diff --git a/src/amazon-marketplace.ts b/src/amazon-marketplace.ts index af65a344..7f57e375 100644 --- a/src/amazon-marketplace.ts +++ b/src/amazon-marketplace.ts @@ -27,6 +27,7 @@ export enum AmazonMarketplaceCountryCode { SG = 'SG', TR = 'TR', US = 'US', + ZA = 'ZA', } /** @@ -50,6 +51,7 @@ export enum AmazonMarketplaceAdvertisingCurrency { SGD = 'SGD', TRY = 'TRY', USD = 'USD', + ZAR = 'ZAR', } /** @@ -105,6 +107,7 @@ export enum AmazonMarketplaceAdvertisingTimeZone { export enum AmazonMarketplaceTimeZone { AFRICA_CAIRO = 'Africa/Cairo', + AFRICA_JOHANNESBURG = 'Africa/Johannesburg', AMERICA_LOS_ANGELES = 'America/Los_Angeles', AMERICA_SAO_PAULO = 'America/Sao_Paulo', ASIA_DUBAI = 'Asia/Dubai', diff --git a/src/marketplaces/index.ts b/src/marketplaces/index.ts index 7fcb819f..80ab2186 100644 --- a/src/marketplaces/index.ts +++ b/src/marketplaces/index.ts @@ -20,6 +20,7 @@ import { SE } from './se' import { SG } from './sg' import { TR } from './tr' import { US } from './us' +import { ZA } from './za' export const amazonMarketplaces = { /** @@ -131,6 +132,11 @@ export const amazonMarketplaces = { * United States */ US, + + /** + * South Africa + */ + ZA, } as const /** diff --git a/src/marketplaces/za.ts b/src/marketplaces/za.ts new file mode 100644 index 00000000..09a21084 --- /dev/null +++ b/src/marketplaces/za.ts @@ -0,0 +1,23 @@ +import { + AmazonMarketplace, + AmazonMarketplaceAdvertisingCurrency, + AmazonMarketplaceCountryCode, + AmazonMarketplaceTimeZone, +} from '../amazon-marketplace' +import { sellingPartnerRegions } from '../selling-partner-api-regions' + +export const ZA = new AmazonMarketplace({ + countryCode: AmazonMarketplaceCountryCode.ZA, + timeZone: AmazonMarketplaceTimeZone.AFRICA_JOHANNESBURG, + currency: AmazonMarketplaceAdvertisingCurrency.ZAR, + id: 'AE08WJ6YKNBMC', + name: 'South Africa', + uri: 'https://www.amazon.co.za', + sellerCentralUri: 'https://sellercentral.amazon.co.za', + vendorCentralUri: 'https://vendorcentral.amazon.co.za', + webServiceUri: 'https://mws-eu.amazonservices.com', + launchDate: '2024-05-07', + sellingPartner: { + region: sellingPartnerRegions.EU, + }, +}) diff --git a/test/__snapshots__/marketplaces.test.ts.snap b/test/__snapshots__/marketplaces.test.ts.snap index 88510920..2d8e7cfd 100644 --- a/test/__snapshots__/marketplaces.test.ts.snap +++ b/test/__snapshots__/marketplaces.test.ts.snap @@ -974,3 +974,28 @@ AmazonMarketplace { "webServiceUri": "https://mws.amazonservices.com", } `; + +exports[`marketplace ZA should match snapshot 1`] = ` +AmazonMarketplace { + "countryCode": "ZA", + "currency": "ZAR", + "id": "AE08WJ6YKNBMC", + "launchDate": "2024-05-07", + "name": "South Africa", + "sellerCentralUri": "https://sellercentral.amazon.co.za", + "sellingPartner": { + "region": AmazonSellingPartnerApiRegion { + "awsRegion": "eu-west-1", + "code": "EU", + "endpoint": "https://sellingpartnerapi-eu.amazon.com", + "name": "Europe", + }, + "sellerCentralAuthUri": "https://sellercentral.amazon.co.za/apps/authorize/consent", + "vendorCentralAuthUri": "https://vendorcentral.amazon.co.za/apps/authorize/consent", + }, + "timeZone": "Africa/Johannesburg", + "uri": "https://www.amazon.co.za", + "vendorCentralUri": "https://vendorcentral.amazon.co.za", + "webServiceUri": "https://mws-eu.amazonservices.com", +} +`; diff --git a/test/index.test.ts b/test/index.test.ts index f4031df9..515202af 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -28,6 +28,6 @@ describe('index', () => { expect.assertions(2) expect(Array.isArray(amazonMarketplacesList)).toBeDefined() - expect(amazonMarketplacesList).toHaveLength(22) + expect(amazonMarketplacesList).toHaveLength(23) }) }) diff --git a/test/marketplaces.test.ts b/test/marketplaces.test.ts index 5c2c86fc..83a4b4dc 100644 --- a/test/marketplaces.test.ts +++ b/test/marketplaces.test.ts @@ -14,7 +14,7 @@ describe('marketplace', () => { it('has a known number of marketplaces', () => { expect.assertions(1) - expect(countryCodes).toHaveLength(22) + expect(countryCodes).toHaveLength(23) }) describe.each(countryCodes)('%s', (countryCode) => {