Class: Verizon::DeviceManagementApi
- Defined in:
- lib/verizon/apis/device_management_api.rb
Overview
DeviceManagementApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
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.
-
#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
Upload a device record Query.
-
#device_upload_status(body) ⇒ ApiResponse
Checks the status of an activation order and lists where the order is in the provisioning process.
-
#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_activate_device(body) ⇒ ApiResponse
Uploads and activates device identifiers and SKUs for new devices from OEMs to Verizon.
-
#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 BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from Verizon::BaseApi
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 33 |
# File 'lib/verizon/apis/device_management_api.rb', line 14 def activate_service_for_devices(body) @api_call .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) .is_required(true)) .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.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/apis/device_management_api.rb', line 39 def add_devices(body) @api_call .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) .is_required(true)) .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.
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 |
# File 'lib/verizon/apis/device_management_api.rb', line 647 def billed_usage_info(body) @api_call .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) .is_required(true)) .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.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/verizon/apis/device_management_api.rb', line 278 def change_devices_service_plan(body) @api_call .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) .is_required(true)) .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.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/verizon/apis/device_management_api.rb', line 354 def check_devices_availability_for_activation(body) @api_call .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) .is_required(true)) .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.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/verizon/apis/device_management_api.rb', line 122 def deactivate_service_for_devices(body) @api_call .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) .is_required(true)) .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.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/verizon/apis/device_management_api.rb', line 147 def delete_deactivated_devices(body) @api_call .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) .is_required(true)) .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
Upload a device record Query
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/verizon/apis/device_management_api.rb', line 621 def device_upload(body) @api_call .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) .is_required(true)) .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 |
#device_upload_status(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.
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 |
# File 'lib/verizon/apis/device_management_api.rb', line 753 def device_upload_status(body) @api_call .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) .is_required(true)) .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 |
#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.
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/verizon/apis/device_management_api.rb', line 433 def get_device_extended_diagnostic_information(body) @api_call .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) .is_required(true)) .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.
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/verizon/apis/device_management_api.rb', line 512 def get_device_service_suspension_status(body) @api_call .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) .is_required(true)) .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.
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/verizon/apis/device_management_api.rb', line 485 def list_current_devices_prl_version(body) @api_call .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) .is_required(true)) .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.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/verizon/apis/device_management_api.rb', line 175 def list_devices_information(body) @api_call .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) .is_required(true)) .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.
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/verizon/apis/device_management_api.rb', line 459 def list_devices_provisioning_history(body) @api_call .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) .is_required(true)) .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.
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 |
# File 'lib/verizon/apis/device_management_api.rb', line 538 def list_devices_usage_history(body) @api_call .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) .is_required(true)) .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.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/verizon/apis/device_management_api.rb', line 201 def list_devices_with_imei_iccid_mismatch(body) @api_call .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) .is_required(true)) .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.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/verizon/apis/device_management_api.rb', line 227 def move_devices_within_accounts_of_profile(body) @api_call .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) .is_required(true)) .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.
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/verizon/apis/device_management_api.rb', line 328 def restore_service_for_suspended_devices(body) @api_call .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) .is_required(true)) .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.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
# File 'lib/verizon/apis/device_management_api.rb', line 564 def retrieve_aggregate_device_usage_history(body) @api_call .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) .is_required(true)) .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.
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/verizon/apis/device_management_api.rb', line 381 def retrieve_device_connection_history(body) @api_call .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) .is_required(true)) .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.
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/verizon/apis/device_management_api.rb', line 303 def suspend_service_for_devices(body) @api_call .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) .is_required(true)) .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.
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 |
# File 'lib/verizon/apis/device_management_api.rb', line 592 def update_device_id(service_type, body) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/m2m/v1/devices/{serviceType}/actions/deviceId', Server::THINGSPACE) .template_param(new_parameter(service_type, key: 'serviceType') .is_required(true) .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .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.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/verizon/apis/device_management_api.rb', line 67 def update_devices_contact_information(body) @api_call .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) .is_required(true)) .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.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/verizon/apis/device_management_api.rb', line 407 def update_devices_cost_center_code(body) @api_call .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) .is_required(true)) .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.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/verizon/apis/device_management_api.rb', line 94 def update_devices_custom_fields(body) @api_call .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) .is_required(true)) .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.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/verizon/apis/device_management_api.rb', line 253 def update_devices_state(body) @api_call .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) .is_required(true)) .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_activate_device(body) ⇒ ApiResponse
Uploads and activates device identifiers and SKUs for new devices from OEMs to Verizon. Upload and Activate device.
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 |
# File 'lib/verizon/apis/device_management_api.rb', line 726 def upload_activate_device(body) @api_call .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) .is_required(true)) .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.
672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/verizon/apis/device_management_api.rb', line 672 def usage_segmentation_label_association(body) @api_call .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) .is_required(true)) .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.
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/verizon/apis/device_management_api.rb', line 699 def usage_segmentation_label_deletion(account_name, label_list) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/m2m/v1/devices/actions/usagesegmentationlabels', Server::THINGSPACE) .query_param(new_parameter(account_name, key: 'accountName') .is_required(true)) .query_param(new_parameter(label_list, key: 'LabelList') .is_required(true)) .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 |