Class: Eloan::Client
Instance Attribute Summary collapse
-
#configurate ⇒ Object
Returns the value of attribute configurate.
Attributes included from Helper::Service
Instance Method Summary collapse
- #execute(method, url, options) ⇒ Object
-
#initialize(config) ⇒ Client
constructor
A new instance of Client.
Methods included from Api
Methods included from Helper::Request
Methods included from Helper::Payment
Methods included from Helper::Signature
#handle_request_data, #handle_response_data, #hexdigest, #verify?
Methods included from Helper::Service
#generate_request_url, #handle_params, #raw_response
Constructor Details
#initialize(config) ⇒ Client
Returns a new instance of Client.
9 10 11 |
# File 'lib/eloan/client.rb', line 9 def initialize(config) @configurate = config end |
Instance Attribute Details
#configurate ⇒ Object
Returns the value of attribute configurate.
7 8 9 |
# File 'lib/eloan/client.rb', line 7 def configurate @configurate end |
Instance Method Details
#execute(method, url, options) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/eloan/client.rb', line 13 def execute(method, url, ) if method == 'GET' response = RestClient.get(URI.escape(url), params: ) else response = RestClient.post(URI.escape(url), ) end raw_response response end |