Class: Privat24Api::Response
- Inherits:
-
Object
- Object
- Privat24Api::Response
- Defined in:
- lib/privat24_api/response/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(body) ⇒ Response
constructor
A new instance of Response.
- #to_hash ⇒ Object
- #to_json ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(body) ⇒ Response
Returns a new instance of Response.
7 8 9 |
# File 'lib/privat24_api/response/response.rb', line 7 def initialize(body) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/privat24_api/response/response.rb', line 5 def body @body end |
Instance Method Details
#to_hash ⇒ Object
11 12 13 |
# File 'lib/privat24_api/response/response.rb', line 11 def to_hash Hash.from_xml(body) end |
#to_json ⇒ Object
15 16 17 |
# File 'lib/privat24_api/response/response.rb', line 15 def to_json Hash.from_xml(body).to_json end |
#to_xml ⇒ Object
19 20 21 |
# File 'lib/privat24_api/response/response.rb', line 19 def to_xml body end |