Arguments

input
CartBuyerIdentityUpdateInput!
required

The input object contains the unique identifier (ID) for the cart and the buyer identity details that need to be associated with the cart.

fetchBuyerIdentity
Boolean

Set to false by default. If set to true, the buyerIdentity field will be fetched in the response.

fetchCartLines
Boolean

Set to false by default. If set to true, the cartLines field will be fetched in the response.

fetchOffer
Boolean

Set to true by default. If set to true, the offers field will be fetched in the response.

fetchShippingMethods
Boolean

Set to true by default. If set to true, the shippingMethods field will be fetched in the response.

Returns

CartResponse.*
CartResponse

Any requested field from the CartResponse object.

Usage

import { RyeClient, Marketplace } from "@rye-api/rye-sdk";

const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");

const result = await ryeClient.updateCartBuyerIdentity({
  input: {
    id: "<CART_ID>",
    buyerIdentity: {
      firstName: "<FIRST_NAME>",
      lastName: "<LAST_NAME>",
      email: "<EMAIL>",
      phone: "<PHONE>",
      address1: "<ADDRESS_1>",
      address2: "<ADDRESS_2>",
      city: "<CITY>",
      provinceCode: "<PROVINCE_CODE>",
      countryCode: "<COUNTRY_CODE>",
      postalCode: "<POSTAL_CODE>",
    },
  },
  fetchOffer: false, // Set to true to fetch offers for each store
  fetchCartLines: false, // Set to true to fetch cart lines
  fetchShippingMethods: false, // Set to true to fetch shipping methods
});