Class: SDM::ApprovalFlowApprover
- Inherits:
-
Object
- Object
- SDM::ApprovalFlowApprover
- Defined in:
- lib/models/porcelain.rb
Overview
An approver for an approval workflow step. Each approver can specify exactly one of: account_id, role_id, or reference
Instance Attribute Summary collapse
-
#account_id ⇒ Object
The approver account id.
-
#group_id ⇒ Object
The approver group id.
-
#reference ⇒ Object
A reference to an approver.
-
#role_id ⇒ Object
The approver role id.
Instance Method Summary collapse
-
#initialize(account_id: nil, group_id: nil, reference: nil, role_id: nil) ⇒ ApprovalFlowApprover
constructor
A new instance of ApprovalFlowApprover.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(account_id: nil, group_id: nil, reference: nil, role_id: nil) ⇒ ApprovalFlowApprover
Returns a new instance of ApprovalFlowApprover.
2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 |
# File 'lib/models/porcelain.rb', line 2981 def initialize( account_id: nil, group_id: nil, reference: nil, role_id: nil ) @account_id = account_id == nil ? "" : account_id @group_id = group_id == nil ? "" : group_id @reference = reference == nil ? "" : reference @role_id = role_id == nil ? "" : role_id end |
Instance Attribute Details
#account_id ⇒ Object
The approver account id.
2972 2973 2974 |
# File 'lib/models/porcelain.rb', line 2972 def account_id @account_id end |
#group_id ⇒ Object
The approver group id
2974 2975 2976 |
# File 'lib/models/porcelain.rb', line 2974 def group_id @group_id end |
#reference ⇒ Object
A reference to an approver. Must be one of ApproverReference constants. If set, the account_id and role_id must be empty.
2977 2978 2979 |
# File 'lib/models/porcelain.rb', line 2977 def reference @reference end |
#role_id ⇒ Object
The approver role id
2979 2980 2981 |
# File 'lib/models/porcelain.rb', line 2979 def role_id @role_id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
2993 2994 2995 2996 2997 2998 2999 |
# File 'lib/models/porcelain.rb', line 2993 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |