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.
1867 1868 1869 1870 1871 1872 1873 1874 1875 |
# File 'lib/models/porcelain.rb', line 1867 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.
1861 1862 1863 |
# File 'lib/models/porcelain.rb', line 1861 def account_id @account_id end |
#group_id ⇒ Object
Unique identifier of the Group.
1863 1864 1865 |
# File 'lib/models/porcelain.rb', line 1863 def group_id @group_id end |
#id ⇒ Object
Unique identifier of the AccountGroup.
1865 1866 1867 |
# File 'lib/models/porcelain.rb', line 1865 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1877 1878 1879 1880 1881 1882 1883 |
# File 'lib/models/porcelain.rb', line 1877 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 |