Order constructor
Order({})
Creates a new instance of Order.
Example:
final order = Order(
amount: 1000,
reference: '123456',
items: [
Item(
name: 'Product 1',
price: 1000,
quantity: 1,
reference: '123456',
),
],
shipping: Shipping(
address: Address(
city: 'City',
number: '123',
state: 'State',
street: 'Street',
zipCode: '12345678',
),
amount: 1000,
pickup: false,
tracking: Tracking(
carrier: 'Carrier',
code: '123',
url: 'https://example.com',
),
),
tax: 100,
);
Implementation
Order({
required this.amount,
required this.reference,
this.description,
this.items,
this.metadata,
this.shipping,
this.tax,
});