Class ByProjectKeyShippingMethodsMatchingLocationRequestBuilder

Constructors

Properties

Methods

Constructors

Properties

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

Methods

  • Retrieves all the active ShippingMethods that can ship to the given Location. ShippingMethods that have a predicate defined are automatically disqualified. If the currency parameter is given, 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 given, exactly one ShippingRate will contain it.

    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 given Location exists. Returns a 200 OK status if the ShippingMethod exists or a 404 Not Found otherwise.

    Parameters

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

    Returns ApiRequest<void>