Class: Verizon::DtoExpandedDeviceResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/dto_expanded_device_response.rb

Overview

DtoExpandedDeviceResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(createdon:, foreignid:, lastupdated:, state:, versionid:, accountclientid: SKIP, billingaccountid: SKIP, chipset: SKIP, commands: SKIP, customdata: SKIP, description: SKIP, esn: SKIP, fields: SKIP, hardwareversion: SKIP, iccid: SKIP, id: SKIP, imei: SKIP, imsi: SKIP, licenses: SKIP, mac: SKIP, manufacturer: SKIP, meid: SKIP, modelmetadata: SKIP, msisdn: SKIP, name: SKIP, parentdeviceid: SKIP, productmodel: SKIP, providerid: SKIP, qrcode: SKIP, refid: SKIP, refidtype: SKIP, serial: SKIP, services: SKIP, sku: SKIP, softwareversion: SKIP, version: SKIP) ⇒ DtoExpandedDeviceResponse

Returns a new instance of DtoExpandedDeviceResponse.



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 246

def initialize(createdon:, foreignid:, lastupdated:, state:, versionid:,
               accountclientid: SKIP, billingaccountid: SKIP, chipset: SKIP,
               commands: SKIP, customdata: SKIP, description: SKIP,
               esn: SKIP, fields: SKIP, hardwareversion: SKIP, iccid: SKIP,
               id: SKIP, imei: SKIP, imsi: SKIP, licenses: SKIP, mac: SKIP,
               manufacturer: SKIP, meid: SKIP, modelmetadata: SKIP,
               msisdn: SKIP, name: SKIP, parentdeviceid: SKIP,
               productmodel: SKIP, providerid: SKIP, qrcode: SKIP,
               refid: SKIP, refidtype: SKIP, serial: SKIP, services: SKIP,
               sku: SKIP, softwareversion: SKIP, version: SKIP)
  @accountclientid = accountclientid unless accountclientid == SKIP
  @billingaccountid = billingaccountid unless billingaccountid == SKIP
  @chipset = chipset unless chipset == SKIP
  @commands = commands unless commands == SKIP
  @createdon = createdon
  @customdata = customdata unless customdata == SKIP
  @description = description unless description == SKIP
  @esn = esn unless esn == SKIP
  @fields = fields unless fields == SKIP
  @foreignid = foreignid
  @hardwareversion = hardwareversion unless hardwareversion == SKIP
  @iccid = iccid unless iccid == SKIP
  @id = id unless id == SKIP
  @imei = imei unless imei == SKIP
  @imsi = imsi unless imsi == SKIP
  @lastupdated = lastupdated
  @licenses = licenses unless licenses == SKIP
  @mac = mac unless mac == SKIP
  @manufacturer = manufacturer unless manufacturer == SKIP
  @meid = meid unless meid == SKIP
  @modelmetadata =  unless  == SKIP
  @msisdn = msisdn unless msisdn == SKIP
  @name = name unless name == SKIP
  @parentdeviceid = parentdeviceid unless parentdeviceid == SKIP
  @productmodel = productmodel unless productmodel == SKIP
  @providerid = providerid unless providerid == SKIP
  @qrcode = qrcode unless qrcode == SKIP
  @refid = refid unless refid == SKIP
  @refidtype = refidtype unless refidtype == SKIP
  @serial = serial unless serial == SKIP
  @services = services unless services == SKIP
  @sku = sku unless sku == SKIP
  @softwareversion = softwareversion unless softwareversion == SKIP
  @state = state
  @version = version unless version == SKIP
  @versionid = versionid
end

Instance Attribute Details

#accountclientidString

Not used in this release, future functionality

Returns:

  • (String)


15
16
17
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 15

def accountclientid
  @accountclientid
end

#billingaccountidString

The billing account ID. This is the same value as the Account ID

Returns:

  • (String)


19
20
21
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 19

def billingaccountid
  @billingaccountid
end

#chipsetString

The Identifier of chipset used by the device

Returns:

  • (String)


23
24
25
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 23

def chipset
  @chipset
end

#commandsHash[String, Object]

The Identifier of chipset used by the device

Returns:

  • (Hash[String, Object])


27
28
29
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 27

def commands
  @commands
end

#createdonDateTime

Timestamp of the record

Returns:

  • (DateTime)


31
32
33
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 31

def createdon
  @createdon
end

#customdataHash[String, Object]

Name/value pair, where the value is client defined. The purpose is to keep track of current state per device action.

Returns:

  • (Hash[String, Object])


36
37
38
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 36

def customdata
  @customdata
end

#descriptionString

a short description

Returns:

  • (String)


