Skip to content

Commit

Permalink
feat: adds advertising to Saudi Arabia
Browse files Browse the repository at this point in the history
  • Loading branch information
moltar committed Dec 1, 2022
1 parent 8d1bf50 commit 3a0a84f
Show file tree
Hide file tree
Showing 3 changed files with 42 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 @@ -72,6 +72,7 @@ export enum AmazonMarketplaceAdvertisingCountryCode {
MX = 'MX',
NL = 'NL',
PL = 'PL',
SA = 'SA',
SE = 'SE',
SG = 'SG',
TR = 'TR',
Expand All @@ -88,6 +89,7 @@ export enum AmazonMarketplaceAdvertisingTimeZone {
AMERICA_SAO_PAULO = 'America/Sao_Paulo',
ASIA_DUBAI = 'Asia/Dubai',
ASIA_INDIA = 'Asia/Kolkata',
ASIA_RIYADH = 'Asia/Riyadh',
ASIA_SINGAPORE = 'Asia/Singapore',
ASIA_TOKYO = 'Asia/Tokyo',
AUSTRALIA_SYDNEY = 'Australia/Sydney',
Expand Down
19 changes: 19 additions & 0 deletions src/marketplaces/sa.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {
AmazonMarketplace,
AmazonMarketplaceAdvertisingCountryCode,
AmazonMarketplaceAdvertisingCurrency,
AmazonMarketplaceAdvertisingTimeZone,
AmazonMarketplaceCountryCode,
AmazonMarketplaceTimeZone,
} from '../amazon-marketplace'
import { marketplaceAdvertisingRegions } from '../marketplace-advertising-regions'
import { sellingPartnerRegions } from '../selling-partner-api-regions'

export const SA = new AmazonMarketplace({
Expand All @@ -15,6 +18,22 @@ export const SA = new AmazonMarketplace({
uri: 'https://www.amazon.sa',
sellerCentralUri: 'https://sellercentral.amazon.sa',
webServiceUri: 'https://mws-eu.amazonservices.com',
advertising: {
// UNDEFINED by Amazon
bids: {
sponsoredBrands: {
min: 1,
max: 1,
},
sponsoredProducts: {
min: 1,
max: 1,
},
},
countryCode: AmazonMarketplaceAdvertisingCountryCode.SA,
timeZone: AmazonMarketplaceAdvertisingTimeZone.ASIA_RIYADH,
region: marketplaceAdvertisingRegions.FE,
},
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 @@ -711,6 +711,27 @@ AmazonMarketplace {

exports[`marketplace SA should match snapshot 1`] = `
AmazonMarketplace {
"advertising": {
"bids": {
"sponsoredBrands": {
"max": 1,
"min": 1,
},
"sponsoredProducts": {
"max": 1,
"min": 1,
},
},
"countryCode": "SA",
"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/Riyadh",
},
"countryCode": "SA",
"currency": "SAR",
"id": "A17E79C6D8DWNP",
Expand Down

0 comments on commit 3a0a84f

Please sign in to comment.