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) ⇒ GIORequestResponse
Activate a device with either a lead or local profile.
-
#deactivate_a_device_profile(body) ⇒ GIORequestResponse
Deactivate the lead or local profile.
-
#delete_a_device_profile(body) ⇒ GIORequestResponse
Delete a device profile for Global IoT Orchestration.
-
#download_a_device_profile(body) ⇒ GIORequestResponse
Download a Global IoT Orchestration device profile.
-
#enable_a_device_profile(body) ⇒ GIORequestResponse
Enable a device lead or local profile.
-
#enable_a_device_profile_for_download(body) ⇒ GIORequestResponse
Enable the Global IoT Orchestration device profile for download.
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) ⇒ GIORequestResponse
Activate 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 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(Single.new('thingspace_oauth'))) .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) ⇒ GIORequestResponse
Deactivate the lead or local profile. Note: to reactivate the profile, use the Activate endpoint above. Profile Query
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 61 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(Single.new('thingspace_oauth'))) .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) ⇒ GIORequestResponse
Delete a device profile for Global IoT Orchestration. Note: the profile must be deactivated first! Query
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 134 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(Single.new('thingspace_oauth'))) .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) ⇒ GIORequestResponse
Download a Global IoT Orchestration device profile. Query
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 109 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(Single.new('thingspace_oauth'))) .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) ⇒ GIORequestResponse
Enable a device lead or local profile. Query
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 36 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(Single.new('thingspace_oauth'))) .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) ⇒ GIORequestResponse
Enable the Global IoT Orchestration device profile for download. Query
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/verizon/controllers/managing_esim_profiles_controller.rb', line 85 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(Single.new('thingspace_oauth'))) .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 |