Class: SDM::ApprovalWorkflowStep

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

Overview

ApprovalWorkflowStep links an approval workflow step to an ApprovalWorkflow

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.



2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
# File 'lib/models/porcelain.rb', line 2976

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



2966
2967
2968
# File 'lib/models/porcelain.rb', line 2966

def approval_flow_id
  @approval_flow_id
end

#idObject

Unique identifier of the ApprovalWorkflowStep.



2968
2969
2970
# File 'lib/models/porcelain.rb', line 2968

def id
  @id
end

#quantifierObject

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



2970
2971
2972
# File 'lib/models/porcelain.rb', line 2970

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.



2972
2973
2974
# File 'lib/models/porcelain.rb', line 2972

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.



2974
2975
2976
# File 'lib/models/porcelain.rb', line 2974

def step_order
  @step_order
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2990
2991
2992
2993
2994
2995
2996
# File 'lib/models/porcelain.rb', line 2990

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