Class: Verizon::WirelessNetworkPerformanceController

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

Overview

WirelessNetworkPerformanceController

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_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from Verizon::BaseController

Instance Method Details

#device_experience30days_history(body) ⇒ ApiResponse

A report of a specific device’s service scores over a 30 day period. Request for a device’s 30 day experience.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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

def device_experience30days_history(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/intelligence/device-experience/history/30-days',
                                 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(WNPRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WNPRestErrorResponseException))
    .execute
end

#device_experience_bulk_latest(body) ⇒ ApiResponse

Run a report to view the latest device experience score for specific devices. Request for bulk latest history details.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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

def device_experience_bulk_latest(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/intelligence/device-experience/bulk/latest',
                                 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(WNPRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WNPRestErrorResponseException))
    .execute
end

#domestic4g_and_5g_nationwide_network_coverage(body) ⇒ ApiResponse

Run a report for FWA Address qualification or to determine network types available and available coverage. Network types covered include: CAT-M, NB-IOT, LTE, LTE-AWS, 5GNW, MMWAVE and C-BAND. Required parameter: Request for network coverage details.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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

def domestic4g_and_5g_nationwide_network_coverage(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/intelligence/wireless-coverage',
                                 Server::THINGSPACE)
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body)
                            .validator(proc do |value|
                              UnionTypeLookUp.get(:Domestic4GAnd5gNationwideNetworkCoverageBody)
                                             .validate(value)
                            end))
               .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(WNPRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WNPRestErrorResponseException))
    .execute
end

#near_real_time_network_conditions(body) ⇒ ApiResponse

WNP Query for current network condition. current network health.

Parameters:

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
# File 'lib/verizon/controllers/wireless_network_performance_controller.rb', line 13

def near_real_time_network_conditions(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/intelligence/network-conditions',
                                 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(WNPRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WNPRestErrorResponseException))
    .execute
end

#site_proximity(body) ⇒ ApiResponse

Identify the direction and general distance of nearby cell sites and the technology supported by the equipment. cell site proximity.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/verizon/controllers/wireless_network_performance_controller.rb', line 68

def site_proximity(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/intelligence/site-proximity/action/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(WNPRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WNPRestErrorResponseException))
    .execute
end