Order
@objcMembers
@objc(BTNOrder)
final public class Order : NSObject, Codable
Represents an order placed by the user to be reported using ButtonMerchant.reportOrder(order)
.
-
The ISO 4217 currency code (default is USD).
Declaration
Swift
public var currencyCode: String
-
The customer-facing order id.
Declaration
Swift
public var customerOrderId: String?
-
The customer related to the order
Declaration
Swift
public var customer: Customer?
-
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
Swift
@objc public init(id: String, purchaseDate: Date, lineItems: [LineItem])
-
Represents a customer in the order.
See moreDeclaration
Swift
@objcMembers @objc(BTNCustomer) final public class Customer : NSObject, Codable
-
Represents a line item in the order.
See moreDeclaration
Swift
@objcMembers @objc(LineItem) final public class LineItem : NSObject, Codable
-
Deprecated.
If you’re migrating to client side order reporting, please use init(id:purchaseDate:lineItems:) instead.
Declaration
Swift
@available(*, deprecated, message: "Use init(id:purchaseDate:lineItems:﹚ instead") @objc public init(id: String, amount: Int64 = 0, currencyCode: String = "USD")