Class: Retab::JobResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::JobResponse
- Defined in:
- lib/retab/jobs/job_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ status_code: :status_code, body: :body }.freeze
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ JobResponse
constructor
A new instance of JobResponse.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ JobResponse
Returns a new instance of JobResponse.
17 18 19 20 21 |
# File 'lib/retab/jobs/job_response.rb', line 17 def initialize(json) hash = self.class.normalize(json) @status_code = hash[:status_code] @body = hash[:body] || {} end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
13 14 15 |
# File 'lib/retab/jobs/job_response.rb', line 13 def body @body end |
#status_code ⇒ Object
Returns the value of attribute status_code.
13 14 15 |
# File 'lib/retab/jobs/job_response.rb', line 13 def status_code @status_code end |