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.
1562 1563 1564 1565 1566 1567 1568 1569 1570 |
# File 'lib/models/porcelain.rb', line 1562 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.
1556 1557 1558 |
# File 'lib/models/porcelain.rb', line 1556 def account_id @account_id end |
#group_id ⇒ Object
Unique identifier of the Group.
1558 1559 1560 |
# File 'lib/models/porcelain.rb', line 1558 def group_id @group_id end |
#id ⇒ Object
Unique identifier of the AccountGroup.
1560 1561 1562 |
# File 'lib/models/porcelain.rb', line 1560 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1572 1573 1574 1575 1576 1577 1578 |
# File 'lib/models/porcelain.rb', line 1572 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 |