Class: SDM::AccountGroup
- Inherits:
-
Object
- Object
- SDM::AccountGroup
- Defined in:
- lib/models/porcelain.rb
Overview
An AccountGroup is a link between an Account and a Group.
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Unique identifier of the Account.
-
#group_id ⇒ Object
Unique identifier of the Group.
-
#id ⇒ Object
Unique identifier of the AccountGroup.
Instance Method Summary collapse
-
#initialize(account_id: nil, group_id: nil, id: nil) ⇒ AccountGroup
constructor
A new instance of AccountGroup.
-
#to_json(options = {}) ⇒ Object
Constructor Details
#initialize(account_id: nil, group_id: nil, id: nil) ⇒ AccountGroup
Returns a new instance of AccountGroup.
1623 1624 1625 1626 1627 1628 1629 1630 1631 |
# File 'lib/models/porcelain.rb', line 1623 def initialize( account_id: nil, group_id: nil, id: nil ) @account_id = account_id == nil ? "" : account_id @group_id = group_id == nil ? "" : group_id @id = id == nil ? "" : id end |
Instance Attribute Details
#account_id ⇒ Object
Unique identifier of the Account.
1617 1618 1619 |
# File 'lib/models/porcelain.rb', line 1617 def account_id @account_id end |
#group_id ⇒ Object
Unique identifier of the Group.
1619 1620 1621 |
# File 'lib/models/porcelain.rb', line 1619 def group_id @group_id end |
#id ⇒ Object
Unique identifier of the AccountGroup.
1621 1622 1623 |
# File 'lib/models/porcelain.rb', line 1621 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1633 1634 1635 1636 1637 1638 1639 |
# File 'lib/models/porcelain.rb', line 1633 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 |