Class: Portmone::Responses::BaseResponse
- Inherits:
-
Object
- Object
- Portmone::Responses::BaseResponse
- Defined in:
- lib/portmone/responses/base_response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
- #http_status ⇒ Object
-
#initialize(faraday_response, currency:, timezone:) ⇒ BaseResponse
constructor
A new instance of BaseResponse.
Constructor Details
#initialize(faraday_response, currency:, timezone:) ⇒ BaseResponse
Returns a new instance of BaseResponse.
5 6 7 8 9 10 |
# File 'lib/portmone/responses/base_response.rb', line 5 def initialize(faraday_response, currency:, timezone:) @response = faraday_response @xml_data = MultiXml.parse(@response.body) @currency = currency @timezone = timezone end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
2 3 4 |
# File 'lib/portmone/responses/base_response.rb', line 2 def response @response end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
3 4 5 |
# File 'lib/portmone/responses/base_response.rb', line 3 def xml_data @xml_data end |
Instance Method Details
#http_status ⇒ Object
12 13 14 |
# File 'lib/portmone/responses/base_response.rb', line 12 def http_status response.status end |