40
41
42
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 40

def description
  @description
end

#esnInteger

The Electronic Serial Number (ESN) of the device

Returns:

  • (Integer)


44
45
46
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 44

def esn
  @esn
end

#fieldsDtoFields

Fields to return needed by search

Returns:



48
49
50
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 48

def fields
  @fields
end

#foreignidString

UUID of the ECPD account the user belongs to

Returns:

  • (String)


52
53
54
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 52

def foreignid
  @foreignid
end

#hardwareversionString

The manufacturer’s hardware version of the device

Returns:

  • (String)


56
57
58
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 56

def hardwareversion
  @hardwareversion
end

#iccidString

The 20-digit Integrated Circuit Card ID (SIM card ID)

Returns:

  • (String)


60
61
62
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 60

def iccid
  @iccid
end

#idString

UUID of the user record, assigned at creation

Returns:

  • (String)


64
65
66
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 64

def id
  @id
end

#imeiInteger

The 15-digit International Mobile Equipment ID

Returns:

  • (Integer)


68
69
70
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 68

def imei
  @imei
end

#imsiInteger

The 64-bit International Mobile Subscriber Identity

Returns:

  • (Integer)


72
73
74
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 72

def imsi
  @imsi
end

#lastupdatedDateTime

Timestamp of the record

Returns:

  • (DateTime)


76
77
78
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 76

def lastupdated
  @lastupdated
end

#licensesArray[String]

licenses assigned to the device

Returns:

  • (Array[String])


80
81
82
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 80

def licenses
  @licenses
end

#macString

The Media Access Control address of the device, listed on the device in the format XX-XX-XX-XX-XX-XX or XX:XX:XX:XX:XX:XX

Returns:

  • (String)


85
86
87
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 85

def mac
  @mac
end

#manufacturerString

The manufacturer of the device

Returns:

  • (String)


89
90
91
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 89

def manufacturer
  @manufacturer
end

#meidString

The 56-bit Mobile Equipment ID

Returns:

  • (String)


93
94
95
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 93

def meid
  @meid
end

#modelmetadataObject

Detail

Returns:

  • (Object)


97
98
99
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 97

def 
  @modelmetadata
end

#msisdnString

The Mobile Station International Subscriber Directory Number. In the USA, this is 1+ a 10-digit phone number

Returns:

  • (String)


102
103
104
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 102

def msisdn
  @msisdn
end

#nameString

User defined name of the record

Returns:

  • (String)


106
107
108
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 106

def name
  @name
end

#parentdeviceidString

this field is applicable for BLE sensors. This represents the value of parent gateway device

Returns:

  • (String)


111
112
113
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 111

def parentdeviceid
  @parentdeviceid
end

#productmodelString

The device model name

Returns:

  • (String)


115
116
117
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 115

def productmodel
  @productmodel
end

#provideridString

The id of the provider who is responible for talking to the device

Returns:

  • (String)


119
120
121
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 119

def providerid
  @providerid
end

#qrcodeString

The numeric value of the Quick Response (QR) code

Returns:

  • (String)


123
124
125
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 123

def qrcode
  @qrcode
end

#refidString

The device reference ID

Returns:

  • (String)


127
128
129
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 127

def refid
  @refid
end

#refidtypeString

The type of value represented by ‘refid`

Returns:

  • (String)


131
132
133
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 131

def refidtype
  @refidtype
end

#serialString

The device’s serial number

Returns:

  • (String)


135
136
137
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 135

def serial
  @serial
end

#servicesArray[String]

The device’s serial number

Returns:

  • (Array[String])


139
140
141
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 139

def services
  @services
end

#skuString

The Stock Keeping Unit (SKU) number of the device

Returns:

  • (String)


143
144
145
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 143

def sku
  @sku
end

#softwareversionString

the current device software version

Returns:

  • (String)


147
148
149
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 147

def softwareversion
  @softwareversion
end

#stateString

The current status of the device or transaction and will be ‘success` or `failed`

Returns:

  • (String)


152
153
154
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 152

def state
  @state
end

#versionString

The resource version

Returns:

  • (String)


156
157
158
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 156

def version
  @version
end

#versionidString

The UUID of the resource version

Returns:

  • (String)


160
161
162
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 160

