Class: Verizon::DeviceMismatchListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::DeviceMismatchListRequest
- Defined in:
- lib/verizon/models/device_mismatch_list_request.rb
Overview
Request to list of all 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 you want to search for mismatched devices.
-
#devices ⇒ Array[AccountDeviceList]
A list of specific devices that you want to check, specified by ICCID or MDN.
-
#filter ⇒ DateFilter
Filter out the dates.
-
#group_name ⇒ String
The name of a device group, to only include devices in that group.
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(filter = nil, devices = SKIP, account_name = SKIP, group_name = SKIP) ⇒ DeviceMismatchListRequest
constructor
A new instance of DeviceMismatchListRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(filter = nil, devices = SKIP, account_name = SKIP, group_name = SKIP) ⇒ DeviceMismatchListRequest
Returns a new instance of DeviceMismatchListRequest.
56 57 58 59 60 61 62 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 56 def initialize(filter = nil, devices = SKIP, account_name = SKIP, group_name = SKIP) @filter = filter @devices = devices unless devices == SKIP @account_name = account_name unless account_name == SKIP @group_name = group_name unless group_name == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The account that you want to search for mismatched devices. If you don’t specify an accountName, the search includes all devices to which you have access.
26 27 28 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 26 def account_name @account_name end |
#devices ⇒ Array[AccountDeviceList]
A list of specific devices that you want to check, specified by ICCID or MDN.
20 21 22 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 20 def devices @devices end |
#filter ⇒ DateFilter
Filter out the dates.
15 16 17 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 15 def filter @filter end |
#group_name ⇒ String
The name of a device group, to only include devices in that group.
30 31 32 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 30 def group_name @group_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. filter = DateFilter.from_hash(hash['filter']) if hash['filter'] # Parameter is an array, so we need to iterate through it devices = nil unless hash['devices'].nil? devices = [] hash['devices'].each do |structure| devices << (AccountDeviceList.from_hash(structure) if structure) end end devices = SKIP unless hash.key?('devices') account_name = hash.key?('accountName') ? hash['accountName'] : SKIP group_name = hash.key?('groupName') ? hash['groupName'] : SKIP # Create object from extracted values. DeviceMismatchListRequest.new(filter, devices, account_name, group_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['filter'] = 'filter' @_hash['devices'] = 'devices' @_hash['account_name'] = 'accountName' @_hash['group_name'] = 'groupName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 49 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 43 def self.optionals %w[ devices account_name group_name ] end |