GitHub

MagentoCart

An object for defining what the cart service requests and retrieves from a magento backend.

API

interface MagentoCart {
  id: string
  email: string
  billing_address: MagentoCartAddress
  shipping_addresses: MagentoShippingAddress[]
  items: MagentoCartItem[]
  available_payment_methods: MagentoCartPaymentMethod[]
  selected_payment_method: MagentoCartPaymentMethod
  applied_coupons: MagentoCartCoupon[]
  prices: {
    grand_total: MagentoMoney;
    subtotal_excluding_tax: MagentoMoney;
    subtotal_including_tax: MagentoMoney;
    subtotal_with_discount_excluding_tax: MagentoMoney;
    applied_taxes: {
        amount: MagentoMoney;
        label: string;
    }[];
    discounts?: {
        amount: MagentoMoney;
        label: string;
    }[];
}
}

Properties

Name Type Description
id string
email string
billing_address MagentoCartAddress
shipping_addresses MagentoShippingAddress[]
items MagentoCartItem[]
available_payment_methods MagentoCartPaymentMethod[]
selected_payment_method MagentoCartPaymentMethod
applied_coupons MagentoCartCoupon[]
prices { grand_total: MagentoMoney; subtotal_excluding_tax: MagentoMoney; subtotal_including_tax: MagentoMoney; subtotal_with_discount_excluding_tax: MagentoMoney; applied_taxes: { amount: MagentoMoney; label: string; }[]; discounts?: { amount: MagentoMoney; label: string; }[]; }