Class: module:models/Basket

module:models/Basket()

new module:models/Basket()

Constructs a new Basket. Document representing a basket.

Source:

Members

(readonly) ChannelTypeEnum :String

Allowed values for the channel_type property.

Type:
  • String
Source:

(readonly) TaxationEnum :String

Allowed values for the taxation property.

Type:
  • String
Source:

(inner) adjusted_merchandize_total_tax :Number

The products tax after discounts applying in purchase currency. Adjusted merchandize prices represent the sum of product prices before services such as shipping have been added, but after adjustment from promotions have been added.

Type:
  • Number
Source:

(inner) adjusted_shipping_total_tax :Number

The tax of all shipping line items of the line item container after shipping adjustments have been applied.

Type:
  • Number
Source:

(inner) agent_basket :Boolean

Is the basket created by an agent?

Type:
  • Boolean
Source:

(inner) basket_id :String

The unique identifier for the basket.

Type:
  • String
Source:

(inner) billing_address :module:models/OrderAddress

The billing address. This property is part of basket checkout information only.

Type:
Source:

(inner) bonus_discount_line_items :Array.<module:models/BonusDiscountLineItem>

The bonus discount line items of the line item container.

Type:
Source:

(inner) c_sessionAddressBook :String

Type:
  • String
Source:

(inner, constant) callcenter

value: "callcenter"

Source:

(inner) channel_type :module:models/Basket.ChannelTypeEnum

The sales channel for the order. This is a read-only attribute that can't be modified by an OCAPI call. For OCAPI, the sales channel is determined based on the client ID and token used for the OCAPI call. Usually, a customer-based authentication sets the channel to Storefront, and an agent-based authentication sets it to CallCenter. Using applications that use other client IDs for OCAPI calls, like Customer Service Center, will set different channel types. To modify the channel type in OCAPI, use a hook. *

Type:
  • module:models/Basket.ChannelTypeEnum
Source:

(inner) coupon_items :Array.<module:models/CouponItem>

The sorted array of coupon items. This array can be empty.

Type:
Source:

(inner) creation_date :Date

Returns the value of attribute 'creationDate'.

Type:
  • Date
Source:

(inner) currency :String

The ISO 4217 mnemonic code of the currency.

Type:
  • String
Source:

(inner) customer_info :module:models/CustomerInfo

The customer information for logged in customers. This property is part of basket checkout information only.

Type:
Source:

(inner, constant) customerservicecenter

value: "customerservicecenter"

Source:

(inner, constant) dss

value: "dss"

Source:

(inner, constant) facebookads

value: "facebookads"

Source:

(inner) gift_certificate_items :Array.<module:models/GiftCertificateItem>

The sorted array of gift certificate line items. This array can be empty.

Type:
Source:

(inner, constant) gross

value: "gross"

Source:

(inner, constant) instagramcommerce

value: "instagramcommerce"

Source:

(inner) inventory_reservation_expiry :Date

Type:
  • Date
Source:

(inner) last_modified :Date

Returns the value of attribute 'lastModified'.

Type:
  • Date
Source:

(inner, constant) marketplace

value: "marketplace"

Source:

(inner) merchandize_total_tax :Number

The products total tax in purchase currency. Merchandize total prices represent the sum of product prices before services such as shipping or adjustment from promotions have been added.

Type:
  • Number
Source:

(inner, constant) net

value: "net"

Source:

(inner) notes :module:models/SimpleLink

The notes for the line item container.

Type:
Source:

(inner, constant) onlinereservation

value: "onlinereservation"

Source:

(inner) order_price_adjustments :Array.<module:models/PriceAdjustment>

The array of order level price adjustments. This array can be empty.

Type:
Source:

(inner) order_total :Number

The total price of the order, including products, shipping and tax. This property is part of basket checkout information only.

Type:
  • Number
Source:

(inner) payment_instruments :Array.<module:models/OrderPaymentInstrument>

The payment instruments list for the order.

Type:
Source:

(inner, constant) pinterest

value: "pinterest"

Source:

(inner) product_items :Array.<module:models/ProductItem>

The sorted array of product items (up to a maximum of 50 items). This array can be empty.

Type:
Source:

(inner) product_sub_total :Number

The total price of all product items after all product discounts. Depending on taxation policy the returned price is net or gross.

Type:
  • Number
Source:

(inner) product_total :Number

The total price of all product items after all product and order discounts. Depending on taxation policy the returned price is net or gross.

Type:
  • Number
Source:

(inner) shipments :Array.<module:models/Shipment>

The array of shipments. This property is part of basket checkout information only.

Type:
Source:

(inner) shipping_items :Array.<module:models/ShippingItem>

The sorted array of shipping items. This array can be empty.

Type:
Source:

(inner) shipping_total :Number

The total shipping price of the order after all shipping discounts. Excludes tax if taxation policy is net. Includes tax if taxation policy is gross. This property is part of basket checkout information only.

Type:
  • Number
Source:

(inner) shipping_total_tax :Number

The tax of all shipping line items of the line item container before shipping adjustments have been applied.

Type:
  • Number
Source:

(inner) source_code :String

Gets the source code assigned to this basket.

Type:
  • String
Source:

(inner, constant) store

value: "store"

Source:

(inner, constant) storefront

value: "storefront"

Source:

(inner, constant) subscriptions

value: "subscriptions"

Source:

(inner) tax_total :Number

The total tax amount of the order. This property is part of basket checkout information only.

Type:
  • Number
Source:

(inner) taxation :module:models/Basket.TaxationEnum

The taxation the line item container is based on.

Type:
  • module:models/Basket.TaxationEnum
Source:

(inner, constant) twitter

value: "twitter"

Source:

Methods

(static) constructFromObject(data, obj) → {module:models/Basket}

Constructs a Basket from a plain JavaScript object, optionally creating a new instance. Copies all relevant properties from data to obj if supplied or a new instance if not.

Parameters:
Name Type Description
data Object

The plain JavaScript object bearing properties of interest.

obj module:models/Basket

Optional instance to populate.

Source:
Returns:

The populated Basket instance.

Type
module:models/Basket