Class: Verizon::ManagingEsimProfilesApi

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

Overview

ManagingEsimProfilesApi

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

#activate_a_device_profile(body) ⇒ ApiResponse

Activate a device with either a lead or local profile.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 110

def activate_a_device_profile(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#deactivate_a_device_profile(body) ⇒ ApiResponse

Deactivate the lead or local profile. Note: to reactivate the profile, use the Activate endpoint above. Profile Query

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 161

def deactivate_a_device_profile(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#delete_a_device_profile(body) ⇒ ApiResponse

Delete a device profile for Global IoT Orchestration. Note: the profile must be deactivated first! Query

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 237

def delete_a_device_profile(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#device_suspend(body) ⇒ ApiResponse

Suspend all service to an eUICC device, including the lead and local profile.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 61

def device_suspend(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/actions/device_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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#download_a_device_profile(body) ⇒ ApiResponse

Download a Global IoT Orchestration device profile. Query

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 211

def download_a_device_profile(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/actions/download',
                                 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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#enable_a_device_profile(body) ⇒ ApiResponse

Enable a device lead or local profile. Query

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 135

def enable_a_device_profile(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/actions/enable',
                                 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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#enable_a_device_profile_for_download(body) ⇒ ApiResponse

Enable the Global IoT Orchestration device profile for download. Query

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 186

def enable_a_device_profile_for_download(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/actions/download_enable',
                                 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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#profile_suspend(body) ⇒ ApiResponse

Suspend a device’s Global profile.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 36

def profile_suspend(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/actions/profile_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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#resume_profile(body) ⇒ ApiResponse

Resume service to a device with either a lead or local profile.

Parameters:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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

def resume_profile(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/m2m/v1/devices/profile/actions/profile_resume',
                                 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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end

#set_fallback(body) ⇒ ApiResponse

Enable a fallback profile to be set. allow a fallback profile to be activated.

Parameters:

  • body (FallBack)

    Required parameter: Set the fallback attributes to

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/verizon/apis/managing_esim_profiles_api.rb', line 86

def set_fallback(body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/v1/devices/profile/actions/setfallbackattribute',
                                 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(GioRequestResponse.method(:from_hash))
                .is_api_response(true)
                .local_error('default',
                             'Error response',
                             GioRestErrorResponseException))
    .execute
end