Class: Retab::ApiCallInvocation
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ApiCallInvocation
- Defined in:
- lib/retab/workflow_artifacts/api_call_invocation.rb
Constant Summary collapse
- HASH_ATTRS =
{ operation: :operation, id: :id, workflow_run_id: :workflow_run_id, step_id: :step_id, attempts: :attempts, error: :error, created_at: :created_at }.freeze
Instance Attribute Summary collapse
-
#attempts ⇒ Object
Returns the value of attribute attempts.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#error ⇒ Object
Returns the value of attribute error.
-
#id ⇒ Object
Returns the value of attribute id.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#step_id ⇒ Object
Returns the value of attribute step_id.
-
#workflow_run_id ⇒ Object
Returns the value of attribute workflow_run_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ApiCallInvocation
constructor
A new instance of ApiCallInvocation.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ApiCallInvocation
Returns a new instance of ApiCallInvocation.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 27 def initialize(json) hash = self.class.normalize(json) @operation = hash[:operation] @id = hash[:id] @workflow_run_id = hash[:workflow_run_id] @step_id = hash[:step_id] @attempts = (hash[:attempts] || []).map { |item| item ? Retab::ApiCallAttempt.new(item) : nil } @error = hash[:error] ? Retab::ErrorDetails.new(hash[:error]) : nil @created_at = hash[:created_at] end |
Instance Attribute Details
#attempts ⇒ Object
Returns the value of attribute attempts.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def attempts @attempts end |
#created_at ⇒ Object
Returns the value of attribute created_at.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def created_at @created_at end |
#error ⇒ Object
Returns the value of attribute error.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def error @error end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def id @id end |
#operation ⇒ Object
Returns the value of attribute operation.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def operation @operation end |
#step_id ⇒ Object
Returns the value of attribute step_id.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def step_id @step_id end |
#workflow_run_id ⇒ Object
Returns the value of attribute workflow_run_id.
18 19 20 |
# File 'lib/retab/workflow_artifacts/api_call_invocation.rb', line 18 def workflow_run_id @workflow_run_id end |