Class: SDM::ApprovalWorkflowApprover

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

Overview

ApprovalWorkflowApprover links an approval workflow approver to an ApprovalWorkflowStep

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_id: nil, approval_flow_id: nil, approval_step_id: nil, id: nil, role_id: nil) ⇒ ApprovalWorkflowApprover

Returns a new instance of ApprovalWorkflowApprover.



2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
# File 'lib/models/porcelain.rb', line 2427

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

Instance Attribute Details

#account_idObject

The approver account id.



2417
2418
2419
# File 'lib/models/porcelain.rb', line 2417

def 
  @account_id
end

#approval_flow_idObject

The approval flow id specified the approval workflow that this approver belongs to



2419
2420
2421
# File 'lib/models/porcelain.rb', line 2419

def approval_flow_id
  @approval_flow_id
end

#approval_step_idObject

The approval step id specified the approval flow step that this approver belongs to



2421
2422
2423
# File 'lib/models/porcelain.rb', line 2421

def approval_step_id
  @approval_step_id
end

#idObject

Unique identifier of the ApprovalWorkflowApprover.



2423
2424
2425
# File 'lib/models/porcelain.rb', line 2423

def id
  @id
end

#role_idObject

The approver role id



2425
2426
2427
# File 'lib/models/porcelain.rb', line 2425

def role_id
  @role_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



2441
2442
2443
2444
2445
2446
2447
# File 'lib/models/porcelain.rb', line 2441

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