rerobe-js-orm 2.4.67 → 2.4.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ const OrderHelpers_1 = require("../../helpers/OrderHelpers");
|
|
|
6
6
|
const orderHelpers = new OrderHelpers_1.default();
|
|
7
7
|
class OrderFromApp extends OrderFactory_1.default {
|
|
8
8
|
createOrder(order) {
|
|
9
|
-
const { id, orderNumber, amount, currencyCode = 'SEK', shippingDetails, appliedDiscount, products, paymentType, paymentMethod, shippingType, shopifyId, shopifyOrderNumber, state, userId, email, salesChannel, tags, paymentDetails, financialStatus, fulfillmentStatus, } = order;
|
|
9
|
+
const { id, orderNumber, amount, currencyCode = 'SEK', shippingDetails, appliedDiscount, products, paymentType, paymentMethod, shippingType, shopifyId, ribbnOrderNumber, shopifyOrderNumber, state, userId, email, customerName, salesChannel, tags, paymentDetails, financialStatus, fulfillmentStatus, } = order;
|
|
10
10
|
let discount = 0;
|
|
11
11
|
let shippingFee = 0;
|
|
12
12
|
let subTotal = 0;
|
|
@@ -52,12 +52,14 @@ class OrderFromApp extends OrderFactory_1.default {
|
|
|
52
52
|
paymentType: paymentType ? this.utilities.constantCase(paymentType) : Order_1.default.PAYMENT_TYPES.creditCard,
|
|
53
53
|
shippingType: shippingType ? this.utilities.constantCase(shippingType) : Order_1.default.SHIPPING_TYPES.localPickUp,
|
|
54
54
|
shopifyId,
|
|
55
|
+
ribbnOrderNumber,
|
|
55
56
|
shopifyOrderNumber,
|
|
56
57
|
shippingAddress: shippingDetails && shippingDetails.deliveryAddress ? shippingDetails.deliveryAddress : null,
|
|
57
58
|
lineItems,
|
|
58
59
|
state,
|
|
59
60
|
userId,
|
|
60
61
|
email,
|
|
62
|
+
customerName,
|
|
61
63
|
paymentDetails,
|
|
62
64
|
tags,
|
|
63
65
|
salesChannel,
|
package/lib/models/Order.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export default class Order extends Base {
|
|
|
55
55
|
shippingType: ReRobeShippingAndDeliveryTypes;
|
|
56
56
|
shopifyId: string | null;
|
|
57
57
|
shopifyOrderNumber: number | null;
|
|
58
|
+
ribbnOrderNumber: number | null;
|
|
58
59
|
subtotalPrice: Money;
|
|
59
60
|
tags: string[] | string | null;
|
|
60
61
|
totalDiscount: Money;
|
package/lib/models/Order.js
CHANGED
|
@@ -49,6 +49,7 @@ class Order extends Base_1.default {
|
|
|
49
49
|
this.shippingType = (props === null || props === void 0 ? void 0 : props.shippingType) || Order.SHIPPING_TYPES.localPickUp;
|
|
50
50
|
this.shopifyId = (props === null || props === void 0 ? void 0 : props.shopifyId) || null;
|
|
51
51
|
this.shopifyOrderNumber = (props === null || props === void 0 ? void 0 : props.shopifyOrderNumber) || null;
|
|
52
|
+
this.ribbnOrderNumber = (props === null || props === void 0 ? void 0 : props.ribbnOrderNumber) || null;
|
|
52
53
|
this.subtotalPrice = (props === null || props === void 0 ? void 0 : props.subtotalPrice) || {
|
|
53
54
|
amount: 0,
|
|
54
55
|
};
|
|
@@ -124,6 +125,7 @@ class Order extends Base_1.default {
|
|
|
124
125
|
shippingType: this.shippingType,
|
|
125
126
|
shopifyId: this.shopifyId,
|
|
126
127
|
shopifyOrderNumber: this.shopifyOrderNumber,
|
|
128
|
+
ribbnOrderNumber: this.ribbnOrderNumber,
|
|
127
129
|
subtotalPrice: this.subtotalPrice,
|
|
128
130
|
tags: this.tags,
|
|
129
131
|
totalDiscount: this.totalDiscount,
|
|
@@ -39,6 +39,7 @@ declare type ReRobeOrderObj = {
|
|
|
39
39
|
shippingType: ReRobeShippingAndDeliveryTypes | string;
|
|
40
40
|
shopifyId?: string | null;
|
|
41
41
|
shopifyOrderNumber?: number | null;
|
|
42
|
+
ribbnOrderNumber?: number | null;
|
|
42
43
|
subtotalPrice: Money;
|
|
43
44
|
tags?: string[] | string | null;
|
|
44
45
|
totalDiscount: Money;
|
|
@@ -95,10 +96,12 @@ declare type OrderInput = {
|
|
|
95
96
|
products: CompleteProduct[];
|
|
96
97
|
appliedDiscount?: AppliedDiscount;
|
|
97
98
|
shopifyId?: string | null;
|
|
99
|
+
ribbnOrderNumber?: number | null;
|
|
98
100
|
shopifyOrderNumber?: number | null;
|
|
99
101
|
state?: ReRobeOrderStates | string | null;
|
|
100
102
|
userId?: string | null;
|
|
101
103
|
email?: string | null;
|
|
104
|
+
customerName?: string | null;
|
|
102
105
|
tags?: string[];
|
|
103
106
|
salesChannel?: SalesChannels | string | null;
|
|
104
107
|
paymentDetails?: PaymentDetails | null;
|