Module: Tray::Checkout::Config
- Included in:
- Tray::Checkout
- Defined in:
- lib/tray/checkout/config.rb
Constant Summary collapse
- DEFAULT_REQUEST_TIMEOUT =
seconds
5
- DEFAULT_ENVIRONMENT =
:production
Instance Attribute Summary collapse
- #environment ⇒ Object
- #proxy_url ⇒ Object
- #request_timeout ⇒ Object
-
#token_account ⇒ Object
Returns the value of attribute token_account.
Instance Method Summary collapse
Instance Attribute Details
#environment ⇒ Object
13 14 15 |
# File 'lib/tray/checkout/config.rb', line 13 def environment @environment ||= DEFAULT_ENVIRONMENT end |
#proxy_url ⇒ Object
29 30 31 |
# File 'lib/tray/checkout/config.rb', line 29 def proxy_url @proxy_url ||= "" end |
#request_timeout ⇒ Object
25 26 27 |
# File 'lib/tray/checkout/config.rb', line 25 def request_timeout (@request_timeout ||= DEFAULT_REQUEST_TIMEOUT).to_i end |
#token_account ⇒ Object
Returns the value of attribute token_account.
8 9 10 |
# File 'lib/tray/checkout/config.rb', line 8 def token_account @token_account end |
Instance Method Details
#api_url ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/tray/checkout/config.rb', line 17 def api_url if environment == :production "https://api.traycheckout.com.br/" else "http://api.sandbox.traycheckout.com.br/" end end |