Class: Ebanx::Response
- Inherits:
-
Object
- Object
- Ebanx::Response
- Defined in:
- lib/ebanx/response.rb
Instance Attribute Summary collapse
-
#http_code ⇒ Object
Returns the value of attribute http_code.
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, response_type) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response, response_type) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 10 11 |
# File 'lib/ebanx/response.rb', line 5 def initialize(response, response_type) @http_code = response.code @raw_response = response.to_str @response = response.to_str @response = JSON.parse @response if response_type == :json end |
Instance Attribute Details
#http_code ⇒ Object
Returns the value of attribute http_code.
3 4 5 |
# File 'lib/ebanx/response.rb', line 3 def http_code @http_code end |
#raw_response ⇒ Object
Returns the value of attribute raw_response.
3 4 5 |
# File 'lib/ebanx/response.rb', line 3 def raw_response @raw_response end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'lib/ebanx/response.rb', line 3 def response @response end |