GiftCard
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
Constructors
constructor
**new GiftCard**()
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
Properties
balancenumberRequiredThe remaining value on the Gift Card.
codestringRequiredThe unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.
created_atDateRequiredThe date with timezone at which the resource was created.
deleted_atnull | DateRequiredThe date with timezone at which the resource was deleted.
ends_atDateRequiredThe time at which the Gift Card can no longer be used.
idstringRequiredThe gift card's ID
is_disabledbooleanRequiredWhether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.
Default: false
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
The details of the order that the gift card was purchased in.
order_idstringRequiredThe ID of the order that the gift card was purchased in.
The details of the region this gift card is available in.
region_idstringRequiredThe ID of the region this gift card is available in.
tax_ratenull | numberRequiredThe gift card's tax rate that will be applied on calculating totals
updated_atDateRequiredThe date with timezone at which the resource was updated.
valuenumberRequiredThe value that the Gift Card represents.
Methods
beforeInsert
Private **beforeInsert**(): void
Returns
void
voidvoidWas this section helpful?