Class: Verizon::ManagingESIMProfilesController
- Inherits:
-
BaseController
- Object
- BaseController
- Verizon::ManagingESIMProfilesController
- Defined in:
- lib/verizon/controllers/managing_esim_profiles_controller.rb
Overview
ManagingESIMProfilesController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#activate_a_device_profile(body) ⇒ ApiResponse
Activate a device with either a lead or local profile.
-
#deactivate_a_device_profile(body) ⇒ ApiResponse
Deactivate the lead or local profile.
-
#delete_a_device_profile(body) ⇒ ApiResponse
Delete a device profile for Global IoT Orchestration.
-
#device_suspend(body) ⇒ ApiResponse
Suspend all service to an eUICC device, including the lead and local profile.
-
#download_a_device_profile(body) ⇒ ApiResponse
Download a Global IoT Orchestration device profile.
-
#enable_a_device_profile(body) ⇒ ApiResponse
Enable a device lead or local profile.
-
#enable_a_device_profile_for_download(body) ⇒ ApiResponse
Enable the Global IoT Orchestration device profile for download.
-
#profile_suspend(body) ⇒ ApiResponse
Suspend a device’s Global profile.
-
#resume_profile(body) ⇒ ApiResponse
Resume service to a device with either a lead or local profile.
-
#set_fallback(body) ⇒ ApiResponse
Enable a fallback profile to be set.
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
#activate_a_device_profile(body) ⇒ ApiResponse
Activate a device with either a lead or local profile.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 106 def activate_a_device_profile(body) new_api_call_builder .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)) .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
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 155 def deactivate_a_device_profile(body) new_api_call_builder .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)) .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
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 228 def delete_a_device_profile(body) new_api_call_builder .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)) .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.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 59 def device_suspend(body) new_api_call_builder .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)) .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
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 203 def download_a_device_profile(body) new_api_call_builder .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)) .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
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 130 def enable_a_device_profile(body) new_api_call_builder .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)) .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
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 179 def enable_a_device_profile_for_download(body) new_api_call_builder .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)) .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.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 35 def profile_suspend(body) new_api_call_builder .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)) .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.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 12 def resume_profile(body) new_api_call_builder .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)) .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.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 83 def set_fallback(body) new_api_call_builder .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)) .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 |