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.



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

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.



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

def 
  @account_id
end

#idObject

Unique identifier of the WorkflowApprover.



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

def id
  @id
end

#role_idObject

The approver role id



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

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



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

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



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

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