def versionid
  @versionid
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 295

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  createdon = if hash.key?('createdon')
                (DateTimeHelper.from_rfc3339(hash['createdon']) if hash['createdon'])
              end
  foreignid = hash.key?('foreignid') ? hash['foreignid'] : nil
  lastupdated = if hash.key?('lastupdated')
                  (DateTimeHelper.from_rfc3339(hash['lastupdated']) if hash['lastupdated'])
                end
  state = hash.key?('state') ? hash['state'] : nil
  versionid = hash.key?('versionid') ? hash['versionid'] : nil
  accountclientid =
    hash.key?('accountclientid') ? hash['accountclientid'] : SKIP
  billingaccountid =
    hash.key?('billingaccountid') ? hash['billingaccountid'] : SKIP
  chipset = hash.key?('chipset') ? hash['chipset'] : SKIP
  commands = hash.key?('commands') ? hash['commands'] : SKIP
  customdata = hash.key?('customdata') ? hash['customdata'] : SKIP
  description = hash.key?('description') ? hash['description'] : SKIP
  esn = hash.key?('esn') ? hash['esn'] : SKIP
  fields = DtoFields.from_hash(hash['fields']) if hash['fields']
  hardwareversion =
    hash.key?('hardwareversion') ? hash['hardwareversion'] : SKIP
  iccid = hash.key?('iccid') ? hash['iccid'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  imei = hash.key?('imei') ? hash['imei'] : SKIP
  imsi = hash.key?('imsi') ? hash['imsi'] : SKIP
  licenses = hash.key?('licenses') ? hash['licenses'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  manufacturer = hash.key?('manufacturer') ? hash['manufacturer'] : SKIP
  meid = hash.key?('meid') ? hash['meid'] : SKIP
   = hash.key?('modelmetadata') ? hash['modelmetadata'] : SKIP
  msisdn = hash.key?('msisdn') ? hash['msisdn'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  parentdeviceid =
    hash.key?('parentdeviceid') ? hash['parentdeviceid'] : SKIP
  productmodel = hash.key?('productmodel') ? hash['productmodel'] : SKIP
  providerid = hash.key?('providerid') ? hash['providerid'] : SKIP
  qrcode = hash.key?('qrcode') ? hash['qrcode'] : SKIP
  refid = hash.key?('refid') ? hash['refid'] : SKIP
  refidtype = hash.key?('refidtype') ? hash['refidtype'] : SKIP
  serial = hash.key?('serial') ? hash['serial'] : SKIP
  services = hash.key?('services') ? hash['services'] : SKIP
  sku = hash.key?('sku') ? hash['sku'] : SKIP
  softwareversion =
    hash.key?('softwareversion') ? hash['softwareversion'] : SKIP
  version = hash.key?('version') ? hash['version'] : SKIP

  # Create object from extracted values.
  DtoExpandedDeviceResponse.new(createdon: createdon,
                                foreignid: foreignid,
                                lastupdated: lastupdated,
                                state: state,
                                versionid: versionid,
                                accountclientid: accountclientid,
                                billingaccountid: billingaccountid,
                                chipset: chipset,
                                commands: commands,
                                customdata: customdata,
                                description: description,
                                esn: esn,
                                fields: fields,
                                hardwareversion: hardwareversion,
                                iccid: iccid,
                                id: id,
                                imei: imei,
                                imsi: imsi,
                                licenses: licenses,
                                mac: mac,
                                manufacturer: manufacturer,
                                meid: meid,
                                modelmetadata: ,
                                msisdn: msisdn,
                                name: name,
                                parentdeviceid: parentdeviceid,
                                productmodel: productmodel,
                                providerid: providerid,
                                qrcode: qrcode,
                                refid: refid,
                                refidtype: refidtype,
                                serial: serial,
                                services: services,
                                sku: sku,
                                softwareversion: softwareversion,
                                version: version)
end

.namesObject

A mapping from model property names to API property names.



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
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 163

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['accountclientid'] = 'accountclientid'
  @_hash['billingaccountid'] = 'billingaccountid'
  @_hash['chipset'] = 'chipset'
  @_hash['commands'] = 'commands'
  @_hash['createdon'] = 'createdon'
  @_hash['customdata'] = 'customdata'
  @_hash['description'] = 'description'
  @_hash['esn'] = 'esn'
  @_hash['fields'] = 'fields'
  @_hash['foreignid'] = 'foreignid'
  @_hash['hardwareversion'] = 'hardwareversion'
  @_hash['iccid'] = 'iccid'
  @_hash['id'] = 'id'
  @_hash['imei'] = 'imei'
  @_hash['imsi'] = 'imsi'
  @_hash['lastupdated'] = 'lastupdated'
  @_hash['licenses'] = 'licenses'
  @_hash['mac'] = 'mac'
  @_hash['manufacturer'] = 'manufacturer'
  @_hash['meid'] = 'meid'
  @_hash['modelmetadata'] = 'modelmetadata'
  @_hash['msisdn'] = 'msisdn'
  @_hash['name'] = 'name'
  @_hash['parentdeviceid'] = 'parentdeviceid'
  @_hash['productmodel'] = 'productmodel'
  @_hash['providerid'] = 'providerid'
  @_hash['qrcode'] = 'qrcode'
  @_hash['refid'] = 'refid'
  @_hash['refidtype'] = 'refidtype'
  @_hash['serial'] = 'serial'
  @_hash['services'] = 'services'
  @_hash['sku'] = 'sku'
  @_hash['softwareversion'] = 'softwareversion'
  @_hash['state'] = 'state'
  @_hash['version'] = 'version'
  @_hash['versionid'] = 'versionid'
  @_hash
end

.nullablesObject

An array for nullable fields



242
243
244
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 242

def self.nullables
  []
end

.optionalsObject

An array for optional fields



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 205

def self.optionals
  %w[
    accountclientid
    billingaccountid
    chipset
    commands
    customdata
    description
    esn
    fields
    hardwareversion
    iccid
    id
    imei
    imsi
    licenses
    mac
    manufacturer
    meid
    modelmetadata
    msisdn
    name
    parentdeviceid
    productmodel
    providerid
    qrcode
    refid
    refidtype
    serial
    services
    sku
    softwareversion
    version
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 409

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} accountclientid: #{@accountclientid.inspect}, billingaccountid:"\
  " #{@billingaccountid.inspect}, chipset: #{@chipset.inspect}, commands:"\
  " #{@commands.inspect}, createdon: #{@createdon.inspect}, customdata:"\
  " #{@customdata.inspect}, description: #{@description.inspect}, esn: #{@esn.inspect},"\
  " fields: #{@fields.inspect}, foreignid: #{@foreignid.inspect}, hardwareversion:"\
  " #{@hardwareversion.inspect}, iccid: #{@iccid.inspect}, id: #{@id.inspect}, imei:"\
  " #{@imei.inspect}, imsi: #{@imsi.inspect}, lastupdated: #{@lastupdated.inspect}, licenses:"\
  " #{@licenses.inspect}, mac: #{@mac.inspect}, manufacturer: #{@manufacturer.inspect}, meid:"\
  " #{@meid.inspect}, modelmetadata: #{@modelmetadata.inspect}, msisdn: #{@msisdn.inspect},"\
  " name: #{@name.inspect}, parentdeviceid: #{@parentdeviceid.inspect}, productmodel:"\
  " #{@productmodel.inspect}, providerid: #{@providerid.inspect}, qrcode: #{@qrcode.inspect},"\
  " refid: #{@refid.inspect}, refidtype: #{@refidtype.inspect}, serial: #{@serial.inspect},"\
  " services: #{@services.inspect}, sku: #{@sku.inspect}, softwareversion:"\
  " #{@softwareversion.inspect}, state: #{@state.inspect}, version: #{@version.inspect},"\
  " versionid: #{@versionid.inspect}>"
end

#to_custom_createdonObject



384
385
386
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 384

def to_custom_createdon
  DateTimeHelper.to_rfc3339(createdon)
end

#to_custom_lastupdatedObject



388
389
390
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 388

def to_custom_lastupdated
  DateTimeHelper.to_rfc3339(lastupdated)
end

#to_sObject

Provides a human-readable string representation of the object.



393
394
395
396
397
398
399
400
401
402
403
404
405
406
# File 'lib/verizon/models/dto_expanded_device_response.rb', line 393

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} accountclientid: #{@accountclientid}, billingaccountid:"\
  " #{@billingaccountid}, chipset: #{@chipset}, commands: #{@commands}, createdon:"\
  " #{@createdon}, customdata: #{@customdata}, description: #{@description}, esn: #{@esn},"\
  " fields: #{@fields}, foreignid: #{@foreignid}, hardwareversion: #{@hardwareversion}, iccid:"\
  " #{@iccid}, id: #{@id}, imei: #{@imei}, imsi: #{@imsi}, lastupdated: #{@lastupdated},"\
  " licenses: #{@licenses}, mac: #{@mac}, manufacturer: #{@manufacturer}, meid: #{@meid},"\
  " modelmetadata: #{@modelmetadata}, msisdn: #{@msisdn}, name: #{@name}, parentdeviceid:"\
  " #{@parentdeviceid}, productmodel: #{@productmodel}, providerid: #{@providerid}, qrcode:"\
  " #{@qrcode}, refid: #{@refid}, refidtype: #{@refidtype}, serial: #{@serial}, services:"\
  " #{@services}, sku: #{@sku}, softwareversion: #{@softwareversion}, state: #{@state},"\
  " version: #{@version}, versionid: #{@versionid}>"
end