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.



13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
# File 'lib/models/porcelain.rb', line 13121

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.



13113
13114
13115
# File 'lib/models/porcelain.rb', line 13113

def 
  @account_id
end

#idObject

Unique identifier of the WorkflowApprover.



13115
13116
13117
# File 'lib/models/porcelain.rb', line 13115

def id
  @id
end

#role_idObject

The approver role id



13117
13118
13119
# File 'lib/models/porcelain.rb', line 13117

def role_id
  @role_id
end

#workflow_idObject

The workflow id.



13119
13120
13121
# File 'lib/models/porcelain.rb', line 13119

def workflow_id
  @workflow_id
end

Instance Method Details

#to_json(options = {}) ⇒ Object



13133
13134
13135
13136
13137
13138
13139
# File 'lib/models/porcelain.rb', line 13133

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