LineItem

@objcMembers
@objc(LineItem)
final public class LineItem : NSObject, Codable

Represents a line item in the order.

  • The number of unique units represented by this line item (default is 1).

    Declaration

    Swift

    public var quantity: Int
  • Text describing the line item.

    Declaration

    Swift

    public var itemDescription: String?
  • sku

    The Stock Keeping Unit of the line item.

    Declaration

    Swift

    public var sku: String?
  • upc

    The Universal Product Code of the line item.

    Declaration

    Swift

    public var upc: String?
  • The category of the line item. An ordered list of strings, starting with the topmost (or most general) category.

    Declaration

    Swift

    public var category: [String]?
  • A key/value store for strings to specify additional information about a line item.

    Declaration

    Swift

    public var attributes: [String : String]?
  • An array of the line item details that comprise the order

    Declaration

    Swift

    @objc
    public init(id: String, total: Int64)

    Parameters

    id

    The unique identifier for this line item, within the scope of this order. This must be unique across all line-items within the order. We suggest using the SKU or UPC of the product. (required)

    total

    The total price of all items bought in a particular line item. (required)