Class: DlocalGo::Utilities
- Inherits:
-
Object
- Object
- DlocalGo::Utilities
- Includes:
- Constants
- Defined in:
- lib/dlocal_go/utilities.rb
Overview
Utilities for using the Dlocal Go API
Constant Summary
Constants included from Constants
Constants::CURRENCY_FOR_COUNTRY, Constants::DEFAULT_SUPPORTED_COUNTRIES, Constants::PRODUCTION_URL, Constants::SANDBOX_URL, Constants::SUBSCRIPTION_BASE_PRODUCTION_URL, Constants::SUBSCRIPTION_BASE_SANDBOX_URL
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Constants
Class Method Details
.subscription_url(token:, email: nil) ⇒ Object
11 12 13 |
# File 'lib/dlocal_go/utilities.rb', line 11 def subscription_url(token:, email: nil) new.subscription_url(token: token, email: email) end |
Instance Method Details
#subscription_url(token:, email: nil) ⇒ Object
16 17 18 |
# File 'lib/dlocal_go/utilities.rb', line 16 def subscription_url(token:, email: nil) email.present? ? "#{subscription_base_url}/#{token}?email=#{email}" : "#{base_url}#{token}" end |