Class ByProjectKeyShippingMethodsMatchingLocationRequestBuilder

Constructors

Properties

Methods

Constructors

Properties

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

Type declaration

  • Optional baseUri?: string
  • executeRequest: executeRequest
  • pathArgs: {
        projectKey: string;
    }
    • projectKey: string

Methods

  • Retrieves all the 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;
          };
      }
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • queryArgs: {
            country: string;
            currency?: string;
            expand?: string | string[];
            sort?: string | string[];
            state?: string;
            [key: string]: QueryParam;
        }
        • [key: string]: QueryParam
        • country: string
        • Optional currency?: string
        • Optional expand?: string | string[]
        • Optional sort?: string | string[]
        • Optional state?: string

    Returns ApiRequest<ShippingMethodPagedQueryResponse>

  • Checks if a 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;
          };
      }
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • queryArgs: {
            country: string;
            currency?: string;
            state?: string;
            [key: string]: QueryParam;
        }
        • [key: string]: QueryParam
        • country: string
        • Optional currency?: string
        • Optional state?: string

    Returns ApiRequest<void>