Class: SDM::RoleAttachment
- Inherits:
-
Object
- Object
- SDM::RoleAttachment
- Defined in:
- lib/models/porcelain.rb
Overview
A RoleAttachment assigns a role to a composite role.
Deprecated: use multi-role via AccountAttachments instead.
Instance Attribute Summary collapse
-
#attached_role_id ⇒ Object
The id of the attached role of this RoleAttachment.
-
#composite_role_id ⇒ Object
The id of the composite role of this RoleAttachment.
-
#id ⇒ Object
Unique identifier of the RoleAttachment.
Instance Method Summary collapse
-
#initialize(attached_role_id: nil, composite_role_id: nil, id: nil) ⇒ RoleAttachment
constructor
A new instance of RoleAttachment.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(attached_role_id: nil, composite_role_id: nil, id: nil) ⇒ RoleAttachment
Returns a new instance of RoleAttachment.
4733 4734 4735 4736 4737 4738 4739 4740 4741 |
# File 'lib/models/porcelain.rb', line 4733 def initialize( attached_role_id: nil, composite_role_id: nil, id: nil ) @attached_role_id = attached_role_id == nil ? "" : attached_role_id @composite_role_id = composite_role_id == nil ? "" : composite_role_id @id = id == nil ? "" : id end |
Instance Attribute Details
#attached_role_id ⇒ Object
The id of the attached role of this RoleAttachment.
4727 4728 4729 |
# File 'lib/models/porcelain.rb', line 4727 def attached_role_id @attached_role_id end |
#composite_role_id ⇒ Object
The id of the composite role of this RoleAttachment.
4729 4730 4731 |
# File 'lib/models/porcelain.rb', line 4729 def composite_role_id @composite_role_id end |
#id ⇒ Object
Unique identifier of the RoleAttachment.
4731 4732 4733 |
# File 'lib/models/porcelain.rb', line 4731 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
4743 4744 4745 4746 4747 4748 4749 |
# File 'lib/models/porcelain.rb', line 4743 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 |