Class: Docdata::Order::Response
- Inherits:
-
Object
- Object
- Docdata::Order::Response
- Defined in:
- lib/docdata/order/response.rb
Overview
Base class for responses.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
- #error_code ⇒ Object
- #error_message ⇒ Object
-
#initialize(options, response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(options, response) ⇒ Response
Returns a new instance of Response.
11 12 13 14 |
# File 'lib/docdata/order/response.rb', line 11 def initialize(, response) = @response = response end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/docdata/order/response.rb', line 9 def end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/docdata/order/response.rb', line 9 def response @response end |
Instance Method Details
#body ⇒ Object
16 17 18 |
# File 'lib/docdata/order/response.rb', line 16 def body response.body end |
#error_code ⇒ Object
24 25 26 |
# File 'lib/docdata/order/response.rb', line 24 def error_code errors[:error].attributes["code"] if errors end |
#error_message ⇒ Object
20 21 22 |
# File 'lib/docdata/order/response.rb', line 20 def errors[:error] if errors end |