Class ShopperGiftCertificates<ConfigParameters>

Shopper Gift Certificates

Obtain details about a gift certificate.

Simple example:

  import { ShopperGiftCertificates } from "commerce-sdk-isomorphic";

const clientConfig = {
parameters: {
clientId: "XXXXXX",
organizationId: "XXXX",
shortCode: "XXX",
siteId: "XX"
}
};
const shopperGiftCertificatesClient = new ShopperGiftCertificates(clientConfig);
API Version: 1.0.12
Last Updated:

Type Parameters

Hierarchy

  • ShopperGiftCertificates

Constructors

Methods

Properties

Constructors

Methods

  • Action to retrieve an existing gift certificate.

    If you would like to get a raw Response object use the other getGiftCertificate function.

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{
          body: GiftCertificateRequest;
          headers?: {
              [key: string]: string;
          };
          parameters?: {
              [K in "organizationId" | "siteId"]: (Omit<{
                  organizationId: string;
                  siteId: string;
              }, keyof ConfigParameters> & Partial<{
                  organizationId: string;
                  siteId: string;
              }>)[K]
          };
      }>

      An object containing the options for this method.

    Returns Promise<GiftCertificate>

    A promise of type GiftCertificate.

  • Action to retrieve an existing gift certificate.

    Type Parameters

    • T extends boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{
          body: GiftCertificateRequest;
          headers?: {
              [key: string]: string;
          };
          parameters?: {
              [K in "organizationId" | "siteId"]: (Omit<{
                  organizationId: string;
                  siteId: string;
              }, keyof ConfigParameters> & Partial<{
                  organizationId: string;
                  siteId: string;
              }>)[K]
          };
      }>

      An object containing the options for this method.

    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true
        ? Response
        : GiftCertificate>

    A promise of type Response if rawResponse is true, a promise of type GiftCertificate otherwise.

Properties

clientConfig: ClientConfig<ConfigParameters> & {
    baseUri: string;
}
defaultBaseUri: "https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}" = "https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}"