Class: Retab::ErrorStepLifecycle

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_steps/error_step_lifecycle.rb

Constant Summary collapse

HASH_ATTRS =
{
  status: :status,
  message: :message,
  stage: :stage,
  category: :category,
  details: :details
}.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) ⇒ ErrorStepLifecycle

Returns a new instance of ErrorStepLifecycle.



23
24
25
26
27
28
29
30
# File 'lib/retab/workflow_steps/error_step_lifecycle.rb', line 23

def initialize(json)
  hash = self.class.normalize(json)
  @status = hash[:status]
  @message = hash[:message]
  @stage = hash[:stage]
  @category = hash[:category]
  @details = hash[:details] ? Retab::ErrorDetails.new(hash[:details]) : nil
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



16
17
18
# File 'lib/retab/workflow_steps/error_step_lifecycle.rb', line 16

def category
  @category
end

#detailsObject

Returns the value of attribute details.



16
17
18
# File 'lib/retab/workflow_steps/error_step_lifecycle.rb', line 16

def details
  @details
end

#messageObject

Returns the value of attribute message.



16
17
18
# File 'lib/retab/workflow_steps/error_step_lifecycle.rb', line 16

def message
  @message
end

#stageObject

Returns the value of attribute stage.



16
17
18
# File 'lib/retab/workflow_steps/error_step_lifecycle.rb', line 16

def stage
  @stage
end

#statusObject

Returns the value of attribute status.



16
17
18
# File 'lib/retab/workflow_steps/error_step_lifecycle.rb', line 16

def status
  @status
end