rerobe-js-orm 4.2.7 → 4.2.8

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.
@@ -43,179 +43,7 @@ export default class OrderHelpers {
43
43
  subTotalWithSalePriceIncluded: number;
44
44
  totalIncludingShipping: number;
45
45
  totalIncludingShippingAndTaxes: number;
46
- }): {
47
- discountTitlePresentment: string;
48
- saleDiscountPresentment: {
49
- amount: string;
50
- currencyCode: string;
51
- };
52
- creditDiscountPresentment: {
53
- amount: string;
54
- currencyCode: string;
55
- };
56
- additionalDiscountPresentment: {
57
- amount: string;
58
- currencyCode: string;
59
- };
60
- lineItems: {
61
- presentmentTotalPrice: {
62
- amount: string;
63
- currencyCode: string;
64
- };
65
- presentmentUnitPrice: {
66
- amount: string;
67
- currencyCode: string;
68
- };
69
- presentmentSalePrice: {
70
- amount: string;
71
- currencyCode: string;
72
- };
73
- presentmentTaxPrice: {
74
- amount: string;
75
- currencyCode: string;
76
- };
77
- brand?: string | null | undefined;
78
- productId?: string | null | undefined;
79
- shopifyProductId?: string | number | null | undefined;
80
- refundedQuantity?: string | number | undefined;
81
- canceledQuantity?: string | number | undefined;
82
- fulfilledQuantity?: string | number | undefined;
83
- unfulfilledQuantity?: string | number | undefined;
84
- status?: string | undefined;
85
- isOnSale?: string | undefined;
86
- salePrice?: string | undefined;
87
- isTaxable?: boolean | undefined;
88
- taxRate?: number | undefined;
89
- fromCountry?: string | undefined;
90
- toCountry?: string | undefined;
91
- taxAmount?: Money | undefined;
92
- discountedPrice?: Money | undefined;
93
- taxAmountWithDiscount?: Money | undefined;
94
- handle?: string | undefined;
95
- title: string;
96
- quantity: string | number;
97
- variant: ProductVariant | null;
98
- originalTotalPrice?: Money | undefined;
99
- originalUnitPrice?: Money | undefined;
100
- discountedTotalPrice?: Money | undefined;
101
- image?: Image | undefined;
102
- }[];
103
- subtotalPricePresentment: {
104
- amount: string;
105
- currencyCode: string;
106
- };
107
- totalDiscountPresentment: {
108
- amount: string;
109
- currencyCode: string;
110
- };
111
- totalShippingPricePresentment: {
112
- amount: string;
113
- currencyCode: string;
114
- };
115
- itemsTaxPresentment: {
116
- amount: string;
117
- currencyCode: string;
118
- };
119
- shippingFeeTax: {
120
- amount: string;
121
- currencyCode: string;
122
- };
123
- totalTaxPresentment: {
124
- amount: string;
125
- currencyCode: string;
126
- };
127
- totalPricePresentment: {
128
- amount: string;
129
- currencyCode: string;
130
- };
131
- shippingFeeTaxPresentment?: undefined;
132
- } | {
133
- discountTitlePresentment: string;
134
- lineItems: {
135
- presentmentTotalPrice: {
136
- amount: string;
137
- currencyCode: string;
138
- };
139
- presentmentUnitPrice: {
140
- amount: string;
141
- currencyCode: string;
142
- };
143
- presentmentSalePrice: {
144
- amount: string;
145
- currencyCode: string;
146
- };
147
- presentmentTaxPrice: {
148
- amount: string;
149
- currencyCode: string;
150
- };
151
- brand?: string | null | undefined;
152
- productId?: string | null | undefined;
153
- shopifyProductId?: string | number | null | undefined;
154
- refundedQuantity?: string | number | undefined;
155
- canceledQuantity?: string | number | undefined;
156
- fulfilledQuantity?: string | number | undefined;
157
- unfulfilledQuantity?: string | number | undefined;
158
- status?: string | undefined;
159
- isOnSale?: string | undefined;
160
- salePrice?: string | undefined;
161
- isTaxable?: boolean | undefined;
162
- taxRate?: number | undefined;
163
- fromCountry?: string | undefined;
164
- toCountry?: string | undefined;
165
- taxAmount?: Money | undefined;
166
- discountedPrice?: Money | undefined;
167
- taxAmountWithDiscount?: Money | undefined;
168
- handle?: string | undefined;
169
- title: string;
170
- quantity: string | number;
171
- variant: ProductVariant | null;
172
- originalTotalPrice?: Money | undefined;
173
- originalUnitPrice?: Money | undefined;
174
- discountedTotalPrice?: Money | undefined;
175
- image?: Image | undefined;
176
- }[];
177
- saleDiscountPresentment: {
178
- amount: string;
179
- currencyCode: string;
180
- };
181
- creditDiscountPresentment: {
182
- amount: string;
183
- currencyCode: string;
184
- };
185
- additionalDiscountPresentment: {
186
- amount: string;
187
- currencyCode: string;
188
- };
189
- subtotalPricePresentment: {
190
- amount: string;
191
- currencyCode: string;
192
- };
193
- totalDiscountPresentment: {
194
- amount: string;
195
- currencyCode: string;
196
- };
197
- totalShippingPricePresentment: {
198
- amount: string;
199
- currencyCode: string;
200
- };
201
- totalPricePresentment: {
202
- amount: string;
203
- currencyCode: string;
204
- };
205
- itemsTaxPresentment: {
206
- amount: string;
207
- currencyCode: string;
208
- };
209
- shippingFeeTaxPresentment: {
210
- amount: string;
211
- currencyCode: string;
212
- };
213
- totalTaxPresentment: {
214
- amount: string;
215
- currencyCode: string;
216
- };
217
- shippingFeeTax?: undefined;
218
- };
46
+ }): PreparePresentmentDataResponse;
219
47
  getPaymentTerminalReceiptInfo(payload?: any): PaymentTerminalReceiptInfo;
