Class: SyncwiseApi::Responses::V1_0::Base
- Defined in:
- lib/syncwise_api/responses/V1_0/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body_hash ⇒ Object
readonly
Returns the value of attribute body_hash.
Instance Method Summary collapse
-
#initialize(http_response_object) ⇒ Base
constructor
A new instance of Base.
- #valid? ⇒ Boolean
Constructor Details
#initialize(http_response_object) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 11 |
# File 'lib/syncwise_api/responses/V1_0/base.rb', line 6 def initialize(http_response_object) @http_response_object = http_response_object @body = @http_response_object.body @header_hash = @http_response_object.header.to_hash.symbolize_keys @body_hash = parse end |
Instance Attribute Details
#body_hash ⇒ Object (readonly)
Returns the value of attribute body_hash.
13 14 15 |
# File 'lib/syncwise_api/responses/V1_0/base.rb', line 13 def body_hash @body_hash end |
Instance Method Details
#valid? ⇒ Boolean
15 16 17 |
# File 'lib/syncwise_api/responses/V1_0/base.rb', line 15 def valid? @body_hash[:sts] == '1' end |