Skip to content

[Feature]: Support Region enums to simplify setup of Terminal API live endpoints #1528

@gcatanese

Description

@gcatanese

Feature summary

Support Region enums to simplify setup of Terminal API live endpoints

Problem statement

Similarly as implemented in the Java library, the Node Library should provide a better support to define the region-specific live URLs:

Region Data Center Sync Async
Australia au https://terminal-api-live-au.adyen.com/sync https://terminal-api-live-au.adyen.com/async
East Asia apse https://terminal-api-live-apse.adyen.com/sync https://terminal-api-live-apse.adyen.com/async
Europe eu (*) https://terminal-api-live.adyen.com/sync https://terminal-api-live.adyen.com/async
United States us https://terminal-api-live-us.adyen.com/sync https://terminal-api-live-us.adyen.com/async

(*) eu is the default endpoint

Proposed solution

Implement Regions enums and refactor the code that defines the TerminalAPI endpoints

Simplify the creation of Client object to standardise the approach (use Config object)

const config = new Config({
    apiKey: "myApiKey",
    environment: "LIVE",
    liveEndpointUrlPrefix: "myPrefix",
    region: RegionEnum.US
});
client = new Client(config);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions