Class: Verizon::DeviceListQueryItem
- Defined in:
- lib/verizon/models/device_list_query_item.rb
Overview
The list of devices in the account.
Instance Attribute Summary collapse
-
#device_id ⇒ String
Device IMEI.
-
#firmware ⇒ String
The name of the firmware image currently installed on the device.
-
#fota_eligible ⇒ TrueClass | FalseClass
True if the device firmware can be upgraded over the air using the Software Management Services API.
-
#license_assigned ⇒ TrueClass | FalseClass
True if an MRC license has been assigned to this device.
-
#make ⇒ String
The device make.
-
#mdn ⇒ String
The MDN (phone number) of the device.
-
#model ⇒ String
The device model name.
-
#upgrade_time ⇒ String
The date and time that the device firmware was last upgraded.
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(device_id = SKIP, mdn = SKIP, model = SKIP, make = SKIP, firmware = SKIP, fota_eligible = SKIP, license_assigned = SKIP, upgrade_time = SKIP) ⇒ DeviceListQueryItem
constructor
A new instance of DeviceListQueryItem.
Methods inherited from BaseModel
Constructor Details
#initialize(device_id = SKIP, mdn = SKIP, model = SKIP, make = SKIP, firmware = SKIP, fota_eligible = SKIP, license_assigned = SKIP, upgrade_time = SKIP) ⇒ DeviceListQueryItem
Returns a new instance of DeviceListQueryItem.
79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/verizon/models/device_list_query_item.rb', line 79 def initialize(device_id = SKIP, mdn = SKIP, model = SKIP, make = SKIP, firmware = SKIP, fota_eligible = SKIP, license_assigned = SKIP, upgrade_time = SKIP) @device_id = device_id unless device_id == SKIP @mdn = mdn unless mdn == SKIP @model = model unless model == SKIP @make = make unless make == SKIP @firmware = firmware unless firmware == SKIP @fota_eligible = fota_eligible unless fota_eligible == SKIP @license_assigned = license_assigned unless license_assigned == SKIP @upgrade_time = upgrade_time unless upgrade_time == SKIP end |
Instance Attribute Details
#device_id ⇒ String
Device IMEI.
14 15 16 |
# File 'lib/verizon/models/device_list_query_item.rb', line 14 def device_id @device_id end |
#firmware ⇒ String
The name of the firmware image currently installed on the device.
30 31 32 |
# File 'lib/verizon/models/device_list_query_item.rb', line 30 def firmware @firmware end |
#fota_eligible ⇒ TrueClass | FalseClass
True if the device firmware can be upgraded over the air using the Software Management Services API.
35 36 37 |
# File 'lib/verizon/models/device_list_query_item.rb', line 35 def fota_eligible @fota_eligible end |
#license_assigned ⇒ TrueClass | FalseClass
True if an MRC license has been assigned to this device.
39 40 41 |
# File 'lib/verizon/models/device_list_query_item.rb', line 39 def license_assigned @license_assigned end |
#make ⇒ String
The device make.
26 27 28 |
# File 'lib/verizon/models/device_list_query_item.rb', line 26 def make @make end |
#mdn ⇒ String
The MDN (phone number) of the device.
18 19 20 |
# File 'lib/verizon/models/device_list_query_item.rb', line 18 def mdn @mdn end |
#model ⇒ String
The device model name.
22 23 24 |
# File 'lib/verizon/models/device_list_query_item.rb', line 22 def model @model end |
#upgrade_time ⇒ String
The date and time that the device firmware was last upgraded. If a device has never been upgraded, the upgradeTime will be 01/01/1900 0:0:0.
44 45 46 |
# File 'lib/verizon/models/device_list_query_item.rb', line 44 def upgrade_time @upgrade_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/verizon/models/device_list_query_item.rb', line 93 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. device_id = hash.key?('deviceId') ? hash['deviceId'] : SKIP mdn = hash.key?('mdn') ? hash['mdn'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP make = hash.key?('make') ? hash['make'] : SKIP firmware = hash.key?('firmware') ? hash['firmware'] : SKIP fota_eligible = hash.key?('fotaEligible') ? hash['fotaEligible'] : SKIP license_assigned = hash.key?('licenseAssigned') ? hash['licenseAssigned'] : SKIP upgrade_time = hash.key?('upgradeTime') ? hash['upgradeTime'] : SKIP # Create object from extracted values. DeviceListQueryItem.new(device_id, mdn, model, make, firmware, fota_eligible, license_assigned, upgrade_time) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/verizon/models/device_list_query_item.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['device_id'] = 'deviceId' @_hash['mdn'] = 'mdn' @_hash['model'] = 'model' @_hash['make'] = 'make' @_hash['firmware'] = 'firmware' @_hash['fota_eligible'] = 'fotaEligible' @_hash['license_assigned'] = 'licenseAssigned' @_hash['upgrade_time'] = 'upgradeTime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
75 76 77 |
# File 'lib/verizon/models/device_list_query_item.rb', line 75 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/verizon/models/device_list_query_item.rb', line 61 def self.optionals %w[ device_id mdn model make firmware fota_eligible license_assigned upgrade_time ] end |