Skip to content

Commit

Permalink
feat: ad sg to advertising
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyentoanit authored and moltar committed Jul 20, 2021
1 parent 6b543ca commit 0a980d4
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 @@ -68,6 +68,7 @@ export enum AmazonMarketplaceAdvertisingCountryCode {
JP = 'JP',
MX = 'MX',
NL = 'NL',
SG = 'SG',
UK = 'UK', // Not a real country code, but such is life. See https://github.com/ScaleLeap/amazon-marketplaces/issues/122
US = 'US',
}
Expand All @@ -79,6 +80,7 @@ export enum AmazonMarketplaceAdvertisingTimeZone {
AMERICA_LOS_ANGELES = 'America/Los_Angeles',
AMERICA_SAO_PAULO = 'America/Sao_Paulo',
ASIA_DUBAI = 'Asia/Dubai',
ASIA_SINGAPORE = 'Asia/Singapore',
ASIA_TOKYO = 'Asia/Tokyo',
AUSTRALIA_SYDNEY = 'Australia/Sydney',
EUROPE_AMSTERDAM = 'Europe/Amsterdam',
Expand Down
18 changes: 18 additions & 0 deletions src/marketplaces/sg.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 { sellerCentralAuthUris, sellingPartnerRegions } from '../selling-partner-api-regions'

export const SG = new AmazonMarketplace({
Expand All @@ -13,6 +16,21 @@ export const SG = new AmazonMarketplace({
uri: 'https://www.amazon.sg',
sellerCentralUri: 'https://sellercentral.amazon.sg',
webServiceUri: 'https://mws-fe.amazonservices.com',
advertising: {
countryCode: AmazonMarketplaceAdvertisingCountryCode.SG,
region: marketplaceAdvertisingRegions.FE,
bids: {
sponsoredBrands: {
min: 10,
max: 10000,
},
sponsoredProducts: {
min: 2,
max: 110000,
},
},
timeZone: AmazonMarketplaceAdvertisingTimeZone.ASIA_SINGAPORE,
},
sellingPartner: {
region: sellingPartnerRegions.FE,
sellerCentralAuthUri: sellerCentralAuthUris.NA,
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 @@ -603,6 +603,27 @@ AmazonMarketplace {

exports[`marketplace SG should match snapshot 1`] = `
AmazonMarketplace {
"advertising": Object {
"bids": Object {
"sponsoredBrands": Object {
"max": 10000,
"min": 10,
},
"sponsoredProducts": Object {
"max": 110000,
"min": 2,
},
},
"countryCode": "SG",
"region": AmazonMarketplaceAdvertisingRegion {
"accessTokenUri": "https://api.amazon.co.jp/auth/o2/token",
"authorizationUri": "https://apac.account.amazon.com/ap/oa",
"code": "FE",
"endpoint": "https://advertising-api-fe.amazon.com",
"name": "Far East",
},
"timeZone": "Asia/Singapore",
},
"countryCode": "SG",
"currency": "SGD",
"id": "A19VAU5U5O7RUS",
Expand Down

0 comments on commit 0a980d4

Please sign in to comment.