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.



3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
# File 'lib/models/porcelain.rb', line 3448

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



3438
3439
3440
# File 'lib/models/porcelain.rb', line 3438

def approval_flow_id
  @approval_flow_id
end

#idObject

Unique identifier of the ApprovalWorkflowStep.



3440
3441
3442
# File 'lib/models/porcelain.rb', line 3440

def id
  @id
end

#quantifierObject

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



3442
3443
3444
# File 'lib/models/porcelain.rb', line 3442

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.



3444
3445
3446
# File 'lib/models/porcelain.rb', line 3444

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.



3446
3447
3448
# File 'lib/models/porcelain.rb', line 3446

def step_order
  @step_order
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3462
3463
3464
3465
3466
3467
3468
# File 'lib/models/porcelain.rb', line 3462

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