Module: ShipEngine::Constants

Defined in:
lib/shipengine/constants/base.rb,
lib/shipengine/constants/countries.rb

Defined Under Namespace

Classes: Country

Constant Summary collapse

API_KEY =

A stub API Key to use in the test suite.

'TEST_ycvJAgX6tLB1Awm9WGJmD8mpZ8wXiQ20WhqFowCk32s'
PROD_URL =

The base_url for the ShipEngine SDK - for use in production environment.

'https://api.shipengine.com'
VALID_ISO_STRING =

Regex pattern to match a valid ISO-8601 string with timezone.

/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$/
VALID_ISO_STRING_WITH_NO_TZ =

Regex pattern to match a valid ISO-8601 string with no timezone.

/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?([+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$/

Class Method Summary collapse

Class Method Details

.base_urlObject

Check env variables to set the appropriate base_url.



18
19
20
# File 'lib/shipengine/constants/base.rb', line 18

def self.base_url
  ShipEngine::Constants::PROD_URL
end