# Order

Represents an order placed by the user to be reported using `ButtonMerchant.reportOrder(order)`.

- `currencyCode`
  
  The ISO 4217 currency code (default is USD).

#### Declaration

- `customerOrderId`
  
  The customer-facing order id.

#### Declaration

- `customer`
  
  The customer related to the order

#### Declaration

- `init(id:purchaseDate:lineItems:)`
  
  Initializes an order object with the passed parameters.

- id: The order identifier (required).
  - purchaseDate: The date of the purchase for the order.
  - lineItems: A list of the line item details that comprise the order.

#### Declaration

- `Customer`
  
  Represents a customer in the order.

[See more](https://building.usebutton.com/button-merchant-ios/latest/Classes/Order/Customer.html)

#### Declaration

- `LineItem`
  
  Represents a line item in the order.

[See more](https://building.usebutton.com/button-merchant-ios/latest/Classes/Order/LineItem.html)

#### Declaration

### Deprecations

- `init(id:amount:currencyCode:)`
  
  Deprecated.

If you’re migrating to client side order reporting, please use init(id:purchaseDate:lineItems:) instead.

#### Declaration
