Skip to content

Commit

Permalink
fix: changes time zone for NL to Europe/Amsterdam
Browse files Browse the repository at this point in the history
Documentation was wrong, which was confirmed by the Jira ticket
ADAPI-8644.

Closes #365
  • Loading branch information
moltar committed Apr 28, 2021
1 parent 9c79a09 commit 72bd0b4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/amazon-marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export enum AmazonMarketplaceAdvertisingTimeZone {
ASIA_DUBAI = 'Asia/Dubai',
ASIA_TOKYO = 'Asia/Tokyo',
AUSTRALIA_SYDNEY = 'Australia/Sydney',
EUROPE_AMSTERDAM = 'Europe/Amsterdam',
EUROPE_LONDON = 'Europe/London',
EUROPE_PARIS = 'Europe/Paris',
}
Expand Down
3 changes: 2 additions & 1 deletion src/european-advertising-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { marketplaceAdvertisingRegions } from './marketplace-advertising-regions

export function europeanAdvertisingFactory(
countryCode: AmazonMarketplaceAdvertisingCountryCode,
tz?: AmazonMarketplaceAdvertisingTimeZone,
): AmazonMarketplaceAdvertising {
return {
countryCode,
Expand All @@ -21,6 +22,6 @@ export function europeanAdvertisingFactory(
max: 100000,
},
},
timeZone: AmazonMarketplaceAdvertisingTimeZone.EUROPE_PARIS,
timeZone: tz || AmazonMarketplaceAdvertisingTimeZone.EUROPE_PARIS,
}
}
6 changes: 5 additions & 1 deletion src/marketplaces/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
AmazonMarketplace,
AmazonMarketplaceAdvertisingCountryCode,
AmazonMarketplaceAdvertisingCurrency,
AmazonMarketplaceAdvertisingTimeZone,
AmazonMarketplaceCountryCode,
} from '../amazon-marketplace'
import { europeanAdvertisingFactory } from '../european-advertising-factory'
Expand All @@ -16,7 +17,10 @@ export const NL = new AmazonMarketplace({
uri: 'https://www.amazon.nl',
sellerCentralUri: 'https://sellercentral.amazon.nl',
webServiceUri: DE.webServiceUri,
advertising: europeanAdvertisingFactory(AmazonMarketplaceAdvertisingCountryCode.NL),
advertising: europeanAdvertisingFactory(
AmazonMarketplaceAdvertisingCountryCode.NL,
AmazonMarketplaceAdvertisingTimeZone.EUROPE_AMSTERDAM,
),
sellingPartner: {
region: sellingPartnerRegions.EU,
sellerCentralAuthUri: sellerCentralAuthUris.NA,
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/marketplaces.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ AmazonMarketplace {
"endpoint": "https://advertising-api-eu.amazon.com",
"name": "Europe",
},
"timeZone": "Europe/Paris",
"timeZone": "Europe/Amsterdam",
},
"countryCode": "NL",
"currency": "EUR",
Expand Down

0 comments on commit 72bd0b4

Please sign in to comment.