Class: ApplicationInsights::Channel::Contracts::User
- Inherits:
-
JsonSerializable
- Object
- JsonSerializable
- ApplicationInsights::Channel::Contracts::User
- Defined in:
- lib/application_insights/channel/contracts/user.rb
Overview
Data contract class for type User.
Instance Method Summary collapse
-
#account_acquisition_date ⇒ Object
Gets the account_acquisition_date property.
-
#account_acquisition_date=(value) ⇒ Object
Sets the account_acquisition_date property.
-
#account_id ⇒ Object
Gets the account_id property.
-
#account_id=(value) ⇒ Object
Sets the account_id property.
-
#id ⇒ Object
Gets the id property.
-
#id=(value) ⇒ Object
Sets the id property.
-
#initialize(options = {}) ⇒ User
constructor
Initializes a new instance of the User class.
-
#store_region ⇒ Object
Gets the store_region property.
-
#store_region=(value) ⇒ Object
Sets the store_region property.
-
#user_agent ⇒ Object
Gets the user_agent property.
-
#user_agent=(value) ⇒ Object
Sets the user_agent property.
Methods inherited from JsonSerializable
Constructor Details
#initialize(options = {}) ⇒ User
Initializes a new instance of the User class.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/application_insights/channel/contracts/user.rb', line 9 def initialize(={}) defaults = { 'ai.user.accountAcquisitionDate' => nil, 'ai.user.accountId' => nil, 'ai.user.userAgent' => nil, 'ai.user.id' => nil, 'ai.user.storeRegion' => nil } values = { } super defaults, values, end |
Instance Method Details
#account_acquisition_date ⇒ Object
Gets the account_acquisition_date property.
23 24 25 26 27 |
# File 'lib/application_insights/channel/contracts/user.rb', line 23 def account_acquisition_date @values.fetch('ai.user.accountAcquisitionDate') { @values['ai.user.accountAcquisitionDate'] = nil } end |
#account_acquisition_date=(value) ⇒ Object
Sets the account_acquisition_date property.
30 31 32 33 34 35 36 |
# File 'lib/application_insights/channel/contracts/user.rb', line 30 def account_acquisition_date=(value) if value == @defaults['ai.user.accountAcquisitionDate'] @values.delete 'ai.user.accountAcquisitionDate' if @values.key? 'ai.user.accountAcquisitionDate' else @values['ai.user.accountAcquisitionDate'] = value end end |
#account_id ⇒ Object
Gets the account_id property.
39 40 41 42 43 |
# File 'lib/application_insights/channel/contracts/user.rb', line 39 def account_id @values.fetch('ai.user.accountId') { @values['ai.user.accountId'] = nil } end |
#account_id=(value) ⇒ Object
Sets the account_id property.
46 47 48 49 50 51 52 |
# File 'lib/application_insights/channel/contracts/user.rb', line 46 def account_id=(value) if value == @defaults['ai.user.accountId'] @values.delete 'ai.user.accountId' if @values.key? 'ai.user.accountId' else @values['ai.user.accountId'] = value end end |
#id ⇒ Object
Gets the id property.
71 72 73 74 75 |
# File 'lib/application_insights/channel/contracts/user.rb', line 71 def id @values.fetch('ai.user.id') { @values['ai.user.id'] = nil } end |
#id=(value) ⇒ Object
Sets the id property.
78 79 80 81 82 83 84 |
# File 'lib/application_insights/channel/contracts/user.rb', line 78 def id=(value) if value == @defaults['ai.user.id'] @values.delete 'ai.user.id' if @values.key? 'ai.user.id' else @values['ai.user.id'] = value end end |
#store_region ⇒ Object
Gets the store_region property.
87 88 89 90 91 |
# File 'lib/application_insights/channel/contracts/user.rb', line 87 def store_region @values.fetch('ai.user.storeRegion') { @values['ai.user.storeRegion'] = nil } end |
#store_region=(value) ⇒ Object
Sets the store_region property.
94 95 96 97 98 99 100 |
# File 'lib/application_insights/channel/contracts/user.rb', line 94 def store_region=(value) if value == @defaults['ai.user.storeRegion'] @values.delete 'ai.user.storeRegion' if @values.key? 'ai.user.storeRegion' else @values['ai.user.storeRegion'] = value end end |
#user_agent ⇒ Object
Gets the user_agent property.
55 56 57 58 59 |
# File 'lib/application_insights/channel/contracts/user.rb', line 55 def user_agent @values.fetch('ai.user.userAgent') { @values['ai.user.userAgent'] = nil } end |
#user_agent=(value) ⇒ Object
Sets the user_agent property.
62 63 64 65 66 67 68 |
# File 'lib/application_insights/channel/contracts/user.rb', line 62 def user_agent=(value) if value == @defaults['ai.user.userAgent'] @values.delete 'ai.user.userAgent' if @values.key? 'ai.user.userAgent' else @values['ai.user.userAgent'] = value end end |