Class: Verizon::M5gBIDeviceActionsController
- Inherits:
-
BaseController
- Object
- BaseController
- Verizon::M5gBIDeviceActionsController
- Defined in:
- lib/verizon/controllers/m_5g_bi_device_actions_controller.rb
Overview
M5gBIDeviceActionsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#business_internet_serviceplanchange(body) ⇒ ApiResponse
Change a device’s service plan to use 5G BI.
-
#business_internetactivate_using_post(body) ⇒ ApiResponse
Uses the device’s ICCID and IMEI to activate service.
-
#business_internetlist_device_information(body) ⇒ ApiResponse
Uses the decive’s Integrated Circuit Card Identification Number (ICCID) to retrive and display the device’s properties.
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
#business_internet_serviceplanchange(body) ⇒ ApiResponse
Change a device’s service plan to use 5G BI. use when changing a device’s service plan to a 5G BI service plan. The service plan can change for an active device up to four times per month but will require address validation for each change. The service plan cannot be changed for a device while its service is suspended.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/verizon/controllers/m_5g_bi_device_actions_controller.rb', line 68 def business_internet_serviceplanchange(body) new_api_call_builder .request(new_request_builder(HttpMethodEnum::PUT, '/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(Or.new('thingspace_oauth', 'VZ-M2M-Token'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(M5gBiRequestResponse.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error response', M5gBiRestErrorResponseException)) .execute end |
#business_internetactivate_using_post(body) ⇒ ApiResponse
Uses the device’s ICCID and IMEI to activate service. service. Defining publicIpRestriction
as “Unrestricted” or “Restricted” is required for activating as Public Static. Leave publicIpRestriction
undefined to activate as Public Dynamic. Removing publicIpRestriction
from the request will activate as Mobile Private Network (MPN).
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/controllers/m_5g_bi_device_actions_controller.rb', line 41 def business_internetactivate_using_post(body) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/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(Or.new('thingspace_oauth', 'VZ-M2M-Token'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(M5gBiRequestResponse.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error response', M5gBiRestErrorResponseException)) .execute end |
#business_internetlist_device_information(body) ⇒ ApiResponse
Uses the decive’s Integrated Circuit Card Identification Number (ICCID) to retrive and display the device’s properties.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/verizon/controllers/m_5g_bi_device_actions_controller.rb', line 13 def business_internetlist_device_information(body) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/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(Or.new('thingspace_oauth', 'VZ-M2M-Token'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(M5gBideviceDetailsresponse.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error response', M5gBiRestErrorResponseException)) .execute end |