fix(types,order,medusa): Create credit lines + hooks (#11569)
what: - api/workflows to create credit lines - hooks to enable extending credit lines
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
AdminOrderChangesResponse,
|
||||
CreateOrderCreditLineDTO,
|
||||
FindParams,
|
||||
HttpTypes,
|
||||
PaginatedResponse,
|
||||
@@ -499,4 +500,21 @@ export class Order {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
async createCreditLine(
|
||||
orderId: string,
|
||||
body: Omit<CreateOrderCreditLineDTO, "order_id">,
|
||||
query?: SelectParams,
|
||||
headers?: ClientHeaders
|
||||
) {
|
||||
return await this.client.fetch<HttpTypes.AdminOrderResponse>(
|
||||
`/admin/orders/${orderId}/credit-lines`,
|
||||
{
|
||||
method: "POST",
|
||||
headers,
|
||||
body,
|
||||
query,
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user