Class: Verizon::DeviceManagementController
- Inherits:
-
BaseController
- Object
- BaseController
- Verizon::DeviceManagementController
- Defined in:
- lib/verizon/controllers/device_management_controller.rb
Overview
DeviceManagementController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#activate_service_for_devices(body) ⇒ ApiResponse
If the devices do not already exist in the account, this API resource adds them before activation.
-
#activation_order_status(body) ⇒ ApiResponse
Uploads and activates device identifiers and SKUs for new devices from OEMs to Verizon.
-
#add_devices(body) ⇒ ApiResponse
Use this API if you want to manage some device settings before you are ready to activate service for the devices.
-
#billed_usage_info(body) ⇒ ApiResponse
Gets billed usage for for either multiple devices or an entire billing account.
-
#change_devices_service_plan(body) ⇒ ApiResponse
Changes the service plan for one or more devices.
-
#check_devices_availability_for_activation(body) ⇒ ApiResponse
Checks whether specified devices are registered by the manufacturer with the Verizon network and are available to be activated.
-
#deactivate_service_for_devices(body) ⇒ ApiResponse
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.
-
#delete_deactivated_devices(body) ⇒ ApiResponse
Use this API to remove unneeded devices from an account.
-
#device_upload(body) ⇒ ApiResponse
This corresponds to the M2M-MC SOAP interface, “‘DeviceUploadService“`.
-
#get_device_extended_diagnostic_information(body) ⇒ ApiResponse
Returns extended diagnostic information about a specified device, including connectivity, provisioning, billing and location status.
-
#get_device_service_suspension_status(body) ⇒ ApiResponse
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.
-
#list_current_devices_prl_version(body) ⇒ ApiResponse
4G and GSM devices do not have a PRL.
-
#list_devices_information(body) ⇒ ApiResponse
Returns information about a single device or information about all devices that match the given parameters.
-
#list_devices_provisioning_history(body) ⇒ ApiResponse
Returns the provisioning history of a specified device during a specified time period.
-
#list_devices_usage_history(body) ⇒ ApiResponse
Returns the network data usage history of a device during a specified time period.
-
#list_devices_with_imei_iccid_mismatch(body) ⇒ ApiResponse
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.
-
#move_devices_within_accounts_of_profile(body) ⇒ ApiResponse
Move active devices from one billing account to another within a customer profile.
-
#restore_service_for_suspended_devices(body) ⇒ ApiResponse
Restores service to one or more suspended devices.
-
#retrieve_aggregate_device_usage_history(body) ⇒ ApiResponse
The information is returned in a callback response, so you must register a URL for DeviceUsage callback messages using the POST /callbacks API.
-
#retrieve_device_connection_history(body) ⇒ ApiResponse
Each response includes a maximum of 500 records.
-
#suspend_service_for_devices(body) ⇒ ApiResponse
Suspends service for one or more devices.
-
#update_device_id(service_type, body) ⇒ ApiResponse
Changes the identifier of a 3G or 4G device to match hardware changes made for a line of service.
-
#update_devices_contact_information(body) ⇒ ApiResponse
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_devices_cost_center_code(body) ⇒ ApiResponse
Changes or removes the CostCenterCode value or customer name and address (Primary Place of Use) for one or more devices.
-
#update_devices_custom_fields(body) ⇒ ApiResponse
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_devices_state(body) ⇒ ApiResponse
Changes the provisioning state of one or more devices to a specified customer-defined service and state.
-
#upload_device_identifier(body) ⇒ ApiResponse
Checks the status of an activation order and lists where the order is in the provisioning process.
-
#usage_segmentation_label_association(body) ⇒ ApiResponse
Allows you to associate your own usage segmentation label with a device.
-
#usage_segmentation_label_deletion(account_name, label_list) ⇒ ApiResponse
Allow customers to remove the associated label from a device.
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) ⇒ ApiResponse
If the devices do not already exist in the account, this API resource adds them before activation. activating a service on devices.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Uploads and activates device identifiers and SKUs for new devices from OEMs to Verizon. Uploads and activates device.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Use this API if you want to manage some device settings before you are ready to activate service for the devices.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Gets billed usage for for either multiple devices or an entire billing account. devices with mismatched IMEIs and ICCIDs.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Changes the service plan for one or more devices. change device service plan.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Use this API to remove unneeded devices from an account. delete.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
This corresponds to the M2M-MC SOAP interface, “‘DeviceUploadService“`. Query
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Returns extended diagnostic information about a specified device, including connectivity, provisioning, billing and location status. to query extended diagnostics information for a device.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
4G and GSM devices do not have a PRL. device PRL.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Returns the provisioning history of a specified device during a specified time period. Query to obtain device provisioning history.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Returns the network data usage history of a device during a specified time period. usage history for a specific device.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Move active devices from one billing account to another within a customer profile. devices between accounts.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Restores service to one or more suspended devices. services of one or more suspended devices.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Suspends service for one or more devices. service for one or more devices.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
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.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Allows you to associate your own usage segmentation label with a device. associate a label to a device.
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(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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) ⇒ ApiResponse
Allow customers to remove the associated label from a device. account. to remove from the exclusion list.
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(account_name, label_list) new_api_call_builder .request(new_request_builder(HttpMethodEnum::DELETE, '/m2m/v1/devices/actions/usagesegmentationlabels', Server::THINGSPACE) .query_param(new_parameter(account_name, key: 'accountName')) .query_param(new_parameter(label_list, key: 'LabelList')) .header_param(new_parameter('application/json', key: 'accept')) .auth(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .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 |