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.



3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
# File 'lib/models/porcelain.rb', line 3388

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



3378
3379
3380
# File 'lib/models/porcelain.rb', line 3378

def approval_flow_id
  @approval_flow_id
end

#idObject

Unique identifier of the ApprovalWorkflowStep.



3380
3381
3382
# File 'lib/models/porcelain.rb', line 3380

def id
  @id
end

#quantifierObject

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



3382
3383
3384
# File 'lib/models/porcelain.rb', line 3382

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.



3384
3385
3386
# File 'lib/models/porcelain.rb', line 3384

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.



3386
3387
3388
# File 'lib/models/porcelain.rb', line 3386

def step_order
  @step_order
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3402
3403
3404
3405
3406
3407
3408
# File 'lib/models/porcelain.rb', line 3402

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