Skip to content

Commit

Permalink
feat: adds Poland marketplace
Browse files Browse the repository at this point in the history
BREAKING CHANGE: adds Poland marketplace
  • Loading branch information
moltar committed Dec 18, 2020
1 parent 36d9f6e commit 6e8377c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/amazon-marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export enum AmazonMarketplaceCountryCode {
JP = 'JP',
MX = 'MX',
NL = 'NL',
PL = 'PL',
SA = 'SA',
SE = 'SE',
SG = 'SG',
Expand All @@ -41,6 +42,7 @@ export enum AmazonMarketplaceAdvertisingCurrency {
INR = 'INR',
JPY = 'JPY',
MXN = 'MXN',
PLN = 'PLN',
SAR = 'SAR',
SEK = 'SEK',
SGD = 'SGD',
Expand Down
6 changes: 6 additions & 0 deletions src/marketplaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { IT } from './it'
import { JP } from './jp'
import { MX } from './mx'
import { NL } from './nl'
import { PL } from './pl'
import { SA } from './sa'
import { SE } from './se'
import { SG } from './sg'
Expand Down Expand Up @@ -95,6 +96,11 @@ export const amazonMarketplaces = {
*/
NL,

/**
* Poland
*/
PL,

/**
* Singapore
*/
Expand Down
14 changes: 14 additions & 0 deletions src/marketplaces/pl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
AmazonMarketplace,
AmazonMarketplaceAdvertisingCurrency,
AmazonMarketplaceCountryCode,
} from '../amazon-marketplace'

export const PL = new AmazonMarketplace({
countryCode: AmazonMarketplaceCountryCode.PL,
currency: AmazonMarketplaceAdvertisingCurrency.PLN,
id: 'A1C3SOZRARQ6R3',
name: 'Poland',
uri: 'https://www.amazon.pl',
webServiceUri: 'https://mws-eu.amazonservices.com',
})
11 changes: 11 additions & 0 deletions test/__snapshots__/marketplaces.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,17 @@ AmazonMarketplace {
}
`;

exports[`marketplace PL should match snapshot 1`] = `
AmazonMarketplace {
"countryCode": "PL",
"currency": "PLN",
"id": "A1C3SOZRARQ6R3",
"name": "Poland",
"uri": "https://www.amazon.pl",
"webServiceUri": "https://mws-eu.amazonservices.com",
}
`;

exports[`marketplace SA should match snapshot 1`] = `
AmazonMarketplace {
"countryCode": "SA",
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ describe('index', () => {
expect.assertions(2)

expect(Array.isArray(amazonMarketplacesList)).toBeDefined()
expect(amazonMarketplacesList).toHaveLength(20)
expect(amazonMarketplacesList).toHaveLength(21)
})
})
2 changes: 1 addition & 1 deletion test/marketplaces.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('marketplace', () => {
it('has a known number of marketplaces', () => {
expect.assertions(1)

expect(countryCodes).toHaveLength(20)
expect(countryCodes).toHaveLength(21)
})

describe.each(countryCodes)('%s', (countryCode) => {
Expand Down

0 comments on commit 6e8377c

Please sign in to comment.