Files
medusa-store/www/apps/docs/content/references/entities/classes/entities.DraftOrder.mdx
Shahed Nasser 892d737c1f docs: enhance how references are generated (#5805)
* adjusted configurations

* enhancements to tool and configurations

* change reference in docs

* fixed issue in workflows reference

* added project name

* more optimizations

* fix context error

* added a types reference

* resolved missing types

* fix reference reflection types not having children

* add an expand url parameter

* added new option to the README

* added details about new option
2023-12-05 15:29:41 +02:00

142 lines
3.7 KiB
Plaintext

---
displayed_sidebar: entitiesSidebar
slug: /references/entities/classes/DraftOrder
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# DraftOrder
A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order.
## Properties
<ParameterTypes parameters={[
{
"name": "canceled_at",
"type": "`Date`",
"description": "The date the draft order was canceled at.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "cart",
"type": "[Cart](entities.Cart.mdx)",
"description": "The details of the cart associated with the draft order.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "cart_id",
"type": "`string`",
"description": "The ID of the cart associated with the draft order.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "completed_at",
"type": "`Date`",
"description": "The date the draft order was completed at.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "created_at",
"type": "`Date`",
"description": "The date with timezone at which the resource was created.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "display_id",
"type": "`number`",
"description": "The draft order's display ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "The draft order's ID",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "idempotency_key",
"type": "`string`",
"description": "Randomly generated key used to continue the completion of the cart associated with the draft order in case of failure.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "metadata",
"type": "`Record<string, unknown>`",
"description": "An optional key-value map with additional details",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "no_notification_order",
"type": "`boolean`",
"description": "Whether to send the customer notifications regarding order updates.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "order",
"type": "[Order](entities.Order.mdx)",
"description": "The details of the order created from the draft order when its payment is captured.",
"optional": false,
"defaultValue": "",
"expandable": true,
"children": []
},
{
"name": "order_id",
"type": "`string`",
"description": "The ID of the order created from the draft order when its payment is captured.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "status",
"type": "[DraftOrderStatus](../enums/entities.DraftOrderStatus.mdx)",
"description": "The status of the draft order. It's changed to `completed` when it's transformed to an order.",
"optional": false,
"defaultValue": "open",
"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": []
}
]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records"/>