@nuskin/ns-shop 7.5.0 → 7.5.1

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": "7.5.0",
3
+ "version": "7.5.1",
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": {
@@ -13,9 +13,14 @@ let eid = '';
13
13
  let id = '';
14
14
 
15
15
  const ZZIP_URLS = {
16
- dev: 'https://zzip.api.dev.nuskin.com/v2/:country/:code',
17
- test: 'https://zzip.api.test.nuskin.com/v2/:country/:code',
18
- prod: 'https://zzip.api.nuskin.com/v2/:country/:code'
16
+ dev: 'https://apis.dev.nuskin.com/zzip/v2/:country/:code',
17
+ test: 'https://apis.test.nuskin.com/zzip/v2/:country/:code',
18
+ prod: 'https://apis.nuskin.com/zzip/v2/:country/:code'
19
+ };
20
+ const STREET_ADDRESS_VALIDATOR_URLS = {
21
+ dev: 'https://apis.dev.nuskin.com/street-address/v1/',
22
+ test: 'https://apis.test.nuskin.com/street-address/v1/',
23
+ prod: 'https://apis.nuskin.com/street-address/v1/'
19
24
  };
20
25
 
21
26
  const zzipCache = {}
@@ -230,8 +235,8 @@ function getHeaders(eid) {
230
235
  */
231
236
  async function useAddressValidationService(address) {
232
237
  const country = RunConfigService.getRunConfig().country;
233
- const awsUrl = UrlService.getAwsUrl();
234
- const url = `${awsUrl}/street-address-validator/v1/${country}`;
238
+ const env = RunConfigService.getEnvironmentCode();
239
+ const url = STREET_ADDRESS_VALIDATOR_URLS[env] + country;
235
240
  let response = await fetch(url, {
236
241
  method: 'POST',
237
242
  headers: getHeaders(),