Class: Retab::CancelWorkflowResponse

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_runs/cancel_workflow_response.rb

Constant Summary collapse

HASH_ATTRS =
{
  run: :run,
  redis_available: :redis_available,
  cancellation_status: :cancellation_status
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ CancelWorkflowResponse

Returns a new instance of CancelWorkflowResponse.



19
20
21
22
23
24
# File 'lib/retab/workflow_runs/cancel_workflow_response.rb', line 19

def initialize(json)
  hash = self.class.normalize(json)
  @run = hash[:run] ? Retab::WorkflowRun.new(hash[:run]) : nil
  @redis_available = hash[:redis_available]
  @cancellation_status = hash[:cancellation_status]
end

Instance Attribute Details

#cancellation_statusObject

Returns the value of attribute cancellation_status.



14
15
16
# File 'lib/retab/workflow_runs/cancel_workflow_response.rb', line 14

def cancellation_status
  @cancellation_status
end

#redis_availableObject

Returns the value of attribute redis_available.



14
15
16
# File 'lib/retab/workflow_runs/cancel_workflow_response.rb', line 14

def redis_available
  @redis_available
end

#runObject

Returns the value of attribute run.



14
15
16
# File 'lib/retab/workflow_runs/cancel_workflow_response.rb', line 14

def run
  @run
end