Class: Verizon::UserDeviceExperienceHistory
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::UserDeviceExperienceHistory
- Defined in:
- lib/verizon/models/user_device_experience_history.rb
Overview
UserDeviceExperienceHistory Model.
Instance Attribute Summary collapse
-
#billingaccountid ⇒ String
The billing account ID.
-
#createdon ⇒ DateTime
Timestamp of the record.
-
#date ⇒ DateTime
Timestamp of the record.
-
#devicesbad ⇒ Integer
This is a score based on combination of network coverage and network outage affecting the device’s ability to connect to the network.
-
#devicesfair ⇒ Integer
This is a score based on combination of network coverage and network outage affecting the device’s ability to connect to the network.
-
#devicesgood ⇒ Integer
This is a score based on combination of network coverage and network outage affecting the device’s ability to connect to the network.
-
#devicestotal ⇒ Integer
A count of all devices.
-
#foreignid ⇒ String
UUID of the ECPD account the user belongs to.
-
#id ⇒ String
UUID of the user record, assigned at creation.
-
#lastupdated ⇒ DateTime
Timestamp of the record.
-
#version ⇒ String
The resource version.
-
#versionid ⇒ String
The UUID of the resource version.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(billingaccountid: SKIP, createdon: SKIP, date: SKIP, devicesbad: SKIP, devicesfair: SKIP, devicesgood: SKIP, devicestotal: SKIP, foreignid: SKIP, id: SKIP, lastupdated: SKIP, version: SKIP, versionid: SKIP) ⇒ UserDeviceExperienceHistory
constructor
A new instance of UserDeviceExperienceHistory.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_createdon ⇒ Object
- #to_custom_date ⇒ Object
- #to_custom_lastupdated ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(billingaccountid: SKIP, createdon: SKIP, date: SKIP, devicesbad: SKIP, devicesfair: SKIP, devicesgood: SKIP, devicestotal: SKIP, foreignid: SKIP, id: SKIP, lastupdated: SKIP, version: SKIP, versionid: SKIP) ⇒ UserDeviceExperienceHistory
Returns a new instance of UserDeviceExperienceHistory.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 108 def initialize(billingaccountid: SKIP, createdon: SKIP, date: SKIP, devicesbad: SKIP, devicesfair: SKIP, devicesgood: SKIP, devicestotal: SKIP, foreignid: SKIP, id: SKIP, lastupdated: SKIP, version: SKIP, versionid: SKIP) @billingaccountid = billingaccountid unless billingaccountid == SKIP @createdon = createdon unless createdon == SKIP @date = date unless date == SKIP @devicesbad = devicesbad unless devicesbad == SKIP @devicesfair = devicesfair unless devicesfair == SKIP @devicesgood = devicesgood unless devicesgood == SKIP @devicestotal = devicestotal unless devicestotal == SKIP @foreignid = foreignid unless foreignid == SKIP @id = id unless id == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @version = version unless version == SKIP @versionid = versionid unless versionid == SKIP end |
Instance Attribute Details
#billingaccountid ⇒ String
The billing account ID. This is the same value as the Account ID
15 16 17 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 15 def billingaccountid @billingaccountid end |
#createdon ⇒ DateTime
Timestamp of the record
19 20 21 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 19 def createdon @createdon end |
#date ⇒ DateTime
Timestamp of the record
23 24 25 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 23 def date @date end |
#devicesbad ⇒ Integer
This is a score based on combination of network coverage and network outage affecting the device’s ability to connect to the network. This is a count of devices that have failed
29 30 31 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 29 def devicesbad @devicesbad end |
#devicesfair ⇒ Integer
This is a score based on combination of network coverage and network outage affecting the device’s ability to connect to the network. This is a count of devices that are impaired
35 36 37 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 35 def devicesfair @devicesfair end |
#devicesgood ⇒ Integer
This is a score based on combination of network coverage and network outage affecting the device’s ability to connect to the network. This is a count of devices that have no issues
41 42 43 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 41 def devicesgood @devicesgood end |
#devicestotal ⇒ Integer
A count of all devices
45 46 47 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 45 def devicestotal @devicestotal end |
#foreignid ⇒ String
UUID of the ECPD account the user belongs to
49 50 51 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 49 def foreignid @foreignid end |
#id ⇒ String
UUID of the user record, assigned at creation
53 54 55 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 53 def id @id end |
#lastupdated ⇒ DateTime
Timestamp of the record
57 58 59 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 57 def lastupdated @lastupdated end |
#version ⇒ String
The resource version
61 62 63 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 61 def version @version end |
#versionid ⇒ String
The UUID of the resource version
65 66 67 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 65 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 127 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. billingaccountid = hash.key?('billingaccountid') ? hash['billingaccountid'] : SKIP createdon = if hash.key?('createdon') (DateTimeHelper.from_rfc3339(hash['createdon']) if hash['createdon']) else SKIP end date = if hash.key?('date') (DateTimeHelper.from_rfc3339(hash['date']) if hash['date']) else SKIP end devicesbad = hash.key?('devicesbad') ? hash['devicesbad'] : SKIP devicesfair = hash.key?('devicesfair') ? hash['devicesfair'] : SKIP devicesgood = hash.key?('devicesgood') ? hash['devicesgood'] : SKIP devicestotal = hash.key?('devicestotal') ? hash['devicestotal'] : SKIP foreignid = hash.key?('foreignid') ? hash['foreignid'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP lastupdated = if hash.key?('lastupdated') (DateTimeHelper.from_rfc3339(hash['lastupdated']) if hash['lastupdated']) else SKIP end version = hash.key?('version') ? hash['version'] : SKIP versionid = hash.key?('versionid') ? hash['versionid'] : SKIP # Create object from extracted values. UserDeviceExperienceHistory.new(billingaccountid: billingaccountid, createdon: createdon, date: date, devicesbad: devicesbad, devicesfair: devicesfair, devicesgood: devicesgood, devicestotal: devicestotal, foreignid: foreignid, id: id, lastupdated: lastupdated, version: version, versionid: versionid) end |
.names ⇒ Object
A mapping from model property names to API property names.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 68 def self.names @_hash = {} if @_hash.nil? @_hash['billingaccountid'] = 'billingaccountid' @_hash['createdon'] = 'createdon' @_hash['date'] = 'date' @_hash['devicesbad'] = 'devicesbad' @_hash['devicesfair'] = 'devicesfair' @_hash['devicesgood'] = 'devicesgood' @_hash['devicestotal'] = 'devicestotal' @_hash['foreignid'] = 'foreignid' @_hash['id'] = 'id' @_hash['lastupdated'] = 'lastupdated' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
104 105 106 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 104 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 86 def self.optionals %w[ billingaccountid createdon date devicesbad devicesfair devicesgood devicestotal foreignid id lastupdated version versionid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
194 195 196 197 198 199 200 201 202 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 194 def inspect class_name = self.class.name.split('::').last "<#{class_name} billingaccountid: #{@billingaccountid.inspect}, createdon:"\ " #{@createdon.inspect}, date: #{@date.inspect}, devicesbad: #{@devicesbad.inspect},"\ " devicesfair: #{@devicesfair.inspect}, devicesgood: #{@devicesgood.inspect}, devicestotal:"\ " #{@devicestotal.inspect}, foreignid: #{@foreignid.inspect}, id: #{@id.inspect},"\ " lastupdated: #{@lastupdated.inspect}, version: #{@version.inspect}, versionid:"\ " #{@versionid.inspect}>" end |
#to_custom_createdon ⇒ Object
172 173 174 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 172 def to_custom_createdon DateTimeHelper.to_rfc3339(createdon) end |
#to_custom_date ⇒ Object
176 177 178 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 176 def to_custom_date DateTimeHelper.to_rfc3339(date) end |
#to_custom_lastupdated ⇒ Object
180 181 182 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 180 def to_custom_lastupdated DateTimeHelper.to_rfc3339(lastupdated) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
185 186 187 188 189 190 191 |
# File 'lib/verizon/models/user_device_experience_history.rb', line 185 def to_s class_name = self.class.name.split('::').last "<#{class_name} billingaccountid: #{@billingaccountid}, createdon: #{@createdon}, date:"\ " #{@date}, devicesbad: #{@devicesbad}, devicesfair: #{@devicesfair}, devicesgood:"\ " #{@devicesgood}, devicestotal: #{@devicestotal}, foreignid: #{@foreignid}, id: #{@id},"\ " lastupdated: #{@lastupdated}, version: #{@version}, versionid: #{@versionid}>" end |