Class: SDM::ApprovalWorkflowStep

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

Overview

ApprovalWorkflowStep links an approval workflow step to an ApprovalWorkflow ApprovalWorkflowStep is deprecated, see docs for more info.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(approval_flow_id: nil, id: nil, quantifier: nil, skip_after: nil, step_order: nil) ⇒ ApprovalWorkflowStep

Returns a new instance of ApprovalWorkflowStep.



3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
# File 'lib/models/porcelain.rb', line 3698

def initialize(
  approval_flow_id: nil,
  id: nil,
  quantifier: nil,
  skip_after: nil,
  step_order: nil
)
  @approval_flow_id = approval_flow_id == nil ? "" : approval_flow_id
  @id = id == nil ? "" : id
  @quantifier = quantifier == nil ? "" : quantifier
  @skip_after = skip_after == nil ? nil : skip_after
  @step_order = step_order == nil ? 0 : step_order
end

Instance Attribute Details

#approval_flow_idObject

The approval flow id specified the approval workflow that this step belongs to



3688
3689
3690
# File 'lib/models/porcelain.rb', line 3688

def approval_flow_id
  @approval_flow_id
end

#idObject

Unique identifier of the ApprovalWorkflowStep.



3690
3691
3692
# File 'lib/models/porcelain.rb', line 3690

def id
  @id
end

#quantifierObject

Whether "any" or "all" approvers must approve for this approval step to pass. Read only field for history commands.



3692
3693
3694
# File 'lib/models/porcelain.rb', line 3692

def quantifier
  @quantifier
end

#skip_afterObject

Duration after which this approval step will be skipped if no approval is given. Read only field for history commands.



3694
3695
3696
# File 'lib/models/porcelain.rb', line 3694

def skip_after
  @skip_after
end

#step_orderObject

The position of the approval step in a sequence of approval steps for an approval workflow. Read only field for history commands.



3696
3697
3698
# File 'lib/models/porcelain.rb', line 3696

def step_order
  @step_order
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3712
3713
3714
3715
3716
3717
3718
# File 'lib/models/porcelain.rb', line 3712

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