Typescript SDK Type Docs
    Preparing search index...

    Class ByProjectKeyShippingMethodsMatchingLocationRequestBuilder

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

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

    Methods

    • Retrieves the active ShippingMethods that can ship to the provided Location.

      The following applies:
      
      - ShippingMethods that have a `predicate` defined are automatically disqualified.
      - If the `currency` parameter is provided, then the ShippingMethods must also have a rate defined in the specified currency.
      - Each ShippingMethod contains at least one ShippingRate with the flag `isMatching` set to `true`.
      - If the `currency` parameter is provided, exactly one ShippingRate will contain it.
      - If a matching ShippingMethod has `isDefault` set to `true`, it is returned as the first item in the array.
      

      Parameters

      • methodArgs: {
            headers?: { [key: string]: string | string[] };
            queryArgs: {
                country: string;
                currency?: string;
                expand?: string | string[];
                sort?: string | string[];
                state?: string;
                [key: string]: QueryParam;
            };
        }

      Returns ApiRequest<ShippingMethodPagedQueryResponse>

    • Checks if an active ShippingMethod that can ship to the provided Location exists. Returns a 200 OK status if the ShippingMethod exists or a Not Found error otherwise.

      Parameters

      • methodArgs: {
            headers?: { [key: string]: string | string[] };
            queryArgs: {
                country: string;
                currency?: string;
                state?: string;
                [key: string]: QueryParam;
            };
        }

      Returns ApiRequest<void>