Class: SDM::ApprovalWorkflow

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

Overview

ApprovalWorkflows are the mechanism by which requests for access can be viewed by authorized approvers and be approved or denied.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(approval_mode: nil, approval_workflow_steps: nil, description: nil, id: nil, name: nil) ⇒ ApprovalWorkflow

Returns a new instance of ApprovalWorkflow.



3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
# File 'lib/models/porcelain.rb', line 3104

def initialize(
  approval_mode: nil,
  approval_workflow_steps: nil,
  description: nil,
  id: nil,
  name: nil
)
  @approval_mode = approval_mode == nil ? "" : approval_mode
  @approval_workflow_steps = approval_workflow_steps == nil ? [] : approval_workflow_steps
  @description = description == nil ? "" : description
  @id = id == nil ? "" : id
  @name = name == nil ? "" : name
end

Instance Attribute Details

#approval_modeObject

Approval mode of the ApprovalWorkflow



3094
3095
3096
# File 'lib/models/porcelain.rb', line 3094

def approval_mode
  @approval_mode
end

#approval_workflow_stepsObject

The approval steps of this approval workflow



3096
3097
3098
# File 'lib/models/porcelain.rb', line 3096

def approval_workflow_steps
  @approval_workflow_steps
end

#descriptionObject

Optional description of the ApprovalWorkflow.



3098
3099
3100
# File 'lib/models/porcelain.rb', line 3098

def description
  @description
end

#idObject

Unique identifier of the ApprovalWorkflow.



3100
3101
3102
# File 'lib/models/porcelain.rb', line 3100

def id
  @id
end

#nameObject

Unique human-readable name of the ApprovalWorkflow.



3102
3103
3104
# File 'lib/models/porcelain.rb', line 3102

def name
  @name
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3118
3119
3120
3121
3122
3123
3124
# File 'lib/models/porcelain.rb', line 3118

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