ECommerceOrder class

This class contains order information.

Instance methods

init(identifier:cartItems:)

Initializes the instance of the ECommerceOrder class with order information.

init(identifier:cartItems:payload:)

Initializes the instance of the ECommerceOrder class with order information.

Properties

identifier

Order ID. Allowed size: Up to 100 characters.

cartItems

A list of items in the cart.

payload

Additional information about the order.

Method descriptions

init(identifier:cartItems:)

init(identifier: String, cartItems: [ECommerceCartItem])

Initializes the instance of the ECommerceOrder class with order information.

Parameters:

identifier

Order ID. Allowed size: Up to 100 characters.

cartItems

A list of items in the cart.

Returns:

The ECommerceOrder class instance.

init(identifier:cartItems:payload:)

init(identifier: String, cartItems: [ECommerceCartItem], payload: [String: String]?)

Initializes the instance of the ECommerceOrder class with order information.

Parameters:

identifier

Order ID. Allowed size: Up to 100 characters.

cartItems

A list of items in the cart.

payload

Additional information about the order.

Returns:

The ECommerceOrder class instance.

Property descriptions

identifier

var identifier: String { get }

Order ID. Allowed size: Up to 100 characters.

cartItems

var cartItems: [ECommerceCartItem] { get }

A list of items in the cart.

payload

var payload: [String: String]? { get }

Additional information about the order. Acceptable sizes:

  • The total payload size: Up to 20 KB.
  • The key size: Up to 100 characters.
  • The value size: Up to 1000 characters.