Skip to content

Commit

Permalink
fix: adds advertising to India marketplace (#422)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: adds advertising to India marketplace
  • Loading branch information
NishealJ authored Sep 7, 2021
1 parent 194feee commit 91d9f30
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/amazon-marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export enum AmazonMarketplaceAdvertisingCountryCode {
DE = 'DE',
ES = 'ES',
FR = 'FR',
IN = 'IN',
IT = 'IT',
JP = 'JP',
MX = 'MX',
Expand All @@ -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',
Expand Down
18 changes: 18 additions & 0 deletions src/marketplaces/in.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -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: 1,
max: 2000,
},
sponsoredProducts: {
min: 1,
max: 5000,
},
},
timeZone: AmazonMarketplaceAdvertisingTimeZone.ASIA_INDIA,
},
sellingPartner: {
region: sellingPartnerRegions.EU,
},
Expand Down
21 changes: 21 additions & 0 deletions test/__snapshots__/marketplaces.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,27 @@ AmazonMarketplace {

exports[`marketplace IN should match snapshot 1`] = `
AmazonMarketplace {
"advertising": Object {
"bids": Object {
"sponsoredBrands": Object {
"max": 2000,
"min": 1,
},
"sponsoredProducts": Object {
"max": 5000,
"min": 1,
},
},
"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",
Expand Down

0 comments on commit 91d9f30

Please sign in to comment.