Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add IN as a marketplace #422

Merged
merged 3 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
moltar marked this conversation as resolved.
Show resolved Hide resolved
bids: {
sponsoredBrands: {
NishealJ marked this conversation as resolved.
Show resolved Hide resolved
min: 24,
max: 18400,
},
sponsoredProducts: {
min: 24,
max: 18400,
},
},
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": 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",
Expand Down