Files
medusa-store/www/apps/docs/content/references/services/classes/GiftCardTransaction.mdx
github-actions[bot] 39649b3552 chore(docs): Generated References (#5602)
Generated the following references:
- `pricing`
- `product`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-11-10 17:31:02 +00:00

126 lines
2.7 KiB
Plaintext

---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# GiftCardTransaction
Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order.
## Constructors
### constructor
**new GiftCardTransaction**()
Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order.
## Properties
<ParameterTypes parameters={[
{
"name": "amount",
"type": "`number`",
"description": "The amount that was used from the Gift Card.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card",
"type": "[`GiftCard`](GiftCard.mdx)",
"description": "The details of the gift card associated used in this transaction.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "gift_card_id",
"type": "`string`",
"description": "The ID of the Gift Card that was used in the transaction.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The gift card transaction's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "is_taxable",
"type": "`boolean`",
"description": "Whether the transaction is taxable or not.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[`Order`](Order.mdx)",
"description": "The details of the order that the gift card was used for payment.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that the gift card was used for payment.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_rate",
"type": "``null`` \\| `number`",
"description": "The tax rate of the transaction",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />