class KaveRestApi::Info

Public Class Methods

new(args = {}) click to toggle source
# File lib/kavenegar-ruby/requests/info.rb, line 3
def initialize(args = {})
  @ACTION_NAME    = [:info,@FORMAT].join('.').freeze
  @response     = ResponseInfo.new
end

Public Instance Methods

call() click to toggle source
# File lib/kavenegar-ruby/requests/info.rb, line 8
def call
    connection = Faraday.new(url: "#{API_URL}/account/") do |faraday|
      faraday.adapter Faraday.default_adapter
      faraday.response FORMAT.to_sym
    end
     response = connection.get(@ACTION_NAME)
     @response.validate(response.body)
end