Class: Verizon::SoftwareManagementSubscriptionsV1Controller
- Inherits:
-
BaseController
- Object
- BaseController
- Verizon::SoftwareManagementSubscriptionsV1Controller
- Defined in:
- lib/verizon/controllers/software_management_subscriptions_v1_controller.rb
Overview
SoftwareManagementSubscriptionsV1Controller
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_account_license_status(account, start_index) ⇒ ApiResponse
Returns information about an account’s Software Management Services licenses and a list of licensed devices.
-
#get_account_subscription_status(account) ⇒ ApiResponse
This subscriptions endpoint retrieves an account’s current Software Management Service subscription status.
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
#get_account_license_status(account, start_index) ⇒ ApiResponse
Returns information about an account’s Software Management Services licenses and a list of licensed devices. “##########-#####”. the first record to return. Set startIndex=0 for the first request. If there are more than 1,000 devices in the response, set startIndex=1000 for the second request, 2000 for the third request, etc.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/verizon/controllers/software_management_subscriptions_v1_controller.rb', line 42 def get_account_license_status(account, start_index) new_api_call_builder .request(new_request_builder(HttpMethodEnum::GET, '/licenses/{account}/index/{startIndex}', Server::SOFTWARE_MANAGEMENT_V1) .template_param(new_parameter(account, key: 'account') .should_encode(true)) .template_param(new_parameter(start_index, key: 'startIndex') .should_encode(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(AccountLicenseInfo.method(:from_hash)) .is_api_response(true) .local_error('400', 'Unexpected error.', FotaV1ResultException)) .execute end |
#get_account_subscription_status(account) ⇒ ApiResponse
This subscriptions endpoint retrieves an account’s current Software Management Service subscription status. “##########-#####”.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/verizon/controllers/software_management_subscriptions_v1_controller.rb', line 14 def get_account_subscription_status(account) new_api_call_builder .request(new_request_builder(HttpMethodEnum::GET, '/subscriptions/{account}', Server::SOFTWARE_MANAGEMENT_V1) .template_param(new_parameter(account, key: 'account') .should_encode(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(V1AccountSubscription.method(:from_hash)) .is_api_response(true) .local_error('400', 'Unexpected error.', FotaV1ResultException)) .execute end |