Arguments

input
UpdateCartSelectedShippingOptionsInput!
required

The input object contains the unique identifier (ID) for the cart and an array of shipping options associated with a store the shipping belongs to.

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.updateCartSelectedShippingOptions({
  input: {
    id: "<CART_ID>",
    shippingOptions: [
      {
        shippingId: "55cfdaa8c7702fb7f57be90",
        store: "rye-dev-store.myshopify.com",
      },
    ],
  },
  fetchBuyerIdentity: false, // Set to true to fetch buyer identity
  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
});