Class: Verizon::ChangeDeviceIdRequest
- Defined in:
- lib/verizon/models/change_device_id_request.rb
Overview
Changes the identifier of a 3G or 4G device to match hardware changes made for a line of service. Use this request to transfer the line of service and the MDN to new hardware, or to change the MDN.
Instance Attribute Summary collapse
-
#assign_non_geo_mdn ⇒ TrueClass | FalseClass
Set to true to assign a non-Geo MDN and MSISDN, or false to assign an MDN and MSISDN from a specific NPA-NXX.
-
#change4g_option ⇒ String
The type of change that you want to make for a 4G device.
-
#device_ids ⇒ Array[DeviceId]
The device that you want to change, specified by a device identifier.
-
#device_ids_to ⇒ Array[DeviceId]
The new identifier for the device.
-
#npa_nxx ⇒ String
The NPA NXX (area code and prefix) from which the MDN and MSISDN will be derived when assignNonGeoMDN is false.
-
#service_plan ⇒ String
The code for a different service plan, if you want to change the service plan while changing the device identifier.
-
#smsr_oid ⇒ String
The ZIP code from which the MDN and MSISDN will be derived when assignNonGeoMDN is true.
-
#zip_code ⇒ String
The ZIP code from which the MDN and MSISDN will be derived when assignNonGeoMDN is true.
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_ids = nil, assign_non_geo_mdn = SKIP, change4g_option = SKIP, device_ids_to = SKIP, npa_nxx = SKIP, service_plan = SKIP, zip_code = SKIP, smsr_oid = SKIP) ⇒ ChangeDeviceIdRequest
constructor
A new instance of ChangeDeviceIdRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(device_ids = nil, assign_non_geo_mdn = SKIP, change4g_option = SKIP, device_ids_to = SKIP, npa_nxx = SKIP, service_plan = SKIP, zip_code = SKIP, smsr_oid = SKIP) ⇒ ChangeDeviceIdRequest
Returns a new instance of ChangeDeviceIdRequest.
92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/verizon/models/change_device_id_request.rb', line 92 def initialize(device_ids = nil, assign_non_geo_mdn = SKIP, change4g_option = SKIP, device_ids_to = SKIP, npa_nxx = SKIP, service_plan = SKIP, zip_code = SKIP, smsr_oid = SKIP) @assign_non_geo_mdn = assign_non_geo_mdn unless assign_non_geo_mdn == SKIP @change4g_option = change4g_option unless change4g_option == SKIP @device_ids = device_ids @device_ids_to = device_ids_to unless device_ids_to == SKIP @npa_nxx = npa_nxx unless npa_nxx == SKIP @service_plan = service_plan unless service_plan == SKIP @zip_code = zip_code unless zip_code == SKIP @smsr_oid = smsr_oid unless smsr_oid == SKIP end |
Instance Attribute Details
#assign_non_geo_mdn ⇒ TrueClass | FalseClass
Set to true to assign a non-Geo MDN and MSISDN, or false to assign an MDN and MSISDN from a specific NPA-NXX.
17 18 19 |
# File 'lib/verizon/models/change_device_id_request.rb', line 17 def assign_non_geo_mdn @assign_non_geo_mdn end |
#change4g_option ⇒ String
The type of change that you want to make for a 4G device.
21 22 23 |
# File 'lib/verizon/models/change_device_id_request.rb', line 21 def change4g_option @change4g_option end |
#device_ids ⇒ Array[DeviceId]
The device that you want to change, specified by a device identifier.
25 26 27 |
# File 'lib/verizon/models/change_device_id_request.rb', line 25 def device_ids @device_ids end |
#device_ids_to ⇒ Array[DeviceId]
The new identifier for the device. Required for all change4GOptions except ChangeMSISDN.
30 31 32 |
# File 'lib/verizon/models/change_device_id_request.rb', line 30 def device_ids_to @device_ids_to end |
#npa_nxx ⇒ String
The NPA NXX (area code and prefix) from which the MDN and MSISDN will be derived when assignNonGeoMDN is false. Specify the 6-digit NPA NXX of the location where the line of service will primarily be used. This API checks to see if a number starting with the NPA NXX is available. If not, this API uses the zipCode parameter, if specified, to assign a number in the area of the line of service. This parameter is required when you change an MDN/MSISDN for a B2B carrier, such as Verizon Wireless.
40 41 42 |
# File 'lib/verizon/models/change_device_id_request.rb', line 40 def npa_nxx @npa_nxx end |
#service_plan ⇒ String
The code for a different service plan, if you want to change the service plan while changing the device identifier. Set this parameter to one of the Code values returned by GET /plans.
46 47 48 |
# File 'lib/verizon/models/change_device_id_request.rb', line 46 def service_plan @service_plan end |
#smsr_oid ⇒ String
The ZIP code from which the MDN and MSISDN will be derived when assignNonGeoMDN is true. Specify the zip code of the location where the line of service will primarily be used.
58 59 60 |
# File 'lib/verizon/models/change_device_id_request.rb', line 58 def smsr_oid @smsr_oid end |
#zip_code ⇒ String
The ZIP code from which the MDN and MSISDN will be derived when assignNonGeoMDN is true. Specify the zip code of the location where the line of service will primarily be used.
52 53 54 |
# File 'lib/verizon/models/change_device_id_request.rb', line 52 def zip_code @zip_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/verizon/models/change_device_id_request.rb', line 106 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it device_ids = nil unless hash['deviceIds'].nil? device_ids = [] hash['deviceIds'].each do |structure| device_ids << (DeviceId.from_hash(structure) if structure) end end device_ids = nil unless hash.key?('deviceIds') assign_non_geo_mdn = hash.key?('assignNonGeoMdn') ? hash['assignNonGeoMdn'] : SKIP change4g_option = hash.key?('change4gOption') ? hash['change4gOption'] : SKIP # Parameter is an array, so we need to iterate through it device_ids_to = nil unless hash['deviceIdsTo'].nil? device_ids_to = [] hash['deviceIdsTo'].each do |structure| device_ids_to << (DeviceId.from_hash(structure) if structure) end end device_ids_to = SKIP unless hash.key?('deviceIdsTo') npa_nxx = hash.key?('npaNxx') ? hash['npaNxx'] : SKIP service_plan = hash.key?('servicePlan') ? hash['servicePlan'] : SKIP zip_code = hash.key?('zipCode') ? hash['zipCode'] : SKIP smsr_oid = hash.key?('smsrOid') ? hash['smsrOid'] : SKIP # Create object from extracted values. ChangeDeviceIdRequest.new(device_ids, assign_non_geo_mdn, change4g_option, device_ids_to, npa_nxx, service_plan, zip_code, smsr_oid) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/verizon/models/change_device_id_request.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['assign_non_geo_mdn'] = 'assignNonGeoMdn' @_hash['change4g_option'] = 'change4gOption' @_hash['device_ids'] = 'deviceIds' @_hash['device_ids_to'] = 'deviceIdsTo' @_hash['npa_nxx'] = 'npaNxx' @_hash['service_plan'] = 'servicePlan' @_hash['zip_code'] = 'zipCode' @_hash['smsr_oid'] = 'smsrOid' @_hash end |
.nullables ⇒ Object
An array for nullable fields
88 89 90 |
# File 'lib/verizon/models/change_device_id_request.rb', line 88 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/verizon/models/change_device_id_request.rb', line 75 def self.optionals %w[ assign_non_geo_mdn change4g_option device_ids_to npa_nxx service_plan zip_code smsr_oid ] end |