getEnvironment static method

String getEnvironment(
  1. String key
)

Determines the API URL to use for the environment the the key belongs to

Implementation

static String getEnvironment(String key) {
  if (MBC_LIVE_PUBLIC_KEY_REGEX.hasMatch(key) ||
      NAS_LIVE_PUBLIC_KEY_REGEX.hasMatch(key)) {
    return LIVE_BASE_URL;
  } else {
    return SANDBOX_BASE_URL;
  }
}