220
48
  getFormattedFulfillmentLocation(order: ReRobeOrderObj): string;
221
49
  generateReceiptLabels(locale: string, paymentMethod: string, entryMode?: string): ReceiptLabels;
@@ -449,7 +449,7 @@ class OrderHelpers {
449
449
  totalDiscountPresentment: prepareMoneyObj(creditDiscountAmount + additionalDiscount),
450
450
  totalShippingPricePresentment: prepareMoneyObj(shippingPrice),
451
451
  itemsTaxPresentment: prepareMoneyObj(itemsTax),
452
- shippingFeeTax: prepareMoneyObj(shippingFeeTax),
452
+ shippingFeeTaxPresentment: prepareMoneyObj(shippingFeeTax),
453
453
  totalTaxPresentment: prepareMoneyObj(totalTax),
454
454
  totalPricePresentment: prepareMoneyObj(totalIncludingShippingAndTaxes || totalIncludingShipping),
455
455
  };
@@ -813,6 +813,20 @@ type OrderPresentmentData = {
813
813
  saleDiscountPresentment?: Money;
814
814
  additionalDiscountPresentment?: Money;
815
815
  };
816
+ type PreparePresentmentDataResponse = {
817
+ discountTitlePresentment: string;
818
+ saleDiscountPresentment: Money;
819
+ creditDiscountPresentment: Money;
820
+ additionalDiscountPresentment: Money;
821
+ lineItems: ReRobeOrderLineItem[];
822
+ subtotalPricePresentment: Money;
823
+ totalDiscountPresentment: Money;
824
+ totalShippingPricePresentment: Money;
825
+ itemsTaxPresentment: Money;
826
+ shippingFeeTaxPresentment: Money;
827
+ totalTaxPresentment: Money;
828
+ totalPricePresentment: Money;
829
+ };
816
830
  type CompleteOrder = ReRobeOrderObj & {
817
831
  [key: string]: any;
818
832
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",