Class: SDM::AccountGroupHistory
- Inherits:
-
Object
- Object
- SDM::AccountGroupHistory
- Defined in:
- lib/models/porcelain.rb
Overview
AccountGroupHistory records the state of an AccountGroup at a given point in time, where every change (create, update and delete) to an AccountGroup produces an AccountGroupHistory record.
Instance Attribute Summary collapse
-
#account_group ⇒ Object
The complete AccountGroup state at this time.
-
#activity_id ⇒ Object
The unique identifier of the Activity that produced this change to the AccountGroup.
-
#deleted_at ⇒ Object
If this AccountGroup was deleted, the time it was deleted.
-
#timestamp ⇒ Object
The time at which the AccountGroup state was recorded.
Instance Method Summary collapse
-
#initialize(account_group: nil, activity_id: nil, deleted_at: nil, timestamp: nil) ⇒ AccountGroupHistory
constructor
A new instance of AccountGroupHistory.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(account_group: nil, activity_id: nil, deleted_at: nil, timestamp: nil) ⇒ AccountGroupHistory
Returns a new instance of AccountGroupHistory.
1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 |
# File 'lib/models/porcelain.rb', line 1792 def initialize( account_group: nil, activity_id: nil, deleted_at: nil, timestamp: nil ) @account_group = account_group == nil ? nil : account_group @activity_id = activity_id == nil ? "" : activity_id @deleted_at = deleted_at == nil ? nil : deleted_at @timestamp = == nil ? nil : end |
Instance Attribute Details
#account_group ⇒ Object
The complete AccountGroup state at this time.
1783 1784 1785 |
# File 'lib/models/porcelain.rb', line 1783 def account_group @account_group end |
#activity_id ⇒ Object
The unique identifier of the Activity that produced this change to the AccountGroup. May be empty for some system-initiated updates.
1786 1787 1788 |
# File 'lib/models/porcelain.rb', line 1786 def activity_id @activity_id end |
#deleted_at ⇒ Object
If this AccountGroup was deleted, the time it was deleted.
1788 1789 1790 |
# File 'lib/models/porcelain.rb', line 1788 def deleted_at @deleted_at end |
#timestamp ⇒ Object
The time at which the AccountGroup state was recorded.
1790 1791 1792 |
# File 'lib/models/porcelain.rb', line 1790 def @timestamp end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1804 1805 1806 1807 1808 1809 1810 |
# File 'lib/models/porcelain.rb', line 1804 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 |