GiftCardModule
Query.giftCardBalance: what is left on a card, from its number and PIN.
import { GiftCardModule } from "@evolve-framework/commercetools/gift-card";Serves the Gift card part of the GraphQL API: giftCardBalance.
new GiftCardModule(options: GiftCardModuleOptions)| Option | Type | Description |
|---|---|---|
store | GiftCardStore | Where the cards live. |
GiftCardStore4The fields of store.
| Field | Type | Description |
|---|---|---|
checkBalance | (card: GiftCardCredentials) => Promise<GiftCardBalance> | The balance available to spend. Throws |
reserve | (card: GiftCardCredentials & { holdId: string; centAmount: number; currency: string; }) => Promise<void> | Hold |
capture | (args: { number: string; holdId: string; }) => Promise<void> | Take what |
release | (args: { number: string; holdId: string; centAmount?: number | undefined; }) => Promise<void> | Give back |
Extends AbstractModule<unknown>.
The same module on medusa.

