Class: Verizon::SoftwareManagementSubscriptionsV1Api

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

Overview

SoftwareManagementSubscriptionsV1Api

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

#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.

Parameters:

  • account (String)

    Required parameter: Account identifier in

  • start_index (String)

    Required parameter: The zero-based number of

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/verizon/apis/software_management_subscriptions_v1_api.rb', line 43

def (,
                               start_index)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/licenses/{account}/index/{startIndex}',
                                 Server::SOFTWARE_MANAGEMENT_V1)
               .template_param(new_parameter(, key: 'account')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(start_index, key: 'startIndex')
                                .is_required(true)
                                .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. “##########-#####”.

Parameters:

  • account (String)

    Required parameter: Account identifier in

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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

def ()
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/subscriptions/{account}',
                                 Server::SOFTWARE_MANAGEMENT_V1)
               .template_param(new_parameter(, key: 'account')
                                .is_required(true)
                                .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