Class: Verizon::DeviceManagementController

Inherits:
BaseController show all
Defined in:
lib/verizon/controllers/device_management_controller.rb

Overview

DeviceManagementController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from Verizon::BaseController

Instance Method Details

#activate_service_for_devices(body) ⇒ DeviceManagementResult

If the devices do not already exist in the account, this API resource adds them before activation. activating a service on devices.

Parameters:

Returns:



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/verizon/controllers/device_management_controller.rb', line 14

def activate_service_for_devices(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/activate',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#activation_order_status(body) ⇒ DeviceManagementResult

Uploads and activates device identifiers and SKUs for new devices from OEMs to Verizon. Uploads and activates device.

Parameters:

Returns:



697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
# File 'lib/verizon/controllers/device_management_controller.rb', line 697

def activation_order_status(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/uploadactivate',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#add_devices(body) ⇒ Array[AddDevicesResult]

Use this API if you want to manage some device settings before you are ready to activate service for the devices.

Parameters:

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/verizon/controllers/device_management_controller.rb', line 38

def add_devices(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/add',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(AddDevicesResult.method(:from_hash))
               .is_api_response(true)
               .is_response_array(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#billed_usage_info(body) ⇒ DeviceManagementResult

Gets billed usage for for either multiple devices or an entire billing account. devices with mismatched IMEIs and ICCIDs.

Parameters:

Returns:



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/verizon/controllers/device_management_controller.rb', line 622

def billed_usage_info(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/usage/actions/billedusage/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#change_devices_service_plan(body) ⇒ DeviceManagementResult

Changes the service plan for one or more devices. change device service plan.

Parameters:

Returns:



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/verizon/controllers/device_management_controller.rb', line 268

def change_devices_service_plan(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/actions/plan',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#check_devices_availability_for_activation(body) ⇒ DeviceManagementResult

Checks whether specified devices are registered by the manufacturer with the Verizon network and are available to be activated. if devices can be activated or not.

Parameters:

Returns:



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/verizon/controllers/device_management_controller.rb', line 341

def check_devices_availability_for_activation(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/availability/actions/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#deactivate_service_for_devices(body) ⇒ DeviceManagementResult

Deactivating service for a device may result in an early termination fee (ETF) being charged to the account, depending on the terms of the contract with Verizon. If your contract allows ETF waivers and if you want to use one for a particular deactivation, set the etfWaiver value to True. deactivate service for one or more devices.

Parameters:

Returns:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/verizon/controllers/device_management_controller.rb', line 118

def deactivate_service_for_devices(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/deactivate',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#delete_deactivated_devices(body) ⇒ Array[DeleteDevicesResult]

Use this API to remove unneeded devices from an account. delete.

Parameters:

Returns:



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/verizon/controllers/device_management_controller.rb', line 142

def delete_deactivated_devices(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/delete',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeleteDevicesResult.method(:from_hash))
               .is_api_response(true)
               .is_response_array(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#device_upload(body) ⇒ RequestResponse

This corresponds to the M2M-MC SOAP interface, “‘DeviceUploadService“`. Query

Parameters:

Returns:



597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/verizon/controllers/device_management_controller.rb', line 597

def device_upload(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/upload',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(RequestResponse.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error Response',
                            RestErrorResponseException))
    .execute
end

#get_device_extended_diagnostic_information(body) ⇒ DeviceExtendedDiagnosticsResult

Returns extended diagnostic information about a specified device, including connectivity, provisioning, billing and location status. to query extended diagnostics information for a device.

Parameters:

Returns:



417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/verizon/controllers/device_management_controller.rb', line 417

def get_device_extended_diagnostic_information(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/extendeddiagnostics/actions/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceExtendedDiagnosticsResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#get_device_service_suspension_status(body) ⇒ DeviceManagementResult

Returns DeviceSuspensionStatus callback messages containing the current device state and information on how many days a device has been suspended and can continue to be suspended. obtain service suspenstion status for a device.

Parameters:

Returns:



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/verizon/controllers/device_management_controller.rb', line 493

def get_device_service_suspension_status(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/suspension/status',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#list_current_devices_prl_version(body) ⇒ DeviceManagementResult

4G and GSM devices do not have a PRL. device PRL.

Parameters:

Returns:



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/verizon/controllers/device_management_controller.rb', line 467

def list_current_devices_prl_version(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/prl/actions/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#list_devices_information(body) ⇒ AccountDeviceListResult

Returns information about a single device or information about all devices that match the given parameters. Returned information includes device provisioning state, service plan, MDN, MIN, and IP address. information query.

Parameters:

Returns:



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/verizon/controllers/device_management_controller.rb', line 169

def list_devices_information(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(AccountDeviceListResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#list_devices_provisioning_history(body) ⇒ Array[DeviceProvisioningHistoryListResult]

Returns the provisioning history of a specified device during a specified time period. Query to obtain device provisioning history.

Parameters:

Returns:



442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/verizon/controllers/device_management_controller.rb', line 442

def list_devices_provisioning_history(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/history/actions/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceProvisioningHistoryListResult.method(:from_hash))
               .is_api_response(true)
               .is_response_array(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#list_devices_usage_history(body) ⇒ DeviceUsageListResult

Returns the network data usage history of a device during a specified time period. usage history for a specific device.

Parameters:

Returns:



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/verizon/controllers/device_management_controller.rb', line 518

def list_devices_usage_history(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/usage/actions/list',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceUsageListResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#list_devices_with_imei_iccid_mismatch(body) ⇒ DeviceMismatchListResult

Returns a list of all 4G devices with an ICCID (SIM) that was not activated with the expected IMEI (hardware) during a specified time frame. list devices with mismatched IMEIs and ICCIDs.

Parameters:

Returns:



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/verizon/controllers/device_management_controller.rb', line 194

def list_devices_with_imei_iccid_mismatch(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/list/imeiiccidmismatch',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceMismatchListResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#move_devices_within_accounts_of_profile(body) ⇒ DeviceManagementResult

Move active devices from one billing account to another within a customer profile. devices between accounts.

Parameters:

Returns:



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/verizon/controllers/device_management_controller.rb', line 219

def move_devices_within_accounts_of_profile(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/actions/move',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#restore_service_for_suspended_devices(body) ⇒ DeviceManagementResult

Restores service to one or more suspended devices. services of one or more suspended devices.

Parameters:

Returns:



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/verizon/controllers/device_management_controller.rb', line 316

def restore_service_for_suspended_devices(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/restore',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#retrieve_aggregate_device_usage_history(body) ⇒ DeviceManagementResult

The information is returned in a callback response, so you must register a URL for DeviceUsage callback messages using the POST /callbacks API. request to retrieve aggregated device usage history information.

Parameters:

Returns:



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/verizon/controllers/device_management_controller.rb', line 543

def retrieve_aggregate_device_usage_history(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/usage/actions/list/aggregate',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#retrieve_device_connection_history(body) ⇒ ConnectionHistoryResult

Each response includes a maximum of 500 records. To obtain more records, you can call the API multiple times, adjusting the earliest value each time to start where the previous request finished. retrieve device connection history.

Parameters:

Returns:



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# File 'lib/verizon/controllers/device_management_controller.rb', line 367

def retrieve_device_connection_history(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/connections/actions/listHistory',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(ConnectionHistoryResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#suspend_service_for_devices(body) ⇒ DeviceManagementResult

Suspends service for one or more devices. service for one or more devices.

Parameters:

Returns:



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/verizon/controllers/device_management_controller.rb', line 292

def suspend_service_for_devices(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/suspend',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#update_device_id(service_type, body) ⇒ DeviceManagementResult

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. device id.

Parameters:

  • service_type (String)

    Required parameter: Identifier type.

  • body (ChangeDeviceIdRequest)

    Required parameter: Request to update

Returns:



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/verizon/controllers/device_management_controller.rb', line 570

def update_device_id(service_type,
                     body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/{serviceType}/actions/deviceId',
                                 Server::THINGSPACE)
               .template_param(new_parameter(service_type, key: 'serviceType')
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#update_devices_contact_information(body) ⇒ DeviceManagementResult

Sends a CarrierService callback message for each device in the request when the contact information has been changed, or if there was a problem and the change could not be completed. update contact information for devices.

Parameters:

Returns:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/verizon/controllers/device_management_controller.rb', line 65

def update_devices_contact_information(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/actions/contactinfo',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#update_devices_cost_center_code(body) ⇒ DeviceManagementResult

Changes or removes the CostCenterCode value or customer name and address (Primary Place of Use) for one or more devices. update cost center code value for one or more devices.

Parameters:

Returns:



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'lib/verizon/controllers/device_management_controller.rb', line 392

def update_devices_cost_center_code(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/costCenter',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#update_devices_custom_fields(body) ⇒ DeviceManagementResult

Sends a CarrierService callback message for each device in the request when the custom fields have been changed, or if there was a problem and the change could not be completed. update custom field of devices.

Parameters:

Returns:



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/verizon/controllers/device_management_controller.rb', line 91

def update_devices_custom_fields(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/actions/customFields',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#update_devices_state(body) ⇒ DeviceManagementResult

Changes the provisioning state of one or more devices to a specified customer-defined service and state. device state to one defined by the user.

Parameters:

Returns:



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/verizon/controllers/device_management_controller.rb', line 244

def update_devices_state(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/m2m/v1/devices/actions/gotostate',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#upload_device_identifier(body) ⇒ DeviceManagementResult

Checks the status of an activation order and lists where the order is in the provisioning process. identifies the device and reporting period that you want included in the report.

Parameters:

Returns:



723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'lib/verizon/controllers/device_management_controller.rb', line 723

def upload_device_identifier(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/requests/status',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#usage_segmentation_label_association(body) ⇒ DeviceManagementResult

Allows you to associate your own usage segmentation label with a device. associate a label to a device.

Parameters:

Returns:



646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'lib/verizon/controllers/device_management_controller.rb', line 646

def usage_segmentation_label_association(body)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/actions/usagesegmentationlabels',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end

#usage_segmentation_label_deletion(account_name, label_list) ⇒ DeviceManagementResult

Allow customers to remove the associated label from a device. account. to remove from the exclusion list.

Parameters:

  • account_name (String)

    Required parameter: The numeric name of the

  • label_list (LabelsList)

    Required parameter: A list of the Label IDs

Returns:



672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/verizon/controllers/device_management_controller.rb', line 672

def usage_segmentation_label_deletion(,
                                      label_list)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::DELETE,
                                 '/m2m/v1/devices/actions/usagesegmentationlabels',
                                 Server::THINGSPACE)
               .query_param(new_parameter(, key: 'accountName'))
               .query_param(new_parameter(label_list, key: 'LabelList'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('oAuth2')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(DeviceManagementResult.method(:from_hash))
               .is_api_response(true)
               .local_error('400',
                            'Error response.',
                            ConnectivityManagementResultException))
    .execute
end