Files
medusa-store/www/apps/docs/content/references/services/classes/OrderEdit.mdx
github-actions[bot] cdd42dbdcd chore(docs): Generated References (#5743)
Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-11-27 18:58:52 +00:00

328 lines
7.8 KiB
Plaintext

---
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# OrderEdit
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
## Constructors
#### constructor
`**new OrderEdit**()`
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was cancelled.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "canceled_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who cancelled the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "changes",
"type": "[OrderItemChange](OrderItemChange.mdx)[]",
"description": "The details of all the changes on the original order's line items.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "confirmed_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was confirmed.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "confirmed_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who confirmed the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who created the order edit.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "declined_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was declined.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "declined_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who declined the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "declined_reason",
"type": "`string`",
"description": "An optional note why the order edit is declined.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "difference_due",
"type": "`number`",
"description": "The difference between the total amount of the order and total amount of edited order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "discount_total",
"type": "`number`",
"description": "The total of discount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_tax_total",
"type": "`number`",
"description": "The total of the gift card tax amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "gift_card_total",
"type": "`number`",
"description": "The total of the gift card amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The order edit's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "internal_note",
"type": "`string`",
"description": "An optional note with additional details about the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "items",
"type": "[LineItem](LineItem.mdx)[]",
"description": "The details of the cloned items from the original order with the new changes. Once the order edit is confirmed, these line items are associated with the original order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order",
"type": "[Order](Order.mdx)",
"description": "The details of the order that this order edit was created for.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order that is edited",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "payment_collection",
"type": "[PaymentCollection](PaymentCollection.mdx)",
"description": "The details of the payment collection used to authorize additional payment if necessary.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "payment_collection_id",
"type": "`string`",
"description": "The ID of the payment collection",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requested_at",
"type": "`Date`",
"description": "The date with timezone at which the edit was requested.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "requested_by",
"type": "`string`",
"description": "The unique identifier of the user or customer who requested the order edit.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "shipping_total",
"type": "`number`",
"description": "The total of the shipping amount",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[OrderEditStatus](../enums/OrderEditStatus.mdx)",
"description": "The status of the order edit.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "subtotal",
"type": "`number`",
"description": "The total of subtotal",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "tax_total",
"type": "`null` \\| `number`",
"description": "The total of tax",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "total",
"type": "`number`",
"description": "The total amount of the edited order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "updated_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was updated.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
## Methods
#### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
#### loadStatus
`**loadStatus**(): void`
##### Returns
`void`
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />