Class: NetSuite::Response
- Inherits:
-
Object
- Object
- NetSuite::Response
- Defined in:
- lib/netsuite/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#header ⇒ Object
Returns the value of attribute header.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Response
constructor
A new instance of Response.
- #success! ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 10 |
# File 'lib/netsuite/response.rb', line 5 def initialize(attributes = {}) @success = attributes[:success] @header = attributes[:header] @body = attributes[:body] @errors = attributes[:errors] || [] end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/netsuite/response.rb', line 3 def body @body end |
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/netsuite/response.rb', line 3 def errors @errors end |
#header ⇒ Object
Returns the value of attribute header.
3 4 5 |
# File 'lib/netsuite/response.rb', line 3 def header @header end |
Instance Method Details
#success! ⇒ Object
12 13 14 |
# File 'lib/netsuite/response.rb', line 12 def success! @success = true end |
#success? ⇒ Boolean
16 17 18 |
# File 'lib/netsuite/response.rb', line 16 def success? @success end |