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.

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.



15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
# File 'lib/models/porcelain.rb', line 15358

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.



15350
15351
15352
# File 'lib/models/porcelain.rb', line 15350

def 
  @account_id
end

#idObject

Unique identifier of the WorkflowApprover.



15352
15353
15354
# File 'lib/models/porcelain.rb', line 15352

def id
  @id
end

#role_idObject

The approver role id



15354
15355
15356
# File 'lib/models/porcelain.rb', line 15354

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



15356
15357
15358
# File 'lib/models/porcelain.rb', line 15356

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



15370
15371
15372
15373
15374
15375
15376
# File 'lib/models/porcelain.rb', line 15370

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