Feat: draft order api (#6797)
This commit is contained in:
committed by
GitHub
parent
883a75c4f3
commit
df0751f122
@@ -50,15 +50,21 @@ export const LINKS = {
|
||||
Modules.STOCK_LOCATION,
|
||||
"location_id"
|
||||
),
|
||||
PublishableApiKeySalesChannel: composeLinkName(
|
||||
Modules.API_KEY,
|
||||
"api_key_id",
|
||||
OrderPromotion: composeLinkName(
|
||||
Modules.ORDER,
|
||||
"order_id",
|
||||
Modules.PROMOTION,
|
||||
"promotion_id"
|
||||
),
|
||||
OrderSalesChannel: composeLinkName(
|
||||
Modules.ORDER,
|
||||
"order_id",
|
||||
Modules.SALES_CHANNEL,
|
||||
"sales_channel_id"
|
||||
),
|
||||
ProductSalesChannel: composeLinkName(
|
||||
Modules.PRODUCT,
|
||||
"product_id",
|
||||
PublishableApiKeySalesChannel: composeLinkName(
|
||||
Modules.API_KEY,
|
||||
"api_key_id",
|
||||
Modules.SALES_CHANNEL,
|
||||
"sales_channel_id"
|
||||
),
|
||||
@@ -70,9 +76,9 @@ export const LINKS = {
|
||||
"shippingProfileService",
|
||||
"profile_id"
|
||||
),
|
||||
OrderSalesChannel: composeLinkName(
|
||||
"orderService",
|
||||
"order_id",
|
||||
ProductSalesChannel: composeLinkName(
|
||||
Modules.PRODUCT,
|
||||
"product_id",
|
||||
Modules.SALES_CHANNEL,
|
||||
"sales_channel_id"
|
||||
),
|
||||
|
||||
@@ -6,6 +6,10 @@ import { BigNumber } from "./big-number"
|
||||
type BNInput = BigNumberInput | BigNumber
|
||||
export class MathBN {
|
||||
static convert(num: BNInput): BigNumberJS {
|
||||
if (num == null) {
|
||||
return new BigNumberJS(0)
|
||||
}
|
||||
|
||||
if (num instanceof BigNumber) {
|
||||
return num.bigNumber!
|
||||
} else if (num instanceof BigNumberJS) {
|
||||
|
||||
Reference in New Issue
Block a user