Class: Verizon::WirelessNetworkPerformanceApi

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

Overview

WirelessNetworkPerformanceApi

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

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



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/verizon/apis/wireless_network_performance_api.rb', line 95

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)
                            .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(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.



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/verizon/apis/wireless_network_performance_api.rb', line 121

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)
                            .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(WnpRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WnpRestErrorResponseException))
    .execute
end

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



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

def domestic4_g_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)
                            .is_required(true)
                            .validator(proc do |value|
                              UnionTypeLookUp.get(:Domestic4GAnd5GNationwideNetworkCoverageBody)
                                             .validate(value)
                            end))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(APIHelper.method(:json_serialize))
               .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
32
# File 'lib/verizon/apis/wireless_network_performance_api.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)
                            .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(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.



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

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)
                            .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(WnpRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             WnpRestErrorResponseException))
    .execute
end