Class: KashflowApi::ApiCall

Inherits:
Object
  • Object
show all
Defined in:
lib/kashflow_api/api_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, argument) ⇒ ApiCall

Returns a new instance of ApiCall.



5
6
7
8
9
10
# File 'lib/kashflow_api/api_call.rb', line 5

def initialize(method, argument)
    @method_sym = method.to_sym
    set_method(method)
    build_xml(argument)
    return self
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/kashflow_api/api_call.rb', line 3

def method
  @method
end

#method_symObject (readonly)

Returns the value of attribute method_sym.



3
4
5
# File 'lib/kashflow_api/api_call.rb', line 3

def method_sym
  @method_sym
end

#resultObject (readonly)

Returns the value of attribute result.



3
4
5
# File 'lib/kashflow_api/api_call.rb', line 3

def result
  @result
end

#xmlObject (readonly)

Returns the value of attribute xml.



3
4
5
# File 'lib/kashflow_api/api_call.rb', line 3

def xml
  @xml
end

Instance Method Details

#make_callObject



12
13
14
# File 'lib/kashflow_api/api_call.rb', line 12

def make_call
    KashflowApi.client.call(self)
end