Method: Valvat::HMRC::AccessToken#initialize
- Defined in:
- lib/valvat/hmrc/access_token.rb
#initialize(options = {}) ⇒ AccessToken
Returns a new instance of AccessToken.
16 17 18 19 20 21 22 23 |
# File 'lib/valvat/hmrc/access_token.rb', line 16 def initialize( = {}) = [:uk].is_a?(Hash) ? [:uk] : {} @client_id = [:client_id].to_s @client_secret = [:client_secret].to_s @rate_limit = [:rate_limit] @endpoint_uri = URI([:sandbox] ? SANDBOX_ENDPOINT_URL : PRODUCTION_ENDPOINT_URL) end |