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.



3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
# File 'lib/models/porcelain.rb', line 3144

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



3134
3135
3136
# File 'lib/models/porcelain.rb', line 3134

def approval_flow_id
  @approval_flow_id
end

#idObject

Unique identifier of the ApprovalWorkflowStep.



3136
3137
3138
# File 'lib/models/porcelain.rb', line 3136

def id
  @id
end

#quantifierObject

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



3138
3139
3140
# File 'lib/models/porcelain.rb', line 3138

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.



3140
3141
3142
# File 'lib/models/porcelain.rb', line 3140

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.



3142
3143
3144
# File 'lib/models/porcelain.rb', line 3142

def step_order
  @step_order
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3158
3159
3160
3161
3162
3163
3164
# File 'lib/models/porcelain.rb', line 3158

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