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:, devices: SKIP, account_name: SKIP, group_name: SKIP, additional_properties: nil) ⇒ DeviceMismatchListRequest
constructor
A new instance of DeviceMismatchListRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(filter:, devices: SKIP, account_name: SKIP, group_name: SKIP, additional_properties: nil) ⇒ DeviceMismatchListRequest
Returns a new instance of DeviceMismatchListRequest.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 56 def initialize(filter:, devices: SKIP, account_name: SKIP, group_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @filter = filter @devices = devices unless devices == SKIP @account_name = account_name unless account_name == SKIP @group_name = group_name unless group_name == SKIP @additional_properties = additional_properties 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.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 69 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 a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. DeviceMismatchListRequest.new(filter: filter, devices: devices, account_name: account_name, group_name: group_name, additional_properties: additional_properties) 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 |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 115 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} filter: #{@filter.inspect}, devices: #{@devices.inspect}, account_name:"\ " #{@account_name.inspect}, group_name: #{@group_name.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 |
# File 'lib/verizon/models/device_mismatch_list_request.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} filter: #{@filter}, devices: #{@devices}, account_name: #{@account_name},"\ " group_name: #{@group_name}, additional_properties: #{@additional_properties}>" end |