@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1
Advanced tools
Comparing version 1.0.6 to 1.1.0
import globalAxios from 'axios'; | ||
import { createAxiosInstance, endpoints } from '@sp-api-sdk/common'; | ||
import { awsRegionByCode, createAxiosInstance, endpoints } from '@sp-api-sdk/common'; | ||
@@ -280,8 +280,9 @@ /* tslint:disable */ | ||
constructor(parameters) { | ||
const axiosInstance = createAxiosInstance(parameters); | ||
const region = awsRegionByCode[parameters.region] ?? parameters.region; | ||
const axiosInstance = createAxiosInstance({ ...parameters, region }); | ||
const configuration = new Configuration(); | ||
const environment = parameters.sandbox ? 'sandbox' : 'production'; | ||
const endpoint = endpoints[environment][parameters.region]; | ||
const endpoint = endpoints[environment][region]; | ||
if (!endpoint) { | ||
throw new VendorDirectFulfillmentPaymentsApiError(`Unknown region : ${parameters.region}`); | ||
throw new VendorDirectFulfillmentPaymentsApiError(`Unknown region : ${region}`); | ||
} | ||
@@ -288,0 +289,0 @@ super(configuration, endpoint, axiosInstance); |
@@ -288,8 +288,9 @@ 'use strict'; | ||
constructor(parameters) { | ||
const axiosInstance = common.createAxiosInstance(parameters); | ||
const region = common.awsRegionByCode[parameters.region] ?? parameters.region; | ||
const axiosInstance = common.createAxiosInstance({ ...parameters, region }); | ||
const configuration = new Configuration(); | ||
const environment = parameters.sandbox ? 'sandbox' : 'production'; | ||
const endpoint = common.endpoints[environment][parameters.region]; | ||
const endpoint = common.endpoints[environment][region]; | ||
if (!endpoint) { | ||
throw new VendorDirectFulfillmentPaymentsApiError(`Unknown region : ${parameters.region}`); | ||
throw new VendorDirectFulfillmentPaymentsApiError(`Unknown region : ${region}`); | ||
} | ||
@@ -296,0 +297,0 @@ super(configuration, endpoint, axiosInstance); |
@@ -5,3 +5,3 @@ { | ||
"description": "The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data.", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"main": "dist/index.js", | ||
@@ -27,3 +27,3 @@ "module": "dist/index.es.js", | ||
"@sp-api-sdk/auth": "^0.3.1", | ||
"@sp-api-sdk/common": "^0.3.2", | ||
"@sp-api-sdk/common": "^0.4.0", | ||
"axios": "^0.21.1" | ||
@@ -58,3 +58,3 @@ }, | ||
], | ||
"gitHead": "614045cd3dad62a5c57f424fe8b00deba52e1b02" | ||
"gitHead": "b273ce408f4da5dd4de6305a9fcfd80551295ac1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52510
1412
+ Added@sp-api-sdk/common@0.4.0(transitive)
- Removed@sp-api-sdk/common@0.3.2(transitive)
Updated@sp-api-sdk/common@^0.4.0