Class: Verizon::MismatchedDevice
- Defined in:
- lib/verizon/models/mismatched_device.rb
Overview
4G devices with an ICCID (SIM) that was not activated with the expected IMEI (hardware) during a specified time frame.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The account that the device is associated with.
-
#activation_date ⇒ String
The date and time when the SIM was last activated.
-
#iccid ⇒ String
The ID of the SIM.
-
#mdn ⇒ String
The assigned phone number of the device.
-
#post_imei ⇒ String
The IMEI of the device after the SIM OTA activation on simOtaDate.
-
#pre_imei ⇒ String
The IMEI of the device prior to the SIM OTA activation on simOtaDate.
-
#sim_ota_date ⇒ String
The date and time of the SIM OTA activation.
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(account_name = SKIP, mdn = SKIP, activation_date = SKIP, iccid = SKIP, pre_imei = SKIP, post_imei = SKIP, sim_ota_date = SKIP) ⇒ MismatchedDevice
constructor
A new instance of MismatchedDevice.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, mdn = SKIP, activation_date = SKIP, iccid = SKIP, pre_imei = SKIP, post_imei = SKIP, sim_ota_date = SKIP) ⇒ MismatchedDevice
Returns a new instance of MismatchedDevice.
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/verizon/models/mismatched_device.rb', line 72 def initialize(account_name = SKIP, mdn = SKIP, activation_date = SKIP, iccid = SKIP, pre_imei = SKIP, post_imei = SKIP, sim_ota_date = SKIP) @account_name = account_name unless account_name == SKIP @mdn = mdn unless mdn == SKIP @activation_date = activation_date unless activation_date == SKIP @iccid = iccid unless iccid == SKIP @pre_imei = pre_imei unless pre_imei == SKIP @post_imei = post_imei unless post_imei == SKIP @sim_ota_date = sim_ota_date unless sim_ota_date == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The account that the device is associated with.
15 16 17 |
# File 'lib/verizon/models/mismatched_device.rb', line 15 def account_name @account_name end |
#activation_date ⇒ String
The date and time when the SIM was last activated.
23 24 25 |
# File 'lib/verizon/models/mismatched_device.rb', line 23 def activation_date @activation_date end |
#iccid ⇒ String
The ID of the SIM.
27 28 29 |
# File 'lib/verizon/models/mismatched_device.rb', line 27 def iccid @iccid end |
#mdn ⇒ String
The assigned phone number of the device.
19 20 21 |
# File 'lib/verizon/models/mismatched_device.rb', line 19 def mdn @mdn end |
#post_imei ⇒ String
The IMEI of the device after the SIM OTA activation on simOtaDate.
35 36 37 |
# File 'lib/verizon/models/mismatched_device.rb', line 35 def post_imei @post_imei end |
#pre_imei ⇒ String
The IMEI of the device prior to the SIM OTA activation on simOtaDate.
31 32 33 |
# File 'lib/verizon/models/mismatched_device.rb', line 31 def pre_imei @pre_imei end |
#sim_ota_date ⇒ String
The date and time of the SIM OTA activation.
39 40 41 |
# File 'lib/verizon/models/mismatched_device.rb', line 39 def sim_ota_date @sim_ota_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/verizon/models/mismatched_device.rb', line 85 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP mdn = hash.key?('mdn') ? hash['mdn'] : SKIP activation_date = hash.key?('activationDate') ? hash['activationDate'] : SKIP iccid = hash.key?('iccid') ? hash['iccid'] : SKIP pre_imei = hash.key?('preImei') ? hash['preImei'] : SKIP post_imei = hash.key?('postImei') ? hash['postImei'] : SKIP sim_ota_date = hash.key?('simOtaDate') ? hash['simOtaDate'] : SKIP # Create object from extracted values. MismatchedDevice.new(account_name, mdn, activation_date, iccid, pre_imei, post_imei, sim_ota_date) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/verizon/models/mismatched_device.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['mdn'] = 'mdn' @_hash['activation_date'] = 'activationDate' @_hash['iccid'] = 'iccid' @_hash['pre_imei'] = 'preImei' @_hash['post_imei'] = 'postImei' @_hash['sim_ota_date'] = 'simOtaDate' @_hash end |
.nullables ⇒ Object
An array for nullable fields
68 69 70 |
# File 'lib/verizon/models/mismatched_device.rb', line 68 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/verizon/models/mismatched_device.rb', line 55 def self.optionals %w[ account_name mdn activation_date iccid pre_imei post_imei sim_ota_date ] end |