From 5e7a05d3060cf22701b91cf348476d8cceec5e8f Mon Sep 17 00:00:00 2001 From: Nisheal John Date: Mon, 6 Sep 2021 23:37:56 +0530 Subject: [PATCH 1/3] fix: add in as marketplace --- src/amazon-marketplace.ts | 2 ++ src/marketplaces/in.ts | 18 +++++++++++++++++ test/__snapshots__/marketplaces.test.ts.snap | 21 ++++++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/src/amazon-marketplace.ts b/src/amazon-marketplace.ts index c27710e7..82b262c1 100644 --- a/src/amazon-marketplace.ts +++ b/src/amazon-marketplace.ts @@ -64,6 +64,7 @@ export enum AmazonMarketplaceAdvertisingCountryCode { DE = 'DE', ES = 'ES', FR = 'FR', + IN = 'IN', IT = 'IT', JP = 'JP', MX = 'MX', @@ -80,6 +81,7 @@ export enum AmazonMarketplaceAdvertisingTimeZone { AMERICA_LOS_ANGELES = 'America/Los_Angeles', AMERICA_SAO_PAULO = 'America/Sao_Paulo', ASIA_DUBAI = 'Asia/Dubai', + ASIA_INDIA = 'Asia/Kolkata', ASIA_SINGAPORE = 'Asia/Singapore', ASIA_TOKYO = 'Asia/Tokyo', AUSTRALIA_SYDNEY = 'Australia/Sydney', diff --git a/src/marketplaces/in.ts b/src/marketplaces/in.ts index 81900e06..0766c603 100644 --- a/src/marketplaces/in.ts +++ b/src/marketplaces/in.ts @@ -1,8 +1,11 @@ import { AmazonMarketplace, + AmazonMarketplaceAdvertisingCountryCode, AmazonMarketplaceAdvertisingCurrency, + AmazonMarketplaceAdvertisingTimeZone, AmazonMarketplaceCountryCode, } from '../amazon-marketplace' +import { marketplaceAdvertisingRegions } from '../marketplace-advertising-regions' import { sellingPartnerRegions } from '../selling-partner-api-regions' export const IN = new AmazonMarketplace({ @@ -14,6 +17,21 @@ export const IN = new AmazonMarketplace({ sellerCentralUri: 'https://sellercentral.amazon.in', vendorCentralUri: 'https://www.vendorcentral.in', webServiceUri: 'https://mws.amazonservices.in', + advertising: { + countryCode: AmazonMarketplaceAdvertisingCountryCode.IN, + region: marketplaceAdvertisingRegions.EU, + bids: { + sponsoredBrands: { + min: 24, + max: 18400, + }, + sponsoredProducts: { + min: 24, + max: 18400, + }, + }, + timeZone: AmazonMarketplaceAdvertisingTimeZone.ASIA_INDIA, + }, sellingPartner: { region: sellingPartnerRegions.EU, }, diff --git a/test/__snapshots__/marketplaces.test.ts.snap b/test/__snapshots__/marketplaces.test.ts.snap index 0ebb18b8..d5b1215b 100644 --- a/test/__snapshots__/marketplaces.test.ts.snap +++ b/test/__snapshots__/marketplaces.test.ts.snap @@ -386,6 +386,27 @@ AmazonMarketplace { exports[`marketplace IN should match snapshot 1`] = ` AmazonMarketplace { + "advertising": Object { + "bids": Object { + "sponsoredBrands": Object { + "max": 18400, + "min": 24, + }, + "sponsoredProducts": Object { + "max": 18400, + "min": 24, + }, + }, + "countryCode": "IN", + "region": AmazonMarketplaceAdvertisingRegion { + "accessTokenUri": "https://api.amazon.co.uk/auth/o2/token", + "authorizationUri": "https://eu.account.amazon.com/ap/oa", + "code": "EU", + "endpoint": "https://advertising-api-eu.amazon.com", + "name": "Europe", + }, + "timeZone": "Asia/Kolkata", + }, "countryCode": "IN", "currency": "INR", "id": "A21TJRUUN4KGV", From 925bff5546eb864fcb8da944e82331d9963bc8e9 Mon Sep 17 00:00:00 2001 From: Nisheal John Date: Tue, 7 Sep 2021 17:48:07 +0530 Subject: [PATCH 2/3] fix: change bid values for in --- src/marketplaces/in.ts | 8 ++++---- test/__snapshots__/marketplaces.test.ts.snap | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/marketplaces/in.ts b/src/marketplaces/in.ts index 0766c603..2fc7aeff 100644 --- a/src/marketplaces/in.ts +++ b/src/marketplaces/in.ts @@ -22,12 +22,12 @@ export const IN = new AmazonMarketplace({ region: marketplaceAdvertisingRegions.EU, bids: { sponsoredBrands: { - min: 24, - max: 18400, + min: 1, + max: 2000, }, sponsoredProducts: { - min: 24, - max: 18400, + min: 1, + max: 50000, }, }, timeZone: AmazonMarketplaceAdvertisingTimeZone.ASIA_INDIA, diff --git a/test/__snapshots__/marketplaces.test.ts.snap b/test/__snapshots__/marketplaces.test.ts.snap index d5b1215b..547d421c 100644 --- a/test/__snapshots__/marketplaces.test.ts.snap +++ b/test/__snapshots__/marketplaces.test.ts.snap @@ -389,12 +389,12 @@ AmazonMarketplace { "advertising": Object { "bids": Object { "sponsoredBrands": Object { - "max": 18400, - "min": 24, + "max": 2000, + "min": 1, }, "sponsoredProducts": Object { - "max": 18400, - "min": 24, + "max": 50000, + "min": 1, }, }, "countryCode": "IN", From 2dc326c2ba53f79e7b57fc9c84e3a5532377269f Mon Sep 17 00:00:00 2001 From: Nisheal John Date: Tue, 7 Sep 2021 17:49:48 +0530 Subject: [PATCH 3/3] fix: change bid values for in - 2 --- src/marketplaces/in.ts | 2 +- test/__snapshots__/marketplaces.test.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/marketplaces/in.ts b/src/marketplaces/in.ts index 2fc7aeff..b32a13ce 100644 --- a/src/marketplaces/in.ts +++ b/src/marketplaces/in.ts @@ -27,7 +27,7 @@ export const IN = new AmazonMarketplace({ }, sponsoredProducts: { min: 1, - max: 50000, + max: 5000, }, }, timeZone: AmazonMarketplaceAdvertisingTimeZone.ASIA_INDIA, diff --git a/test/__snapshots__/marketplaces.test.ts.snap b/test/__snapshots__/marketplaces.test.ts.snap index 547d421c..507f1105 100644 --- a/test/__snapshots__/marketplaces.test.ts.snap +++ b/test/__snapshots__/marketplaces.test.ts.snap @@ -393,7 +393,7 @@ AmazonMarketplace { "min": 1, }, "sponsoredProducts": Object { - "max": 50000, + "max": 5000, "min": 1, }, },