diff --git a/clicksend_client/__init__.py b/clicksend_client/__init__.py index aa81778..8a9b94c 100644 --- a/clicksend_client/__init__.py +++ b/clicksend_client/__init__.py @@ -28,6 +28,7 @@ from clicksend_client.api.email_to_sms_api import EmailToSmsApi from clicksend_client.api.fax_api import FAXApi from clicksend_client.api.fax_delivery_receipt_rules_api import FAXDeliveryReceiptRulesApi +from clicksend_client.api.global_sending_api import GlobalSendingApi from clicksend_client.api.inbound_fax_rules_api import InboundFAXRulesApi from clicksend_client.api.inbound_sms_rules_api import InboundSMSRulesApi from clicksend_client.api.mms_api import MMSApi @@ -65,6 +66,8 @@ from clicksend_client.models.contact import Contact from clicksend_client.models.contact_list import ContactList from clicksend_client.models.contact_list_import import ContactListImport +from clicksend_client.models.country_list_id import CountryListId +from clicksend_client.models.country_list_ids import CountryListIds from clicksend_client.models.credit_card import CreditCard from clicksend_client.models.date_before import DateBefore from clicksend_client.models.delivery_issue import DeliveryIssue diff --git a/clicksend_client/api/__init__.py b/clicksend_client/api/__init__.py index 8cbcb45..ec64dd3 100644 --- a/clicksend_client/api/__init__.py +++ b/clicksend_client/api/__init__.py @@ -15,6 +15,7 @@ from clicksend_client.api.email_to_sms_api import EmailToSmsApi from clicksend_client.api.fax_api import FAXApi from clicksend_client.api.fax_delivery_receipt_rules_api import FAXDeliveryReceiptRulesApi +from clicksend_client.api.global_sending_api import GlobalSendingApi from clicksend_client.api.inbound_fax_rules_api import InboundFAXRulesApi from clicksend_client.api.inbound_sms_rules_api import InboundSMSRulesApi from clicksend_client.api.mms_api import MMSApi diff --git a/clicksend_client/api/contact_api.py b/clicksend_client/api/contact_api.py index ad1cba3..7556141 100644 --- a/clicksend_client/api/contact_api.py +++ b/clicksend_client/api/contact_api.py @@ -375,6 +375,7 @@ def lists_contacts_by_list_id_get(self, list_id, **kwargs): # noqa: E501 :param int list_id: Contact list ID (required) :param int page: Page number :param int limit: Number of records per page + :param int updated_after: Get all contacts updated after a given timestamp. :return: str If the method is called asynchronously, returns the request thread. @@ -399,12 +400,13 @@ def lists_contacts_by_list_id_get_with_http_info(self, list_id, **kwargs): # no :param int list_id: Contact list ID (required) :param int page: Page number :param int limit: Number of records per page + :param int updated_after: Get all contacts updated after a given timestamp. :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['list_id', 'page', 'limit'] # noqa: E501 + all_params = ['list_id', 'page', 'limit', 'updated_after'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -428,6 +430,8 @@ def lists_contacts_by_list_id_get_with_http_info(self, list_id, **kwargs): # no raise ValueError("Invalid value for parameter `page` when calling `lists_contacts_by_list_id_get`, must be a value greater than or equal to `1`") # noqa: E501 if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 1): # noqa: E501 raise ValueError("Invalid value for parameter `limit` when calling `lists_contacts_by_list_id_get`, must be a value greater than or equal to `1`") # noqa: E501 + if self.api_client.client_side_validation and ('updated_after' in params and params['updated_after'] < 1): # noqa: E501 + raise ValueError("Invalid value for parameter `updated_after` when calling `lists_contacts_by_list_id_get`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} @@ -439,6 +443,8 @@ def lists_contacts_by_list_id_get_with_http_info(self, list_id, **kwargs): # no query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 + if 'updated_after' in params: + query_params.append(('updated_after', params['updated_after'])) # noqa: E501 header_params = {} diff --git a/clicksend_client/api/global_sending_api.py b/clicksend_client/api/global_sending_api.py new file mode 100644 index 0000000..dbc4a29 --- /dev/null +++ b/clicksend_client/api/global_sending_api.py @@ -0,0 +1,406 @@ +# coding: utf-8 + +""" + ClickSend v3 API + + This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501 + + OpenAPI spec version: 3.1 + Contact: support@clicksend.com + Generated by: https://github.com/clicksend-api/clicksend-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from clicksend_client.api_client import ApiClient + + +class GlobalSendingApi(object): + """NOTE: This class is auto generated by the clicksend code generator program. + + Do not edit the class manually. + Ref: https://github.com/clicksend-api/clicksend-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_countries_get(self, **kwargs): # noqa: E501 + """List of countries # noqa: E501 + + List of countries with IDs that can be used in selecting countries for Global sending. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_countries_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_countries_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_countries_get_with_http_info(**kwargs) # noqa: E501 + return data + + def list_countries_get_with_http_info(self, **kwargs): # noqa: E501 + """List of countries # noqa: E501 + + List of countries with IDs that can be used in selecting countries for Global sending. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_countries_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_countries_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['BasicAuth'] # noqa: E501 + + return self.api_client.call_api( + '/country-list', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_countries_agree_post(self, **kwargs): # noqa: E501 + """Agree to rules and regulation # noqa: E501 + + To agree on rules and regulations of selected countries and confirm selection. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_countries_agree_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_countries_agree_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_countries_agree_post_with_http_info(**kwargs) # noqa: E501 + return data + + def user_countries_agree_post_with_http_info(self, **kwargs): # noqa: E501 + """Agree to rules and regulation # noqa: E501 + + To agree on rules and regulations of selected countries and confirm selection. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_countries_agree_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_countries_agree_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['BasicAuth'] # noqa: E501 + + return self.api_client.call_api( + '/user-countries/agree', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_countries_get(self, **kwargs): # noqa: E501 + """Get Countries for Global Sending # noqa: E501 + + Get the list of selected countries. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_countries_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_countries_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_countries_get_with_http_info(**kwargs) # noqa: E501 + return data + + def user_countries_get_with_http_info(self, **kwargs): # noqa: E501 + """Get Countries for Global Sending # noqa: E501 + + Get the list of selected countries. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_countries_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_countries_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['BasicAuth'] # noqa: E501 + + return self.api_client.call_api( + '/user-countries', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_countries_post(self, country_list_ids, **kwargs): # noqa: E501 + """Select Countries for Global Sending # noqa: E501 + + Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_countries_post(country_list_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CountryListIds country_list_ids: Id of countr(ies) you want to select, you can get them from GET /country-list response (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_countries_post_with_http_info(country_list_ids, **kwargs) # noqa: E501 + else: + (data) = self.user_countries_post_with_http_info(country_list_ids, **kwargs) # noqa: E501 + return data + + def user_countries_post_with_http_info(self, country_list_ids, **kwargs): # noqa: E501 + """Select Countries for Global Sending # noqa: E501 + + Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_countries_post_with_http_info(country_list_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CountryListIds country_list_ids: Id of countr(ies) you want to select, you can get them from GET /country-list response (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['country_list_ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_countries_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'country_list_ids' is set + if self.api_client.client_side_validation and ('country_list_ids' not in params or + params['country_list_ids'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `country_list_ids` when calling `user_countries_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'country_list_ids' in params: + body_params = params['country_list_ids'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['BasicAuth'] # noqa: E501 + + return self.api_client.call_api( + '/user-countries', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/clicksend_client/models/__init__.py b/clicksend_client/models/__init__.py index 82b79cf..6ab2144 100644 --- a/clicksend_client/models/__init__.py +++ b/clicksend_client/models/__init__.py @@ -23,6 +23,8 @@ from clicksend_client.models.contact import Contact from clicksend_client.models.contact_list import ContactList from clicksend_client.models.contact_list_import import ContactListImport +from clicksend_client.models.country_list_id import CountryListId +from clicksend_client.models.country_list_ids import CountryListIds from clicksend_client.models.credit_card import CreditCard from clicksend_client.models.date_before import DateBefore from clicksend_client.models.delivery_issue import DeliveryIssue diff --git a/clicksend_client/models/country_list_id.py b/clicksend_client/models/country_list_id.py new file mode 100644 index 0000000..0336e67 --- /dev/null +++ b/clicksend_client/models/country_list_id.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + ClickSend v3 API + + This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501 + + OpenAPI spec version: 3.1 + Contact: support@clicksend.com + Generated by: https://github.com/clicksend-api/clicksend-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from clicksend_client.configuration import Configuration + + +class CountryListId(object): + """NOTE: This class is auto generated by the clicksend code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + clicksend_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + clicksend_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """CountryListId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.clicksend_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CountryListId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountryListId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountryListId): + return True + + return self.to_dict() != other.to_dict() diff --git a/clicksend_client/models/country_list_ids.py b/clicksend_client/models/country_list_ids.py new file mode 100644 index 0000000..885cb87 --- /dev/null +++ b/clicksend_client/models/country_list_ids.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + ClickSend v3 API + + This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501 + + OpenAPI spec version: 3.1 + Contact: support@clicksend.com + Generated by: https://github.com/clicksend-api/clicksend-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from clicksend_client.configuration import Configuration + + +class CountryListIds(object): + """NOTE: This class is auto generated by the clicksend code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + clicksend_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + clicksend_types = { + 'country_list_ids': 'list[CountryListId]' + } + + attribute_map = { + 'country_list_ids': 'country_list_ids' + } + + def __init__(self, country_list_ids=None, _configuration=None): # noqa: E501 + """CountryListIds - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._country_list_ids = None + self.discriminator = None + + self.country_list_ids = country_list_ids + + @property + def country_list_ids(self): + """Gets the country_list_ids of this CountryListIds. # noqa: E501 + + Array of country ids # noqa: E501 + + :return: The country_list_ids of this CountryListIds. # noqa: E501 + :rtype: list[CountryListId] + """ + return self._country_list_ids + + @country_list_ids.setter + def country_list_ids(self, country_list_ids): + """Sets the country_list_ids of this CountryListIds. + + Array of country ids # noqa: E501 + + :param country_list_ids: The country_list_ids of this CountryListIds. # noqa: E501 + :type: list[CountryListId] + """ + if self._configuration.client_side_validation and country_list_ids is None: + raise ValueError("Invalid value for `country_list_ids`, must not be `None`") # noqa: E501 + + self._country_list_ids = country_list_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.clicksend_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CountryListIds, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountryListIds): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountryListIds): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/ContactApi.md b/docs/ContactApi.md index b9077a3..3b26c13 100644 --- a/docs/ContactApi.md +++ b/docs/ContactApi.md @@ -182,7 +182,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **lists_contacts_by_list_id_get** -> str lists_contacts_by_list_id_get(list_id, page=page, limit=limit) +> str lists_contacts_by_list_id_get(list_id, page=page, limit=limit, updated_after=updated_after) Get all contacts in a list @@ -206,10 +206,11 @@ api_instance = clicksend_client.ContactApi(clicksend_client.ApiClient(configurat list_id = 56 # int | Contact list ID page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) +updated_after = 10 # int | Get all contacts updated after a given timestamp. (optional) (default to 10) try: # Get all contacts in a list - api_response = api_instance.lists_contacts_by_list_id_get(list_id, page=page, limit=limit) + api_response = api_instance.lists_contacts_by_list_id_get(list_id, page=page, limit=limit, updated_after=updated_after) pprint(api_response) except ApiException as e: print("Exception when calling ContactApi->lists_contacts_by_list_id_get: %s\n" % e) @@ -222,6 +223,7 @@ Name | Type | Description | Notes **list_id** | **int**| Contact list ID | **page** | **int**| Page number | [optional] [default to 1] **limit** | **int**| Number of records per page | [optional] [default to 10] + **updated_after** | **int**| Get all contacts updated after a given timestamp. | [optional] [default to 10] ### Return type diff --git a/docs/CountryListId.md b/docs/CountryListId.md new file mode 100644 index 0000000..e5ddd08 --- /dev/null +++ b/docs/CountryListId.md @@ -0,0 +1,9 @@ +# CountryListId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountryListIds.md b/docs/CountryListIds.md new file mode 100644 index 0000000..367f4d0 --- /dev/null +++ b/docs/CountryListIds.md @@ -0,0 +1,10 @@ +# CountryListIds + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_list_ids** | [**list[CountryListId]**](CountryListId.md) | Array of country ids | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GlobalSendingApi.md b/docs/GlobalSendingApi.md new file mode 100644 index 0000000..9a92f0f --- /dev/null +++ b/docs/GlobalSendingApi.md @@ -0,0 +1,212 @@ +# clicksend_client.GlobalSendingApi + +All URIs are relative to *https://rest.clicksend.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_countries_get**](GlobalSendingApi.md#list_countries_get) | **GET** /country-list | List of countries +[**user_countries_agree_post**](GlobalSendingApi.md#user_countries_agree_post) | **POST** /user-countries/agree | Agree to rules and regulation +[**user_countries_get**](GlobalSendingApi.md#user_countries_get) | **GET** /user-countries | Get Countries for Global Sending +[**user_countries_post**](GlobalSendingApi.md#user_countries_post) | **POST** /user-countries | Select Countries for Global Sending + + +# **list_countries_get** +> str list_countries_get() + +List of countries + +List of countries with IDs that can be used in selecting countries for Global sending. + +### Example +```python +from __future__ import print_function +import time +import clicksend_client +from clicksend_client.rest import ApiException +from pprint import pprint + +# Configure HTTP basic authorization: BasicAuth +configuration = clicksend_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' + +# create an instance of the API class +api_instance = clicksend_client.GlobalSendingApi(clicksend_client.ApiClient(configuration)) + +try: + # List of countries + api_response = api_instance.list_countries_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling GlobalSendingApi->list_countries_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_countries_agree_post** +> str user_countries_agree_post() + +Agree to rules and regulation + +To agree on rules and regulations of selected countries and confirm selection. + +### Example +```python +from __future__ import print_function +import time +import clicksend_client +from clicksend_client.rest import ApiException +from pprint import pprint + +# Configure HTTP basic authorization: BasicAuth +configuration = clicksend_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' + +# create an instance of the API class +api_instance = clicksend_client.GlobalSendingApi(clicksend_client.ApiClient(configuration)) + +try: + # Agree to rules and regulation + api_response = api_instance.user_countries_agree_post() + pprint(api_response) +except ApiException as e: + print("Exception when calling GlobalSendingApi->user_countries_agree_post: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_countries_get** +> str user_countries_get() + +Get Countries for Global Sending + +Get the list of selected countries. + +### Example +```python +from __future__ import print_function +import time +import clicksend_client +from clicksend_client.rest import ApiException +from pprint import pprint + +# Configure HTTP basic authorization: BasicAuth +configuration = clicksend_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' + +# create an instance of the API class +api_instance = clicksend_client.GlobalSendingApi(clicksend_client.ApiClient(configuration)) + +try: + # Get Countries for Global Sending + api_response = api_instance.user_countries_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling GlobalSendingApi->user_countries_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_countries_post** +> str user_countries_post(country_list_ids) + +Select Countries for Global Sending + +Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload. + +### Example +```python +from __future__ import print_function +import time +import clicksend_client +from clicksend_client.rest import ApiException +from pprint import pprint + +# Configure HTTP basic authorization: BasicAuth +configuration = clicksend_client.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' + +# create an instance of the API class +api_instance = clicksend_client.GlobalSendingApi(clicksend_client.ApiClient(configuration)) +country_list_ids = clicksend_client.CountryListIds() # CountryListIds | Id of countr(ies) you want to select, you can get them from GET /country-list response + +try: + # Select Countries for Global Sending + api_response = api_instance.user_countries_post(country_list_ids) + pprint(api_response) +except ApiException as e: + print("Exception when calling GlobalSendingApi->user_countries_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **country_list_ids** | [**CountryListIds**](CountryListIds.md)| Id of countr(ies) you want to select, you can get them from GET /country-list response | + +### Return type + +**str** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/setup.py b/setup.py index ea3710c..7dd9ecb 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "clicksend-client" -VERSION = "5.0.75" +VERSION = "5.0.76" # To install the library, run the following # # python setup.py install diff --git a/test/__init__.py b/test/__init__.py index e69de29..576f56f 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -0,0 +1 @@ +# coding: utf-8 \ No newline at end of file diff --git a/test/test_country_list_id.py b/test/test_country_list_id.py new file mode 100644 index 0000000..b3ea29f --- /dev/null +++ b/test/test_country_list_id.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + ClickSend v3 API + + This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501 + + OpenAPI spec version: 3.1 + Contact: support@clicksend.com + Generated by: https://github.com/clicksend-api/clicksend-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import clicksend_client +from clicksend_client.models.country_list_id import CountryListId # noqa: E501 +from clicksend_client.rest import ApiException + + +class TestCountryListId(unittest.TestCase): + """CountryListId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCountryListId(self): + """Test CountryListId""" + # FIXME: construct object with mandatory attributes with example values + # model = clicksend_client.models.country_list_id.CountryListId() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_country_list_ids.py b/test/test_country_list_ids.py new file mode 100644 index 0000000..85aa43b --- /dev/null +++ b/test/test_country_list_ids.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + ClickSend v3 API + + This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501 + + OpenAPI spec version: 3.1 + Contact: support@clicksend.com + Generated by: https://github.com/clicksend-api/clicksend-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import clicksend_client +from clicksend_client.models.country_list_ids import CountryListIds # noqa: E501 +from clicksend_client.rest import ApiException + + +class TestCountryListIds(unittest.TestCase): + """CountryListIds unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCountryListIds(self): + """Test CountryListIds""" + # FIXME: construct object with mandatory attributes with example values + # model = clicksend_client.models.country_list_ids.CountryListIds() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_global_sending_api.py b/test/test_global_sending_api.py new file mode 100644 index 0000000..fe60d75 --- /dev/null +++ b/test/test_global_sending_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + ClickSend v3 API + + This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501 + + OpenAPI spec version: 3.1 + Contact: support@clicksend.com + Generated by: https://github.com/clicksend-api/clicksend-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import clicksend_client +from clicksend_client.api.global_sending_api import GlobalSendingApi # noqa: E501 +from clicksend_client.rest import ApiException + + +class TestGlobalSendingApi(unittest.TestCase): + """GlobalSendingApi unit test stubs""" + + def setUp(self): + self.api = clicksend_client.api.global_sending_api.GlobalSendingApi() # noqa: E501 + + def tearDown(self): + pass + + def test_list_countries_get(self): + """Test case for list_countries_get + + List of countries # noqa: E501 + """ + pass + + def test_user_countries_agree_post(self): + """Test case for user_countries_agree_post + + Agree to rules and regulation # noqa: E501 + """ + pass + + def test_user_countries_get(self): + """Test case for user_countries_get + + Get Countries for Global Sending # noqa: E501 + """ + pass + + def test_user_countries_post(self): + """Test case for user_countries_post + + Select Countries for Global Sending # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main()