Class: SDM::ApprovalWorkflowStepHistory

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

ApprovalWorkflowStepHistory records the state of an ApprovalWorkflowStep at a given point in time, where every change (create or delete) to an ApprovalWorkflowStep produces an ApprovalWorkflowStepHistory record.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(activity_id: nil, approval_workflow_step: nil, deleted_at: nil, timestamp: nil) ⇒ ApprovalWorkflowStepHistory

Returns a new instance of ApprovalWorkflowStepHistory.



2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
# File 'lib/models/porcelain.rb', line 2649

def initialize(
  activity_id: nil,
  approval_workflow_step: nil,
  deleted_at: nil,
  timestamp: nil
)
  @activity_id = activity_id == nil ? "" : activity_id
  @approval_workflow_step = approval_workflow_step == nil ? nil : approval_workflow_step
  @deleted_at = deleted_at == nil ? nil : deleted_at
  @timestamp = timestamp == nil ? nil : timestamp
end

Instance Attribute Details

#activity_idObject

The unique identifier of the Activity that produced this change to the ApprovalWorkflowStep. May be empty for some system-initiated updates.



2641
2642
2643
# File 'lib/models/porcelain.rb', line 2641

def activity_id
  @activity_id
end

#approval_workflow_stepObject

The complete ApprovalWorkflowStep state at this time.



2643
2644
2645
# File 'lib/models/porcelain.rb', line 2643

def approval_workflow_step
  @approval_workflow_step
end

#deleted_atObject

If this ApprovalWorkflowStep was deleted, the time it was deleted.



2645
2646
2647
# File 'lib/models/porcelain.rb', line 2645

def deleted_at
  @deleted_at
end

#timestampObject

The time at which the ApprovalWorkflowStep state was recorded.



2647
2648
2649
# File 'lib/models/porcelain.rb', line 2647

def timestamp
  @timestamp
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2661
2662
2663
2664
2665
2666
2667
# File 'lib/models/porcelain.rb', line 2661

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end