Class: Verizon::M5GBiDeviceActionsApi

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/verizon/apis/m_5g_bi_device_actions_api.rb

Overview

M5GBiDeviceActionsApi

Constant Summary

Constants inherited from BaseApi

BaseApi::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseApi

#config, #http_call_back

Instance Method Summary collapse

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

#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.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/verizon/apis/m_5g_bi_device_actions_api.rb', line 70

def business_internet_serviceplanchange(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PUT,
                                 '/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(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).

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/verizon/apis/m_5g_bi_device_actions_api.rb', line 42

def business_internetactivate_using_post(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/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(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.

Parameters:

  • body (M5GBideviceId)

    Required parameter: Device Profile Query

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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

def business_internetlist_device_information(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/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(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