docs: update override price selection strategy documentation (#5438)

* docs: update override price selection strategy documentation

* fix eslint errors
This commit is contained in:
Shahed Nasser
2023-10-20 20:17:45 +03:00
committed by GitHub
parent 8bc902fb0f
commit 1a10822cae
540 changed files with 244366 additions and 18865 deletions
+22 -2
View File
@@ -11,11 +11,31 @@ module.exports = {
tsconfig: path.join(pathPrefix, "packages/medusa/tsconfig.json"),
name: "Entities Reference",
indexTitle: "Entities Reference",
entryDocument: "index.md",
entryDocument: "_index.mdx",
hideInPageTOC: true,
hideBreadcrumbs: true,
plugin: [...globalTypedocOptions.plugin, "typedoc-plugin-frontmatter"],
plugin: ["typedoc-plugin-markdown-medusa", "typedoc-plugin-frontmatter"],
frontmatterData: {
displayed_sidebar: "entitiesSidebar",
},
formatting: {
"*": {
showCommentsAsHeader: true,
sections: {
member_sources_definedIn: false,
reflection_hierarchy: false,
},
parameterStyle: "component",
parameterComponent: "ParameterTypes",
mdxImports: [
`import ParameterTypes from "@site/src/components/ParameterTypes"`,
],
reflectionGroups: {
Constructors: false,
Methods: false,
},
},
},
objectLiteralTypeDeclarationStyle: "component",
mdxOutput: true,
}
@@ -12,7 +12,7 @@ module.exports = {
tsconfig: path.join(pathPrefix, "packages/medusa-js/tsconfig.json"),
name: "JS Client Reference",
indexTitle: "JS Client Reference",
entryDocument: "index.md",
entryDocument: "_index.mdx",
hideInPageTOC: true,
hideBreadcrumbs: true,
plugin: [
@@ -86,7 +86,6 @@ module.exports = ({
"typedoc-plugin-rename-defaults",
"typedoc-plugin-frontmatter",
],
hideMembersSymbol: true,
formatting,
allReflectionsHaveOwnDocument: true,
objectLiteralTypeDeclarationStyle: "component",
@@ -71,7 +71,7 @@ export function load(app: Application) {
help: "[Markdown Plugin] Do not add special symbols for class members.",
name: "hideMembersSymbol",
type: ParameterType.Boolean,
defaultValue: false,
defaultValue: true,
})
app.options.addDeclaration({
@@ -21,7 +21,7 @@ You can also create a custom batch job or overwrite Medusas batch jobs.
### BatchJob Entity Overview
A batch job is stored in the database as a [BatchJob](../../references/entities/classes/BatchJob) entity. Some of its important attributes are:
A batch job is stored in the database as a [BatchJob](../../references/entities/classes/BatchJob.mdx) entity. Some of its important attributes are:
- `status`: A string that determines the current status of the Batch Job.
- `context`: An object that can be used to store configurations related to the batch job. For example, you can use it to store listing configurations such as the limit or offset of the list to be retrieved during the processing of the batch job.
@@ -1948,7 +1948,7 @@ Triggered when a payment is created.
</td>
<td>
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -1966,7 +1966,7 @@ Triggered when a payment is updated.
</td>
<td>
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -1984,7 +1984,7 @@ Triggered when a payment is captured.
</td>
<td>
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2002,7 +2002,7 @@ Triggered when the capturing of a payment fails.
</td>
<td>
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
In addition, an error object is passed within the same object as the Payment Processor:
@@ -2034,7 +2034,7 @@ Triggered when a refund of a payment is created.
</td>
<td>
The entire refund passed as an object. You can refer to the [Refund entity](../../references/entities/classes/Refund.md) for an idea of what fields to expect.
The entire refund passed as an object. You can refer to the [Refund entity](../../references/entities/classes/Refund.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2052,7 +2052,7 @@ Triggered when a payment's refund fails.
</td>
<td>
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2095,7 +2095,7 @@ Triggered when a payment collection is created.
</td>
<td>
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2113,7 +2113,7 @@ Triggered when a payment collection is update.
</td>
<td>
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2131,7 +2131,7 @@ Triggered when a payment collection is deleted.
</td>
<td>
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2149,7 +2149,7 @@ Triggered when a payment collection is either marked authorized or its payment s
</td>
<td>
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
</td>
</tr>
@@ -2216,7 +2216,7 @@ Triggered when a product and data associated with it (options, variant orders, e
</td>
<td>
The entire product passed as an object. You can refer to the [Product entity](../../references/entities/classes/Product.md) for an idea of what fields to expect.
The entire product passed as an object. You can refer to the [Product entity](../../references/entities/classes/Product.mdx) for an idea of what fields to expect.
In one case, when the `/admin/products/{id}` API Route is used to update the product, the payload is an object of the following format:
@@ -58,7 +58,7 @@ A Notification also represents a resent notification. So, when a notification is
### Notification Entity Overview
The two most important properties in the [`Notification`](../../references/entities/classes/Notification.md) entity are the `to` and `data` properties.
The two most important properties in the [`Notification`](../../references/entities/classes/Notification.mdx) entity are the `to` and `data` properties.
The `to` property is a string that represents the receiver of the Notification. For example, if the Notification was sent to an email address, the `to` property holds the email address the Notification was sent to.
@@ -37,7 +37,7 @@ There are other resources that provide steps specific to a strategy type:
- [How to override the Cart Completion Strategy](../../modules/carts-and-checkout/backend/cart-completion-strategy.md)
- [How to override the Tax Calculation Strategy](../../modules/taxes/backend/tax-calculation-strategy.md)
- [How to override the Price Selection Strategy](../../modules/price-lists/backend/override-price-selection-strategy.md)
- [How to override the Price Selection Strategy](../../modules/price-lists/backend/override-price-selection-strategy.mdx)
- [How to override a Batch Job Strategy](../batch-jobs/customize-import.md)
---
@@ -262,7 +262,7 @@ It accepts four parameters:
1. If the resource the fulfillment is being created for is a claim, the `is_claim` property in the object will be `true`.
2. If the resource the fulfillment is being created for is a swap, the `is_swap` property in the object will be `true`.
3. Otherwise, the resource is an order.
4. The fourth parameter is an object of type [Fulfillment](../../../references/entities/classes/Fulfillment.md), which is the fulfillment being created.
4. The fourth parameter is an object of type [Fulfillment](../../../references/entities/classes/Fulfillment.mdx), which is the fulfillment being created.
You can use the `data` property in the shipping method (first parameter) to access the data specific to the shipping option. This is based on your implementation of previous methods.
@@ -328,7 +328,7 @@ This method receives three parameters:
1. If the price is being calculated for the list of shipping options available for a cart, it's the `data` object of the shipping option.
2. If the price is being calculated when the shipping method is being created, it's the data returned by the [validateFulfillmentData](#validatefulfillmentdata) method used during the shipping method creation.
3. If the price is being calculated while calculating the cart's totals, it will be the `data` object of the cart's shipping method.
3. The third parameter is either the [Cart](../../../references/entities/classes/Cart.md) or the [Order](../../../references/entities/classes/Order.md) object.
3. The third parameter is either the [Cart](../../../references/entities/classes/Cart.mdx) or the [Order](../../../references/entities/classes/Order.mdx) object.
The method is expected to return a number that will be used to set the price of the shipping method or option, based on the context it's used in.
@@ -368,7 +368,7 @@ Fulfillment providers can also be used to return products. A shipping option can
This method is used when the admin [creates a return request](https://docs.medusajs.com/api/admin#orders_postordersorderreturns) for an order, [creates a swap](https://docs.medusajs.com/api/admin#orders_postordersorderswaps) for an order, or when the customer [creates a return of their order](https://docs.medusajs.com/api/store#returns_postreturns). The fulfillment is created automatically for the order return.
The method receives as a parameter the [Return](../../../references/entities/classes/Return.md) object, which is the return that the fulfillment is being created for.
The method receives as a parameter the [Return](../../../references/entities/classes/Return.mdx) object, which is the return that the fulfillment is being created for.
The method must return an object that will be used to set the value of the `shipping_data` attribute of the return being created.
@@ -138,7 +138,7 @@ class MyPaymentProcessor extends AbstractPaymentProcessor {
Record<string, unknown> |
PaymentProcessorError
> {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
}
@@ -440,7 +440,7 @@ An example of a minimal implementation of `updatePaymentData` that returns the `
```ts
import {
PaymentProcessorError
PaymentProcessorError,
} from "@medusajs/medusa"
// ...
@@ -26,7 +26,7 @@ A cart is represented by the `Cart` entity. Some of the `Cart` entitys attrib
- `completed_at`: the date the cart was completed. A completed cart means that it has been used for its main purpose. For example, if the cart is used to place an order, then a completed cart means that the order was placed.
- `payment_authorized_at`: the date a payment was authorized.
There are other important attributes discussed in later sections. Check out the [full Cart entity in the entities reference](../../references/entities/classes/Cart.md).
There are other important attributes discussed in later sections. Check out the [full Cart entity in the entities reference](../../references/entities/classes/Cart.mdx).
---
@@ -58,7 +58,7 @@ Its important to enable a payment processor in a region, or else the payment
### PaymentProvider Entity Overview
The [`PaymentProvider`](../../references/entities/classes/PaymentProvider.md) entity only has 2 attributes: `is_installed` which is a boolean value indicating whether the Payment Processor is installed; and `id` which is the unique identifier that you define in the Payment Processor service.
The [`PaymentProvider`](../../references/entities/classes/PaymentProvider.mdx) entity only has 2 attributes: `is_installed` which is a boolean value indicating whether the Payment Processor is installed; and `id` which is the unique identifier that you define in the Payment Processor service.
---
@@ -82,7 +82,7 @@ Among the Payment Sessions available only one will be selected based on the cust
### PaymentSession Entity Overview
The [`PaymentSession`](../../references/entities/classes/PaymentSession.md) entity belongs to a `Cart`. This is the customers cart that was used for checkout which lead to the creation of the Payment Session.
The [`PaymentSession`](../../references/entities/classes/PaymentSession.mdx) entity belongs to a `Cart`. This is the customers cart that was used for checkout which lead to the creation of the Payment Session.
The `PaymentSession` instance also belongs to a `PaymentProvider` instance. This is the Payment Processor that was used to create the Payment Session and that controls it for further actions like authorizing the payment.
@@ -116,7 +116,7 @@ When the store operator then chooses to capture the order from the Medusa Admin,
### Payment Entity Overview
The [`Payment`](../../references/entities/classes/Payment.md) entity belongs to the `Cart` that it was originally created from when the customers payment was authorized. It also belongs to an `Order` once its placed. Additionally, it belongs to a `PaymentProvider` which is the payment processor that the customer chose on checkout.
The [`Payment`](../../references/entities/classes/Payment.mdx) entity belongs to the `Cart` that it was originally created from when the customers payment was authorized. It also belongs to an `Order` once its placed. Additionally, it belongs to a `PaymentProvider` which is the payment processor that the customer chose on checkout.
In case a `Swap` is created for an order, `Payment` will be associated with that swap to handle payment operations related to it.
@@ -49,7 +49,7 @@ Once the Fulfillment Provider is added to the backend, the store operator will b
### FulfillmentProvider Entity Overview
The [`FulfillmentProvider`](../../references/entities/classes/FulfillmentProvider.md) entity only has 2 attributes: `is_installed` to indicate if the fulfillment provider is installed and its value is a boolean; and `id` which is the unique identifier that you define in the Fulfillment Provider Service.
The [`FulfillmentProvider`](../../references/entities/classes/FulfillmentProvider.mdx) entity only has 2 attributes: `is_installed` to indicate if the fulfillment provider is installed and its value is a boolean; and `id` which is the unique identifier that you define in the Fulfillment Provider Service.
---
@@ -73,7 +73,7 @@ For example, shipping heavy items might be more expensive than others, which wou
### ShippingProfile Entity Overview
The [`ShippingProfile`](../../references/entities/classes/ShippingProfile.md) entity can have a set of `Product` instances. These would be the products the shipping profile is providing shipping options for.
The [`ShippingProfile`](../../references/entities/classes/ShippingProfile.mdx) entity can have a set of `Product` instances. These would be the products the shipping profile is providing shipping options for.
The `ShippingProfile` has a `type` attribute that can be `default`, `gift_card`, or `custom`.
@@ -101,7 +101,7 @@ Think of a shipping option as a template defined by the admin that indicates wha
### ShippingOption Entity Overview
The [`ShippingOption`](../../references/entities/classes/ShippingOption.md) entity belongs to the `ShippingProfile` entity.
The [`ShippingOption`](../../references/entities/classes/ShippingOption.mdx) entity belongs to the `ShippingProfile` entity.
The `ShippingOption` entity also belongs to a `FulfillmentProvider`. This can be either a custom third-party provider or one of Medusas default fulfillment providers.
@@ -139,7 +139,7 @@ This separation allows for developers to implement the custom integration with t
A lot of the shipping methods attributes are similar to the shipping options attribute.
The [`ShippingMethod`](../../references/entities/classes/ShippingMethod.md) entity belongs to a `ShippingOption`.
The [`ShippingMethod`](../../references/entities/classes/ShippingMethod.mdx) entity belongs to a `ShippingOption`.
Similar to the `data` attribute explained for the `ShippingOption` entity, a `ShippingMethod` has a similar `data` attribute that includes all the data to be sent to the fulfillment provider when fulfilling the order.
@@ -24,7 +24,7 @@ The customer groups feature can be used in a variety of use cases including:
## CustomerGroup Entity Overview
A customer group is stored in the database as a [CustomerGroup](../../references/entities/classes/CustomerGroup.md) entity. This entity has two attributes other than the `id`: `name` and `metadata`.
A customer group is stored in the database as a [CustomerGroup](../../references/entities/classes/CustomerGroup.mdx) entity. This entity has two attributes other than the `id`: `name` and `metadata`.
Similar to all entities in Medusa, you can use the `metadata` object attribute to store any custom data you want. For example, you can add some flag or tag to the customer group for a custom use case:
@@ -32,7 +32,7 @@ Discounts can be used in many use cases including:
## Discount Entity Overview
A discount is represented by the [`Discount`](../../references/entities/classes/Discount.md) entity. Some of its important attributes are:
A discount is represented by the [`Discount`](../../references/entities/classes/Discount.mdx) entity. Some of its important attributes are:
- `code` is a unique code that you specify when you create the discount. Customers use this code to apply the discount during checkout. The code can only include upper-case letters and numbers.
- `rule_id` is the ID of the rule of this discount. The `rule` attribute is the expanded object of the `DiscountRule` entity. You can use the `rule` attribute to get details regarding the discount type. You can learn more about this in the [`DiscountRule` entity overview](#discountrule-entity-overview) later.
@@ -54,7 +54,7 @@ The `is_dynamic` attribute in the `Discount` entity is a boolean value that dete
## DiscountRule Entity Overview
Every `Discount` entity belongs to a [`DiscountRule`](../../references/entities/classes/DiscountRule.md) entity. `DiscountRule` includes details such as the type of discount, the amount to be discounted, and more.
Every `Discount` entity belongs to a [`DiscountRule`](../../references/entities/classes/DiscountRule.mdx) entity. `DiscountRule` includes details such as the type of discount, the amount to be discounted, and more.
Some of the `DiscountRule` entitys important attributes are:
@@ -71,7 +71,7 @@ Some of the `DiscountRule` entitys important attributes are:
A discount can optionally have discount conditions. Discount conditions are used to further add limitations on when the discount can be applied.
A [`DiscountCondition`](../../references/entities/classes/DiscountCondition.md) belongs to a `DiscountRule` entity. The `discount_rule_id` attribute indicates the ID of the `DiscountRule` it belongs to.
A [`DiscountCondition`](../../references/entities/classes/DiscountCondition.mdx) belongs to a `DiscountRule` entity. The `discount_rule_id` attribute indicates the ID of the `DiscountRule` it belongs to.
Discount conditions have an attribute `type` that indicates the conditions type. Its value must be one of the following:
@@ -92,11 +92,11 @@ Discount conditions also have an attribute `operator` that indicates how the con
Based on the value of `type`, one of the following relations can be used to retrieve the conditions items:
- `products` is an array of products that this condition applies to if the conditions `type` is `products`. Each item of the array would be a [`DiscountConditionProduct`](../../references/entities/classes/DiscountConditionProduct.md).
- `product_types` is an array of product types that this condition applies to if the conditions `type` is `product_types`. Each item of the array would be a [`DiscountConditionProductType`](../../references/entities/classes/DiscountConditionProductType.md).
- `product_collections` is an array of product collections that this condition applies to if the conditions `type` is `product_collections`. Each item of the array would be a [`DiscountConditionProductCollection`](../../references/entities/classes/DiscountConditionProductCollection.md).
- `product_tags` is an array of product tags that this condition applies to if the conditions `type` is `product_tags`. Each item of the array would be a [`DiscountConditionProductTag`](../../references/entities/classes/DiscountConditionProductTag.md).
- `customer_groups` is an array of customer groups that this condition applies to if the conditions `type` is `customer_groups`. Each item of the array would be a [`DiscountConditionCustomerGroup`](../../references/entities/classes/DiscountConditionCustomerGroup.md).
- `products` is an array of products that this condition applies to if the conditions `type` is `products`. Each item of the array would be a [`DiscountConditionProduct`](../../references/entities/classes/DiscountConditionProduct.mdx).
- `product_types` is an array of product types that this condition applies to if the conditions `type` is `product_types`. Each item of the array would be a [`DiscountConditionProductType`](../../references/entities/classes/DiscountConditionProductType.mdx).
- `product_collections` is an array of product collections that this condition applies to if the conditions `type` is `product_collections`. Each item of the array would be a [`DiscountConditionProductCollection`](../../references/entities/classes/DiscountConditionProductCollection.mdx).
- `product_tags` is an array of product tags that this condition applies to if the conditions `type` is `product_tags`. Each item of the array would be a [`DiscountConditionProductTag`](../../references/entities/classes/DiscountConditionProductTag.mdx).
- `customer_groups` is an array of customer groups that this condition applies to if the conditions `type` is `customer_groups`. Each item of the array would be a [`DiscountConditionCustomerGroup`](../../references/entities/classes/DiscountConditionCustomerGroup.mdx).
![Discounts Architecture](https://res.cloudinary.com/dza7lstvk/image/upload/v1678372360/Medusa%20Docs/Diagrams/discounts_ioivrl.png)
@@ -34,7 +34,7 @@ As custom gift cards can be used once theyre created, theyre also represen
## GiftCard Entity Overview
Some of the [GiftCard](../../references/entities/classes/GiftCard.md) entitys attributes are:
Some of the [GiftCard](../../references/entities/classes/GiftCard.mdx) entitys attributes are:
- `code`: a unique string of random characters. This is the code that the customer can use during their checkout to redeem the gift card.
- `value`: The amount of the gift card. This is the amount the customer purchased, or was gifted in the case of custom gift cards.
@@ -208,7 +208,7 @@ curl -L -X GET '<BACKEND_URL>/admin/orders?status[]=completed' \
:::note
You can check available order statuses [here](../../../references/entities/enums/OrderStatus).
You can check available order statuses [here](../../../references/entities/enums/OrderStatus.mdx).
:::
@@ -19,12 +19,12 @@ The Medusa core provides the necessary implementation and functionalities that a
A claim is represented by the `ClaimOrder` entity. Some of its attributes include:
- `type`: a string indicating the type of the claim. Its value can be either `refund` or `replace`.
- `payment_status`: a string indicating the status of the claims payment. Its possible values are indicated by the [ClaimPaymentStatus enum](../../references/entities/enums/ClaimPaymentStatus.md). This attribute is useful to check the status of the payment if the claims type is `refund`.
- `fulfillment_status`: a string indicating the status of the claims fulfillment. Its possible values are indicated by the [ClaimFulfillmentStatus enum](../../references/entities/enums/ClaimFulfillmentStatus.md). This attribute is useful to check the status of the fulfillment if the claims type is `replace`.
- `payment_status`: a string indicating the status of the claims payment. Its possible values are indicated by the [ClaimPaymentStatus enum](../../references/entities/enums/ClaimPaymentStatus.mdx). This attribute is useful to check the status of the payment if the claims type is `refund`.
- `fulfillment_status`: a string indicating the status of the claims fulfillment. Its possible values are indicated by the [ClaimFulfillmentStatus enum](../../references/entities/enums/ClaimFulfillmentStatus.mdx). This attribute is useful to check the status of the fulfillment if the claims type is `replace`.
- `refund_amount`: an integer used to indicate the amount that should be refunded to the customer. This is only useful if the claims type is `refund`.
- `canceled_at`: a date indicating when the claim was canceled.
There are other important attributes discussed in later sections. Check out the [full ClaimOrder entity in the entities reference](../../references/entities/classes/ClaimOrder.md).
There are other important attributes discussed in later sections. Check out the [full ClaimOrder entity in the entities reference](../../references/entities/classes/ClaimOrder.mdx).
---
@@ -26,7 +26,7 @@ Some of the `DraftOrder`'s attributes include:
- `completed_at`: a date indicating when the draft order was completed.
- `no_notification_order`: a boolean indicating whether the customer should receive notifications when the order is updated.
There are other important attributes discussed in later sections. Check out the [full DraftOrder entity in the entities reference](../../references/entities/classes/DraftOrder.md).
There are other important attributes discussed in later sections. Check out the [full DraftOrder entity in the entities reference](../../references/entities/classes/DraftOrder.mdx).
---
@@ -27,7 +27,7 @@ Some of the `Fulfillment` entitys attributes include:
- `shipped_at`: a date indicating when the fulfillment was shipped.
- `canceled_at`: a date indicating when the fulfillment was canceled.
There are other important attributes discussed in later sections. Check out the [full Fulfillment entity in the entities reference](../../references/entities/classes/Fulfillment.md).
There are other important attributes discussed in later sections. Check out the [full Fulfillment entity in the entities reference](../../references/entities/classes/Fulfillment.mdx).
---
@@ -37,7 +37,7 @@ Some of the attributes of the `Order` entity include:
- `no_notification`: a boolean value indicating whether the customer should receive notifications when the order is updated.
- `external_id`: a string indicating an ID of the order in an external system. This can be useful if youre migrating your orders from another commerce system or youre linking your order to a third-party service.
There are other important attributes discussed in later sections. Check out the full [Order entity in the entities reference](../../references/entities/classes/Order.md).
There are other important attributes discussed in later sections. Check out the full [Order entity in the entities reference](../../references/entities/classes/Order.mdx).
---
@@ -145,7 +145,7 @@ Some of the `OrderEdit`'s other attributes include:
- `confirmed_by`: a string that typically should hold the ID of who confirmed the order edit. Similar to the `created_by` attribute, there are no restrictions on what value this attribute can actually hold.
- `declined_by`: a string that typically should hold the ID of who declined the order edit. Similar to the `created_by` attribute, there are no restrictions on what value this attribute can actually hold.
There are other attributes explained in other sections. You can also check out the full [OrderEdit entity in the entities reference](../../references/entities/classes/OrderEdit.md).
There are other attributes explained in other sections. You can also check out the full [OrderEdit entity in the entities reference](../../references/entities/classes/OrderEdit.mdx).
### Item Changes
@@ -28,7 +28,7 @@ Some of the `Return` entitys attributes include:
- `no_notification`: a boolean value indicating whether the customer should receive notification updates when there are any changes in the return.
- `shipping_data`: this is a JSONB object that can hold any data related to the fulfillment associated with the return.
There are other important attributes discussed in later sections. Check out the [full Return entity in the entities reference](../../references/entities/classes/Return.md).
There are other important attributes discussed in later sections. Check out the [full Return entity in the entities reference](../../references/entities/classes/Return.mdx).
---
@@ -18,8 +18,8 @@ The Medusa core provides the necessary implementation and functionalities that a
Some of the attributes of the `Swap` entity include:
- `fulfillment_status`: a string indicating the status of the swaps fulfillment. Its possible values indicated by the [SwapFulfillmentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.md) can determine whether all items have been fulfilled, shipped, or canceled.
- `payment_status`: a string indicating the status of the swaps payment. Its possible values indicated by the [SwapPaymentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.md) can determine whether the payment of the swap has been captured or refunded.
- `fulfillment_status`: a string indicating the status of the swaps fulfillment. Its possible values indicated by the [SwapFulfillmentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.mdx) can determine whether all items have been fulfilled, shipped, or canceled.
- `payment_status`: a string indicating the status of the swaps payment. Its possible values indicated by the [SwapPaymentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.mdx) can determine whether the payment of the swap has been captured or refunded.
- `difference_due`: An integer indicating the difference amount between the orders original total and the new total imposed by the swap.
- If the value of `difference_due` is negative, that means the customer should be refunded.
- If its positive, that means the customer must authorize additional payment.
@@ -29,7 +29,7 @@ Some of the attributes of the `Swap` entity include:
- `no_notification`: a boolean value indicating whether the customer should receive notifications when the order is updated.
- `allow_backorder`: a boolean value indicating whether a swap can be created and completed with items that are out of stock.
There are other important attributes discussed in later sections. Check out the full [Swap entity in the entities reference](../../references/entities/classes/Swap.md).
There are other important attributes discussed in later sections. Check out the full [Swap entity in the entities reference](../../references/entities/classes/Swap.mdx).
---
@@ -1,128 +0,0 @@
---
description: 'Learn how to override the price selection strategy. The price selection strategy is used to determine the best price based on a specific context.'
addHowToData: true
---
# How to Override Price Selection Strategy
In this document, youll learn how to override Medusas price selection strategy to create a custom pricing strategy.
:::note
If youre interested in learning what a price selection strategy is and how it works, check out [this documentation](../price-selection-strategy.md) instead.
:::
## 1. Create Class
Create a TypeScript or JavaScript file in `src/strategies` of your Medusa backend project with a class that extends the `AbstractPriceSelectionStrategy` class:
```ts title=src/strategies/price.ts
import {
AbstractPriceSelectionStrategy,
IPriceSelectionStrategy,
PriceSelectionContext,
PriceSelectionResult,
} from "@medusajs/medusa"
import { EntityManager } from "typeorm"
export default class MyStrategy extends
AbstractPriceSelectionStrategy {
withTransaction(
manager: EntityManager
): IPriceSelectionStrategy {
if (!manager) {
return this
}
return new MyStrategy()
}
async calculateVariantPrice(
variant_id: string,
context: PriceSelectionContext
): Promise<PriceSelectionResult> {
// TODO
}
}
```
You can use services or repositories in the strategy by adding them to the constructor and updating the parameters passed to the `MyStrategy` constructor in `withTransaction`. For example:
```ts
import {
AbstractPriceSelectionStrategy,
CustomerService,
IPriceSelectionStrategy,
PriceSelectionContext,
PriceSelectionResult,
} from "@medusajs/medusa"
export default class MyStrategy extends
AbstractPriceSelectionStrategy {
private customerService: CustomerService
constructor({
customerService,
}) {
super()
this.customerService = customerService
}
withTransaction(
manager: EntityManager
): IPriceSelectionStrategy {
if (!manager) {
return this
}
return new MyStrategy({
customerService: this.customerService,
})
}
// ...
}
```
---
## 2. Implement calculateVariantPrice
Implement the price selection strategy you want inside the `calculateVariantPrice` method.
This method accepts the variant ID as a first parameter and the [context](../price-selection-strategy.md#context-object) object as a second parameter.
This method must return an object having the following fields:
```ts noReport
{
originalPrice, // number | null
calculatedPrice, // number | null
prices // MoneyAmount[]
}
```
You can learn more about optional properties and the meaning behind every property [here](../price-selection-strategy.md#calculatevariantprice-method).
---
## 3. Run Build Command
In your terminal, run the build command to transpile the files in the `src` directory into the `dist` directory:
```bash npm2yarn
npm run build
```
---
## Test it Out
Run your backend to test it out:
```bash npm2yarn
npx medusa develop
```
Then, try out your strategy using any of the [Products](https://docs.medusajs.com/api/store#products) or [Carts](https://docs.medusajs.com/api/store#carts) API Routes which include retrieving product variants and line items respectively. You should then see the prices in the response based on your implemented strategy.
@@ -0,0 +1,295 @@
---
description: 'Learn how to override the price selection strategy. The price selection strategy is used to determine the best price based on a specific context.'
addHowToData: true
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# How to Override Price Selection Strategy
In this document, youll learn how to override Medusas price selection strategy to create a custom pricing strategy.
:::note
If youre interested in learning what a price selection strategy is and how it works, check out [this documentation](../price-selection-strategy.md) instead.
:::
## 1. Create Class
Create a TypeScript or JavaScript file in `src/strategies` of your Medusa backend project with a class that extends the `AbstractPriceSelectionStrategy` class:
```ts title=src/strategies/price.ts
import {
AbstractPriceSelectionStrategy,
PriceSelectionContext,
PriceSelectionResult,
} from "@medusajs/medusa"
import {
TaxServiceRate,
} from "@medusajs/medusa/dist/types/tax-service"
export default class MyStrategy extends
AbstractPriceSelectionStrategy {
async calculateVariantPrice(
data: {
variantId: string;
taxRates: TaxServiceRate[];
quantity?: number
}[],
context: PriceSelectionContext
): Promise<Map<string, PriceSelectionResult>> {
throw new Error("Method not implemented.")
}
}
```
### Resolve Resources
You can resolve resources like services or repositories using [dependency injection](../../../development/fundamentals/dependency-injection.md).
For example:
```ts title=src/strategies/price.ts
import {
AbstractPriceSelectionStrategy,
CustomerService,
PriceSelectionContext,
PriceSelectionResult,
} from "@medusajs/medusa"
import {
TaxServiceRate,
} from "@medusajs/medusa/dist/types/tax-service"
type InjectedDependencies = {
customerService: CustomerService
}
export default class MyStrategy extends
AbstractPriceSelectionStrategy {
protected customerService_: CustomerService
constructor(container: InjectedDependencies) {
super(container)
this.customerService_ = container.customerService
}
// ...
}
```
---
## 2. Implement calculateVariantPrice
In this method, you can implement your price selection strategy.
### Parameters
You can learn more about optional properties and the meaning behind every property [here](../price-selection-strategy.md#calculatevariantprice-method).
<ParameterTypes parameters={[
{
name: "data",
type: "object[]",
description: "Holds the data necessary to perform the price selection for each variant ID.",
optional: false,
children: [
{
name: "variantId",
type: "string",
description: "The ID of the variant to retrieve the prices for.",
optional: false,
},
{
name: "taxRates",
type: "object[]",
description: "The tax rates to be applied. This is only used for [Tax-Inclusive Pricing](../../taxes/inclusive-pricing.md).",
optional: false,
children: [
{
name: "rate",
type: "number | null",
description: "The tax rate",
optional: true
},
{
name: "name",
type: "string",
description: "The name of the tax rate",
optional: false
},
{
name: "code",
type: "string | null",
description: "The code of the tax rate",
optional: false
}
],
},
{
name: "quantity",
type: "number",
description: "The quantity of the variant",
optional: true
}
],
},
{
name: "context",
type: "[PriceSelectionContext](../price-selection-strategy.md#context-object)",
description: "The context of the price selection",
optional: false,
children: [
{
name: "cart_id",
type: "string",
description: "The ID of the customers cart. This is used when the prices are being retrieved for the variant of a line item, as it is used to determine the current region and currency code of the context.",
optional: true
},
{
name: "customer_id",
type: "string",
description: "The ID of the customer. This is used to filter out price lists for a customer group that this customer doesnt belong to.",
optional: true
},
{
name: "region_id",
type: "string",
description: "The ID of the region the customer is using.",
optional: true
},
{
name: "quantity",
type: "number",
description: "The quantity of the item in the cart. This is used to filter out price lists that have `min_quantity` or `max_quantity` conditions set.",
optional: true
},
{
name: "currency_code",
type: "string",
description: "The currency code the customer is using.",
optional: true
},
{
name: "include_discount_prices",
type: "boolean",
description: "Whether the price list's prices should be retrieved or not.",
optional: true
},
{
name: "taxRates",
type: "object[]",
description: "The tax rates to be applied. This is only used for [Tax-Inclusive Pricing](../../taxes/inclusive-pricing.md).",
optional: false,
children: [
{
name: "rate",
type: "number | null",
description: "The tax rate",
optional: true
},
{
name: "name",
type: "string",
description: "The name of the tax rate",
optional: false
},
{
name: "code",
type: "string | null",
description: "The code of the tax rate",
optional: false
}
],
},
{
name: "ignore_cache",
type: "boolean",
description: "Whether to calculate the prices even if the value of an earlier price calculation is available in the cache.",
optional: true
},
]
}
]} />
### Returns
<ParameterTypes parameters={[
{
name: "Promise",
type: "Promise<Map<string, PriceSelectionResult>>",
description: "A map, each key is an ID of a variant, and its value is an object holding the price selection result.",
optional: false,
children: [
{
name: "PriceSelectionResult",
type: "PriceSelectionResult",
description: "The price selection result of a variant.",
optional: false,
children: [
{
name: "originalPrice",
type: "number | null",
description: "The original price of the variant which depends on the selected region or currency code in the context object. If both region ID and currency code are available in the context object, the region has higher precedence.",
optional: false
},
{
name: "originalPriceIncludesTax",
type: "boolean | null",
description: "Whether the original price includes taxes or not. This is only available for [Tax-Inclusive Pricing](../../taxes/inclusive-pricing.md).",
optional: true
},
{
name: "calculatedPrice",
type: "number | null",
description: "The lowest price among the prices of the product variant retrieved using the context object.",
optional: false
},
{
name: "calculatedPriceIncludesTax",
type: "boolean | null",
description: "Whether the calculated price includes taxes or not. This is only available for [Tax-Inclusive Pricing](../../taxes/inclusive-pricing.md).",
optional: true
},
{
name: "calculatedPriceType",
type: "enum",
description: "Either `default` if the `calculatedPrice` is the original price, or the type of the price list applied, which can be `override` or `sale`.",
optional: true
},
{
name: "prices",
type: "[MoneyAmount](../../../references/entities/classes/MoneyAmount.mdx)[]",
description: "The prices of the variant retrieved using the `context` object. It can include its original price and its price lists if there are any.",
optional: false
}
],
}
],
},
]} />
---
## 3. Run Build Command
In your terminal, run the build command to transpile the files in the `src` directory into the `dist` directory:
```bash npm2yarn
npm run build
```
---
## Test it Out
Run your backend to test it out:
```bash npm2yarn
npx medusa develop
```
Then, try out your strategy using any of the [Products](https://docs.medusajs.com/api/store#products) or [Carts](https://docs.medusajs.com/api/store#carts) API Routes which include retrieving product variants and line items respectively. You should then see the prices in the response based on your implemented strategy.
@@ -20,7 +20,7 @@ Price lists can be used for a variety of use cases including:
### Price List Entity Overview
A price list is stored in the database as a [PriceList](../../references/entities/classes/PriceList.md) entity. Some of its important attributes are:
A price list is stored in the database as a [PriceList](../../references/entities/classes/PriceList.mdx) entity. Some of its important attributes are:
- `type`: The price list's type. Can be either a `sale` or an `override`.
- `status`: The status of the price list. Can be `active` or `draft`. If a price list is a `draft`, its prices won't be applied even if its conditions are met.
@@ -8,7 +8,7 @@ In this document, youll learn what a price selection strategy is.
:::note
If youre interested to learn how to override the price selection strategy, check out [this documentation](./backend/override-price-selection-strategy.md) instead.
If youre interested to learn how to override the price selection strategy, check out [this documentation](./backend/override-price-selection-strategy.mdx) instead.
:::
@@ -69,4 +69,4 @@ The context that is passed to the `calculateVariantPrice` method is an object th
## See Also
- [Override the Price Selection Strategy](./backend/override-price-selection-strategy.md)
- [Override the Price Selection Strategy](./backend/override-price-selection-strategy.mdx)
@@ -613,8 +613,8 @@ fetch(`<BACKEND_URL>/store/products/search`, {
"Content-Type": "application/json",
},
body: JSON.stringify({
q: "Shirt"
})
q: "Shirt",
}),
})
.then((response) => response.json())
.then(({ hits }) => {
@@ -43,7 +43,7 @@ There is no limit on how many regions you can create, and regions can share simi
## Region Entity Overview
A region is stored in the database as a [Region](../../references/entities/classes/Region.md) entity. Some of its important attributes are:
A region is stored in the database as a [Region](../../references/entities/classes/Region.mdx) entity. Some of its important attributes are:
- `name`: The name of the region. Customers will see this name on the storefront.
- `tax_rate`: A number that indicates the tax rate. The tax rate is a percentage.
@@ -24,7 +24,7 @@ The sales channel feature can be used in a variety of use cases including:
## SalesChannel Entity Overview
A sales channel is stored in the database as a [SalesChannel](../../references/entities/classes/SalesChannel.md) entity. Some of its important attributes are:
A sales channel is stored in the database as a [SalesChannel](../../references/entities/classes/SalesChannel.mdx) entity. Some of its important attributes are:
- `name`: The name of the sales channel.
- `is_disabled`: A boolean value indicating of the Sales Channel is disabled or not.
@@ -37,13 +37,13 @@ A sales channel is stored in the database as a [SalesChannel](../../references/e
A store has a default sales channel. When you first run your Medusa backend or seed your database, a default sales channel is created, if it doesnt exist, and associated with the store.
The relation is implemented in the [Store](../../references/entities/classes/Store.md) entity. You can access the default sales channel of a store by expanding the `default_sales_channel` relation and using `store.default_sales_channel`. You can also access the ID of the default sales channel using `store.default_sales_channel_id`.
The relation is implemented in the [Store](../../references/entities/classes/Store.mdx) entity. You can access the default sales channel of a store by expanding the `default_sales_channel` relation and using `store.default_sales_channel`. You can also access the ID of the default sales channel using `store.default_sales_channel_id`.
### Product
Products can be available in more than one sales channel. You can then filter products by a sales channel using the Storefront and Admin APIs.
The relation is implemented in the [Product](../../references/entities/classes/Product.md) entity. You can access the sales channels a product is available in by expanding the `sales_channels` relation and using `product.sales_channels`.
The relation is implemented in the [Product](../../references/entities/classes/Product.mdx) entity. You can access the sales channels a product is available in by expanding the `sales_channels` relation and using `product.sales_channels`.
### Cart
@@ -51,13 +51,13 @@ When you create a cart, you can optionally specify the sales channel it belongs
A cart can belong to only one sales channel. Only products that belong to the same sales channel as the cart can be added to it.
The relation is implemented in the [Cart](../../references/entities/classes/Cart.md) entity. You can access the sales channel a cart is associated with by expanding the `sales_channel` relation and using `cart.sales_channel`. You can also access the ID of the sales channel using `cart.sales_channel_id`.
The relation is implemented in the [Cart](../../references/entities/classes/Cart.mdx) entity. You can access the sales channel a cart is associated with by expanding the `sales_channel` relation and using `cart.sales_channel`. You can also access the ID of the sales channel using `cart.sales_channel_id`.
### Order
Orders can optionally be associated with a sales channel. You can filter orders by a sales channel using the Storefront and Admin APIs.
The relation is implemented in the [Order](../../references/entities/classes/Order.md) entity. You can access the sales channel an order is associated with by expanding the `sales_channel` relation and using `order.sales_channel`. You can also access the ID of the sales channel using `order.sales_channel_id`.
The relation is implemented in the [Order](../../references/entities/classes/Order.mdx) entity. You can access the sales channel an order is associated with by expanding the `sales_channel` relation and using `order.sales_channel`. You can also access the ID of the sales channel using `order.sales_channel_id`.
---
@@ -89,8 +89,8 @@ If automatic tax calculation is disabled, then the tax calculation strategy will
The `calculate` method expects three parameters:
- `items`: the first parameter is an array of [line item](../../../references/entities/classes/LineItem.md) objects.
- `taxLines`: the second parameter is an array of either [shipping method tax line](../../../references/entities/classes/ShippingMethodTaxLine.md) or [line item tax line](../../../references/entities/classes/LineItemTaxLine.md) objects.
- `items`: the first parameter is an array of [line item](../../../references/entities/classes/LineItem.mdx) objects.
- `taxLines`: the second parameter is an array of either [shipping method tax line](../../../references/entities/classes/ShippingMethodTaxLine.mdx) or [line item tax line](../../../references/entities/classes/LineItemTaxLine.mdx) objects.
- `calculationContext`: an object holding the context of the tax calculation. The object has the following properties:
- `shipping_address`: an optional address object used for shipping.
- `customer`: an optional customer object.
@@ -121,7 +121,7 @@ const plugins = [
// optional
download_file_duration:
process.env.S3_DOWNLOAD_FILE_DURATION,
prefix: process.env.S3_PREFIX
prefix: process.env.S3_PREFIX,
},
},
]
+1 -1
View File
@@ -67,7 +67,7 @@ Medusa's modular architecture removes any restrictions you may have while making
POS systems make the checkout process smoother by integrating a barcode scanner. Merchants can scan a product by its barcode to check its details or add it to the customer's purchase.
Medusas [Product Variant entity](../references/entities/classes/ProductVariant.md) includes the necessary attributes to implement this integration, mainly the `barcode` attribute. Other notable attributes include `ean`, `upc`, and `hs_code`, among others.
Medusas [Product Variant entity](../references/entities/classes/ProductVariant.mdx) includes the necessary attributes to implement this integration, mainly the `barcode` attribute. Other notable attributes include `ean`, `upc`, and `hs_code`, among others.
To search through product variants by their barcode, you can create a custom API Route and call it within your POS.
@@ -0,0 +1,119 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Entities Reference
## Enumerations
- [AllocationType](enums/AllocationType.mdx)
- [CartType](enums/CartType.mdx)
- [ClaimFulfillmentStatus](enums/ClaimFulfillmentStatus.mdx)
- [ClaimPaymentStatus](enums/ClaimPaymentStatus.mdx)
- [ClaimReason](enums/ClaimReason.mdx)
- [ClaimType](enums/ClaimType.mdx)
- [DiscountConditionOperator](enums/DiscountConditionOperator.mdx)
- [DiscountConditionType](enums/DiscountConditionType.mdx)
- [DiscountRuleType](enums/DiscountRuleType.mdx)
- [DraftOrderStatus](enums/DraftOrderStatus.mdx)
- [FulfillmentStatus](enums/FulfillmentStatus.mdx)
- [OrderEditItemChangeType](enums/OrderEditItemChangeType.mdx)
- [OrderEditStatus](enums/OrderEditStatus.mdx)
- [OrderStatus](enums/OrderStatus.mdx)
- [PaymentCollectionStatus](enums/PaymentCollectionStatus.mdx)
- [PaymentCollectionType](enums/PaymentCollectionType.mdx)
- [PaymentSessionStatus](enums/PaymentSessionStatus.mdx)
- [PaymentStatus](enums/PaymentStatus.mdx)
- [ProductStatus](enums/ProductStatus.mdx)
- [RefundReason](enums/RefundReason.mdx)
- [RequirementType](enums/RequirementType.mdx)
- [ReturnStatus](enums/ReturnStatus.mdx)
- [ShippingOptionPriceType](enums/ShippingOptionPriceType.mdx)
- [ShippingProfileType](enums/ShippingProfileType.mdx)
- [SwapFulfillmentStatus](enums/SwapFulfillmentStatus.mdx)
- [SwapPaymentStatus](enums/SwapPaymentStatus.mdx)
- [UserRoles](enums/UserRoles.mdx)
## Classes
- [Address](classes/Address.mdx)
- [AnalyticsConfig](classes/AnalyticsConfig.mdx)
- [BatchJob](classes/BatchJob.mdx)
- [Cart](classes/Cart.mdx)
- [ClaimImage](classes/ClaimImage.mdx)
- [ClaimItem](classes/ClaimItem.mdx)
- [ClaimOrder](classes/ClaimOrder.mdx)
- [ClaimTag](classes/ClaimTag.mdx)
- [Country](classes/Country.mdx)
- [Currency](classes/Currency.mdx)
- [CustomShippingOption](classes/CustomShippingOption.mdx)
- [Customer](classes/Customer.mdx)
- [CustomerGroup](classes/CustomerGroup.mdx)
- [Discount](classes/Discount.mdx)
- [DiscountCondition](classes/DiscountCondition.mdx)
- [DiscountConditionCustomerGroup](classes/DiscountConditionCustomerGroup.mdx)
- [DiscountConditionProduct](classes/DiscountConditionProduct.mdx)
- [DiscountConditionProductCollection](classes/DiscountConditionProductCollection.mdx)
- [DiscountConditionProductTag](classes/DiscountConditionProductTag.mdx)
- [DiscountConditionProductType](classes/DiscountConditionProductType.mdx)
- [DiscountRule](classes/DiscountRule.mdx)
- [DraftOrder](classes/DraftOrder.mdx)
- [Fulfillment](classes/Fulfillment.mdx)
- [FulfillmentItem](classes/FulfillmentItem.mdx)
- [FulfillmentProvider](classes/FulfillmentProvider.mdx)
- [GiftCard](classes/GiftCard.mdx)
- [GiftCardTransaction](classes/GiftCardTransaction.mdx)
- [IdempotencyKey](classes/IdempotencyKey.mdx)
- [Image](classes/Image.mdx)
- [Invite](classes/Invite.mdx)
- [LineItem](classes/LineItem.mdx)
- [LineItemAdjustment](classes/LineItemAdjustment.mdx)
- [LineItemTaxLine](classes/LineItemTaxLine.mdx)
- [MoneyAmount](classes/MoneyAmount.mdx)
- [Note](classes/Note.mdx)
- [Notification](classes/Notification.mdx)
- [Oauth](classes/Oauth.mdx)
- [Order](classes/Order.mdx)
- [OrderEdit](classes/OrderEdit.mdx)
- [OrderItemChange](classes/OrderItemChange.mdx)
- [Payment](classes/Payment.mdx)
- [PaymentCollection](classes/PaymentCollection.mdx)
- [PaymentProvider](classes/PaymentProvider.mdx)
- [PaymentSession](classes/PaymentSession.mdx)
- [PriceList](classes/PriceList.mdx)
- [Product](classes/Product.mdx)
- [ProductCategory](classes/ProductCategory.mdx)
- [ProductCollection](classes/ProductCollection.mdx)
- [ProductOption](classes/ProductOption.mdx)
- [ProductOptionValue](classes/ProductOptionValue.mdx)
- [ProductTag](classes/ProductTag.mdx)
- [ProductTaxRate](classes/ProductTaxRate.mdx)
- [ProductType](classes/ProductType.mdx)
- [ProductTypeTaxRate](classes/ProductTypeTaxRate.mdx)
- [ProductVariant](classes/ProductVariant.mdx)
- [ProductVariantInventoryItem](classes/ProductVariantInventoryItem.mdx)
- [ProductVariantMoneyAmount](classes/ProductVariantMoneyAmount.mdx)
- [PublishableApiKey](classes/PublishableApiKey.mdx)
- [PublishableApiKeySalesChannel](classes/PublishableApiKeySalesChannel.mdx)
- [Refund](classes/Refund.mdx)
- [Region](classes/Region.mdx)
- [Return](classes/Return.mdx)
- [ReturnItem](classes/ReturnItem.mdx)
- [ReturnReason](classes/ReturnReason.mdx)
- [SalesChannel](classes/SalesChannel.mdx)
- [SalesChannelLocation](classes/SalesChannelLocation.mdx)
- [ShippingMethod](classes/ShippingMethod.mdx)
- [ShippingMethodTaxLine](classes/ShippingMethodTaxLine.mdx)
- [ShippingOption](classes/ShippingOption.mdx)
- [ShippingOptionRequirement](classes/ShippingOptionRequirement.mdx)
- [ShippingProfile](classes/ShippingProfile.mdx)
- [ShippingTaxRate](classes/ShippingTaxRate.mdx)
- [StagedJob](classes/StagedJob.mdx)
- [Store](classes/Store.mdx)
- [Swap](classes/Swap.mdx)
- [TaxProvider](classes/TaxProvider.mdx)
- [TaxRate](classes/TaxRate.mdx)
- [TrackingLink](classes/TrackingLink.mdx)
- [User](classes/User.mdx)
@@ -1,231 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Address
## Hierarchy
- `SoftDeletableEntity`
**`Address`**
## Constructors
### constructor
**new Address**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### address\_1
**address\_1**: ``null`` \| `string`
#### Defined in
[models/address.ts:36](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L36)
___
### address\_2
**address\_2**: ``null`` \| `string`
#### Defined in
[models/address.ts:39](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L39)
___
### city
**city**: ``null`` \| `string`
#### Defined in
[models/address.ts:42](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L42)
___
### company
**company**: ``null`` \| `string`
#### Defined in
[models/address.ts:27](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L27)
___
### country
**country**: ``null`` \| [`Country`](Country.md)
#### Defined in
[models/address.ts:49](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L49)
___
### country\_code
**country\_code**: ``null`` \| `string`
#### Defined in
[models/address.ts:45](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L45)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### customer
**customer**: ``null`` \| [`Customer`](Customer.md)
#### Defined in
[models/address.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L24)
___
### customer\_id
**customer\_id**: ``null`` \| `string`
#### Defined in
[models/address.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L20)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### first\_name
**first\_name**: ``null`` \| `string`
#### Defined in
[models/address.ts:30](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L30)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### last\_name
**last\_name**: ``null`` \| `string`
#### Defined in
[models/address.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L33)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/address.ts:61](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L61)
___
### phone
**phone**: ``null`` \| `string`
#### Defined in
[models/address.ts:58](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L58)
___
### postal\_code
**postal\_code**: ``null`` \| `string`
#### Defined in
[models/address.ts:55](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L55)
___
### province
**province**: ``null`` \| `string`
#### Defined in
[models/address.ts:52](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L52)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/address.ts:64](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/address.ts#L64)
@@ -0,0 +1,156 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Address
## Properties
<ParameterTypes parameters={[
{
"name": "address_1",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "address_2",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "city",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "company",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "country",
"type": "``null`` \\| [`Country`](Country.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "country_code",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "customer",
"type": "``null`` \\| [`Customer`](Customer.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "customer_id",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "first_name",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "last_name",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "metadata",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "phone",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "postal_code",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "province",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,121 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: AnalyticsConfig
## Hierarchy
- `SoftDeletableEntity`
**`AnalyticsConfig`**
## Constructors
### constructor
**new AnalyticsConfig**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### anonymize
**anonymize**: `boolean`
#### Defined in
[models/analytics-config.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/analytics-config.ts#L17)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### opt\_out
**opt\_out**: `boolean`
#### Defined in
[models/analytics-config.ts:14](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/analytics-config.ts#L14)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### user\_id
**user\_id**: `string`
#### Defined in
[models/analytics-config.ts:11](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/analytics-config.ts#L11)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/analytics-config.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/analytics-config.ts#L20)
@@ -0,0 +1,68 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AnalyticsConfig
## Properties
<ParameterTypes parameters={[
{
"name": "anonymize",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "opt_out",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "user_id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,249 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: BatchJob
## Hierarchy
- `SoftDeletableEntity`
**`BatchJob`**
## Constructors
### constructor
**new BatchJob**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### canceled\_at
`Optional` **canceled\_at**: `Date`
#### Defined in
[models/batch-job.ts:62](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L62)
___
### completed\_at
`Optional` **completed\_at**: `Date`
#### Defined in
[models/batch-job.ts:59](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L59)
___
### confirmed\_at
`Optional` **confirmed\_at**: `Date`
#### Defined in
[models/batch-job.ts:56](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L56)
___
### context
**context**: `Record`<`string`, `unknown`\>
#### Defined in
[models/batch-job.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L33)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### created\_by
**created\_by**: ``null`` \| `string`
#### Defined in
[models/batch-job.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L26)
___
### created\_by\_user
**created\_by\_user**: [`User`](User.md)
#### Defined in
[models/batch-job.ts:30](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L30)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### dry\_run
**dry\_run**: `boolean` = `false`
#### Defined in
[models/batch-job.ts:47](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L47)
___
### failed\_at
`Optional` **failed\_at**: `Date`
#### Defined in
[models/batch-job.ts:65](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L65)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### pre\_processed\_at
`Optional` **pre\_processed\_at**: `Date`
#### Defined in
[models/batch-job.ts:50](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L50)
___
### processing\_at
`Optional` **processing\_at**: `Date`
#### Defined in
[models/batch-job.ts:53](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L53)
___
### result
**result**: { `advancement_count?`: `number` ; `count?`: `number` ; `errors?`: (`string` \| `BatchJobResultError`)[] ; `file_key?`: `string` ; `file_size?`: `number` ; `progress?`: `number` ; `stat_descriptors?`: `BatchJobResultStatDescriptor`[] } & `Record`<`string`, `unknown`\>
#### Defined in
[models/batch-job.ts:36](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L36)
___
### status
**status**: `BatchJobStatus`
#### Defined in
[models/batch-job.ts:67](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L67)
___
### type
**type**: `string`
#### Defined in
[models/batch-job.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L23)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/batch-job.ts:95](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L95)
___
### loadStatus
**loadStatus**(): `void`
#### Returns
`void`
#### Defined in
[models/batch-job.ts:70](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L70)
___
### toJSON
**toJSON**(): [`BatchJob`](BatchJob.md)
#### Returns
[`BatchJob`](BatchJob.md)
#### Defined in
[models/batch-job.ts:99](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/batch-job.ts#L99)
@@ -0,0 +1,278 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# BatchJob
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "completed_at",
"type": "`Date`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "confirmed_at",
"type": "`Date`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "context",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_by",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_by_user",
"type": "[`User`](User.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`User`](User.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "api_token",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "email",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "first_name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "last_name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "metadata",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "password_hash",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "role",
"type": "[`UserRoles`](../enums/UserRoles.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "ADMIN",
"type": "``\"admin\"``",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "DEVELOPER",
"type": "``\"developer\"``",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "MEMBER",
"type": "``\"member\"``",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
}
]
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "beforeInsert",
"type": "() => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "dry_run",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "`false`",
"children": []
},
{
"name": "failed_at",
"type": "`Date`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "pre_processed_at",
"type": "`Date`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "processing_at",
"type": "`Date`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "result",
"type": "{ `advancement_count?`: `number` ; `count?`: `number` ; `errors?`: (`string` \\| `BatchJobResultError`)[] ; `file_key?`: `string` ; `file_size?`: `number` ; `progress?`: `number` ; `stat_descriptors?`: `BatchJobResultStatDescriptor`[] } & Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "status",
"type": "`BatchJobStatus`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "type",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,485 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Cart
## Hierarchy
- `SoftDeletableEntity`
**`Cart`**
## Constructors
### constructor
**new Cart**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### billing\_address
**billing\_address**: [`Address`](Address.md)
#### Defined in
[models/cart.ts:288](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L288)
___
### billing\_address\_id
**billing\_address\_id**: `string`
#### Defined in
[models/cart.ts:282](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L282)
___
### completed\_at
**completed\_at**: `Date`
#### Defined in
[models/cart.ts:373](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L373)
___
### context
**context**: `Record`<`string`, `unknown`\>
#### Defined in
[models/cart.ts:382](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L382)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### customer
**customer**: [`Customer`](Customer.md)
#### Defined in
[models/cart.ts:347](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L347)
___
### customer\_id
**customer\_id**: `string`
#### Defined in
[models/cart.ts:343](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L343)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### discount\_total
`Optional` **discount\_total**: `number`
#### Defined in
[models/cart.ts:397](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L397)
___
### discounts
**discounts**: [`Discount`](Discount.md)[]
#### Defined in
[models/cart.ts:325](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L325)
___
### email
**email**: `string`
#### Defined in
[models/cart.ts:278](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L278)
___
### gift\_card\_tax\_total
`Optional` **gift\_card\_tax\_total**: `number`
#### Defined in
[models/cart.ts:407](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L407)
___
### gift\_card\_total
`Optional` **gift\_card\_total**: `number`
#### Defined in
[models/cart.ts:406](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L406)
___
### gift\_cards
**gift\_cards**: [`GiftCard`](GiftCard.md)[]
#### Defined in
[models/cart.ts:339](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L339)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### idempotency\_key
**idempotency\_key**: `string`
#### Defined in
[models/cart.ts:379](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L379)
___
### item\_tax\_total
`Optional` **item\_tax\_total**: ``null`` \| `number`
#### Defined in
[models/cart.ts:399](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L399)
___
### items
**items**: [`LineItem`](LineItem.md)[]
#### Defined in
[models/cart.ts:303](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L303)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/cart.ts:385](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L385)
___
### object
`Readonly` **object**: ``"cart"``
#### Defined in
[models/cart.ts:275](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L275)
___
### payment
**payment**: [`Payment`](Payment.md)
#### Defined in
[models/cart.ts:362](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L362)
___
### payment\_authorized\_at
**payment\_authorized\_at**: `Date`
#### Defined in
[models/cart.ts:376](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L376)
___
### payment\_id
**payment\_id**: `string`
#### Defined in
[models/cart.ts:358](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L358)
___
### payment\_session
**payment\_session**: ``null`` \| [`PaymentSession`](PaymentSession.md)
#### Defined in
[models/cart.ts:349](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L349)
___
### payment\_sessions
**payment\_sessions**: [`PaymentSession`](PaymentSession.md)[]
#### Defined in
[models/cart.ts:354](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L354)
___
### raw\_discount\_total
`Optional` **raw\_discount\_total**: `number`
#### Defined in
[models/cart.ts:398](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L398)
___
### refundable\_amount
`Optional` **refundable\_amount**: `number`
#### Defined in
[models/cart.ts:405](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L405)
___
### refunded\_total
`Optional` **refunded\_total**: `number`
#### Defined in
[models/cart.ts:402](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L402)
___
### region
**region**: [`Region`](Region.md)
#### Defined in
[models/cart.ts:311](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L311)
___
### region\_id
**region\_id**: `string`
#### Defined in
[models/cart.ts:307](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L307)
___
### sales\_channel
**sales\_channel**: [`SalesChannel`](SalesChannel.md)
#### Defined in
[models/cart.ts:394](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L394)
___
### sales\_channel\_id
**sales\_channel\_id**: ``null`` \| `string`
#### Defined in
[models/cart.ts:388](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L388)
___
### shipping\_address
**shipping\_address**: ``null`` \| [`Address`](Address.md)
#### Defined in
[models/cart.ts:298](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L298)
___
### shipping\_address\_id
**shipping\_address\_id**: `string`
#### Defined in
[models/cart.ts:292](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L292)
___
### shipping\_methods
**shipping\_methods**: [`ShippingMethod`](ShippingMethod.md)[]
#### Defined in
[models/cart.ts:367](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L367)
___
### shipping\_tax\_total
`Optional` **shipping\_tax\_total**: ``null`` \| `number`
#### Defined in
[models/cart.ts:400](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L400)
___
### shipping\_total
`Optional` **shipping\_total**: `number`
#### Defined in
[models/cart.ts:396](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L396)
___
### subtotal
`Optional` **subtotal**: `number`
#### Defined in
[models/cart.ts:404](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L404)
___
### tax\_total
`Optional` **tax\_total**: ``null`` \| `number`
#### Defined in
[models/cart.ts:401](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L401)
___
### total
`Optional` **total**: `number`
#### Defined in
[models/cart.ts:403](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L403)
___
### type
**type**: [`CartType`](../enums/CartType.md)
#### Defined in
[models/cart.ts:370](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L370)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### afterLoad
`Private` **afterLoad**(): `void`
#### Returns
`void`
#### Defined in
[models/cart.ts:410](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L410)
___
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/cart.ts:417](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/cart.ts#L417)
File diff suppressed because it is too large Load Diff
@@ -1,131 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: ClaimImage
## Hierarchy
- `SoftDeletableEntity`
**`ClaimImage`**
## Constructors
### constructor
**new ClaimImage**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### claim\_item
**claim\_item**: [`ClaimItem`](ClaimItem.md)
#### Defined in
[models/claim-image.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-image.ts#L23)
___
### claim\_item\_id
**claim\_item\_id**: `string`
#### Defined in
[models/claim-image.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-image.ts#L19)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/claim-image.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-image.ts#L29)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### url
**url**: `string`
#### Defined in
[models/claim-image.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-image.ts#L26)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/claim-image.ts:32](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-image.ts#L32)
File diff suppressed because it is too large Load Diff
@@ -1,211 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: ClaimItem
## Hierarchy
- `SoftDeletableEntity`
**`ClaimItem`**
## Constructors
### constructor
**new ClaimItem**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### claim\_order
**claim\_order**: [`ClaimOrder`](ClaimOrder.md)
#### Defined in
[models/claim-item.ts:42](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L42)
___
### claim\_order\_id
**claim\_order\_id**: `string`
#### Defined in
[models/claim-item.ts:38](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L38)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### images
**images**: [`ClaimImage`](ClaimImage.md)[]
#### Defined in
[models/claim-item.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L34)
___
### item
**item**: [`LineItem`](LineItem.md)
#### Defined in
[models/claim-item.ts:50](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L50)
___
### item\_id
**item\_id**: `string`
#### Defined in
[models/claim-item.ts:46](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L46)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/claim-item.ts:84](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L84)
___
### note
**note**: `string`
#### Defined in
[models/claim-item.ts:64](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L64)
___
### quantity
**quantity**: `number`
#### Defined in
[models/claim-item.ts:67](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L67)
___
### reason
**reason**: [`ClaimReason`](../enums/ClaimReason.md)
#### Defined in
[models/claim-item.ts:61](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L61)
___
### tags
**tags**: [`ClaimTag`](ClaimTag.md)[]
#### Defined in
[models/claim-item.ts:81](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L81)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### variant
**variant**: [`ProductVariant`](ProductVariant.md)
#### Defined in
[models/claim-item.ts:58](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L58)
___
### variant\_id
**variant\_id**: `string`
#### Defined in
[models/claim-item.ts:54](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L54)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/claim-item.ts:87](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-item.ts#L87)
File diff suppressed because it is too large Load Diff
@@ -1,261 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: ClaimOrder
## Hierarchy
- `SoftDeletableEntity`
**`ClaimOrder`**
## Constructors
### constructor
**new ClaimOrder**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### additional\_items
**additional\_items**: [`LineItem`](LineItem.md)[]
#### Defined in
[models/claim-order.ts:69](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L69)
___
### canceled\_at
**canceled\_at**: `Date`
#### Defined in
[models/claim-order.ts:107](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L107)
___
### claim\_items
**claim\_items**: [`ClaimItem`](ClaimItem.md)[]
#### Defined in
[models/claim-order.ts:66](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L66)
___
### created\_at
**created\_at**: `Date`
#### Overrides
SoftDeletableEntity.created\_at
#### Defined in
[models/claim-order.ts:110](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L110)
___
### deleted\_at
**deleted\_at**: `Date`
#### Overrides
SoftDeletableEntity.deleted\_at
#### Defined in
[models/claim-order.ts:116](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L116)
___
### fulfillment\_status
**fulfillment\_status**: [`ClaimFulfillmentStatus`](../enums/ClaimFulfillmentStatus.md)
#### Defined in
[models/claim-order.ts:63](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L63)
___
### fulfillments
**fulfillments**: [`Fulfillment`](Fulfillment.md)[]
#### Defined in
[models/claim-order.ts:101](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L101)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### idempotency\_key
**idempotency\_key**: `string`
#### Defined in
[models/claim-order.ts:125](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L125)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/claim-order.ts:122](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L122)
___
### no\_notification
**no\_notification**: `boolean`
#### Defined in
[models/claim-order.ts:119](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L119)
___
### order
**order**: [`Order`](Order.md)
#### Defined in
[models/claim-order.ts:80](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L80)
___
### order\_id
**order\_id**: `string`
#### Defined in
[models/claim-order.ts:76](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L76)
___
### payment\_status
**payment\_status**: [`ClaimPaymentStatus`](../enums/ClaimPaymentStatus.md)
#### Defined in
[models/claim-order.ts:56](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L56)
___
### refund\_amount
**refund\_amount**: `number`
#### Defined in
[models/claim-order.ts:104](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L104)
___
### return\_order
**return\_order**: [`Return`](Return.md)
#### Defined in
[models/claim-order.ts:83](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L83)
___
### shipping\_address
**shipping\_address**: [`Address`](Address.md)
#### Defined in
[models/claim-order.ts:91](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L91)
___
### shipping\_address\_id
**shipping\_address\_id**: `string`
#### Defined in
[models/claim-order.ts:87](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L87)
___
### shipping\_methods
**shipping\_methods**: [`ShippingMethod`](ShippingMethod.md)[]
#### Defined in
[models/claim-order.ts:96](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L96)
___
### type
**type**: [`ClaimType`](../enums/ClaimType.md)
#### Defined in
[models/claim-order.ts:72](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L72)
___
### updated\_at
**updated\_at**: `Date`
#### Overrides
SoftDeletableEntity.updated\_at
#### Defined in
[models/claim-order.ts:113](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L113)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/claim-order.ts:128](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-order.ts#L128)
File diff suppressed because it is too large Load Diff
@@ -1,111 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: ClaimTag
## Hierarchy
- `SoftDeletableEntity`
**`ClaimTag`**
## Constructors
### constructor
**new ClaimTag**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/claim-tag.ts:14](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-tag.ts#L14)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### value
**value**: `string`
#### Defined in
[models/claim-tag.ts:11](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-tag.ts#L11)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/claim-tag.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/claim-tag.ts#L17)
@@ -0,0 +1,60 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimTag
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "metadata",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "value",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,91 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Country
## Constructors
### constructor
**new Country**()
## Properties
### display\_name
**display\_name**: `string`
#### Defined in
[models/country.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L31)
___
### id
**id**: `number`
#### Defined in
[models/country.ts:15](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L15)
___
### iso\_2
**iso\_2**: `string`
#### Defined in
[models/country.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L19)
___
### iso\_3
**iso\_3**: `string`
#### Defined in
[models/country.ts:22](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L22)
___
### name
**name**: `string`
#### Defined in
[models/country.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L28)
___
### num\_code
**num\_code**: `number`
#### Defined in
[models/country.ts:25](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L25)
___
### region
**region**: [`Region`](Region.md)
#### Defined in
[models/country.ts:39](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L39)
___
### region\_id
**region\_id**: ``null`` \| `string`
#### Defined in
[models/country.ts:35](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/country.ts#L35)
@@ -0,0 +1,442 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Country
## Properties
<ParameterTypes parameters={[
{
"name": "display_name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "iso_2",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "iso_3",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "num_code",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "region",
"type": "[`Region`](Region.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`Region`](Region.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "automatic_taxes",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "countries",
"type": "[`Country`](Country.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`Country`](Country.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "display_name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "iso_2",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "iso_3",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "num_code",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "region",
"type": "[`Region`](Region.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "region_id",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "currency",
"type": "[`Currency`](Currency.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`Currency`](Currency.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "code",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "symbol",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "symbol_native",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "currency_code",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "fulfillment_providers",
"type": "[`FulfillmentProvider`](FulfillmentProvider.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`FulfillmentProvider`](FulfillmentProvider.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "gift_cards_taxable",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "metadata",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "payment_providers",
"type": "[`PaymentProvider`](PaymentProvider.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`PaymentProvider`](PaymentProvider.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "tax_code",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "tax_provider",
"type": "[`TaxProvider`](TaxProvider.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "constructor",
"type": "() => [`TaxProvider`](TaxProvider.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "tax_provider_id",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "tax_rate",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "tax_rates",
"type": "``null`` \\| [`TaxRate`](TaxRate.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "beforeInsert",
"type": "() => `void`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
},
{
"name": "region_id",
"type": "``null`` \\| `string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,61 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Currency
## Constructors
### constructor
**new Currency**()
## Properties
### code
**code**: `string`
#### Defined in
[models/currency.ts:8](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/currency.ts#L8)
___
### includes\_tax
`Optional` **includes\_tax**: `boolean`
#### Defined in
[models/currency.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/currency.ts#L20)
___
### name
**name**: `string`
#### Defined in
[models/currency.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/currency.ts#L17)
___
### symbol
**symbol**: `string`
#### Defined in
[models/currency.ts:11](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/currency.ts#L11)
___
### symbol\_native
**symbol\_native**: `string`
#### Defined in
[models/currency.ts:14](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/currency.ts#L14)
@@ -0,0 +1,52 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Currency
## Properties
<ParameterTypes parameters={[
{
"name": "code",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "includes_tax",
"type": "`boolean`",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "name",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "symbol",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "symbol_native",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,151 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: CustomShippingOption
## Hierarchy
- `SoftDeletableEntity`
**`CustomShippingOption`**
## Constructors
### constructor
**new CustomShippingOption**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### cart
**cart**: [`Cart`](Cart.md)
#### Defined in
[models/custom-shipping-option.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L37)
___
### cart\_id
**cart\_id**: `string`
#### Defined in
[models/custom-shipping-option.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L33)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/custom-shipping-option.ts:40](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L40)
___
### price
**price**: `number`
#### Defined in
[models/custom-shipping-option.ts:21](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L21)
___
### shipping\_option
**shipping\_option**: [`ShippingOption`](ShippingOption.md)
#### Defined in
[models/custom-shipping-option.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L29)
___
### shipping\_option\_id
**shipping\_option\_id**: `string`
#### Defined in
[models/custom-shipping-option.ts:25](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L25)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/custom-shipping-option.ts:43](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/custom-shipping-option.ts#L43)
File diff suppressed because it is too large Load Diff
@@ -1,211 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Customer
## Hierarchy
- `SoftDeletableEntity`
**`Customer`**
## Constructors
### constructor
**new Customer**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### billing\_address
**billing\_address**: [`Address`](Address.md)
#### Defined in
[models/customer.ts:40](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L40)
___
### billing\_address\_id
**billing\_address\_id**: ``null`` \| `string`
#### Defined in
[models/customer.ts:36](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L36)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### email
**email**: `string`
#### Defined in
[models/customer.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L26)
___
### first\_name
**first\_name**: `string`
#### Defined in
[models/customer.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L29)
___
### groups
**groups**: [`CustomerGroup`](CustomerGroup.md)[]
#### Defined in
[models/customer.ts:71](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L71)
___
### has\_account
**has\_account**: `boolean`
#### Defined in
[models/customer.ts:52](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L52)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### last\_name
**last\_name**: `string`
#### Defined in
[models/customer.ts:32](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L32)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/customer.ts:74](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L74)
___
### orders
**orders**: [`Order`](Order.md)[]
#### Defined in
[models/customer.ts:55](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L55)
___
### password\_hash
**password\_hash**: `string`
#### Defined in
[models/customer.ts:46](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L46)
___
### phone
**phone**: `string`
#### Defined in
[models/customer.ts:49](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L49)
___
### shipping\_addresses
**shipping\_addresses**: [`Address`](Address.md)[]
#### Defined in
[models/customer.ts:43](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L43)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/customer.ts:77](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer.ts#L77)
File diff suppressed because it is too large Load Diff
@@ -1,131 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: CustomerGroup
## Hierarchy
- `SoftDeletableEntity`
**`CustomerGroup`**
## Constructors
### constructor
**new CustomerGroup**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### customers
**customers**: [`Customer`](Customer.md)[]
#### Defined in
[models/customer-group.ts:18](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer-group.ts#L18)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/customer-group.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer-group.ts#L26)
___
### name
**name**: `string`
#### Defined in
[models/customer-group.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer-group.ts#L13)
___
### price\_lists
**price\_lists**: [`PriceList`](PriceList.md)[]
#### Defined in
[models/customer-group.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer-group.ts#L23)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/customer-group.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/customer-group.ts#L29)
File diff suppressed because it is too large Load Diff
@@ -1,231 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Discount
## Hierarchy
- `SoftDeletableEntity`
**`Discount`**
## Constructors
### constructor
**new Discount**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### code
**code**: `string`
#### Defined in
[models/discount.ts:22](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L22)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### ends\_at
**ends\_at**: ``null`` \| `Date`
#### Defined in
[models/discount.ts:52](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L52)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### is\_disabled
**is\_disabled**: `boolean`
#### Defined in
[models/discount.ts:36](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L36)
___
### is\_dynamic
**is\_dynamic**: `boolean`
#### Defined in
[models/discount.ts:25](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L25)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount.ts:78](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L78)
___
### parent\_discount
**parent\_discount**: [`Discount`](Discount.md)
#### Defined in
[models/discount.ts:43](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L43)
___
### parent\_discount\_id
**parent\_discount\_id**: `string`
#### Defined in
[models/discount.ts:39](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L39)
___
### regions
**regions**: [`Region`](Region.md)[]
#### Defined in
[models/discount.ts:69](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L69)
___
### rule
**rule**: [`DiscountRule`](DiscountRule.md)
#### Defined in
[models/discount.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L33)
___
### rule\_id
**rule\_id**: `string`
#### Defined in
[models/discount.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L29)
___
### starts\_at
**starts\_at**: `Date`
#### Defined in
[models/discount.ts:49](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L49)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### usage\_count
**usage\_count**: `number`
#### Defined in
[models/discount.ts:75](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L75)
___
### usage\_limit
**usage\_limit**: ``null`` \| `number`
#### Defined in
[models/discount.ts:72](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L72)
___
### valid\_duration
**valid\_duration**: ``null`` \| `string`
#### Defined in
[models/discount.ts:55](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L55)
## Methods
### upperCaseCodeAndTrim
`Private` **upperCaseCodeAndTrim**(): `void`
#### Returns
`void`
#### Defined in
[models/discount.ts:81](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount.ts#L81)
File diff suppressed because it is too large Load Diff
@@ -1,191 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountCondition
## Hierarchy
- `SoftDeletableEntity`
**`DiscountCondition`**
## Constructors
### constructor
**new DiscountCondition**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### customer\_groups
**customer\_groups**: [`CustomerGroup`](CustomerGroup.md)[]
#### Defined in
[models/discount-condition.ts:129](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L129)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### discount\_rule
**discount\_rule**: [`DiscountRule`](DiscountRule.md)
#### Defined in
[models/discount-condition.ts:59](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L59)
___
### discount\_rule\_id
**discount\_rule\_id**: `string`
#### Defined in
[models/discount-condition.ts:55](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L55)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-condition.ts:132](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L132)
___
### operator
**operator**: [`DiscountConditionOperator`](../enums/DiscountConditionOperator.md)
#### Defined in
[models/discount-condition.ts:51](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L51)
___
### product\_collections
**product\_collections**: [`ProductCollection`](ProductCollection.md)[]
#### Defined in
[models/discount-condition.ts:115](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L115)
___
### product\_tags
**product\_tags**: [`ProductTag`](ProductTag.md)[]
#### Defined in
[models/discount-condition.ts:101](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L101)
___
### product\_types
**product\_types**: [`ProductType`](ProductType.md)[]
#### Defined in
[models/discount-condition.ts:87](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L87)
___
### products
**products**: [`Product`](Product.md)[]
#### Defined in
[models/discount-condition.ts:73](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L73)
___
### type
**type**: [`DiscountConditionType`](../enums/DiscountConditionType.md)
#### Defined in
[models/discount-condition.ts:45](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L45)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/discount-condition.ts:135](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition.ts#L135)
File diff suppressed because it is too large Load Diff
@@ -1,81 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountConditionCustomerGroup
## Constructors
### constructor
**new DiscountConditionCustomerGroup**()
## Properties
### condition\_id
**condition\_id**: `string`
#### Defined in
[models/discount-condition-customer-group.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L20)
___
### created\_at
**created\_at**: `Date`
#### Defined in
[models/discount-condition-customer-group.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L31)
___
### customer\_group
`Optional` **customer\_group**: [`CustomerGroup`](CustomerGroup.md)
#### Defined in
[models/discount-condition-customer-group.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L24)
___
### customer\_group\_id
**customer\_group\_id**: `string`
#### Defined in
[models/discount-condition-customer-group.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L17)
___
### discount\_condition
`Optional` **discount\_condition**: [`DiscountCondition`](DiscountCondition.md)
#### Defined in
[models/discount-condition-customer-group.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L28)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-condition-customer-group.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L37)
___
### updated\_at
**updated\_at**: `Date`
#### Defined in
[models/discount-condition-customer-group.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-customer-group.ts#L34)
@@ -1,81 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountConditionProduct
## Constructors
### constructor
**new DiscountConditionProduct**()
## Properties
### condition\_id
**condition\_id**: `string`
#### Defined in
[models/discount-condition-product.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L20)
___
### created\_at
**created\_at**: `Date`
#### Defined in
[models/discount-condition-product.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L31)
___
### discount\_condition
`Optional` **discount\_condition**: [`DiscountCondition`](DiscountCondition.md)
#### Defined in
[models/discount-condition-product.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L28)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-condition-product.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L37)
___
### product
`Optional` **product**: [`Product`](Product.md)
#### Defined in
[models/discount-condition-product.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L24)
___
### product\_id
**product\_id**: `string`
#### Defined in
[models/discount-condition-product.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L17)
___
### updated\_at
**updated\_at**: `Date`
#### Defined in
[models/discount-condition-product.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product.ts#L34)
File diff suppressed because it is too large Load Diff
@@ -1,81 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountConditionProductCollection
## Constructors
### constructor
**new DiscountConditionProductCollection**()
## Properties
### condition\_id
**condition\_id**: `string`
#### Defined in
[models/discount-condition-product-collection.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L20)
___
### created\_at
**created\_at**: `Date`
#### Defined in
[models/discount-condition-product-collection.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L31)
___
### discount\_condition
`Optional` **discount\_condition**: [`DiscountCondition`](DiscountCondition.md)
#### Defined in
[models/discount-condition-product-collection.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L28)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-condition-product-collection.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L37)
___
### product\_collection
`Optional` **product\_collection**: [`ProductCollection`](ProductCollection.md)
#### Defined in
[models/discount-condition-product-collection.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L24)
___
### product\_collection\_id
**product\_collection\_id**: `string`
#### Defined in
[models/discount-condition-product-collection.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L17)
___
### updated\_at
**updated\_at**: `Date`
#### Defined in
[models/discount-condition-product-collection.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-collection.ts#L34)
@@ -1,81 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountConditionProductTag
## Constructors
### constructor
**new DiscountConditionProductTag**()
## Properties
### condition\_id
**condition\_id**: `string`
#### Defined in
[models/discount-condition-product-tag.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L20)
___
### created\_at
**created\_at**: `Date`
#### Defined in
[models/discount-condition-product-tag.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L31)
___
### discount\_condition
`Optional` **discount\_condition**: [`DiscountCondition`](DiscountCondition.md)
#### Defined in
[models/discount-condition-product-tag.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L28)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-condition-product-tag.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L37)
___
### product\_tag
`Optional` **product\_tag**: [`ProductTag`](ProductTag.md)
#### Defined in
[models/discount-condition-product-tag.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L24)
___
### product\_tag\_id
**product\_tag\_id**: `string`
#### Defined in
[models/discount-condition-product-tag.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L17)
___
### updated\_at
**updated\_at**: `Date`
#### Defined in
[models/discount-condition-product-tag.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-tag.ts#L34)
@@ -1,81 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountConditionProductType
## Constructors
### constructor
**new DiscountConditionProductType**()
## Properties
### condition\_id
**condition\_id**: `string`
#### Defined in
[models/discount-condition-product-type.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L20)
___
### created\_at
**created\_at**: `Date`
#### Defined in
[models/discount-condition-product-type.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L31)
___
### discount\_condition
`Optional` **discount\_condition**: [`DiscountCondition`](DiscountCondition.md)
#### Defined in
[models/discount-condition-product-type.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L28)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-condition-product-type.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L37)
___
### product\_type
`Optional` **product\_type**: [`ProductType`](ProductType.md)
#### Defined in
[models/discount-condition-product-type.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L24)
___
### product\_type\_id
**product\_type\_id**: `string`
#### Defined in
[models/discount-condition-product-type.ts:17](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L17)
___
### updated\_at
**updated\_at**: `Date`
#### Defined in
[models/discount-condition-product-type.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-condition-product-type.ts#L34)
@@ -1,151 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DiscountRule
## Hierarchy
- `SoftDeletableEntity`
**`DiscountRule`**
## Constructors
### constructor
**new DiscountRule**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### allocation
**allocation**: [`AllocationType`](../enums/AllocationType.md)
#### Defined in
[models/discount-rule.ts:38](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L38)
___
### conditions
**conditions**: [`DiscountCondition`](DiscountCondition.md)[]
#### Defined in
[models/discount-rule.ts:41](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L41)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### description
**description**: `string`
#### Defined in
[models/discount-rule.ts:22](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L22)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/discount-rule.ts:44](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L44)
___
### type
**type**: [`DiscountRuleType`](../enums/DiscountRuleType.md)
#### Defined in
[models/discount-rule.ts:28](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L28)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### value
**value**: `number`
#### Defined in
[models/discount-rule.ts:31](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L31)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/discount-rule.ts:47](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/discount-rule.ts#L47)
File diff suppressed because it is too large Load Diff
@@ -1,187 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: DraftOrder
## Hierarchy
- `BaseEntity`
**`DraftOrder`**
## Constructors
### constructor
**new DraftOrder**()
#### Inherited from
BaseEntity.constructor
## Properties
### canceled\_at
**canceled\_at**: `Date`
#### Defined in
[models/draft-order.ts:53](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L53)
___
### cart
**cart**: [`Cart`](Cart.md)
#### Defined in
[models/draft-order.ts:42](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L42)
___
### cart\_id
**cart\_id**: `string`
#### Defined in
[models/draft-order.ts:38](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L38)
___
### completed\_at
**completed\_at**: `Date`
#### Defined in
[models/draft-order.ts:56](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L56)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### display\_id
**display\_id**: `number`
#### Defined in
[models/draft-order.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L34)
___
### id
**id**: `string`
#### Inherited from
BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### idempotency\_key
**idempotency\_key**: `string`
#### Defined in
[models/draft-order.ts:65](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L65)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/draft-order.ts:62](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L62)
___
### no\_notification\_order
**no\_notification\_order**: `boolean`
#### Defined in
[models/draft-order.ts:59](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L59)
___
### order
**order**: [`Order`](Order.md)
#### Defined in
[models/draft-order.ts:50](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L50)
___
### order\_id
**order\_id**: `string`
#### Defined in
[models/draft-order.ts:46](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L46)
___
### status
**status**: [`DraftOrderStatus`](../enums/DraftOrderStatus.md)
#### Defined in
[models/draft-order.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L29)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `Promise`<`void`\>
#### Returns
`Promise`<`void`\>
#### Defined in
[models/draft-order.ts:68](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/draft-order.ts#L68)
File diff suppressed because it is too large Load Diff
@@ -1,257 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Fulfillment
## Hierarchy
- `BaseEntity`
**`Fulfillment`**
## Constructors
### constructor
**new Fulfillment**()
#### Inherited from
BaseEntity.constructor
## Properties
### canceled\_at
**canceled\_at**: `Date`
#### Defined in
[models/fulfillment.ts:82](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L82)
___
### claim\_order
**claim\_order**: [`ClaimOrder`](ClaimOrder.md)
#### Defined in
[models/fulfillment.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L29)
___
### claim\_order\_id
**claim\_order\_id**: `string`
#### Defined in
[models/fulfillment.ts:25](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L25)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### data
**data**: `Record`<`string`, `unknown`\>
#### Defined in
[models/fulfillment.ts:76](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L76)
___
### id
**id**: `string`
#### Inherited from
BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### idempotency\_key
**idempotency\_key**: `string`
#### Defined in
[models/fulfillment.ts:88](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L88)
___
### items
**items**: [`FulfillmentItem`](FulfillmentItem.md)[]
#### Defined in
[models/fulfillment.ts:65](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L65)
___
### location\_id
**location\_id**: ``null`` \| `string`
#### Defined in
[models/fulfillment.ts:55](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L55)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/fulfillment.ts:85](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L85)
___
### no\_notification
**no\_notification**: `boolean`
#### Defined in
[models/fulfillment.ts:48](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L48)
___
### order
**order**: [`Order`](Order.md)
#### Defined in
[models/fulfillment.ts:45](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L45)
___
### order\_id
**order\_id**: `string`
#### Defined in
[models/fulfillment.ts:41](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L41)
___
### provider
**provider**: [`FulfillmentProvider`](FulfillmentProvider.md)
#### Defined in
[models/fulfillment.ts:59](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L59)
___
### provider\_id
**provider\_id**: `string`
#### Defined in
[models/fulfillment.ts:52](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L52)
___
### shipped\_at
**shipped\_at**: `Date`
#### Defined in
[models/fulfillment.ts:79](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L79)
___
### swap
**swap**: [`Swap`](Swap.md)
#### Defined in
[models/fulfillment.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L37)
___
### swap\_id
**swap\_id**: `string`
#### Defined in
[models/fulfillment.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L33)
___
### tracking\_links
**tracking\_links**: [`TrackingLink`](TrackingLink.md)[]
#### Defined in
[models/fulfillment.ts:70](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L70)
___
### tracking\_numbers
**tracking\_numbers**: `string`[]
#### Defined in
[models/fulfillment.ts:73](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L73)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/fulfillment.ts:91](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment.ts#L91)
File diff suppressed because it is too large Load Diff
@@ -1,61 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: FulfillmentItem
## Constructors
### constructor
**new FulfillmentItem**()
## Properties
### fulfillment
**fulfillment**: [`Fulfillment`](Fulfillment.md)
#### Defined in
[models/fulfillment-item.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-item.ts#L16)
___
### fulfillment\_id
**fulfillment\_id**: `string`
#### Defined in
[models/fulfillment-item.ts:9](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-item.ts#L9)
___
### item
**item**: [`LineItem`](LineItem.md)
#### Defined in
[models/fulfillment-item.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-item.ts#L20)
___
### item\_id
**item\_id**: `string`
#### Defined in
[models/fulfillment-item.ts:12](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-item.ts#L12)
___
### quantity
**quantity**: `number`
#### Defined in
[models/fulfillment-item.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-item.ts#L23)
File diff suppressed because it is too large Load Diff
@@ -1,31 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: FulfillmentProvider
## Constructors
### constructor
**new FulfillmentProvider**()
## Properties
### id
**id**: `string`
#### Defined in
[models/fulfillment-provider.ts:6](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-provider.ts#L6)
___
### is\_installed
**is\_installed**: `boolean`
#### Defined in
[models/fulfillment-provider.ts:9](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/fulfillment-provider.ts#L9)
@@ -0,0 +1,28 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# FulfillmentProvider
## Properties
<ParameterTypes parameters={[
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "is_installed",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,201 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: GiftCard
## Hierarchy
- `SoftDeletableEntity`
**`GiftCard`**
## Constructors
### constructor
**new GiftCard**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### balance
**balance**: `number`
#### Defined in
[models/gift-card.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L26)
___
### code
**code**: `string`
#### Defined in
[models/gift-card.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L20)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### ends\_at
**ends\_at**: `Date`
#### Defined in
[models/gift-card.ts:51](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L51)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### is\_disabled
**is\_disabled**: `boolean`
#### Defined in
[models/gift-card.ts:45](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L45)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/gift-card.ts:57](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L57)
___
### order
**order**: [`Order`](Order.md)
#### Defined in
[models/gift-card.ts:42](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L42)
___
### order\_id
**order\_id**: `string`
#### Defined in
[models/gift-card.ts:38](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L38)
___
### region
**region**: [`Region`](Region.md)
#### Defined in
[models/gift-card.ts:34](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L34)
___
### region\_id
**region\_id**: `string`
#### Defined in
[models/gift-card.ts:30](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L30)
___
### tax\_rate
**tax\_rate**: ``null`` \| `number`
#### Defined in
[models/gift-card.ts:54](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L54)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### value
**value**: `number`
#### Defined in
[models/gift-card.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L23)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/gift-card.ts:60](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card.ts#L60)
File diff suppressed because it is too large Load Diff
@@ -1,115 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: GiftCardTransaction
## Constructors
### constructor
**new GiftCardTransaction**()
## Properties
### amount
**amount**: `number`
#### Defined in
[models/gift-card-transaction.ts:40](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L40)
___
### created\_at
**created\_at**: `Date`
#### Defined in
[models/gift-card-transaction.ts:43](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L43)
___
### gift\_card
**gift\_card**: [`GiftCard`](GiftCard.md)
#### Defined in
[models/gift-card-transaction.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L29)
___
### gift\_card\_id
**gift\_card\_id**: `string`
#### Defined in
[models/gift-card-transaction.ts:25](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L25)
___
### id
**id**: `string`
#### Defined in
[models/gift-card-transaction.ts:22](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L22)
___
### is\_taxable
**is\_taxable**: `boolean`
#### Defined in
[models/gift-card-transaction.ts:46](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L46)
___
### order
**order**: [`Order`](Order.md)
#### Defined in
[models/gift-card-transaction.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L37)
___
### order\_id
**order\_id**: `string`
#### Defined in
[models/gift-card-transaction.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L33)
___
### tax\_rate
**tax\_rate**: ``null`` \| `number`
#### Defined in
[models/gift-card-transaction.ts:49](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L49)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/gift-card-transaction.ts:52](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/gift-card-transaction.ts#L52)
File diff suppressed because it is too large Load Diff
@@ -1,125 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: IdempotencyKey
## Constructors
### constructor
**new IdempotencyKey**()
## Properties
### created\_at
**created\_at**: `Date`
#### Defined in
[models/idempotency-key.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L23)
___
### id
**id**: `string`
#### Defined in
[models/idempotency-key.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L16)
___
### idempotency\_key
**idempotency\_key**: `string`
#### Defined in
[models/idempotency-key.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L20)
___
### locked\_at
**locked\_at**: `Date`
#### Defined in
[models/idempotency-key.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L26)
___
### recovery\_point
**recovery\_point**: `string`
#### Defined in
[models/idempotency-key.ts:44](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L44)
___
### request\_method
**request\_method**: `string`
#### Defined in
[models/idempotency-key.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L29)
___
### request\_params
**request\_params**: `Record`<`string`, `unknown`\>
#### Defined in
[models/idempotency-key.ts:32](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L32)
___
### request\_path
**request\_path**: `string`
#### Defined in
[models/idempotency-key.ts:35](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L35)
___
### response\_body
**response\_body**: `Record`<`string`, `unknown`\>
#### Defined in
[models/idempotency-key.ts:41](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L41)
___
### response\_code
**response\_code**: `number`
#### Defined in
[models/idempotency-key.ts:38](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L38)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/idempotency-key.ts:47](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/idempotency-key.ts#L47)
@@ -0,0 +1,92 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# IdempotencyKey
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "locked_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "recovery_point",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "request_method",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "request_params",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "request_path",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "response_body",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "response_code",
"type": "`number`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,111 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Image
## Hierarchy
- `SoftDeletableEntity`
**`Image`**
## Constructors
### constructor
**new Image**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/image.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/image.ts#L13)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### url
**url**: `string`
#### Defined in
[models/image.ts:10](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/image.ts#L10)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/image.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/image.ts#L16)
@@ -0,0 +1,60 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Image
## Properties
<ParameterTypes parameters={[
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "metadata",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "url",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,151 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: Invite
## Hierarchy
- `SoftDeletableEntity`
**`Invite`**
## Constructors
### constructor
**new Invite**()
#### Inherited from
SoftDeletableEntity.constructor
## Properties
### accepted
**accepted**: `boolean`
#### Defined in
[models/invite.ts:23](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L23)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
SoftDeletableEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### deleted\_at
**deleted\_at**: ``null`` \| `Date`
#### Inherited from
SoftDeletableEntity.deleted\_at
#### Defined in
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
___
### expires\_at
**expires\_at**: `Date`
#### Defined in
[models/invite.ts:29](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L29)
___
### id
**id**: `string`
#### Inherited from
SoftDeletableEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/invite.ts:32](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L32)
___
### role
**role**: [`UserRoles`](../enums/UserRoles.md)
#### Defined in
[models/invite.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L20)
___
### token
**token**: `string`
#### Defined in
[models/invite.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L26)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
SoftDeletableEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### user\_email
**user\_email**: `string`
#### Defined in
[models/invite.ts:12](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L12)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/invite.ts:35](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/invite.ts#L35)
@@ -0,0 +1,117 @@
---
displayed_sidebar: entitiesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# Invite
## Properties
<ParameterTypes parameters={[
{
"name": "accepted",
"type": "`boolean`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "deleted_at",
"type": "``null`` \\| `Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "expires_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "metadata",
"type": "Record<`string`, `unknown`\\>",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "role",
"type": "[`UserRoles`](../enums/UserRoles.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
"children": [
{
"name": "ADMIN",
"type": "``\"admin\"``",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "DEVELOPER",
"type": "``\"developer\"``",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
},
{
"name": "MEMBER",
"type": "``\"member\"``",
"description": "",
"optional": true,
"defaultValue": "",
"children": []
}
]
},
{
"name": "token",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "user_email",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]} />
@@ -1,505 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: LineItem
## Hierarchy
- `BaseEntity`
**`LineItem`**
## Constructors
### constructor
**new LineItem**()
#### Inherited from
BaseEntity.constructor
## Properties
### adjustments
**adjustments**: [`LineItemAdjustment`](LineItemAdjustment.md)[]
#### Defined in
[models/line-item.ts:87](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L87)
___
### allow\_discounts
**allow\_discounts**: `boolean`
#### Defined in
[models/line-item.ts:118](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L118)
___
### cart
**cart**: [`Cart`](Cart.md)
#### Defined in
[models/line-item.ts:53](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L53)
___
### cart\_id
**cart\_id**: `string`
#### Defined in
[models/line-item.ts:49](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L49)
___
### claim\_order
**claim\_order**: [`ClaimOrder`](ClaimOrder.md)
#### Defined in
[models/line-item.ts:77](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L77)
___
### claim\_order\_id
**claim\_order\_id**: `string`
#### Defined in
[models/line-item.ts:73](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L73)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
BaseEntity.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### description
**description**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:103](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L103)
___
### discount\_total
`Optional` **discount\_total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:161](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L161)
___
### fulfilled\_quantity
**fulfilled\_quantity**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:141](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L141)
___
### gift\_card\_total
`Optional` **gift\_card\_total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:163](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L163)
___
### has\_shipping
**has\_shipping**: ``null`` \| `boolean`
#### Defined in
[models/line-item.ts:121](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L121)
___
### id
**id**: `string`
#### Inherited from
BaseEntity.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### includes\_tax
**includes\_tax**: `boolean`
#### Defined in
[models/line-item.ts:153](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L153)
___
### is\_giftcard
**is\_giftcard**: `boolean`
#### Defined in
[models/line-item.ts:112](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L112)
___
### is\_return
**is\_return**: `boolean`
#### Defined in
[models/line-item.ts:109](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L109)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/line-item.ts:150](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L150)
___
### order
**order**: [`Order`](Order.md)
#### Defined in
[models/line-item.ts:61](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L61)
___
### order\_edit
`Optional` **order\_edit**: ``null`` \| [`OrderEdit`](OrderEdit.md)
#### Defined in
[models/line-item.ts:97](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L97)
___
### order\_edit\_id
`Optional` **order\_edit\_id**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:93](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L93)
___
### order\_id
**order\_id**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:57](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L57)
___
### original\_item\_id
`Optional` **original\_item\_id**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:90](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L90)
___
### original\_tax\_total
`Optional` **original\_tax\_total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:160](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L160)
___
### original\_total
`Optional` **original\_total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:159](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L159)
___
### product\_id
**product\_id**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:135](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L135)
___
### quantity
**quantity**: `number`
#### Defined in
[models/line-item.ts:138](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L138)
___
### raw\_discount\_total
`Optional` **raw\_discount\_total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:162](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L162)
___
### refundable
`Optional` **refundable**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:155](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L155)
___
### returned\_quantity
**returned\_quantity**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:144](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L144)
___
### shipped\_quantity
**shipped\_quantity**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:147](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L147)
___
### should\_merge
**should\_merge**: `boolean`
#### Defined in
[models/line-item.ts:115](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L115)
___
### subtotal
`Optional` **subtotal**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:156](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L156)
___
### swap
**swap**: [`Swap`](Swap.md)
#### Defined in
[models/line-item.ts:69](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L69)
___
### swap\_id
**swap\_id**: `string`
#### Defined in
[models/line-item.ts:65](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L65)
___
### tax\_lines
**tax\_lines**: [`LineItemTaxLine`](LineItemTaxLine.md)[]
#### Defined in
[models/line-item.ts:82](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L82)
___
### tax\_total
`Optional` **tax\_total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:157](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L157)
___
### thumbnail
**thumbnail**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:106](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L106)
___
### title
**title**: `string`
#### Defined in
[models/line-item.ts:100](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L100)
___
### total
`Optional` **total**: ``null`` \| `number`
#### Defined in
[models/line-item.ts:158](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L158)
___
### unit\_price
**unit\_price**: `number`
#### Defined in
[models/line-item.ts:124](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L124)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
BaseEntity.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
___
### variant
**variant**: [`ProductVariant`](ProductVariant.md)
#### Defined in
[models/line-item.ts:132](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L132)
___
### variant\_id
**variant\_id**: ``null`` \| `string`
#### Defined in
[models/line-item.ts:128](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L128)
## Methods
### afterUpdateOrLoad
**afterUpdateOrLoad**(): `void`
#### Returns
`void`
#### Defined in
[models/line-item.ts:193](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L193)
___
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/line-item.ts:166](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L166)
___
### beforeUpdate
**beforeUpdate**(): `void`
#### Returns
`void`
#### Defined in
[models/line-item.ts:182](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item.ts#L182)
File diff suppressed because it is too large Load Diff
@@ -1,105 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: LineItemAdjustment
## Constructors
### constructor
**new LineItemAdjustment**()
## Properties
### amount
**amount**: `number`
#### Defined in
[models/line-item-adjustment.ts:44](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L44)
___
### description
**description**: `string`
#### Defined in
[models/line-item-adjustment.ts:33](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L33)
___
### discount
**discount**: [`Discount`](Discount.md)
#### Defined in
[models/line-item-adjustment.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L37)
___
### discount\_id
**discount\_id**: `string`
#### Defined in
[models/line-item-adjustment.ts:41](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L41)
___
### id
**id**: `string`
#### Defined in
[models/line-item-adjustment.ts:22](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L22)
___
### item
**item**: [`LineItem`](LineItem.md)
#### Defined in
[models/line-item-adjustment.ts:30](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L30)
___
### item\_id
**item\_id**: `string`
#### Defined in
[models/line-item-adjustment.ts:26](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L26)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Defined in
[models/line-item-adjustment.ts:47](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L47)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/line-item-adjustment.ts:50](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-adjustment.ts#L50)
File diff suppressed because it is too large Load Diff
@@ -1,153 +0,0 @@
---
displayed_sidebar: entitiesSidebar
---
# Class: LineItemTaxLine
## Hierarchy
- `TaxLine`
**`LineItemTaxLine`**
## Constructors
### constructor
**new LineItemTaxLine**()
#### Inherited from
TaxLine.constructor
## Properties
### code
**code**: ``null`` \| `string`
#### Inherited from
TaxLine.code
#### Defined in
[models/tax-line.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/tax-line.ts#L13)
___
### created\_at
**created\_at**: `Date`
#### Inherited from
TaxLine.created\_at
#### Defined in
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L16)
___
### id
**id**: `string`
#### Inherited from
TaxLine.id
#### Defined in
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L13)
___
### item
**item**: [`LineItem`](LineItem.md)
#### Defined in
[models/line-item-tax-line.ts:24](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-tax-line.ts#L24)
___
### item\_id
**item\_id**: `string`
#### Defined in
[models/line-item-tax-line.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-tax-line.ts#L20)
___
### metadata
**metadata**: `Record`<`string`, `unknown`\>
#### Inherited from
TaxLine.metadata
#### Defined in
[models/tax-line.ts:16](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/tax-line.ts#L16)
___
### name
**name**: `string`
#### Inherited from
TaxLine.name
#### Defined in
[models/tax-line.ts:10](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/tax-line.ts#L10)
___
### rate
**rate**: `number`
#### Inherited from
TaxLine.rate
#### Defined in
[models/tax-line.ts:7](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/tax-line.ts#L7)
___
### updated\_at
**updated\_at**: `Date`
#### Inherited from
TaxLine.updated\_at
#### Defined in
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/models/base-entity.ts#L19)
## Methods
### beforeInsert
`Private` **beforeInsert**(): `void`
#### Returns
`void`
#### Defined in
[models/line-item-tax-line.ts:27](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/models/line-item-tax-line.ts#L27)
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More