class MoneyMover::Dwolla::Token

Attributes

access_token[R]
account_id[R]
expires_in[R]
refresh_expires_in[R]
refresh_token[R]
scope[R]
token_type[R]

Public Class Methods

new(attrs={}, ach_config = Config.new, client = Client.new) click to toggle source
# File lib/money_mover/dwolla/token.rb, line 6
def initialize(attrs={}, ach_config = Config.new, client = Client.new)
  @_links = attrs[:_links]
  @account_id = attrs[:account_id]
  @expires_in = attrs[:expires_in]
  @refresh_expires_in = attrs[:refresh_expires_in]
  @access_token = attrs[:access_token]
  @refresh_token = attrs[:refresh_token]
  @token_type = attrs[:token_type]
  @scope = attrs[:scope]

  @ach_config = ach_config
  @client = client
end

Public Instance Methods

request_new_token!() click to toggle source
# File lib/money_mover/dwolla/token.rb, line 20
def request_new_token!
  response = @client.post @client.token_url, create_params
  Token.new response.body
end