rerobe-js-orm 3.8.8 → 3.8.9

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.
@@ -20,6 +20,7 @@ class MerchantFromFormState extends MerchantFactory_1.default {
20
20
  webhooks: fs.fields.webhooks.selectedValues,
21
21
  primaryDomain: fs.fields.primaryDomain.inputValue,
22
22
  socialLinks: fs.fields.socialLinks.selectedValue,
23
+ organizationNumber: fs.fields.organizationNumber.inputValue,
23
24
  };
24
25
  return new Merchant_1.default(Object.assign(Object.assign({}, fs.props), MerchantMutableData));
25
26
  }
@@ -14,6 +14,7 @@ class MerchantFormState extends FormState_1.default {
14
14
  this.fields.senderEmail = this.fieldFactory('textInput', 'senderEmail');
15
15
  this.fields.industry = this.fieldFactory('singleSelect', 'industry', options_1.industryOptions);
16
16
  this.fields.legalName = this.fieldFactory('textInput', 'legalName');
17
+ this.fields.organizationNumber = this.fieldFactory('textInput', 'organizationNumber');
17
18
  this.fields.phone = this.fieldFactory('textInput', 'phone');
18
19
  this.fields.address = this.fieldFactory('singleSelect', 'address');
19
20
  this.fields.currency = this.fieldFactory('singleSelect', 'currency', options_1.currencyOptions);
@@ -217,10 +217,11 @@ export default class OrderHelpers {
217
217
  getPaymentTerminalReceiptInfo(payload?: any): PaymentTerminalReceiptInfo;
218
218
  getFormattedFulfillmentLocation(order: ReRobeOrderObj): string;
219
219
  generateReceiptLabels(locale: string, paymentMethod: string, entryMode?: string): ReceiptLabels;
220
- buildReceiptObjFromOrder({ order, merchant, merchantLogoUrl, receiptNumber, }: {
220
+ buildReceiptObjFromOrder({ order, merchant, merchantLogoUrl, receiptNumber, additionalInfo, }: {
221
221
  order: ReRobeOrderObj;
222
222
  merchant: MerchantObj;
223
223
  merchantLogoUrl: string;
224
224
  receiptNumber: string;
225
+ additionalInfo: string;
225
226
  }): ReceiptObj;
226
227
  }
@@ -547,7 +547,7 @@ class OrderHelpers {
547
547
  entryModeLabel,
548
548
  };
549
549
  }
550
- buildReceiptObjFromOrder({ order, merchant, merchantLogoUrl = '', receiptNumber = '', }) {
550
+ buildReceiptObjFromOrder({ order, merchant, merchantLogoUrl = '', receiptNumber = '', additionalInfo = '', }) {
551
551
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
552
552
  const { address: merchantAddress, legalName, contactEmail, phone = '', organizationNumber = '', primaryDomain, currency: storeCurrencyCode, } = merchant;
553
553
  const currencyCode = ((_a = order.totalPricePresentment) === null || _a === void 0 ? void 0 : _a.currencyCode) || storeCurrencyCode;
@@ -635,7 +635,8 @@ class OrderHelpers {
635
635
  return Object.assign(Object.assign({ merchantLogoUrl, merchantName: legalName, storeAddress: buildStoreAddress(), phone,
636
636
  contactEmail,
637
637
  organizationNumber,
638
- primaryDomain, storeUrl: `https://${primaryDomain}`, orderDate: (0, Utilities_1.getFormattedTimestamp)(presentmentLocale), receiptNumber, lineItems: buildLineItems(), subTotal: (0, Utilities_1.formatPrice)({
638
+ primaryDomain, storeUrl: `https://${primaryDomain}`, orderDate: (0, Utilities_1.getFormattedTimestamp)(presentmentLocale), receiptNumber,
639
+ additionalInfo, lineItems: buildLineItems(), subTotal: (0, Utilities_1.formatPrice)({
639
640
  currencyCode,
640
641
  amount: (_e = (_d = order.subtotalPricePresentment) === null || _d === void 0 ? void 0 : _d.amount) !== null && _e !== void 0 ? _e : '',
641
642
  fractionDigits: 2,
@@ -81,6 +81,8 @@ export default class Merchant extends Base {
81
81
  socialLinks: SocialLinksType | null;
82
82
  isChannelPartner?: boolean;
83
83
  isZettleUser?: boolean;
84
+ hasStripeBluetoothReader?: boolean;
85
+ organizationNumber?: string;
84
86
  constructor(props?: any);
85
87
  toObj(): MerchantObj;
86
88
  toMerchantMutableData(): MerchantMutableData;
@@ -47,12 +47,16 @@ class Merchant extends Base_1.default {
47
47
  pinterest: '',
48
48
  tiktok: '',
49
49
  };
50
+ this.organizationNumber = (props === null || props === void 0 ? void 0 : props.organizationNumber) || '';
50
51
  if (props === null || props === void 0 ? void 0 : props.isChannelPartner) {
51
52
  this.isChannelPartner = props.isChannelPartner;
52
53
  }
53
54
  if (props === null || props === void 0 ? void 0 : props.isZettleUser) {
54
55
  this.isZettleUser = props.isZettleUser;
55
56
  }
57
+ if (props === null || props === void 0 ? void 0 : props.hasStripeBluetoothReader) {
58
+ this.hasStripeBluetoothReader = props.hasStripeBluetoothReader;
59
+ }
56
60
  }
57
61
  toObj() {
58
62
  const mObj = {
@@ -82,6 +86,7 @@ class Merchant extends Base_1.default {
82
86
  primaryDomain: this.primaryDomain,
83
87
  webshopHomePageId: this.webshopHomePageId,
84
88
  socialLinks: this.socialLinks,
89
+ organizationNumber: this.organizationNumber,
85
90
  };
86
91
  if (this.isChannelPartner) {
87
92
  mObj.isChannelPartner = this.isChannelPartner;
@@ -89,6 +94,9 @@ class Merchant extends Base_1.default {
89
94
  if (this.isZettleUser) {
90
95
  mObj.isZettleUser = this.isZettleUser;
91
96
  }
97
+ if (this.hasStripeBluetoothReader) {
98
+ mObj.hasStripeBluetoothReader = this.hasStripeBluetoothReader;
99
+ }
92
100
  return mObj;
93
101
  }
94
102
  toMerchantMutableData() {
@@ -38,6 +38,7 @@ type MerchantSystemOnlyMutableData = {
38
38
  defaultLocation: string;
39
39
  isZettleUser?: boolean;
40
40
  isChannelPartner?: boolean;
41
+ hasStripeBluetoothReader?: boolean;
41
42
  };
42
43
  type MerchantObj = MerchantMutableData & MerchantSystemOnlyMutableData;
43
44
  type MerchantTypes = 'INDIVIDUAL' | 'BUSINESS';
@@ -70,6 +71,7 @@ type MerchantFormFields = {
70
71
  senderEmail: TextInputFormField<string>;
71
72
  industry: SingleSelectFormField<string>;
72
73
  legalName: TextInputFormField<string>;
74
+ organizationNumber: TextInputFormField<string>;
73
75
  phone: TextInputFormField<string>;
74
76
  address: SingleSelectFormField<AddressInput>;
75
77
  currency: SingleSelectFormField<string>;
@@ -73,6 +73,7 @@ type ReceiptObj = {
73
73
  taxRates: {
74
74
  [key: string]: string;
75
75
  };
76
+ additionalInfo: string;
76
77
  } & ReceiptLabelsAndPaymentTerminalInfo;
77
78
  type ReRobeOrderObj = {
78
79
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.8.8",
3
+ "version": "3.8.9",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",