chore: reorganize docs apps (#7228)
* reorganize docs apps * add README * fix directory * add condition for old docs
This commit is contained in:
1 parent
224ebb2154
commit
4fe28f5a95
6187 files changed
+601447
-598226
No files matched your search
+94
@@ -0,0 +1,94 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/addLineItemAdjustments
|
||||
sidebar_label: addLineItemAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# addLineItemAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `addLineItemAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
## addLineItemAdjustments(data): Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>
|
||||
|
||||
This method adds line item adjustments to line items.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.addLineItemAdjustments([
|
||||
{
|
||||
item_id: "caliadj_123",
|
||||
code: "50%OFF",
|
||||
amount: 3000,
|
||||
},
|
||||
{
|
||||
item_id: "caliadj_321",
|
||||
code: "10%OFF",
|
||||
amount: 3000,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateLineItemAdjustmentDTO](../../../interfaces/cart.CreateLineItemAdjustmentDTO/page.mdx)[]","description":"The line item adjustments to be created and added to line items.\nThe line item is specified by the `item_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addLineItemAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item adjustments.","expandable":false,"children":[{"name":"LineItemAdjustmentDTO[]","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemAdjustmentDTO","type":"`object`","description":"The line item adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItemAdjustments"/>
|
||||
|
||||
## addLineItemAdjustments(data): Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>
|
||||
|
||||
This method adds a line item adjustment to a line item.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.addLineItemAdjustments({
|
||||
item_id: "caliadj_123",
|
||||
code: "50%OFF",
|
||||
amount: 3000,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateLineItemAdjustmentDTO](../../../interfaces/cart.CreateLineItemAdjustmentDTO/page.mdx)","description":"The line item adjustment to be created and added to a line item.\nThe line item is specified by the `item_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addLineItemAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item adjustment.","expandable":false,"children":[{"name":"LineItemAdjustmentDTO[]","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemAdjustmentDTO","type":"`object`","description":"The line item adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItemAdjustments"/>
|
||||
|
||||
## addLineItemAdjustments(cartId, data): Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>
|
||||
|
||||
This method adds line item adjustments to line items in a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.addLineItemAdjustments("cart_123", [
|
||||
{
|
||||
item_id: "caliadj_123",
|
||||
code: "50%OFF",
|
||||
amount: 3000,
|
||||
},
|
||||
{
|
||||
item_id: "caliadj_321",
|
||||
code: "10%OFF",
|
||||
amount: 2000,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[CreateLineItemAdjustmentDTO](../../../interfaces/cart.CreateLineItemAdjustmentDTO/page.mdx)[]","description":"The line item adjustments to be created and added to line items.\nThe line item is specified by the `item_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addLineItemAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item adjustment.","expandable":false,"children":[{"name":"LineItemAdjustmentDTO[]","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemAdjustmentDTO","type":"`object`","description":"The line item adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItemAdjustments"/>
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/addLineItemTaxLines
|
||||
sidebar_label: addLineItemTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# addLineItemTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `addLineItemTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
## addLineItemTaxLines(taxLines): Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]>
|
||||
|
||||
This method creates and adds line item tax lines.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.addLineItemTaxLines([
|
||||
{
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
},
|
||||
{
|
||||
code: "1234",
|
||||
rate: 20,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"taxLines","type":"[CreateLineItemTaxLineDTO](../../../interfaces/cart.CreateLineItemTaxLineDTO/page.mdx)[]","description":"The line item tax lines to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addLineItemTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item tax lines.","expandable":false,"children":[{"name":"LineItemTaxLineDTO[]","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemTaxLineDTO","type":"`object`","description":"The line item tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItemTaxLines"/>
|
||||
|
||||
## addLineItemTaxLines(taxLine): Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)>
|
||||
|
||||
This method creates and adds a line item tax line.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.addLineItemTaxLines({
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"taxLine","type":"[CreateLineItemTaxLineDTO](../../../interfaces/cart.CreateLineItemTaxLineDTO/page.mdx)","description":"The line item tax line to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addLineItemTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The added line item tax line.","expandable":false,"children":[{"name":"LineItemTaxLineDTO","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)","optional":false,"defaultValue":"","description":"The line item tax line details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the tax line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the tax line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","description":"The associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"Line truncated
|
||||
|
||||
## addLineItemTaxLines(cartId, taxLines, sharedContext?): Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]>
|
||||
|
||||
This method creates and adds one or more line item tax lines to a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.addLineItemTaxLines("cart_123", {
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxLines","type":"[CreateLineItemTaxLineDTO](../../../interfaces/cart.CreateLineItemTaxLineDTO/page.mdx) \\| [CreateLineItemTaxLineDTO](../../../interfaces/cart.CreateLineItemTaxLineDTO/page.mdx)[]","description":"The line item tax lines to add.\nYou can specify one or more items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addLineItemTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item tax lines.","expandable":false,"children":[{"name":"LineItemTaxLineDTO[]","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemTaxLineDTO","type":"`object`","description":"The line item tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItemTaxLines"/>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/addLineItems
|
||||
sidebar_label: addLineItems
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# addLineItems - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `addLineItems` method. This belongs to the Cart Module.
|
||||
|
||||
## addLineItems(data): Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>
|
||||
|
||||
This method adds a line item to a cart
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItem = await cartModuleService.addLineItems({
|
||||
cart_id: "cart_123",
|
||||
title: "Shirt",
|
||||
quantity: 2,
|
||||
unit_price: 4000,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateLineItemForCartDTO](../../../interfaces/cart.CreateLineItemForCartDTO/page.mdx)","description":"The line item to create and add to the cart.\nThe cart is specified in the `cart_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record<string, unknown>`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","oLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item.","expandable":false,"children":[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"`object`","description":"The cart line item details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItems"/>
|
||||
|
||||
## addLineItems(data): Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>
|
||||
|
||||
This method adds line items to carts.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.addLineItems([
|
||||
{
|
||||
cart_id: "cart_123",
|
||||
title: "Shirt",
|
||||
quantity: 2,
|
||||
unit_price: 4000,
|
||||
},
|
||||
{
|
||||
cart_id: "cart_123",
|
||||
title: "Pants",
|
||||
quantity: 1,
|
||||
unit_price: 3000,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateLineItemForCartDTO](../../../interfaces/cart.CreateLineItemForCartDTO/page.mdx)[]","description":"The line item to create and add to the carts.\nThe cart is specified in the `cart_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record<string, unknown>`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID."Line truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line items.","expandable":false,"children":[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"`object`","description":"The cart line item details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItems"/>
|
||||
|
||||
## addLineItems(cartId, items, sharedContext?): Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>
|
||||
|
||||
This method adds line items to a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.addLineItems(
|
||||
"cart_123",
|
||||
[
|
||||
{
|
||||
title: "Shirt",
|
||||
quantity: 2,
|
||||
unit_price: 4000,
|
||||
},
|
||||
{
|
||||
title: "Pants",
|
||||
quantity: 1,
|
||||
unit_price: 3000,
|
||||
},
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CreateLineItemDTO](../../../interfaces/cart.CreateLineItemDTO/page.mdx)[]","description":"The line items to be created and added.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record<string, unknown>`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"providerLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line items.","expandable":false,"children":[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"`object`","description":"The cart line item details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addLineItems"/>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/addShippingMethodAdjustments
|
||||
sidebar_label: addShippingMethodAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# addShippingMethodAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `addShippingMethodAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
## addShippingMethodAdjustments(data): Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]>
|
||||
|
||||
This method adds shipping method adjustments to shipping methods.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustments =
|
||||
await cartModuleService.addShippingMethodAdjustments([
|
||||
{
|
||||
shipping_method_id: "casm_123",
|
||||
code: "FREESHIPPING",
|
||||
amount: 3000,
|
||||
},
|
||||
{
|
||||
shipping_method_id: "casm_321",
|
||||
code: "10%OFF",
|
||||
amount: 1500,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateShippingMethodAdjustmentDTO](../../../interfaces/cart.CreateShippingMethodAdjustmentDTO/page.mdx)[]","description":"The shipping method adjustments to be created and added to\nshipping methods. The shipping method is specified by the `shipping_method_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_method_id","type":"`string`","description":"The associated shipping method's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping method adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addShippingMethodAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping method adjustments.","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO[]","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO","type":"`object`","description":"The shipping method adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethodAdjustments"/>
|
||||
|
||||
## addShippingMethodAdjustments(data): Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)>
|
||||
|
||||
This method adds a shipping method adjustment to a shipping method.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustment =
|
||||
await cartModuleService.addShippingMethodAdjustments({
|
||||
shipping_method_id: "casm_123",
|
||||
code: "FREESHIPPING",
|
||||
amount: 3000,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateShippingMethodAdjustmentDTO](../../../interfaces/cart.CreateShippingMethodAdjustmentDTO/page.mdx)","description":"The shipping method adjustment to be created and added to a\nshipping method. The shipping method is specified by the `shipping_method_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_method_id","type":"`string`","description":"The associated shipping method's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping method adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addShippingMethodAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The added shipping method adjustment.","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping method adjustment details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the adjustment line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the adjustment line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the adjustment line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)","description":"The associated shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The price of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the shipping method price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the shipping method was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the shipping method was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"Line truncated
|
||||
|
||||
## addShippingMethodAdjustments(cartId, data, sharedContext?): Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]>
|
||||
|
||||
This method adds shipping method adjustments to shipping methods in a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustments =
|
||||
await cartModuleService.addShippingMethodAdjustments(
|
||||
"cart_123",
|
||||
[
|
||||
{
|
||||
shipping_method_id: "casm_123",
|
||||
code: "FREESHIPPING",
|
||||
amount: 3000,
|
||||
},
|
||||
{
|
||||
shipping_method_id: "casm_321",
|
||||
code: "10%OFF",
|
||||
amount: 1500,
|
||||
},
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[CreateShippingMethodAdjustmentDTO](../../../interfaces/cart.CreateShippingMethodAdjustmentDTO/page.mdx)[]","description":"The shipping method adjustments to be created and added to\nshipping methods. The shipping method is specified by the `shipping_method_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_method_id","type":"`string`","description":"The associated shipping method's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping method adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addShippingMethodAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping method adjustments.","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO[]","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO","type":"`object`","description":"The shipping method adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethodAdjustments"/>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/addShippingMethodTaxLines
|
||||
sidebar_label: addShippingMethodTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# addShippingMethodTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `addShippingMethodTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
## addShippingMethodTaxLines(taxLines): Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]>
|
||||
|
||||
This method creates and adds shipping method tax lines.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLines =
|
||||
await cartModuleService.addShippingMethodTaxLines([
|
||||
{
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
},
|
||||
{
|
||||
code: "1234",
|
||||
rate: 20,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"taxLines","type":"[CreateShippingMethodTaxLineDTO](../../../interfaces/cart.CreateShippingMethodTaxLineDTO/page.mdx)[]","description":"The shipping method tax lines to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addShippingMethodTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping method tax lines.","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO[]","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO","type":"`object`","description":"The shipping method tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethodTaxLines"/>
|
||||
|
||||
## addShippingMethodTaxLines(taxLine): Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)>
|
||||
|
||||
This method creates and adds a shipping method tax line.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLine =
|
||||
await cartModuleService.addShippingMethodTaxLines({
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"taxLine","type":"[CreateShippingMethodTaxLineDTO](../../../interfaces/cart.CreateShippingMethodTaxLineDTO/page.mdx)","description":"The shipping method tax line to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addShippingMethodTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The added shipping method tax line.","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)","optional":false,"defaultValue":"","description":"The shipping method tax line details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax line","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the tax line was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the tax line was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)","description":"The associated shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The price of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the shipping method price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the shipping method was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the shipping method was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},Line truncated
|
||||
|
||||
## addShippingMethodTaxLines(cartId, taxLines, sharedContext?): Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]>
|
||||
|
||||
This method creates and adds one or more shipping method tax lines to a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLines =
|
||||
await cartModuleService.addShippingMethodTaxLines(
|
||||
"cart_123",
|
||||
[
|
||||
{
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
},
|
||||
{
|
||||
code: "1234",
|
||||
rate: 20,
|
||||
},
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxLines","type":"[CreateShippingMethodTaxLineDTO](../../../interfaces/cart.CreateShippingMethodTaxLineDTO/page.mdx) \\| [CreateShippingMethodTaxLineDTO](../../../interfaces/cart.CreateShippingMethodTaxLineDTO/page.mdx)[]","description":"The shipping item tax lines to add.\nIf the `id` field is specified, the tax line is kept and its attributes can be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addShippingMethodTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping method tax lines.","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO[]","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO","type":"`object`","description":"The shipping method tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethodTaxLines"/>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/addShippingMethods
|
||||
sidebar_label: addShippingMethods
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# addShippingMethods - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `addShippingMethods` method. This belongs to the Cart Module.
|
||||
|
||||
## addShippingMethods(data): Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)>
|
||||
|
||||
This method adds a shipping method to carts.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethod =
|
||||
await cartModuleService.addShippingMethods({
|
||||
cart_id: "cart_123",
|
||||
name: "UPS",
|
||||
amount: 3000,
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateShippingMethodDTO](../../../interfaces/cart.CreateShippingMethodDTO/page.mdx)","description":"The shipping method to be created and added to the carts.\nThe cart is specified in the `cart_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethods"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The added shipping method.","expandable":false,"children":[{"name":"CartShippingMethodDTO","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart shipping method details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The price of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the shipping method price is tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the shipping method was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the shipping method was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total of the cart shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_Line truncated
|
||||
|
||||
## addShippingMethods(data): Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]>
|
||||
|
||||
This method adds shipping methods to carts.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethods =
|
||||
await cartModuleService.addShippingMethods([
|
||||
{
|
||||
cart_id: "cart_123",
|
||||
name: "UPS",
|
||||
amount: 3000,
|
||||
},
|
||||
{
|
||||
cart_id: "cart_123",
|
||||
name: "FedEx",
|
||||
amount: 2000,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateShippingMethodDTO](../../../interfaces/cart.CreateShippingMethodDTO/page.mdx)[]","description":"The shipping methods to be created and added to the carts.\nThe cart is specified in the `cart_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethods"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping methods.","expandable":false,"children":[{"name":"CartShippingMethodDTO[]","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartShippingMethodDTO","type":"`object`","description":"The cart shipping method details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethods"/>
|
||||
|
||||
## addShippingMethods(cartId, methods, sharedContext?): Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]>
|
||||
|
||||
This method adds shipping methods to a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const shippingMethods =
|
||||
await cartModuleService.addShippingMethods("cart_123", [
|
||||
{
|
||||
name: "UPS",
|
||||
amount: 3000,
|
||||
},
|
||||
{
|
||||
name: "FedEx",
|
||||
amount: 2000,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methods","type":"[CreateShippingMethodForSingleCartDTO](../../../interfaces/cart.CreateShippingMethodForSingleCartDTO/page.mdx)[]","description":"The shipping methods to be created and added.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[]","description":"The tax lines of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the tax line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string`","description":"The associated tax rate's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[]","description":"The adjustments of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the promotion that lead to\nthis adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"dLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping methods.","expandable":false,"children":[{"name":"CartShippingMethodDTO[]","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartShippingMethodDTO","type":"`object`","description":"The cart shipping method details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addShippingMethods"/>
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/create
|
||||
sidebar_label: create
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# create - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `create` method. This belongs to the Cart Module.
|
||||
|
||||
## create(data, sharedContext?): Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>
|
||||
|
||||
This method creates carts.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const carts = await cartModuleService.create([
|
||||
{
|
||||
currency_code: "usd",
|
||||
},
|
||||
{
|
||||
currency_code: "eur",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateCartDTO](../../../interfaces/cart.CreateCartDTO/page.mdx)[]","description":"The carts to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The associated region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The associated shipping address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The associated billing address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`string` \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The billing address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CreateLineItemDTO](../../../interfaces/cart.CreateLineItemDTO/page.mdx)[]","description":"The items of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandabLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The created carts.","expandable":false,"children":[{"name":"CartDTO[]","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartDTO","type":"`object`","description":"The cart details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="create"/>
|
||||
|
||||
## create(data, sharedContext?): Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>
|
||||
|
||||
This method creates a cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const cart = await cartModuleService.create({
|
||||
currency_code: "usd",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateCartDTO](../../../interfaces/cart.CreateCartDTO/page.mdx)","description":"The cart to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The associated region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`string`","description":"The associated shipping address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`string`","description":"The associated billing address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`string` \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The billing address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CreateLineItemDTO](../../../interfaces/cart.CreateLineItemDTO/page.mdx)[]","description":"The items of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The title of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable"Line truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The created cart.","expandable":false,"children":[{"name":"CartDTO","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable"Line truncated
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/createAddresses
|
||||
sidebar_label: createAddresses
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# createAddresses - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `createAddresses` method. This belongs to the Cart Module.
|
||||
|
||||
## createAddresses(data, sharedContext?): Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]>
|
||||
|
||||
This method creates addresses.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const addresses = await cartModuleService.createAddresses([
|
||||
{
|
||||
address_1: "412 E Cheyenne Rd",
|
||||
country_code: "us",
|
||||
},
|
||||
{
|
||||
first_name: "Genevieve",
|
||||
last_name: "Fox",
|
||||
address_1: "17350 Northwest Fwy",
|
||||
country_code: "us",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)[]","description":"The addresss to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="createAddresses"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The created addresses.","expandable":false,"children":[{"name":"CartAddressDTO[]","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartAddressDTO","type":"`object`","description":"The cart address details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createAddresses"/>
|
||||
|
||||
## createAddresses(data, sharedContext?): Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)>
|
||||
|
||||
This method creates a address.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const address = await cartModuleService.createAddresses({
|
||||
first_name: "Genevieve",
|
||||
last_name: "Fox",
|
||||
address_1: "17350 Northwest Fwy",
|
||||
country_code: "us",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The address to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="createAddresses"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The created address.","expandable":false,"children":[{"name":"CartAddressDTO","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart address details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the address was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the address was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer ID of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createAddresses"/>
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/delete
|
||||
sidebar_label: delete
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# delete - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `delete` method. This belongs to the Cart Module.
|
||||
|
||||
## delete(cartIds, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes carts by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.delete(["cart_123", "cart_321"])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartIds","type":"`string`[]","description":"The list of cart IDs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="delete"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the carts are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="delete"/>
|
||||
|
||||
## delete(cartId, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a cart by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.delete("cart_123")
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="delete"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the carts are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="delete"/>
|
||||
|
||||
## delete(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes carts by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.delete(["cart_123", "cart_321"])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="delete"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the carts are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="delete"/>
|
||||
|
||||
## delete(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a cart by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.delete("cart_123")
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="delete"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when a cart is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="delete"/>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteAddresses
|
||||
sidebar_label: deleteAddresses
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteAddresses - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteAddresses` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteAddresses(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes addresses by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteAddresses([
|
||||
"caaddr_123",
|
||||
"caaddr_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteAddresses"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the addresses are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteAddresses"/>
|
||||
|
||||
## deleteAddresses(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes an address by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteAddresses("caaddr_123")
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`","description":"The IDs of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteAddresses"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the address are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteAddresses"/>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteLineItemAdjustments
|
||||
sidebar_label: deleteLineItemAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteLineItemAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteLineItemAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteLineItemAdjustments(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes line item adjustments by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteLineItemAdjustments([
|
||||
"caliadj_123",
|
||||
"caliadj_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line item adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteLineItemAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the line item adjustments are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteLineItemAdjustments"/>
|
||||
|
||||
## deleteLineItemAdjustments(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a line item adjustment by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteLineItemAdjustments(
|
||||
"caliadj_123"
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the line item adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteLineItemAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the line item adjustment is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteLineItemAdjustments"/>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteLineItemTaxLines
|
||||
sidebar_label: deleteLineItemTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteLineItemTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteLineItemTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteLineItemTaxLines(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes line item tax lines by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteLineItemTaxLines([
|
||||
"calitxl_123",
|
||||
"calitxl_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line item tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteLineItemTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the line item tax lines are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteLineItemTaxLines"/>
|
||||
|
||||
## deleteLineItemTaxLines(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a line item tax line by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteLineItemTaxLines("calitxl_123")
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the line item tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteLineItemTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the line item tax line is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteLineItemTaxLines"/>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteLineItems
|
||||
sidebar_label: deleteLineItems
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteLineItems - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteLineItems` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteLineItems(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes line items by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteLineItems([
|
||||
"cali_123",
|
||||
"cali_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteLineItems"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the line items are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteLineItems"/>
|
||||
|
||||
## deleteLineItems(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a line item by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteLineItems("cali_123")
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteLineItems"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when a line item is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteLineItems"/>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteShippingMethodAdjustments
|
||||
sidebar_label: deleteShippingMethodAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteShippingMethodAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteShippingMethodAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteShippingMethodAdjustments(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes shipping method adjustments by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteShippingMethodAdjustments([
|
||||
"casmadj_123",
|
||||
"casmadj_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping method adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteShippingMethodAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the shipping method adjustments are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethodAdjustments"/>
|
||||
|
||||
## deleteShippingMethodAdjustments(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a shipping method adjustment by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteShippingMethodAdjustments(
|
||||
"casmadj_123"
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping method adjustment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteShippingMethodAdjustments"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when shipping method adjustment is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethodAdjustments"/>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteShippingMethodTaxLines
|
||||
sidebar_label: deleteShippingMethodTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteShippingMethodTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteShippingMethodTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteShippingMethodTaxLines(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes shipping method tax lines by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteShippingMethodTaxLines([
|
||||
"casmtxl_123",
|
||||
"casmtxl_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping method tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteShippingMethodTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the shipping method tax lines are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethodTaxLines"/>
|
||||
|
||||
## deleteShippingMethodTaxLines(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a shipping method tax line by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteShippingMethodTaxLines(
|
||||
"casmtxl_123"
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping method tax line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteShippingMethodTaxLines"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the shipping method tax line is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethodTaxLines"/>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/deleteShippingMethods
|
||||
sidebar_label: deleteShippingMethods
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deleteShippingMethods - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `deleteShippingMethods` method. This belongs to the Cart Module.
|
||||
|
||||
## deleteShippingMethods(ids, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes shipping methods by their IDs.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteShippingMethods([
|
||||
"casm_123",
|
||||
"casm_321",
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteShippingMethods"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the shipping methods are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethods"/>
|
||||
|
||||
## deleteShippingMethods(id, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a shipping method by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.deleteShippingMethods("casm_123")
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteShippingMethods"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the shipping method is deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethods"/>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/list
|
||||
sidebar_label: list
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# list - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `list` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of carts based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of carts using their IDs:
|
||||
|
||||
```ts
|
||||
const carts = await cartModuleService.list({
|
||||
id: ["cart_123", "cart_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the carts:
|
||||
|
||||
```ts
|
||||
const carts = await cartModuleService.list(
|
||||
{
|
||||
id: ["cart_123", "cart_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_address"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const carts = await cartModuleService.list(
|
||||
{
|
||||
id: ["cart_123", "cart_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_address"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableCartProps](../../../interfaces/cart.FilterableCartProps/page.mdx)","description":"The filters to apply on the retrieved carts.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the carts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by the ID of their associated sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by the ID of their associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by the ID of their associated region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../types/cart.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated_at","type":"[OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","typeLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of carts.","expandable":false,"children":[{"name":"CartDTO[]","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartDTO","type":"`object`","description":"The cart details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="list"/>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listAddresses
|
||||
sidebar_label: listAddresses
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listAddresses - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listAddresses` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of addresses based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of addresses using their IDs:
|
||||
|
||||
```ts
|
||||
const addresses = await cartModuleService.listAddresses({
|
||||
id: ["caaddr_123", "caaddr_321"],
|
||||
})
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const addresses = await cartModuleService.listAddresses(
|
||||
{
|
||||
id: ["caaddr_123", "caaddr_321"],
|
||||
},
|
||||
{
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableAddressProps](../../../interfaces/cart.FilterableAddressProps/page.mdx)","description":"The filters to apply on the retrieved addresss.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the addresss by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAddressProps](../../../interfaces/cart.FilterableAddressProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableAddressProps](../../../interfaces/cart.FilterableAddressProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAddressProps](../../../interfaces/cart.FilterableAddressProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableAddressProps](../../../interfaces/cart.FilterableAddressProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)>","description":"The configurations determining how the address is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of addresses.","expandable":false,"children":[{"name":"CartAddressDTO[]","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartAddressDTO","type":"`object`","description":"The cart address details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listAddresses"/>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listAndCount
|
||||
sidebar_label: listAndCount
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listAndCount - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listAndCount` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of carts along with the total count of available carts satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of carts using their IDs:
|
||||
|
||||
```ts
|
||||
const [carts, count] = await cartModuleService.listAndCount({
|
||||
id: ["cart_123", "cart_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the carts:
|
||||
|
||||
```ts
|
||||
const [carts, count] = await cartModuleService.listAndCount(
|
||||
{
|
||||
id: ["cart_123", "cart_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_address"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const [carts, count] = await cartModuleService.listAndCount(
|
||||
{
|
||||
id: ["cart_123", "cart_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_address"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableCartProps](../../../interfaces/cart.FilterableCartProps/page.mdx)","description":"The filters to apply on the retrieved carts.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the carts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by the ID of their associated sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by the ID of their associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by the ID of their associated region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../types/cart.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../types/cart.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated_at","type":"[OperatorMap](../../../types/cart.OperatorMap/page.mdx)<string>","description":"Filter the carts by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../types/cart.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","typeLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of carts along with their total count.","expandable":false,"children":[{"name":"CartDTO[]","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listLineItemAdjustments
|
||||
sidebar_label: listLineItemAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listLineItemAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listLineItemAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of line item adjustments based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of line item adjustments using their IDs:
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.listLineItemAdjustments({
|
||||
id: ["caliadj_123", "caliadj_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the line item adjustments:
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.listLineItemAdjustments(
|
||||
{
|
||||
id: ["caliadj_123", "caliadj_321"],
|
||||
},
|
||||
{
|
||||
relations: ["item"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.listLineItemAdjustments(
|
||||
{
|
||||
id: ["caliadj_123", "caliadj_321"],
|
||||
},
|
||||
{
|
||||
relations: ["item"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableLineItemAdjustmentProps](../../../interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx)","description":"The filters to apply on the retrieved line item adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line item adjustments by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string` \\| `string`[]","description":"Filter the adjustments by the ID of their associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string` \\| `string`[]","description":"Filter the line item adjustments by the ID of their associated promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string` \\| `string`[]","description":"Filter the line item adjustments by the ID of their associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)","description":"Filter the adjustments by their associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([FilterableLineItemAdjustmentProps](../../../interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemAdjustmentProps](../../../interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemAdjustmentProps](../../../interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemAdjustmentProps](../../../interfaces/cart.FilterableLineItemAdjustmentProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)>","description":"The configurations determining how the line item adjustment is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a line item adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of line item adjustments.","expandable":false,"children":[{"name":"LineItemAdjustmentDTO[]","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemAdjustmentDTO","type":"`object`","description":"The line item adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listLineItemAdjustments"/>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listLineItemTaxLines
|
||||
sidebar_label: listLineItemTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listLineItemTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listLineItemTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of line item tax lines based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of line item tax lines using their IDs:
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.listLineItemTaxLines({
|
||||
id: ["calitxl_123", "calitxl_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the line item tax lines:
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.listLineItemTaxLines(
|
||||
{
|
||||
id: ["calitxl_123", "calitxl_321"],
|
||||
},
|
||||
{
|
||||
relations: ["item"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.listLineItemTaxLines(
|
||||
{
|
||||
id: ["calitxl_123", "calitxl_321"],
|
||||
},
|
||||
{
|
||||
relations: ["item"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableLineItemTaxLineProps](../../../interfaces/cart.FilterableLineItemTaxLineProps/page.mdx)","description":"The filters to apply on the retrieved line item tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line item tax lines by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Filter the line item tax lines by their description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[]","description":"Filter the line item tax lines by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string` \\| `string`[]","description":"Filter the line item tax lines by the ID of their associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string` \\| `string`[]","description":"Filter the line item tax lines by the ID of their associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string` \\| `string`[]","description":"Filter the tax lines by the ID of their associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)","description":"Filter the tax lines by their associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([FilterableLineItemTaxLineProps](../../../interfaces/cart.FilterableLineItemTaxLineProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemTaxLineProps](../../../interfaces/cart.FilterableLineItemTaxLineProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemTaxLineProps](../../../interfaces/cart.FilterableLineItemTaxLineProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemTaxLineProps](../../../interfaces/cart.FilterableLineItemTaxLineProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)>","description":"The configurations determining how the line item tax line is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a line item tax line.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","typLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of line item tax lines.","expandable":false,"children":[{"name":"LineItemTaxLineDTO[]","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemTaxLineDTO","type":"`object`","description":"The line item tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listLineItemTaxLines"/>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listLineItems
|
||||
sidebar_label: listLineItems
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listLineItems - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listLineItems` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of line items based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of line items using their IDs:
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.listLineItems({
|
||||
id: ["cali_123", "cali_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the line items:
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.listLineItems(
|
||||
{
|
||||
id: ["cali_123", "cali_321"],
|
||||
},
|
||||
{
|
||||
relations: ["cart"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.listLineItems(
|
||||
{
|
||||
id: ["cali_123", "cali_321"],
|
||||
},
|
||||
{
|
||||
relations: ["cart"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)","description":"The filters to apply on the retrieved line items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableLineItemProps](../../../interfaces/cart.FilterableLineItemProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>","description":"The configurations determining how the line item is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of line items.","expandable":false,"children":[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"`object`","description":"The cart line item details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listLineItems"/>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listShippingMethodAdjustments
|
||||
sidebar_label: listShippingMethodAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listShippingMethodAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listShippingMethodAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of shipping method adjustments based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of shipping method adjustments using their IDs:
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustments =
|
||||
await cartModuleService.listShippingMethodAdjustments({
|
||||
id: ["casmadj_123", "casmadj_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the shipping method adjustments:
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustments =
|
||||
await cartModuleService.listShippingMethodAdjustments(
|
||||
{
|
||||
id: ["casmadj_123", "casmadj_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_method"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustments =
|
||||
await cartModuleService.listShippingMethodAdjustments(
|
||||
{
|
||||
id: ["casmadj_123", "casmadj_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_method"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableShippingMethodAdjustmentProps](../../../interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx)","description":"The filters to apply on the retrieved shipping method adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the shipping method adjustments by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method_id","type":"`string` \\| `string`[]","description":"Filter the adjustments by the ID of their associated shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string` \\| `string`[]","description":"Filter the shipping method adjustments by the ID of their associated promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string` \\| `string`[]","description":"Filter the shipping method adjustments by the ID of their associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)","description":"Filter the adjustments by their associated shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the shipping methods by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the shipping methods by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"Filter the shipping methods by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string` \\| `string`[]","description":"Filter the shipping methods by the ID of their associated shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([FilterableShippingMethodAdjustmentProps](../../../interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodAdjustmentProps](../../../interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingMethodAdjustmentProps](../../../interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodAdjustmentProps](../../../interfaces/cart.FilterableShippingMethodAdjustmentProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)>","description":"The configurations determining how the shipping method adjustment is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a shipping method adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","descripLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of shipping method adjustments.","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO[]","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO","type":"`object`","description":"The shipping method adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listShippingMethodAdjustments"/>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listShippingMethodTaxLines
|
||||
sidebar_label: listShippingMethodTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listShippingMethodTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listShippingMethodTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of shipping method tax lines based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of shipping method tax lines using their IDs:
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLines =
|
||||
await cartModuleService.listShippingMethodTaxLines({
|
||||
id: ["casmtxl_123", "casmtxl_321"],
|
||||
})
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the shipping method tax lines:
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLines =
|
||||
await cartModuleService.listShippingMethodTaxLines(
|
||||
{
|
||||
id: ["casmtxl_123", "casmtxl_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_method"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLines =
|
||||
await cartModuleService.listShippingMethodTaxLines(
|
||||
{
|
||||
id: ["casmtxl_123", "casmtxl_321"],
|
||||
},
|
||||
{
|
||||
relations: ["shipping_method"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableShippingMethodTaxLineProps](../../../interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx)","description":"The filters to apply on the retrieved shipping method tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the shipping method tax lines by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Filter the shipping method tax lines by their description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[]","description":"Filter the shipping method tax lines by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate_id","type":"`string` \\| `string`[]","description":"Filter the shipping method tax lines by the ID of their associated tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string` \\| `string`[]","description":"Filter the shipping method tax lines by the ID of their associated provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method_id","type":"`string` \\| `string`[]","description":"Filter the tax lines by the ID of their associated shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method","type":"[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)","description":"Filter the tax lines by their associated shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the shipping methods by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the shipping methods by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"Filter the shipping methods by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string` \\| `string`[]","description":"Filter the shipping methods by the ID of their associated shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$and","type":"([FilterableShippingMethodTaxLineProps](../../../interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodTaxLineProps](../../../interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingMethodTaxLineProps](../../../interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodTaxLineProps](../../../interfaces/cart.FilterableShippingMethodTaxLineProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)>","description":"The configurations determining how the shipping method tax line is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a shipping method tax line.","optional":true,"defaultValue":""Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of shipping method tax lines.","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO[]","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO","type":"`object`","description":"The shipping method tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listShippingMethodTaxLines"/>
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/listShippingMethods
|
||||
sidebar_label: listShippingMethods
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# listShippingMethods - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `listShippingMethods` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a paginated list of shipping methods based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of shipping methods using their IDs:
|
||||
|
||||
```ts
|
||||
const shippingMethods =
|
||||
await cartModuleService.listShippingMethods(
|
||||
{
|
||||
id: ["casm_123", "casm_321"],
|
||||
},
|
||||
{}
|
||||
)
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved within the shipping methods:
|
||||
|
||||
```ts
|
||||
const shippingMethods =
|
||||
await cartModuleService.listShippingMethods(
|
||||
{
|
||||
id: ["casm_123", "casm_321"],
|
||||
},
|
||||
{
|
||||
relations: ["cart"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const shippingMethods =
|
||||
await cartModuleService.listShippingMethods(
|
||||
{
|
||||
id: ["casm_123", "casm_321"],
|
||||
},
|
||||
{
|
||||
relations: ["cart"],
|
||||
take: 20,
|
||||
skip: 2,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)","description":"The filters to apply on the retrieved shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the shipping methods by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the shipping methods by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"Filter the shipping methods by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string` \\| `string`[]","description":"Filter the shipping methods by the ID of their associated shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx) \\| [BaseFilterable](../../../interfaces/cart.BaseFilterable/page.mdx)<[FilterableShippingMethodProps](../../../interfaces/cart.FilterableShippingMethodProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)>","description":"The configurations determining how the shipping method is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"nameLine truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of shipping methods.","expandable":false,"children":[{"name":"CartShippingMethodDTO[]","type":"[CartShippingMethodDTO](../../../interfaces/cart.CartShippingMethodDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartShippingMethodDTO","type":"`object`","description":"The cart shipping method details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listShippingMethods"/>
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restore
|
||||
sidebar_label: restore
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restore - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restore` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted carts by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restore(["cart_123", "cart_321"])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the carts.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the carts. You can pass to its `returnLinkableKeys`\nproperty any of the cart's relation attribute names, such as `items`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restore"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored, such as the ID of associated line item.\nThe object's keys are the ID attribute names of the cart entity's relations, such as `item_id`,\nand its value is an array of strings, each being the ID of the record associated with the cart through this relation,\nsuch as the IDs of associated line item.\n\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restore"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreAddresses
|
||||
sidebar_label: restoreAddresses
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreAddresses - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreAddresses` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted addresses by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreAddresses([
|
||||
"caaddr_123",
|
||||
"caaddr_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the addresses. You can pass to its `returnLinkableKeys`\nproperty any of the address's relation attribute names.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreAddresses"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored.\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreAddresses"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreLineItemAdjustments
|
||||
sidebar_label: restoreLineItemAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreLineItemAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreLineItemAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted line item adjustments by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreLineItemAdjustments([
|
||||
"caliadj_123",
|
||||
"caliadj_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line item adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the line item adjustments. You can pass to its `returnLinkableKeys`\nproperty any of the line item adjustment's relation attribute names.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreLineItemAdjustments"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored.\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreLineItemAdjustments"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreLineItemTaxLines
|
||||
sidebar_label: restoreLineItemTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreLineItemTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreLineItemTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted line item tax lines by its IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreLineItemTaxLines([
|
||||
"calitxl_123",
|
||||
"calitxl_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line item tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the line item tax lines. You can pass to its `returnLinkableKeys`\nproperty any of the line item tax line's relation attribute names.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreLineItemTaxLines"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored.\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreLineItemTaxLines"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreLineItems
|
||||
sidebar_label: restoreLineItems
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreLineItems - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreLineItems` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted line items by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreLineItems([
|
||||
"cali_123",
|
||||
"cali_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the line items. You can pass to its `returnLinkableKeys`\nproperty any of the line item's relation attribute names, such as `tax_lines`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreLineItems"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored, such as the ID of associated tax line.\nThe object's keys are the ID attribute names of the line item entity's relations, such as `tax_line_id`,\nand its value is an array of strings, each being the ID of the record associated with the line item through this relation,\nsuch as the IDs of associated tax line.\n\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreLineItems"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreShippingMethodAdjustments
|
||||
sidebar_label: restoreShippingMethodAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreShippingMethodAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreShippingMethodAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted shipping method adjustments by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreShippingMethodAdjustments([
|
||||
"casmadj_123",
|
||||
"casmadj_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping method adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the shipping method adjustment. You can pass to its `returnLinkableKeys`\nproperty any of the shipping method adjustment's relation attribute names.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreShippingMethodAdjustments"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored.\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreShippingMethodAdjustments"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreShippingMethodTaxLines
|
||||
sidebar_label: restoreShippingMethodTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreShippingMethodTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreShippingMethodTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted shipping method tax lines by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreShippingMethodTaxLines([
|
||||
"casmtxl_123",
|
||||
"casmtxl_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping method tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the shipping method tax lines. You can pass to its `returnLinkableKeys`\nproperty any of the shipping method tax line's relation attribute names.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreShippingMethodTaxLines"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored.\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreShippingMethodTaxLines"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/restoreShippingMethods
|
||||
sidebar_label: restoreShippingMethods
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restoreShippingMethods - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `restoreShippingMethods` method. This belongs to the Cart Module.
|
||||
|
||||
This method restores soft deleted shipping methods by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.restoreShippingMethods([
|
||||
"casm_123",
|
||||
"casm_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/cart.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the shipping methods. You can pass to its `returnLinkableKeys`\nproperty any of the shipping method's relation attribute names, such as `tax_lines`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restoreShippingMethods"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored, such as the ID of associated tax lines.\nThe object's keys are the ID attribute names of the shipping method entity's relations, such as `tax_line_id`,\nand its value is an array of strings, each being the ID of the record associated with the shipping method through this relation,\nsuch as the IDs of associated tax lines.\n\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restoreShippingMethods"/>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/retrieve
|
||||
sidebar_label: retrieve
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# retrieve - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieve` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a cart by its ID.
|
||||
|
||||
## Example
|
||||
|
||||
A simple example that retrieves a cart by its ID:
|
||||
|
||||
```ts
|
||||
const cart = await cartModuleService.retrieve("cart_123")
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved:
|
||||
|
||||
```ts
|
||||
const cart = await cartModuleService.retrieve("cart_123", {
|
||||
relations: ["shipping_address"],
|
||||
})
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>","description":"The configurations determining how the cart is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieve"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The retrieved cart.","expandable":false,"children":[{"name":"CartDTO","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandablLine truncated
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/retrieveLineItem
|
||||
sidebar_label: retrieveLineItem
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# retrieveLineItem - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrieveLineItem` method. This belongs to the Cart Module.
|
||||
|
||||
This method retrieves a line item by its ID.
|
||||
|
||||
## Example
|
||||
|
||||
A simple example that retrieves a line item by its ID:
|
||||
|
||||
```ts
|
||||
const lineItem =
|
||||
await cartModuleService.retrieveLineItem("cali_123")
|
||||
```
|
||||
|
||||
To specify relations that should be retrieved:
|
||||
|
||||
```ts
|
||||
const lineItem = await cartModuleService.retrieveLineItem(
|
||||
"cali_123",
|
||||
{
|
||||
relations: ["cart"],
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"itemId","type":"`string`","description":"The item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/cart.FindConfig/page.mdx)<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>","description":"The configurations determining how the line item is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieveLineItem"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The retrieved line item.","expandable":false,"children":[{"name":"CartLineItemDTO","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart line item details.","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `nLine truncated
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/setLineItemAdjustments
|
||||
sidebar_label: setLineItemAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# setLineItemAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `setLineItemAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method set the line item adjustments of line items in a cart. The existing line item adjustments, except those
|
||||
included in the specified list, of an item are removed and replaced with the specified adjustments.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const lineItemAdjustments =
|
||||
await cartModuleService.setLineItemAdjustments("cart_123", [
|
||||
{
|
||||
id: "adj_123",
|
||||
item_id: "caliadj_123",
|
||||
},
|
||||
{
|
||||
item_id: "caliadj_123",
|
||||
code: "10%OFF",
|
||||
amount: 2000,
|
||||
},
|
||||
{
|
||||
item_id: "caliadj_321",
|
||||
code: "50%OFF",
|
||||
amount: 3000,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpsertLineItemAdjustmentDTO](../../../interfaces/cart.UpsertLineItemAdjustmentDTO/page.mdx)[]","description":"The line item adjustments to add to the line items.\nThe line item is specified by the `item_id` field. If the `id` field is specified, the adjustment\nis kept in the line item's adjustment and its attributes can be updated.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the line item adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion that lead to the\nadjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The amount to adjust the original amount with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the line item adjustment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion_id","type":"`string`","description":"The associated promotion's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="setLineItemAdjustments"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item adjustments.","expandable":false,"children":[{"name":"LineItemAdjustmentDTO[]","type":"[LineItemAdjustmentDTO](../../../interfaces/cart.LineItemAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemAdjustmentDTO","type":"`object`","description":"The line item adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="setLineItemAdjustments"/>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/setLineItemTaxLines
|
||||
sidebar_label: setLineItemTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# setLineItemTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `setLineItemTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method sets the line item tax lines in a cart. The existing line item tax lines,
|
||||
except those included in the specified list, are removed and replaced with the specified tax lines.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const lineItemTaxLines =
|
||||
await cartModuleService.setLineItemTaxLines("cart_123", [
|
||||
{
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
},
|
||||
{
|
||||
code: "1234",
|
||||
rate: 20,
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxLines","type":"([CreateLineItemTaxLineDTO](../../../interfaces/cart.CreateLineItemTaxLineDTO/page.mdx) \\| [UpdateLineItemTaxLineDTO](../../../interfaces/cart.UpdateLineItemTaxLineDTO/page.mdx))[]","description":"The line item tax lines to add.\nIf the `id` field is specified, the tax line is kept and its attributes can be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="setLineItemTaxLines"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added line item tax lines.","expandable":false,"children":[{"name":"LineItemTaxLineDTO[]","type":"[LineItemTaxLineDTO](../../../interfaces/cart.LineItemTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LineItemTaxLineDTO","type":"`object`","description":"The line item tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="setLineItemTaxLines"/>
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/setShippingMethodAdjustments
|
||||
sidebar_label: setShippingMethodAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# setShippingMethodAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `setShippingMethodAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method sets the shipping method adjustment of shipping methods in a cart. The existing shipping method adjustments,
|
||||
except those included in the specified list, of an item are removed and replaced with the specified adjustments.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const shippingMethodAdjustments =
|
||||
await cartModuleService.setShippingMethodAdjustments(
|
||||
"cart_123",
|
||||
[
|
||||
{
|
||||
id: "casmadj_123",
|
||||
shipping_method_id: "casm_123",
|
||||
code: "FREESHIPPING",
|
||||
},
|
||||
{
|
||||
shipping_method_id: "casm_321",
|
||||
code: "10%OFF",
|
||||
amount: 1500,
|
||||
},
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"([CreateShippingMethodAdjustmentDTO](../../../interfaces/cart.CreateShippingMethodAdjustmentDTO/page.mdx) \\| [UpdateShippingMethodAdjustmentDTO](../../../interfaces/cart.UpdateShippingMethodAdjustmentDTO/page.mdx))[]","description":"The shipping method adjustments to add to the shipping\nmethod. If the `id` field is specified, the adjustment is kept in the shipping method's adjustment and its attributes can be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="setShippingMethodAdjustments"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping method adjustments.","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO[]","type":"[ShippingMethodAdjustmentDTO](../../../interfaces/cart.ShippingMethodAdjustmentDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodAdjustmentDTO","type":"`object`","description":"The shipping method adjustment details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="setShippingMethodAdjustments"/>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/setShippingMethodTaxLines
|
||||
sidebar_label: setShippingMethodTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# setShippingMethodTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `setShippingMethodTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method sets the shipping item tax lines in a cart. The shipping line item tax lines,
|
||||
except those included in the specified list, are removed and replaced with the specified tax lines.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const shippingMethodTaxLines =
|
||||
await cartModuleService.setShippingMethodTaxLines(
|
||||
"cart_123",
|
||||
[
|
||||
{
|
||||
code: "1000",
|
||||
rate: 10,
|
||||
},
|
||||
{
|
||||
code: "1234",
|
||||
rate: 20,
|
||||
},
|
||||
]
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxLines","type":"([CreateShippingMethodTaxLineDTO](../../../interfaces/cart.CreateShippingMethodTaxLineDTO/page.mdx) \\| [UpdateShippingMethodTaxLineDTO](../../../interfaces/cart.UpdateShippingMethodTaxLineDTO/page.mdx))[]","description":"The shipping item tax lines to add.\nIf the `id` field is specified, the tax line is kept and its attributes can be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="setShippingMethodTaxLines"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The added shipping method tax lines.","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO[]","type":"[ShippingMethodTaxLineDTO](../../../interfaces/cart.ShippingMethodTaxLineDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ShippingMethodTaxLineDTO","type":"`object`","description":"The shipping method tax line details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="setShippingMethodTaxLines"/>
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDelete
|
||||
sidebar_label: softDelete
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDelete - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDelete` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes carts by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDelete(["cart_123", "cart_321"])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the carts.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDelete"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated line item.\nThe object's keys are the ID attribute names of the cart entity's relations, such as `item_id`, and its value is an array of strings, each being the ID of a record associated\nwith the cart through this relation, such as the IDs of associated line item.\n\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDelete"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteAddresses
|
||||
sidebar_label: softDeleteAddresses
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteAddresses - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteAddresses` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes addresses by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteAddresses([
|
||||
"caaddr_123",
|
||||
"caaddr_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteAddresses"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted.\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteAddresses"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteLineItemAdjustments
|
||||
sidebar_label: softDeleteLineItemAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteLineItemAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteLineItemAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes line item adjustments by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteLineItemAdjustments([
|
||||
"caliadj_123",
|
||||
"caliadj_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line item adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteLineItemAdjustments"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted.\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteLineItemAdjustments"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteLineItemTaxLines
|
||||
sidebar_label: softDeleteLineItemTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteLineItemTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteLineItemTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes line item tax lines by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteLineItemTaxLines([
|
||||
"calitxl_123",
|
||||
"calitxl_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line item tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteLineItemTaxLines"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted.\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteLineItemTaxLines"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteLineItems
|
||||
sidebar_label: softDeleteLineItems
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteLineItems - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteLineItems` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes line items by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteLineItems([
|
||||
"cali_123",
|
||||
"cali_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the line items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteLineItems"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated tax lines.\nThe object's keys are the ID attribute names of the line item entity's relations, such as `tax_line_id`, and its value is an array of strings, each being the ID of a record associated\nwith the line item through this relation, such as the IDs of associated tax lines.\n\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteLineItems"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteShippingMethodAdjustments
|
||||
sidebar_label: softDeleteShippingMethodAdjustments
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteShippingMethodAdjustments - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteShippingMethodAdjustments` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes shipping method adjustments by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteShippingMethodAdjustments([
|
||||
"casmadj_123",
|
||||
"casmadj_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping method adjustments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteShippingMethodAdjustments"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted.\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteShippingMethodAdjustments"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteShippingMethodTaxLines
|
||||
sidebar_label: softDeleteShippingMethodTaxLines
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteShippingMethodTaxLines - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteShippingMethodTaxLines` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes shipping method tax lines by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteShippingMethodTaxLines([
|
||||
"casmtxl_123",
|
||||
"casmtxl_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping method tax lines.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteShippingMethodTaxLines"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted.\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteShippingMethodTaxLines"/>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/softDeleteShippingMethods
|
||||
sidebar_label: softDeleteShippingMethods
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeleteShippingMethods - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeleteShippingMethods` method. This belongs to the Cart Module.
|
||||
|
||||
This method soft deletes shipping methods by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await cartModuleService.softDeleteShippingMethods([
|
||||
"casm_123",
|
||||
"casm_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/cart.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteShippingMethods"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<TReturnableLinkableKeys, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated tax lines.\nThe object's keys are the ID attribute names of the shipping method entity's relations, such as `tax_line_id`, and its value is an array of strings, each being the ID of a record associated\nwith the shipping method through this relation, such as the IDs of associated tax line.\n\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<TReturnableLinkableKeys, string[]>","type":"`void` \\| `Record<TReturnableLinkableKeys, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeleteShippingMethods"/>
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/update
|
||||
sidebar_label: update
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# update - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `update` method. This belongs to the Cart Module.
|
||||
|
||||
## update(data): Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing carts.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const carts = await cartModuleService.update([
|
||||
{
|
||||
id: "cart_123",
|
||||
region_id: "reg_123",
|
||||
},
|
||||
{
|
||||
id: "cart_321",
|
||||
customer_id: "cus_123",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateCartDTO](../../../interfaces/cart.UpdateCartDTO/page.mdx)[]","description":"The attributes to update in the carts.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The associated region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The associated sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`null` \\| `string`","description":"The associated shipping address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`null` \\| `string`","description":"The associated billing address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The billing address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated carts.","expandable":false,"children":[{"name":"CartDTO[]","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartDTO","type":"`object`","description":"The cart details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
|
||||
|
||||
## update(cartId, data, sharedContext?): Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>
|
||||
|
||||
This method updates an existing cart.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const cart = await cartModuleService.update("cart_123", {
|
||||
region_id: "reg_123",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateCartDataDTO](../../../interfaces/cart.UpdateCartDataDTO/page.mdx)","description":"The attributes to update in the cart data.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The associated region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The associated sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address_id","type":"`null` \\| `string`","description":"The associated shipping address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address_id","type":"`null` \\| `string`","description":"The associated billing address's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The billing address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`null` \\| [UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx) \\| [CreateAddressDTO](../../../interfaces/cart.CreateAddressDTO/page.mdx)","description":"The shipping address of the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated cart.","expandable":false,"children":[{"name":"CartDTO","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable"Line truncated
|
||||
|
||||
## update(selector, data, sharedContext?): Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing carts matching the specified filters.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const carts = await cartModuleService.update(
|
||||
{
|
||||
currency_code: "usd",
|
||||
},
|
||||
{
|
||||
region_id: "reg_123",
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"selector","type":"Partial<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)>","description":"The filters that specify which carts to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The Line truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated carts.","expandable":false,"children":[{"name":"CartDTO[]","type":"[CartDTO](../../../interfaces/cart.CartDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartDTO","type":"`object`","description":"The cart details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/updateAddresses
|
||||
sidebar_label: updateAddresses
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# updateAddresses - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateAddresses` method. This belongs to the Cart Module.
|
||||
|
||||
## updateAddresses(data, sharedContext?): Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing addresses.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const addresses = await cartModuleService.updateAddresses([
|
||||
{
|
||||
id: "caaddr_123",
|
||||
first_name: "Leroy",
|
||||
},
|
||||
{
|
||||
id: "caaddr_321",
|
||||
last_name: "Hunt",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx)[]","description":"The attributes to update in the addresss.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updateAddresses"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated addresses.","expandable":false,"children":[{"name":"CartAddressDTO[]","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartAddressDTO","type":"`object`","description":"The cart address details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updateAddresses"/>
|
||||
|
||||
## updateAddresses(data, sharedContext?): Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)>
|
||||
|
||||
This method updates an existing address.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const address = await cartModuleService.updateAddresses({
|
||||
id: "caaddr_123",
|
||||
first_name: "Leroy",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAddressDTO](../../../interfaces/cart.UpdateAddressDTO/page.mdx)","description":"The attributes to update in the address.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO two country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/cart.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/cart.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updateAddresses"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated address.","expandable":false,"children":[{"name":"CartAddressDTO","type":"[CartAddressDTO](../../../interfaces/cart.CartAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart address details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the address was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the address was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The customer ID of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updateAddresses"/>
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
---
|
||||
displayed_sidebar: cartReference
|
||||
slug: /references/cart/updateLineItems
|
||||
sidebar_label: updateLineItems
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# updateLineItems - Cart Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateLineItems` method. This belongs to the Cart Module.
|
||||
|
||||
## updateLineItems(data): Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing line items.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.updateLineItems([
|
||||
{
|
||||
selector: {
|
||||
id: "cali_123",
|
||||
},
|
||||
data: {
|
||||
quantity: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
selector: {
|
||||
variant_sku: "PANTS",
|
||||
},
|
||||
data: {
|
||||
unit_price: 3000,
|
||||
},
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateLineItemWithSelectorDTO](../../../interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx)[]","description":"A list of objects, each holding the filters that specify which items\nto update, and the attributes to update in the items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"selector","type":"Partial<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>","description":"Filters to specify which line items to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_item_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description"Line truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated line items.","expandable":false,"children":[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"`object`","description":"The cart line item details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updateLineItems"/>
|
||||
|
||||
## updateLineItems(selector, data, sharedContext?): Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing line items matching the specified filters.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItems = await cartModuleService.updateLineItems(
|
||||
{
|
||||
variant_sku: "PANTS",
|
||||
},
|
||||
{
|
||||
unit_price: 4000,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"selector","type":"Partial<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>","description":"The filters that specify which line items to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/pagLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated line items.","expandable":false,"children":[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"`object`","description":"The cart line item details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updateLineItems"/>
|
||||
|
||||
## updateLineItems(lineId, data, sharedContext?): Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>
|
||||
|
||||
This method updates an existing line item.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const lineItem = await cartModuleService.updateLineItems(
|
||||
"cali_123",
|
||||
{
|
||||
unit_price: 3000,
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"lineId","type":"`string`","description":"The line item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial<[UpdateLineItemDTO](../../../interfaces/cart.UpdateLineItemDTO/page.mdx)>","description":"The attributes to update in the line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`string`","description":"The subtitle of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`string`","description":"The thumbnail of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string`","description":"The associated cart's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_title","type":"`string`","description":"The title of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_description","type":"`string`","description":"The description of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_subtitle","type":"`string`","description":"The subtitle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type","type":"`string`","description":"The type of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_collection","type":"`string`","description":"The collection of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_handle","type":"`string`","description":"The handle of the associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The associated variant's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_sku","type":"`string`","description":"The SKU of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_barcode","type":"`string`","description":"The barcode of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_title","type":"`string`","description":"The title of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_option_values","type":"`Record<string, unknown>`","description":"The option values of the associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the line item requires shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_discountable","type":"`boolean`","description":"Whether the line item is discountable.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether the line item's amount is tax inclusive.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The calculated price of the line item after applying promotions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The quantity of the line item in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../types/cart.BigNumberInput/page.mdx)","description":"The unit price of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_lines","type":"[CreateTaxLineDTO](../../../interfaces/cart.CreateTaxLineDTO/page.mdx)[] \\| [UpdateTaxLineDTO](../../../interfaces/cart.UpdateTaxLineDTO/page.mdx)[]","description":"The tax lines of the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"[CreateAdjustmentDTO](../../../interfaces/cart.CreateAdjustmentDTO/page.mdx)[] \\| [UpdateAdjustmentDTO](../../../interfaces/cart.UpdateAdjustmentDTO/page.mdx)Line truncated
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated line item.","expandable":false,"children":[{"name":"CartLineItemDTO","type":"[CartLineItemDTO](../../../interfaces/cart.CartLineItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart line item details.","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"[BigNumberValue](../../../types/cart.BigNumberValue/page.mdx)","description":"The discount tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_original_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_original_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_subtotal","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_item_tax_total","type":"[BigNumberRawValue](../../../types/cart.BigNumberRawValue/page.mdx)","description":"The raw item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `numLine truncated
|
||||
Reference in new issue
Block a user