interface GiftCard { /** * Gift card obfuscated code. * * For example: "****-****-****-1234". */ obfuscatedCode?: string; /** Gift card balance. */ balance?: Money; /** Current gift card status. */ status?: Status; /** App ID of the gift card provider, as returned in eCommerce Get Checkout or List Transactions for Single Order. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface Money { /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */ value?: string; /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */ currency?: string; } declare enum Status { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Gift card is active and can be used for purchases. */ VALID = "VALID", /** Gift card expiration date has passed and can no longer be used. */ EXPIRED = "EXPIRED", /** Gift card has been disabled by the merchant and can no longer be used. */ DISABLED = "DISABLED" } interface GetGiftCardRequest { /** Gift card code. */ code: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; /** App ID of the gift card provider. */ appId?: string | null; /** * Gift card PIN. * Required for some providers, like 'Moneris'. */ pin?: string | null; } interface Context { /** Physical location ID. Can be based on the Locations API or an external provider. */ locationId?: string | null; } interface GetGiftCardResponse { /** Retrieved gift card. */ giftCard?: GiftCard; } interface RedeemGiftCardRequest { /** Gift card code. */ code: string; /** Amount to redeem from the gift card. */ amount: Money; /** Order ID to apply the gift card transaction, when applying a gift card after order creation. Order ID can be collected from the eCommerce Order Created webhook or by calling eCommerce Search Orders. */ orderId?: string; /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; /** * Gift card PIN. * Required for some providers, like 'Moneris'. */ pin?: string | null; } interface RedeemGiftCardResponse { /** Gift card transaction ID. */ transactionId?: string; } interface VoidTransactionRequest { /** Gift card transaction ID, as returned from Redeem Gift Card. */ transactionId: string; /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } interface VoidTransactionResponse { } interface MoneyNonNullableFields { value: string; currency: string; } interface GiftCardNonNullableFields { obfuscatedCode: string; balance?: MoneyNonNullableFields; status: Status; appId: string; } interface GetGiftCardResponseNonNullableFields { giftCard?: GiftCardNonNullableFields; } interface RedeemGiftCardResponseNonNullableFields { transactionId: string; } interface GetGiftCardOptions { /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; /** App ID of the gift card provider. */ appId?: string | null; /** * Gift card PIN. * Required for some providers, like 'Moneris'. */ pin?: string | null; } interface RedeemGiftCardOptions { /** Amount to redeem from the gift card. */ amount: Money; /** Order ID to apply the gift card transaction, when applying a gift card after order creation. Order ID can be collected from the eCommerce Order Created webhook or by calling eCommerce Search Orders. */ orderId?: string; /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; /** * Gift card PIN. * Required for some providers, like 'Moneris'. */ pin?: string | null; } interface VoidTransactionOptions { /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } export { type Context as C, type GetGiftCardOptions as G, type Money as M, type RedeemGiftCardOptions as R, Status as S, type VoidTransactionOptions as V, type GetGiftCardResponse as a, type GetGiftCardResponseNonNullableFields as b, type RedeemGiftCardResponse as c, type RedeemGiftCardResponseNonNullableFields as d, type GiftCard as e, type GetGiftCardRequest as f, type RedeemGiftCardRequest as g, type VoidTransactionRequest as h, type VoidTransactionResponse as i };