module Uphold::Options

Constants

API_BASE
SANDBOX_API_BASE

Attributes

options[R]

Public Instance Methods

authorization_header() click to toggle source
# File lib/uphold/options.rb, line 19
def authorization_header
  return {} unless bearer_token?

  { 'Authorization' => "Bearer #{bearer_token}" }
end
bearer_token() click to toggle source
# File lib/uphold/options.rb, line 11
def bearer_token
  @bearer_token ||= (
    options[:token] ||
    ENV['UPHOLD_AUTH_TOKEN'] ||
    ENV['BITRESERVE_AUTH_TOKEN']
  )
end
bearer_token?() click to toggle source
# File lib/uphold/options.rb, line 7
def bearer_token?
  !bearer_token.nil?
end