class Myfinance::Http
Attributes
account_id[R]
token[R]
Public Class Methods
new(token, account_id = nil)
click to toggle source
# File lib/myfinance/http.rb, line 8 def initialize(token, account_id = nil) @token = token @account_id = account_id end
Private Instance Methods
send_request(method, path, options, &block)
click to toggle source
# File lib/myfinance/http.rb, line 21 def send_request(method, path, options, &block) request = Request.new( options.merge!( method: method, token: token, url: "#{Myfinance.configuration.url}#{path}", user_agent: Myfinance.configuration.user_agent, account_id: account_id ) ) Response.new(request.run).resolve!(&block) end