Class: Maxipago::Client
- Inherits:
-
Object
- Object
- Maxipago::Client
- Defined in:
- lib/maxipago/client.rb
Constant Summary collapse
- APIVERSION =
"3.1.1.15"
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
5 6 7 |
# File 'lib/maxipago/client.rb', line 5 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/maxipago/client.rb', line 5 def response @response end |
Instance Method Details
#execute(opts = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/maxipago/client.rb', line 11 def execute(opts = {}) raise "Sets the api type before execute commands." if request.nil? raise ArgumentError, "Execute method needs options" if opts.empty? @response = request.send_command(opts) end |
#use(request) ⇒ Object
7 8 9 |
# File 'lib/maxipago/client.rb', line 7 def use(request) @request = request end |