Skip to content

Commit

Permalink
feat: adds advertising to Netherlands marketplace
Browse files Browse the repository at this point in the history
BREAKING CHANGE: adds advertising to Netherlands marketplace
  • Loading branch information
moltar committed Jan 8, 2021
1 parent 59b4a48 commit 4548726
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/amazon-marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ export enum AmazonMarketplaceAdvertisingCurrency {
export enum AmazonMarketplaceAdvertisingCountryCode {
AE = 'AE',
AU = 'AU',
CA = 'CA',
BR = 'BR',
CA = 'CA',
DE = 'DE',
ES = 'ES',
FR = 'FR',
IT = 'IT',
JP = 'JP',
MX = 'MX',
NL = 'NL',
UK = 'UK', // Not a real country code, but such is life. See https://github.com/ScaleLeap/amazon-marketplaces/issues/122
US = 'US',
}
Expand Down
3 changes: 3 additions & 0 deletions src/marketplaces/nl.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import {
AmazonMarketplace,
AmazonMarketplaceAdvertisingCountryCode,
AmazonMarketplaceAdvertisingCurrency,
AmazonMarketplaceCountryCode,
} from '../amazon-marketplace'
import { europeanAdvertisingFactory } from '../european-advertising-factory'
import { DE } from './de'

export const NL = new AmazonMarketplace({
Expand All @@ -12,4 +14,5 @@ export const NL = new AmazonMarketplace({
name: 'Netherlands',
uri: 'https://www.amazon.nl',
webServiceUri: DE.webServiceUri,
advertising: europeanAdvertisingFactory(AmazonMarketplaceAdvertisingCountryCode.NL),
})
21 changes: 21 additions & 0 deletions test/__snapshots__/marketplaces.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,27 @@ AmazonMarketplace {

exports[`marketplace NL should match snapshot 1`] = `
AmazonMarketplace {
"advertising": Object {
"bids": Object {
"sponsoredBrands": Object {
"max": 3900,
"min": 10,
},
"sponsoredProducts": Object {
"max": 100000,
"min": 2,
},
},
"countryCode": "NL",
"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": "Europe/Paris",
},
"countryCode": "NL",
"currency": "EUR",
"id": "A1805IZSGTT6HS",
Expand Down

0 comments on commit 4548726

Please sign in to comment.