Module: DlocalGo::Constants
- Included in:
- EndpointGenerator, Utilities
- Defined in:
- lib/dlocal_go/constants.rb
Overview
Constants we’ll use throughout the gem
Constant Summary collapse
- SANDBOX_URL =
"https://api-sbx.dlocalgo.com"
- PRODUCTION_URL =
"https://api.dlocalgo.com"
- SUBSCRIPTION_BASE_SANDBOX_URL =
"https://checkout-sbx.dlocalgo.com/validate/subscription"
- SUBSCRIPTION_BASE_PRODUCTION_URL =
"https://checkout.dlocalgo.com/validate/subscription"
- DEFAULT_SUPPORTED_COUNTRIES =
%w[UY AR CL BO BR CO CR EC GT ID MX MY PE PY].freeze
- CURRENCY_FOR_COUNTRY =
{ UY: "UYU", AR: "ARS", CL: "CLP", BO: "BOB", BR: "BRL", CO: "COP", CR: "CRC", EC: "USD", GT: "GTQ", ID: "IDR", MX: "MXN", MY: "MYR", PE: "PEN", PY: "PYG" }.freeze
Instance Method Summary collapse
Instance Method Details
#currency_for_country(country) ⇒ Object
17 18 19 |
# File 'lib/dlocal_go/constants.rb', line 17 def currency_for_country(country) CURRENCY_FOR_COUNTRY[country.to_sym] end |