Cart
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
Constructors
constructor
**new Cart**()
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
Properties
The details of the billing address associated with the cart.
billing_address_idstringRequiredThe billing address's ID
completed_atDateRequiredThe date with timezone at which the cart was completed.
contextRecord<string, unknown>RequiredThe context of the cart which can include info like IP or user agent.
created_atDateRequiredThe date with timezone at which the resource was created.
The details of the customer the cart belongs to.
customer_idstringRequiredThe customer's ID
deleted_atnull | DateRequiredThe date with timezone at which the resource was deleted.
discount_totalnumberThe total of discount rounded
An array of details of all discounts applied to the cart.
emailstringRequiredThe email associated with the cart
gift_card_tax_totalnumberThe total of gift cards with taxes
gift_card_totalnumberThe total of gift cards
An array of details of all gift cards applied to the cart.
idstringRequiredThe cart's ID
idempotency_keystringRequiredRandomly generated key used to continue the completion of a cart in case of failure.
item_tax_totalnull | numberThe total of items with taxes
The line items added to the cart.
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
object"cart"RequiredDefault: "cart"
The details of the payment associated with the cart.
payment_authorized_atDateRequiredThe date with timezone at which the payment was authorized.
payment_idstringRequiredThe payment's ID if available
The details of the selected payment session in the cart.
The details of all payment sessions created on the cart.
raw_discount_totalnumberThe total of discount
refundable_amountnumberThe amount that can be refunded
refunded_totalnumberThe total amount refunded if the order associated with this cart is returned.
The details of the region associated with the cart.
region_idstringRequiredThe region's ID
The details of the sales channel associated with the cart.
sales_channel_idnull | stringRequiredThe sales channel ID the cart is associated with.
The details of the shipping address associated with the cart.
shipping_address_idstringRequiredThe shipping address's ID
The details of the shipping methods added to the cart.
shipping_tax_totalnull | numberThe total of shipping with taxes
shipping_totalnumberThe total of shipping
subtotalnumberThe subtotal of the cart
tax_totalnull | numberThe total of tax
totalnumberThe total amount of the cart
The cart's type.
Default: default
updated_atDateRequiredThe date with timezone at which the resource was updated.
Methods
afterLoad
Private **afterLoad**(): void
Returns
void
voidvoidbeforeInsert
Private **beforeInsert**(): void
Returns
void
voidvoidWas this section helpful?