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.
Constructors
constructor
**new 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
canceled_atDateRequiredThe date the draft order was canceled at.
The details of the cart associated with the draft order.
cart_idstringRequiredThe ID of the cart associated with the draft order.
completed_atDateRequiredThe date the draft order was completed at.
created_atDateRequiredThe date with timezone at which the resource was created.
display_idnumberRequiredThe draft order's display ID
idstringRequiredThe draft order's ID
idempotency_keystringRequiredRandomly generated key used to continue the completion of the cart associated with the draft order in case of failure.
metadataRecord<string, unknown>RequiredAn optional key-value map with additional details
no_notification_orderbooleanRequiredWhether to send the customer notifications regarding order updates.
The details of the order created from the draft order when its payment is captured.
order_idstringRequiredThe ID of the order created from the draft order when its payment is captured.
The status of the draft order. It's changed to
completed when it's transformed to an order.Default: open
updated_atDateRequiredThe date with timezone at which the resource was updated.
Methods
beforeInsert
Private **beforeInsert**(): Promise<void>
Returns
Promise<void>
PromisePromise<void>RequiredWas this section helpful?