@nuskin/ns-shop 5.14.9 → 5.14.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "5.14.9",
3
+ "version": "5.14.10",
4
4
  "description": "The description that will amaze and astound your audience when they read it",
5
5
  "main": "src/shop.js",
6
6
  "scripts": {
@@ -8,7 +8,8 @@
8
8
  "lint": "eslint src __tests__"
9
9
  },
10
10
  "publishConfig": {
11
- "access": "public"
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org"
12
13
  },
13
14
  "repository": {
14
15
  "type": "git",
@@ -75,10 +76,10 @@
75
76
  "@nuskin/ns-product-lib": "1.3.7"
76
77
  },
77
78
  "peerDependencies": {
79
+ "@nuskin/my-site-api": "3.x",
78
80
  "@nuskin/ns-account": "4.x",
79
81
  "@nuskin/ns-loyalty": "2.x",
80
82
  "@nuskin/ns-product": "3.x",
81
- "@nuskin/my-site-api": "3.x",
82
83
  "@nuskin/ns-util": "3.x"
83
84
  },
84
85
  "jest": {
@@ -118,6 +118,7 @@ const populateItem = (order, salesOrder, shipImmediate, includeSapItems) => {
118
118
  });
119
119
  };
120
120
 
121
+ /*
121
122
  const populateAttribution = (salesOrder) => {
122
123
  const sponsorId = util.getSponsorId();
123
124
 
@@ -130,6 +131,7 @@ const populateAttribution = (salesOrder) => {
130
131
  });
131
132
  }
132
133
  }
134
+ */
133
135
 
134
136
  const populateShipping = (order, salesOrder) => {
135
137
  let nsConfig = ConfigService.getMarketConfig();
@@ -298,7 +300,7 @@ const populateShipping = (order, salesOrder) => {
298
300
  salesOrder.Shipping.ShippingParty.push(shippingParty);
299
301
  }
300
302
 
301
- populateAttribution(salesOrder);
303
+ // populateAttribution(salesOrder);
302
304
  };
303
305
 
304
306
  const addContactInfo = (contacts, selectedAddress) => {
@@ -125,20 +125,12 @@ const getScanCards = () => {
125
125
  });
126
126
  }
127
127
 
128
- const getResUrl = (action = 'simulate', isAnonymous = false) => {
128
+ const getResUrl = (isAnonymous = false) => {
129
129
  let nsConfig = ConfigService.getMarketConfig(),
130
130
  retVal;
131
-
132
-
133
- if (!isAnonymous && ((action === 'simulate' && nsConfig.useAwsOrderService) || (action === 'create' && nsConfig.useAwsOrderCreateService))) {
134
- retVal = `${nsConfig.awsUrl}/order/v1`;
135
- } else {
136
- retVal = ShopServiceApiVersion.getSapOrderServiceVersionedUrl(ConfigService.getMarketConfig().checkout.nsurl_sapOrderService);
137
- }
138
-
139
- if (isAnonymous) {
140
- retVal += '/anonymous';
141
- }
131
+ retVal = isAnonymous ?
132
+ ShopServiceApiVersion.getSapOrderServiceVersionedUrl(ConfigService.getMarketConfig().checkout.nsurl_sapOrderService) + '/anonymous' :
133
+ `${nsConfig.awsUrl}/order/v1`;
142
134
 
143
135
  return retVal;
144
136
  };
@@ -461,7 +453,7 @@ const orderSimulate = () => {
461
453
  let promise = new Promise(function(resolve, reject) {
462
454
  axios({
463
455
  method: 'PUT',
464
- url: getResUrl('simulate', CheckoutModeService.isGuestCheckout()),
456
+ url: getResUrl(CheckoutModeService.isGuestCheckout()),
465
457
  data: postData,
466
458
  params: getParams(order),
467
459
  headers: _getHeaders(),
@@ -521,7 +513,7 @@ const orderCreate = async () => {
521
513
  try {
522
514
  const response = await axios({
523
515
  method: 'POST',
524
- url: getResUrl('create'),
516
+ url: getResUrl(),
525
517
  data: salesOrder,
526
518
  params: getParams(order),
527
519
  headers: _getHeaders(),