Constructors

Properties

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

Methods

  • 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>

  • Checks if a Cart exists for a given Query Predicate. Returns a 200 OK status if any Carts match the Query Predicate, or a 404 Not Found otherwise.

    Parameters

    • OptionalmethodArgs: {
          headers?: { [key: string]: string | string[] };
          queryArgs?: { where?: string | string[]; [key: string]: QueryParam };
      }

    Returns ApiRequest<void>

  • If the referenced ShippingMethod in the CartDraft has a predicate that does not match, or if the Shipping Method is not active, an InvalidOperation 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)
    

    Parameters

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

    Returns ApiRequest<Cart>