Class: SDM::WorkflowApprover

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

Overview

WorkflowApprover is an account or a role with the ability to approve requests bound to a workflow. WorkflowApprover is deprecated, see docs for more info.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_id: nil, id: nil, role_id: nil, workflow_id: nil) ⇒ WorkflowApprover

Returns a new instance of WorkflowApprover.



18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
# File 'lib/models/porcelain.rb', line 18514

def initialize(
  account_id: nil,
  id: nil,
  role_id: nil,
  workflow_id: nil
)
  @account_id =  == nil ? "" : 
  @id = id == nil ? "" : id
  @role_id = role_id == nil ? "" : role_id
  @workflow_id = workflow_id == nil ? "" : workflow_id
end

Instance Attribute Details

#account_idObject

The approver account id.



18506
18507
18508
# File 'lib/models/porcelain.rb', line 18506

def 
  @account_id
end

#idObject

Unique identifier of the WorkflowApprover.



18508
18509
18510
# File 'lib/models/porcelain.rb', line 18508

def id
  @id
end

#role_idObject

The approver role id



18510
18511
18512
# File 'lib/models/porcelain.rb', line 18510

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



18512
18513
18514
# File 'lib/models/porcelain.rb', line 18512

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



18526
18527
18528
18529
18530
18531
18532
# File 'lib/models/porcelain.rb', line 18526

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