@odus/checkout 0.20.0 → 0.21.0

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.
@@ -6162,15 +6162,16 @@ class ku {
6162
6162
  }) {
6163
6163
  let s = {};
6164
6164
  if (a) {
6165
- const o = {
6165
+ const o = this.hasAddressData(a.billingAddress), d = this.hasAddressData(a.shippingAddress), l = {}, u = o ? a.billingAddress : d ? a.shippingAddress : void 0;
6166
+ u && this.hasAddressData(u) && (l.billingAddress = this.mapAddressToApiFormat(u));
6167
+ const f = d ? a.shippingAddress : o ? a.billingAddress : void 0;
6168
+ f && this.hasAddressData(f) && (l.shippingAddress = this.mapAddressToApiFormat(f));
6169
+ const h = {
6166
6170
  email: a.email,
6167
- name: a.name
6171
+ name: a.name,
6172
+ ...l
6168
6173
  };
6169
- a.phone && (o.phone = a.phone), a.billingAddress && (o.billingAddress = this.mapAddressToApiFormat(
6170
- a.billingAddress
6171
- )), a.shippingAddress && (o.shippingAddress = this.mapAddressToApiFormat(
6172
- a.shippingAddress
6173
- )), s = {
6174
+ a.phone && (h.phoneNumber = a.phone), s = {
6174
6175
  paymentMethodData: {
6175
6176
  type: "applePay",
6176
6177
  applePay: {
@@ -6178,7 +6179,7 @@ class ku {
6178
6179
  displayName: a.displayName
6179
6180
  }
6180
6181
  },
6181
- customerData: o,
6182
+ customerData: h,
6182
6183
  context: {
6183
6184
  returnUrl: r,
6184
6185
  userAgent: globalThis.navigator.userAgent
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",