import urllib
class Licensing(object):
def __init__(self, session):
super(Licensing, self).__init__()
self._session = session
def getAdministeredLicensingSubscriptionEntitlements(self, **kwargs):
"""
**Retrieve the list of purchasable entitlements**
https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-entitlements
- skus (array): Filter to entitlements with the specified SKUs
"""
kwargs.update(locals())
metadata = {
'tags': ['licensing', 'configure', 'subscription', 'entitlements'],
'operation': 'getAdministeredLicensingSubscriptionEntitlements'
}
resource = f'/administered/licensing/subscription/entitlements'
query_params = ['skus', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
array_params = ['skus', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())
return self._session.get(metadata, resource, params)
def getAdministeredLicensingSubscriptionSubscriptions(self, organizationIds: list, total_pages=1, direction='next', **kwargs):
"""
**List available subscriptions**
https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-subscriptions
- organizationIds (array): Organizations to get associated subscriptions for
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- subscriptionIds (array): List of subscription ids to fetch
- statuses (array): List of statuses that returned subscriptions can have
- productTypes (array): List of product types that returned subscriptions need to have entitlements for.
- skus (array): List of SKUs that returned subscriptions need to have entitlements for.
- name (string): Search for subscription name
- startDate (string): Filter subscriptions by start date, ISO 8601 format. To filter with a range of dates, use 'startDate[