Skip to main content

Class: AdminDraftOrdersResource

Hierarchy

  • default

    AdminDraftOrdersResource

Methods

addLineItem

addLineItem(id, payload, customHeaders?): ResponsePromise<AdminDraftOrdersRes>

Description

Add line item to draft order

Parameters

NameType
idstring
payloadAdminPostDraftOrdersDraftOrderLineItemsReq
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:30


create

create(payload, customHeaders?): ResponsePromise<AdminDraftOrdersRes>

Description

Creates a draft order

Parameters

NameType
payloadAdminPostDraftOrdersReq
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:20


delete

delete(id, customHeaders?): ResponsePromise<DeleteResponse>

Description

Delete draft order

Parameters

NameType
idstring
customHeadersRecord<string, any>

Returns

ResponsePromise<DeleteResponse>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:42


list

list(query?, customHeaders?): ResponsePromise<AdminDraftOrdersListRes>

Description

Lists draft orders

Parameters

NameType
query?AdminGetDraftOrdersParams
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersListRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:76


markPaid

markPaid(id, customHeaders?): ResponsePromise<AdminPostDraftOrdersDraftOrderRegisterPaymentRes>

Description

Mark a draft order as paid

Parameters

NameType
idstring
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminPostDraftOrdersDraftOrderRegisterPaymentRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:93


removeLineItem

removeLineItem(id, itemId, customHeaders?): ResponsePromise<AdminDraftOrdersRes>

Description

Remove line item

Parameters

NameType
idstring
itemIdstring
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:53


retrieve

retrieve(id, customHeaders?): ResponsePromise<AdminDraftOrdersRes>

Description

Retrieves a draft order

Parameters

NameType
idstring
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:65


update

update(id, payload, customHeaders?): ResponsePromise<AdminDraftOrdersRes>

Description

Update draft order

Parameters

NameType
idstring
payloadAdminPostDraftOrdersDraftOrderReq
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:104


updateLineItem

updateLineItem(id, itemId, payload, customHeaders?): ResponsePromise<AdminDraftOrdersRes>

Description

Update draft order line item

Parameters

NameType
idstring
itemIdstring
payloadAdminPostDraftOrdersDraftOrderLineItemsItemReq
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminDraftOrdersRes>

Defined in

medusa-js/src/resources/admin/draft-orders.ts:116