-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b5ec21
commit 602c678
Showing
2 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,53 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Adyen.Constants | ||
{ | ||
/// <summary> | ||
/// Enum to set region based urls for terminal api | ||
/// https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/ | ||
/// Enum to set region-based URLs for the Terminal API. | ||
/// Reference: https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/ | ||
/// </summary> | ||
public enum Region | ||
{ | ||
//Europe | ||
/// <summary> | ||
/// European Union region | ||
/// </summary> | ||
EU = 0, | ||
|
||
//Australia | ||
/// <summary> | ||
/// Australia region | ||
/// </summary> | ||
AU = 1, | ||
|
||
//US | ||
/// <summary> | ||
/// United States region | ||
/// </summary> | ||
US = 2, | ||
|
||
//East Asia | ||
APSE = 3 | ||
/// <summary> | ||
/// Asia-Pacific, South East region | ||
/// </summary> | ||
APSE = 3, | ||
|
||
/// <summary> | ||
/// India region | ||
/// </summary> | ||
IN = 4 | ||
} | ||
|
||
/// <summary> | ||
/// A static class that provides mapping of regions to their respective Terminal API endpoints. | ||
/// </summary> | ||
public static class RegionMapping | ||
{ | ||
public static readonly Dictionary<Region, string> TERMINAL_API_ENDPOINTS_MAPPING = new() | ||
/// <summary> | ||
/// Maps regions to their respective Terminal API live endpoints. | ||
/// </summary> | ||
public static readonly Dictionary<Region, string> TERMINAL_API_ENDPOINTS_MAPPING = new Dictionary<Region, string>() | ||
{ | ||
{ Region.EU, "https://terminal-api-live.adyen.com" }, | ||
{ Region.AU, "https://terminal-api-live-au.adyen.com" }, | ||
{ Region.US, "https://terminal-api-live-us.adyen.com" }, | ||
{ Region.APSE, "https://terminal-api-live-apse.adyen.com" } | ||
}; | ||
} | ||
} | ||
} |