Module: Uphold::Options
- Included in:
- Client
- Defined in:
- lib/uphold/options.rb
Constant Summary collapse
- API_BASE =
'https://api.uphold.com'
- SANDBOX_API_BASE =
'https://api-sandbox.uphold.com'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/uphold/options.rb', line 3 def @options end |
Instance Method Details
#authorization_header ⇒ Object
19 20 21 22 23 |
# File 'lib/uphold/options.rb', line 19 def return {} unless bearer_token? { 'Authorization' => "Bearer #{bearer_token}" } end |
#bearer_token ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/uphold/options.rb', line 11 def bearer_token @bearer_token ||= ( [:token] || ENV['UPHOLD_AUTH_TOKEN'] || ENV['BITRESERVE_AUTH_TOKEN'] ) end |
#bearer_token? ⇒ Boolean
7 8 9 |
# File 'lib/uphold/options.rb', line 7 def bearer_token? !bearer_token.nil? end |