Class: Verizon::UserNetworkExperienceHistory
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::UserNetworkExperienceHistory
- Defined in:
- lib/verizon/models/user_network_experience_history.rb
Overview
UserNetworkExperienceHistory 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.
-
#hours ⇒ Integer
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.
-
#minutes ⇒ Integer
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, hours: SKIP, id: SKIP, lastupdated: SKIP, minutes: SKIP, version: SKIP, versionid: SKIP) ⇒ UserNetworkExperienceHistory
constructor
A new instance of UserNetworkExperienceHistory.
-
#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, hours: SKIP, id: SKIP, lastupdated: SKIP, minutes: SKIP, version: SKIP, versionid: SKIP) ⇒ UserNetworkExperienceHistory
Returns a new instance of UserNetworkExperienceHistory.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 120 def initialize(billingaccountid: SKIP, createdon: SKIP, date: SKIP, devicesbad: SKIP, devicesfair: SKIP, devicesgood: SKIP, devicestotal: SKIP, foreignid: SKIP, hours: SKIP, id: SKIP, lastupdated: SKIP, minutes: 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 @hours = hours unless hours == SKIP @id = id unless id == SKIP @lastupdated = lastupdated unless lastupdated == SKIP @minutes = minutes unless minutes == 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_network_experience_history.rb', line 15 def billingaccountid @billingaccountid end |
#createdon ⇒ DateTime
Timestamp of the record
19 20 21 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 19 def createdon @createdon end |
#date ⇒ DateTime
Timestamp of the record
23 24 25 |
# File 'lib/verizon/models/user_network_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_network_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_network_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_network_experience_history.rb', line 41 def devicesgood @devicesgood end |
#devicestotal ⇒ Integer
A count of all devices
45 46 47 |
# File 'lib/verizon/models/user_network_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_network_experience_history.rb', line 49 def foreignid @foreignid end |
#hours ⇒ Integer
UUID of the ECPD account the user belongs to
53 54 55 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 53 def hours @hours end |
#id ⇒ String
UUID of the user record, assigned at creation
57 58 59 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 57 def id @id end |
#lastupdated ⇒ DateTime
Timestamp of the record
61 62 63 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 61 def lastupdated @lastupdated end |
#minutes ⇒ Integer
Timestamp of the record
65 66 67 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 65 def minutes @minutes end |
#version ⇒ String
The resource version
69 70 71 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 69 def version @version end |
#versionid ⇒ String
The UUID of the resource version
73 74 75 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 73 def versionid @versionid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 142 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 hours = hash.key?('hours') ? hash['hours'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP lastupdated = if hash.key?('lastupdated') (DateTimeHelper.from_rfc3339(hash['lastupdated']) if hash['lastupdated']) else SKIP end minutes = hash.key?('minutes') ? hash['minutes'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP versionid = hash.key?('versionid') ? hash['versionid'] : SKIP # Create object from extracted values. UserNetworkExperienceHistory.new(billingaccountid: billingaccountid, createdon: createdon, date: date, devicesbad: devicesbad, devicesfair: devicesfair, devicesgood: devicesgood, devicestotal: devicestotal, foreignid: foreignid, hours: hours, id: id, lastupdated: lastupdated, minutes: minutes, version: version, versionid: versionid) end |
.names ⇒ Object
A mapping from model property names to API property names.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 76 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['hours'] = 'hours' @_hash['id'] = 'id' @_hash['lastupdated'] = 'lastupdated' @_hash['minutes'] = 'minutes' @_hash['version'] = 'version' @_hash['versionid'] = 'versionid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
116 117 118 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 116 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 96 def self.optionals %w[ billingaccountid createdon date devicesbad devicesfair devicesgood devicestotal foreignid hours id lastupdated minutes version versionid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
214 215 216 217 218 219 220 221 222 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 214 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}, hours: #{@hours.inspect}, id:"\ " #{@id.inspect}, lastupdated: #{@lastupdated.inspect}, minutes: #{@minutes.inspect},"\ " version: #{@version.inspect}, versionid: #{@versionid.inspect}>" end |
#to_custom_createdon ⇒ Object
191 192 193 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 191 def to_custom_createdon DateTimeHelper.to_rfc3339(createdon) end |
#to_custom_date ⇒ Object
195 196 197 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 195 def to_custom_date DateTimeHelper.to_rfc3339(date) end |
#to_custom_lastupdated ⇒ Object
199 200 201 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 199 def to_custom_lastupdated DateTimeHelper.to_rfc3339(lastupdated) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
204 205 206 207 208 209 210 211 |
# File 'lib/verizon/models/user_network_experience_history.rb', line 204 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}, hours:"\ " #{@hours}, id: #{@id}, lastupdated: #{@lastupdated}, minutes: #{@minutes}, version:"\ " #{@version}, versionid: #{@versionid}>" end |