Alokai

removeGiftCertificateFromBasket

Deletes a gift certificate item from an existing basket.

This method communicates with the removeGiftCertificateFromBasket endpoint of the Vue Storefront API Middleware. In turn, it receives data from the removeGiftCertificateItemFromBasket or the Delete a gift certificate item from a basket endpoints exposed by SCAPI / OCAPI depending on the middleware configuration.

Signature

export declare function removeGiftCertificateFromBasket(
	props: BasketGiftCertificateRemoveParams & {
    basketId?: string;
}
): Promise<import("commerce-sdk/dist/checkout/checkout").ShopperBaskets.Basket>;

Parameters

NameRequiredTypeDescription
propsRequiredBasketGiftCertificateRemoveParams & { basketId?: string; }Parameter object which can be used with this method. Refer to its type definition to learn about possible properties.

Returns

Returns a representation of a Basket object.

Referenced Types

  • BasketGiftCertificateRemoveParams
  • ShopperBaskets.Basket

Examples

Delete a gift certificate item from an existing basket. by giftCertificateItemId.

import { sdk } from '~/sdk.config.ts';

const basket = await sdk.commerce.removeGiftCertificateFromBasket({ giftCertificateItemId: 'testItemId' });

On this page