Constructors

Properties

args: {
    baseUri?: string;
    executeRequest: executeRequest;
    pathArgs: { projectKey: string; storeKey: string };
}

Methods

  • Queries Carts in a specific Store.

    Parameters

    • OptionalmethodArgs: {
          headers?: { [key: string]: string | string[] };
          queryArgs?: {
              expand?: string | string[];
              limit?: number;
              offset?: number;
              sort?: string | string[];
              where?: string | string[];
              withTotal?: boolean;
              [key: string]: QueryParam;
          };
      }

    Returns ApiRequest<CartPagedQueryResponse>

  • Creates a Cart in the Store specified by storeKey.

    If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match, or if the Shipping Method is not active, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
    
    Specific Error Codes:
    
    - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
    - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
    - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
    - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
    - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
    

    Parameters

    • methodArgs: {
          body: CartDraft;
          headers?: { [key: string]: string | string[] };
          queryArgs?: { expand?: string | string[]; [key: string]: QueryParam };
      }

    Returns ApiRequest<Cart>