Typescript SDK Type Docs
    Preparing search index...

    Class ByProjectKeyInStoreKeyByStoreKeyCartsByIDRequestBuilder

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

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

    Methods

    • Deletes a Cart in a Store.

      If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
      

      Parameters

      • methodArgs: {
            headers?: { [key: string]: string | string[] };
            queryArgs: {
                dataErasure?: boolean;
                expand?: string | string[];
                version: number;
                [key: string]: QueryParam;
            };
        }

      Returns ApiRequest<Cart>

    • Retrieves a Cart with the provided id in a Store.

      If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
      
      To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
      

      Parameters

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

      Returns ApiRequest<Cart>

    post