Class: Retab::WorkflowDiagnosisResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowDiagnosisResponse
- Defined in:
- lib/retab/workflows/workflow_diagnosis_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ is_valid: :is_valid, issues: :issues, suggestions: :suggestions, stats: :stats }.freeze
Instance Attribute Summary collapse
-
#is_valid ⇒ Object
Returns the value of attribute is_valid.
-
#issues ⇒ Object
Returns the value of attribute issues.
-
#stats ⇒ Object
Returns the value of attribute stats.
-
#suggestions ⇒ Object
Returns the value of attribute suggestions.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowDiagnosisResponse
constructor
A new instance of WorkflowDiagnosisResponse.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowDiagnosisResponse
Returns a new instance of WorkflowDiagnosisResponse.
21 22 23 24 25 26 27 |
# File 'lib/retab/workflows/workflow_diagnosis_response.rb', line 21 def initialize(json) hash = self.class.normalize(json) @is_valid = hash[:is_valid] @issues = (hash[:issues] || []).map { |item| item ? Retab::WorkflowDiagnosisIssue.new(item) : nil } @suggestions = (hash[:suggestions] || []) @stats = hash[:stats] ? Retab::WorkflowDiagnosisStats.new(hash[:stats]) : nil end |
Instance Attribute Details
#is_valid ⇒ Object
Returns the value of attribute is_valid.
15 16 17 |
# File 'lib/retab/workflows/workflow_diagnosis_response.rb', line 15 def is_valid @is_valid end |
#issues ⇒ Object
Returns the value of attribute issues.
15 16 17 |
# File 'lib/retab/workflows/workflow_diagnosis_response.rb', line 15 def issues @issues end |
#stats ⇒ Object
Returns the value of attribute stats.
15 16 17 |
# File 'lib/retab/workflows/workflow_diagnosis_response.rb', line 15 def stats @stats end |
#suggestions ⇒ Object
Returns the value of attribute suggestions.
15 16 17 |
# File 'lib/retab/workflows/workflow_diagnosis_response.rb', line 15 def suggestions @suggestions end |