Class: Verizon::ThingSpaceQualityOfServiceApiActionsApi
- Defined in:
- lib/verizon/apis/thing_space_quality_of_service_api_actions_api.rb
Overview
ThingSpaceQualityOfServiceApiActionsApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#create_a_thing_space_quality_of_service_api_subscription(body) ⇒ ApiResponse
Creates a QoS elevation subscription ID and activates the subscription.
-
#stop_a_thing_space_quality_of_service_api_subscription(account_name, qos_subscription_id) ⇒ ApiResponse
Stops an active ThingSpace Quality of Service API subscription using the account name and the subscription ID.
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
#create_a_thing_space_quality_of_service_api_subscription(body) ⇒ ApiResponse
Creates a QoS elevation subscription ID and activates the subscription. create a ThingSpace Quality of Service API subscription.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/verizon/apis/thing_space_quality_of_service_api_actions_api.rb', line 13 def create_a_thing_space_quality_of_service_api_subscription(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/m2m/v1/devices/actions/enhanceQoS', 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(M201Success.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error Response', DefaultResponseException)) .execute end |
#stop_a_thing_space_quality_of_service_api_subscription(account_name, qos_subscription_id) ⇒ ApiResponse
Stops an active ThingSpace Quality of Service API subscription using the account name and the subscription ID. here description here
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/verizon/apis/thing_space_quality_of_service_api_actions_api.rb', line 41 def stop_a_thing_space_quality_of_service_api_subscription(account_name, qos_subscription_id) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/m2m/v1/devices/actions/enhanceQoS', Server::THINGSPACE) .query_param(new_parameter(account_name, key: 'accountName') .is_required(true)) .query_param(new_parameter(qos_subscription_id, key: 'qosSubscriptionId') .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(And.new('thingspace_oauth', 'VZ-M2M-Token'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(M201Success.method(:from_hash)) .is_api_response(true) .local_error('default', 'Error Response', DefaultResponseException)) .execute end |