diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a655050 --- /dev/null +++ b/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..6381ae0 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.18 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..86211e2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/MimePost/__init__.py b/MimePost/__init__.py new file mode 100644 index 0000000..b1b1a24 --- /dev/null +++ b/MimePost/__init__.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +# flake8: noqa + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from MimePost.api.accounts_api import AccountsApi +from MimePost.api.domains_api import DomainsApi +from MimePost.api.emails_api import EmailsApi +from MimePost.api.stats_api import StatsApi +from MimePost.api.webhooks_api import WebhooksApi + +# import ApiClient +from MimePost.api_client import ApiClient +from MimePost.configuration import Configuration +# import models into sdk package +from MimePost.models.account_profile import AccountProfile +from MimePost.models.account_profile_response import AccountProfileResponse +from MimePost.models.account_settings import AccountSettings +from MimePost.models.api_response import ApiResponse +from MimePost.models.api_response_all_webhooks import ApiResponseAllWebhooks +from MimePost.models.api_response_all_webhooks_data import ApiResponseAllWebhooksData +from MimePost.models.api_response_domains_list import ApiResponseDomainsList +from MimePost.models.api_response_domains_list_data import ApiResponseDomainsListData +from MimePost.models.api_response_emaillogs import ApiResponseEmaillogs +from MimePost.models.api_response_emaillogs_data import ApiResponseEmaillogsData +from MimePost.models.api_response_single_webhooks import ApiResponseSingleWebhooks +from MimePost.models.api_response_stats import ApiResponseStats +from MimePost.models.api_response_stats_data import ApiResponseStatsData +from MimePost.models.api_response_stats_data_datewise_summary import ApiResponseStatsDataDatewiseSummary +from MimePost.models.api_response_stats_data_graph_summary import ApiResponseStatsDataGraphSummary +from MimePost.models.api_response_stats_data_total_summary import ApiResponseStatsDataTotalSummary +from MimePost.models.api_response_stats_data_total_summary_status import ApiResponseStatsDataTotalSummaryStatus +from MimePost.models.api_response_webhooks import ApiResponseWebhooks +from MimePost.models.api_response_webhooks_data import ApiResponseWebhooksData +from MimePost.models.domain import Domain +from MimePost.models.email import Email +from MimePost.models.email_attachments import EmailAttachments +from MimePost.models.email_global_merge_vars import EmailGlobalMergeVars +from MimePost.models.email_merge_vars import EmailMergeVars +from MimePost.models.email_to import EmailTo +from MimePost.models.webhook import Webhook +from MimePost.models.webhook1 import Webhook1 diff --git a/MimePost/api/__init__.py b/MimePost/api/__init__.py new file mode 100644 index 0000000..2212641 --- /dev/null +++ b/MimePost/api/__init__.py @@ -0,0 +1,10 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from MimePost.api.accounts_api import AccountsApi +from MimePost.api.domains_api import DomainsApi +from MimePost.api.emails_api import EmailsApi +from MimePost.api.stats_api import StatsApi +from MimePost.api.webhooks_api import WebhooksApi diff --git a/MimePost/api/accounts_api.py b/MimePost/api/accounts_api.py new file mode 100644 index 0000000..9048d3e --- /dev/null +++ b/MimePost/api/accounts_api.py @@ -0,0 +1,414 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from MimePost.api_client import ApiClient + + +class AccountsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def account_profile_get(self, **kwargs): # noqa: E501 + """Get account profile details # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.account_profile_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AccountProfileResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.account_profile_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.account_profile_get_with_http_info(**kwargs) # noqa: E501 + return data + + def account_profile_get_with_http_info(self, **kwargs): # noqa: E501 + """Get account profile details # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.account_profile_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AccountProfileResponse + 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 account_profile_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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/account/profile/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountProfileResponse', # 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 account_profile_post(self, body, **kwargs): # noqa: E501 + """Update account profile details # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.account_profile_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AccountProfile body: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.account_profile_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.account_profile_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def account_profile_post_with_http_info(self, body, **kwargs): # noqa: E501 + """Update account profile details # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.account_profile_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AccountProfile body: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # 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 account_profile_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `account_profile_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/account/profile/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 settings_get(self, **kwargs): # noqa: E501 + """Get all the settings # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.settings_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AccountSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.settings_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.settings_get_with_http_info(**kwargs) # noqa: E501 + return data + + def settings_get_with_http_info(self, **kwargs): # noqa: E501 + """Get all the settings # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.settings_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AccountSettings + 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 settings_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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/settings/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountSettings', # 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 settings_post(self, body, **kwargs): # noqa: E501 + """Set a setting # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.settings_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AccountSettings body: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.settings_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.settings_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def settings_post_with_http_info(self, body, **kwargs): # noqa: E501 + """Set a setting # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.settings_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AccountSettings body: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # 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 settings_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `settings_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/settings/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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/MimePost/api/domains_api.py b/MimePost/api/domains_api.py new file mode 100644 index 0000000..f3bfa0e --- /dev/null +++ b/MimePost/api/domains_api.py @@ -0,0 +1,798 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from MimePost.api_client import ApiClient + + +class DomainsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def domains_get(self, **kwargs): # noqa: E501 + """Get a list of all the domains # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ApiResponseDomainsList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.domains_get_with_http_info(**kwargs) # noqa: E501 + return data + + def domains_get_with_http_info(self, **kwargs): # noqa: E501 + """Get a list of all the domains # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ApiResponseDomainsList + 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 domains_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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseDomainsList', # 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 domains_id_approve_post(self, id, **kwargs): # noqa: E501 + """Submit request for the approval of a verified domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_approve_post(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_id_approve_post_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.domains_id_approve_post_with_http_info(id, **kwargs) # noqa: E501 + return data + + def domains_id_approve_post_with_http_info(self, id, **kwargs): # noqa: E501 + """Submit request for the approval of a verified domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_approve_post_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 domains_id_approve_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `domains_id_approve_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}/approve/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 domains_id_delete(self, id, **kwargs): # noqa: E501 + """Remove a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_id_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.domains_id_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def domains_id_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Remove a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 domains_id_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `domains_id_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 domains_id_get(self, id, **kwargs): # noqa: E501 + """Get the details of a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponseDomainsList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_id_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.domains_id_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def domains_id_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get the details of a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponseDomainsList + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 domains_id_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `domains_id_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseDomainsList', # 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 domains_id_verify_dkim_post(self, id, **kwargs): # noqa: E501 + """Request for the verification of DKIM record for a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_verify_dkim_post(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_id_verify_dkim_post_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.domains_id_verify_dkim_post_with_http_info(id, **kwargs) # noqa: E501 + return data + + def domains_id_verify_dkim_post_with_http_info(self, id, **kwargs): # noqa: E501 + """Request for the verification of DKIM record for a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_verify_dkim_post_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 domains_id_verify_dkim_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `domains_id_verify_dkim_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}/verify_dkim/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 domains_id_verify_spf_post(self, id, **kwargs): # noqa: E501 + """Request for the verification of SPF record for a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_verify_spf_post(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_id_verify_spf_post_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.domains_id_verify_spf_post_with_http_info(id, **kwargs) # noqa: E501 + return data + + def domains_id_verify_spf_post_with_http_info(self, id, **kwargs): # noqa: E501 + """Request for the verification of SPF record for a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_verify_spf_post_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 domains_id_verify_spf_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `domains_id_verify_spf_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}/verify_spf/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 domains_id_verify_tracking_post(self, id, **kwargs): # noqa: E501 + """Request for the verification of tracking record for a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_verify_tracking_post(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_id_verify_tracking_post_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.domains_id_verify_tracking_post_with_http_info(id, **kwargs) # noqa: E501 + return data + + def domains_id_verify_tracking_post_with_http_info(self, id, **kwargs): # noqa: E501 + """Request for the verification of tracking record for a single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_id_verify_tracking_post_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 domains_id_verify_tracking_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `domains_id_verify_tracking_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}/verify_tracking/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 domains_post(self, **kwargs): # noqa: E501 + """Add single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Domain domain: The name of the domain name + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.domains_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.domains_post_with_http_info(**kwargs) # noqa: E501 + return data + + def domains_post_with_http_info(self, **kwargs): # noqa: E501 + """Add single domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.domains_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Domain domain: The name of the domain name + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['domain'] # 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 domains_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'domain' in params: + body_params = params['domain'] + # 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/domains/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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/MimePost/api/emails_api.py b/MimePost/api/emails_api.py new file mode 100644 index 0000000..e99ff0b --- /dev/null +++ b/MimePost/api/emails_api.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from MimePost.api_client import ApiClient + + +class EmailsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def send_email(self, body, **kwargs): # noqa: E501 + """Send email # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Email body: Single Email object (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.send_email_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.send_email_with_http_info(body, **kwargs) # noqa: E501 + return data + + def send_email_with_http_info(self, body, **kwargs): # noqa: E501 + """Send email # noqa: E501 + + # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Email body: Single Email object (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # 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 send_email" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/emails/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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/MimePost/api/stats_api.py b/MimePost/api/stats_api.py new file mode 100644 index 0000000..05873c7 --- /dev/null +++ b/MimePost/api/stats_api.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from MimePost.api_client import ApiClient + + +class StatsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def emaillogs_get(self, start_date, end_date, **kwargs): # noqa: E501 + """Get the logs of a particular date # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.emaillogs_get(start_date, end_date, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str start_date: Start Date in yyyymmdd format example 20190801 (required) + :param str end_date: End Date in yyyymmdd format example 20190803 (required) + :param str status: + :param str to: + :param int page: + :param int limit: + :return: ApiResponseEmaillogs + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.emaillogs_get_with_http_info(start_date, end_date, **kwargs) # noqa: E501 + else: + (data) = self.emaillogs_get_with_http_info(start_date, end_date, **kwargs) # noqa: E501 + return data + + def emaillogs_get_with_http_info(self, start_date, end_date, **kwargs): # noqa: E501 + """Get the logs of a particular date # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.emaillogs_get_with_http_info(start_date, end_date, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str start_date: Start Date in yyyymmdd format example 20190801 (required) + :param str end_date: End Date in yyyymmdd format example 20190803 (required) + :param str status: + :param str to: + :param int page: + :param int limit: + :return: ApiResponseEmaillogs + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start_date', 'end_date', 'status', 'to', 'page', 'limit'] # 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 emaillogs_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start_date' is set + if ('start_date' not in params or + params['start_date'] is None): + raise ValueError("Missing the required parameter `start_date` when calling `emaillogs_get`") # noqa: E501 + # verify the required parameter 'end_date' is set + if ('end_date' not in params or + params['end_date'] is None): + raise ValueError("Missing the required parameter `end_date` when calling `emaillogs_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start_date' in params: + query_params.append(('start_date', params['start_date'])) # noqa: E501 + if 'end_date' in params: + query_params.append(('end_date', params['end_date'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + if 'to' in params: + query_params.append(('to', params['to'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/emaillogs/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseEmaillogs', # 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 stats_get(self, start_date, end_date, **kwargs): # noqa: E501 + """Get the summary of stats for a range of dates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stats_get(start_date, end_date, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str start_date: Start Date in yyyymmdd format example 20190801 (required) + :param str end_date: End Date in yyyymmdd format example 20190803 (required) + :return: ApiResponseStats + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.stats_get_with_http_info(start_date, end_date, **kwargs) # noqa: E501 + else: + (data) = self.stats_get_with_http_info(start_date, end_date, **kwargs) # noqa: E501 + return data + + def stats_get_with_http_info(self, start_date, end_date, **kwargs): # noqa: E501 + """Get the summary of stats for a range of dates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stats_get_with_http_info(start_date, end_date, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str start_date: Start Date in yyyymmdd format example 20190801 (required) + :param str end_date: End Date in yyyymmdd format example 20190803 (required) + :return: ApiResponseStats + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['start_date', 'end_date'] # 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 stats_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'start_date' is set + if ('start_date' not in params or + params['start_date'] is None): + raise ValueError("Missing the required parameter `start_date` when calling `stats_get`") # noqa: E501 + # verify the required parameter 'end_date' is set + if ('end_date' not in params or + params['end_date'] is None): + raise ValueError("Missing the required parameter `end_date` when calling `stats_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'start_date' in params: + query_params.append(('start_date', params['start_date'])) # noqa: E501 + if 'end_date' in params: + query_params.append(('end_date', params['end_date'])) # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/stats/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseStats', # 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/MimePost/api/webhooks_api.py b/MimePost/api/webhooks_api.py new file mode 100644 index 0000000..78afbda --- /dev/null +++ b/MimePost/api/webhooks_api.py @@ -0,0 +1,511 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from MimePost.api_client import ApiClient + + +class WebhooksApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def webhooks_get(self, **kwargs): # noqa: E501 + """Get the list of all the webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ApiResponseAllWebhooks + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhooks_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.webhooks_get_with_http_info(**kwargs) # noqa: E501 + return data + + def webhooks_get_with_http_info(self, **kwargs): # noqa: E501 + """Get the list of all the webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ApiResponseAllWebhooks + 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 webhooks_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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseAllWebhooks', # 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 webhooks_id_delete(self, id, **kwargs): # noqa: E501 + """Remove a single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_id_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhooks_id_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_id_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def webhooks_id_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Remove a single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_id_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 webhooks_id_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `webhooks_id_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponse', # 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 webhooks_id_get(self, id, **kwargs): # noqa: E501 + """Get the details of a single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_id_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponseSingleWebhooks + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhooks_id_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_id_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def webhooks_id_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get the details of a single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_id_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: ApiResponseSingleWebhooks + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 webhooks_id_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `webhooks_id_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseSingleWebhooks', # 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 webhooks_id_put(self, id, **kwargs): # noqa: E501 + """Update the details of a single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_id_put(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param Webhook1 webhook: + :return: ApiResponseSingleWebhooks + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhooks_id_put_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.webhooks_id_put_with_http_info(id, **kwargs) # noqa: E501 + return data + + def webhooks_id_put_with_http_info(self, id, **kwargs): # noqa: E501 + """Update the details of a single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_id_put_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param Webhook1 webhook: + :return: ApiResponseSingleWebhooks + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'webhook'] # 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 webhooks_id_put" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `webhooks_id_put`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'webhook' in params: + body_params = params['webhook'] + # 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseSingleWebhooks', # 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 webhooks_post(self, **kwargs): # noqa: E501 + """Add single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Webhook webhook: + :return: ApiResponseWebhooks + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.webhooks_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.webhooks_post_with_http_info(**kwargs) # noqa: E501 + return data + + def webhooks_post_with_http_info(self, **kwargs): # noqa: E501 + """Add single webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.webhooks_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Webhook webhook: + :return: ApiResponseWebhooks + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['webhook'] # 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 webhooks_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'webhook' in params: + body_params = params['webhook'] + # 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 = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiResponseWebhooks', # 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/MimePost/api_client.py b/MimePost/api_client.py new file mode 100644 index 0000000..0c1c1c8 --- /dev/null +++ b/MimePost/api_client.py @@ -0,0 +1,638 @@ +# coding: utf-8 +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from MimePost.configuration import Configuration +import MimePost.models +from MimePost import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/1.0.0/python' + + def __del__(self): + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(MimePost.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __hasattr(self, object, name): + return name in object.__class__.__dict__ + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if (not klass.swagger_types and + not self.__hasattr(klass, 'get_real_child_model')): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if self.__hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/MimePost/configuration.py b/MimePost/configuration.py new file mode 100644 index 0000000..7f1dd71 --- /dev/null +++ b/MimePost/configuration.py @@ -0,0 +1,252 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "https://api.mimepost.com/v1/" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("MimePost") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @classmethod + def set_default(cls, default): + cls._default = default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + + if self.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'api_key': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'X-Auth-Token', + 'value': self.get_api_key_with_prefix('X-Auth-Token') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.1.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/MimePost/models/__init__.py b/MimePost/models/__init__.py new file mode 100644 index 0000000..41bb3e6 --- /dev/null +++ b/MimePost/models/__init__.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +# flake8: noqa +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from MimePost.models.account_profile import AccountProfile +from MimePost.models.account_profile_response import AccountProfileResponse +from MimePost.models.account_settings import AccountSettings +from MimePost.models.api_response import ApiResponse +from MimePost.models.api_response_all_webhooks import ApiResponseAllWebhooks +from MimePost.models.api_response_all_webhooks_data import ApiResponseAllWebhooksData +from MimePost.models.api_response_domains_list import ApiResponseDomainsList +from MimePost.models.api_response_domains_list_data import ApiResponseDomainsListData +from MimePost.models.api_response_emaillogs import ApiResponseEmaillogs +from MimePost.models.api_response_emaillogs_data import ApiResponseEmaillogsData +from MimePost.models.api_response_single_webhooks import ApiResponseSingleWebhooks +from MimePost.models.api_response_stats import ApiResponseStats +from MimePost.models.api_response_stats_data import ApiResponseStatsData +from MimePost.models.api_response_stats_data_datewise_summary import ApiResponseStatsDataDatewiseSummary +from MimePost.models.api_response_stats_data_graph_summary import ApiResponseStatsDataGraphSummary +from MimePost.models.api_response_stats_data_total_summary import ApiResponseStatsDataTotalSummary +from MimePost.models.api_response_stats_data_total_summary_status import ApiResponseStatsDataTotalSummaryStatus +from MimePost.models.api_response_webhooks import ApiResponseWebhooks +from MimePost.models.api_response_webhooks_data import ApiResponseWebhooksData +from MimePost.models.domain import Domain +from MimePost.models.email import Email +from MimePost.models.email_attachments import EmailAttachments +from MimePost.models.email_global_merge_vars import EmailGlobalMergeVars +from MimePost.models.email_merge_vars import EmailMergeVars +from MimePost.models.email_to import EmailTo +from MimePost.models.webhook import Webhook +from MimePost.models.webhook1 import Webhook1 diff --git a/MimePost/models/account_profile.py b/MimePost/models/account_profile.py new file mode 100644 index 0000000..a56ea3b --- /dev/null +++ b/MimePost/models/account_profile.py @@ -0,0 +1,513 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AccountProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'first_name': 'str', + 'last_name': 'str', + 'address': 'str', + 'city': 'str', + 'country': 'str', + 'phone_number': 'str', + 'skype_id': 'str', + 'company_name': 'str', + 'website': 'str', + 'twitter_handle': 'str', + 'linkedin': 'str', + 'billing_name': 'str', + 'billing_company_name': 'str', + 'billing_address': 'str', + 'username': 'str', + 'email': 'str' + } + + attribute_map = { + 'first_name': 'first_name', + 'last_name': 'last_name', + 'address': 'address', + 'city': 'city', + 'country': 'country', + 'phone_number': 'phone_number', + 'skype_id': 'skype_id', + 'company_name': 'company_name', + 'website': 'website', + 'twitter_handle': 'twitter_handle', + 'linkedin': 'linkedin', + 'billing_name': 'billing_name', + 'billing_company_name': 'billing_company_name', + 'billing_address': 'billing_address', + 'username': 'username', + 'email': 'email' + } + + def __init__(self, first_name=None, last_name=None, address=None, city=None, country=None, phone_number=None, skype_id=None, company_name=None, website=None, twitter_handle='', linkedin=None, billing_name=None, billing_company_name=None, billing_address=None, username=None, email=None): # noqa: E501 + """AccountProfile - a model defined in Swagger""" # noqa: E501 + + self._first_name = None + self._last_name = None + self._address = None + self._city = None + self._country = None + self._phone_number = None + self._skype_id = None + self._company_name = None + self._website = None + self._twitter_handle = None + self._linkedin = None + self._billing_name = None + self._billing_company_name = None + self._billing_address = None + self._username = None + self._email = None + self.discriminator = None + + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + if address is not None: + self.address = address + if city is not None: + self.city = city + if country is not None: + self.country = country + if phone_number is not None: + self.phone_number = phone_number + if skype_id is not None: + self.skype_id = skype_id + if company_name is not None: + self.company_name = company_name + if website is not None: + self.website = website + if twitter_handle is not None: + self.twitter_handle = twitter_handle + if linkedin is not None: + self.linkedin = linkedin + if billing_name is not None: + self.billing_name = billing_name + if billing_company_name is not None: + self.billing_company_name = billing_company_name + if billing_address is not None: + self.billing_address = billing_address + if username is not None: + self.username = username + if email is not None: + self.email = email + + @property + def first_name(self): + """Gets the first_name of this AccountProfile. # noqa: E501 + + First name of the user # noqa: E501 + + :return: The first_name of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this AccountProfile. + + First name of the user # noqa: E501 + + :param first_name: The first_name of this AccountProfile. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this AccountProfile. # noqa: E501 + + Last name of the user # noqa: E501 + + :return: The last_name of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this AccountProfile. + + Last name of the user # noqa: E501 + + :param last_name: The last_name of this AccountProfile. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def address(self): + """Gets the address of this AccountProfile. # noqa: E501 + + + :return: The address of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this AccountProfile. + + + :param address: The address of this AccountProfile. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def city(self): + """Gets the city of this AccountProfile. # noqa: E501 + + + :return: The city of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this AccountProfile. + + + :param city: The city of this AccountProfile. # noqa: E501 + :type: str + """ + + self._city = city + + @property + def country(self): + """Gets the country of this AccountProfile. # noqa: E501 + + + :return: The country of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this AccountProfile. + + + :param country: The country of this AccountProfile. # noqa: E501 + :type: str + """ + + self._country = country + + @property + def phone_number(self): + """Gets the phone_number of this AccountProfile. # noqa: E501 + + + :return: The phone_number of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this AccountProfile. + + + :param phone_number: The phone_number of this AccountProfile. # noqa: E501 + :type: str + """ + + self._phone_number = phone_number + + @property + def skype_id(self): + """Gets the skype_id of this AccountProfile. # noqa: E501 + + + :return: The skype_id of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._skype_id + + @skype_id.setter + def skype_id(self, skype_id): + """Sets the skype_id of this AccountProfile. + + + :param skype_id: The skype_id of this AccountProfile. # noqa: E501 + :type: str + """ + + self._skype_id = skype_id + + @property + def company_name(self): + """Gets the company_name of this AccountProfile. # noqa: E501 + + + :return: The company_name of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._company_name + + @company_name.setter + def company_name(self, company_name): + """Sets the company_name of this AccountProfile. + + + :param company_name: The company_name of this AccountProfile. # noqa: E501 + :type: str + """ + + self._company_name = company_name + + @property + def website(self): + """Gets the website of this AccountProfile. # noqa: E501 + + + :return: The website of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._website + + @website.setter + def website(self, website): + """Sets the website of this AccountProfile. + + + :param website: The website of this AccountProfile. # noqa: E501 + :type: str + """ + + self._website = website + + @property + def twitter_handle(self): + """Gets the twitter_handle of this AccountProfile. # noqa: E501 + + + :return: The twitter_handle of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._twitter_handle + + @twitter_handle.setter + def twitter_handle(self, twitter_handle): + """Sets the twitter_handle of this AccountProfile. + + + :param twitter_handle: The twitter_handle of this AccountProfile. # noqa: E501 + :type: str + """ + + self._twitter_handle = twitter_handle + + @property + def linkedin(self): + """Gets the linkedin of this AccountProfile. # noqa: E501 + + + :return: The linkedin of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._linkedin + + @linkedin.setter + def linkedin(self, linkedin): + """Sets the linkedin of this AccountProfile. + + + :param linkedin: The linkedin of this AccountProfile. # noqa: E501 + :type: str + """ + + self._linkedin = linkedin + + @property + def billing_name(self): + """Gets the billing_name of this AccountProfile. # noqa: E501 + + + :return: The billing_name of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._billing_name + + @billing_name.setter + def billing_name(self, billing_name): + """Sets the billing_name of this AccountProfile. + + + :param billing_name: The billing_name of this AccountProfile. # noqa: E501 + :type: str + """ + + self._billing_name = billing_name + + @property + def billing_company_name(self): + """Gets the billing_company_name of this AccountProfile. # noqa: E501 + + + :return: The billing_company_name of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._billing_company_name + + @billing_company_name.setter + def billing_company_name(self, billing_company_name): + """Sets the billing_company_name of this AccountProfile. + + + :param billing_company_name: The billing_company_name of this AccountProfile. # noqa: E501 + :type: str + """ + + self._billing_company_name = billing_company_name + + @property + def billing_address(self): + """Gets the billing_address of this AccountProfile. # noqa: E501 + + + :return: The billing_address of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._billing_address + + @billing_address.setter + def billing_address(self, billing_address): + """Sets the billing_address of this AccountProfile. + + + :param billing_address: The billing_address of this AccountProfile. # noqa: E501 + :type: str + """ + + self._billing_address = billing_address + + @property + def username(self): + """Gets the username of this AccountProfile. # noqa: E501 + + username # noqa: E501 + + :return: The username of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this AccountProfile. + + username # noqa: E501 + + :param username: The username of this AccountProfile. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def email(self): + """Gets the email of this AccountProfile. # noqa: E501 + + Account email address # noqa: E501 + + :return: The email of this AccountProfile. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this AccountProfile. + + Account email address # noqa: E501 + + :param email: The email of this AccountProfile. # noqa: E501 + :type: str + """ + + self._email = email + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(AccountProfile, 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, AccountProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/account_profile_response.py b/MimePost/models/account_profile_response.py new file mode 100644 index 0000000..342848c --- /dev/null +++ b/MimePost/models/account_profile_response.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AccountProfileResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'AccountProfile' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """AccountProfileResponse - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this AccountProfileResponse. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this AccountProfileResponse. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this AccountProfileResponse. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this AccountProfileResponse. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this AccountProfileResponse. # noqa: E501 + + + :return: The message of this AccountProfileResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this AccountProfileResponse. + + + :param message: The message of this AccountProfileResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this AccountProfileResponse. # noqa: E501 + + + :return: The data of this AccountProfileResponse. # noqa: E501 + :rtype: AccountProfile + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AccountProfileResponse. + + + :param data: The data of this AccountProfileResponse. # noqa: E501 + :type: AccountProfile + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(AccountProfileResponse, 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, AccountProfileResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/account_settings.py b/MimePost/models/account_settings.py new file mode 100644 index 0000000..279c980 --- /dev/null +++ b/MimePost/models/account_settings.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AccountSettings(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """AccountSettings - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this AccountSettings. # noqa: E501 + + Name of the config # noqa: E501 + + :return: The name of this AccountSettings. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AccountSettings. + + Name of the config # noqa: E501 + + :param name: The name of this AccountSettings. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this AccountSettings. # noqa: E501 + + + :return: The value of this AccountSettings. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this AccountSettings. + + + :param value: The value of this AccountSettings. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(AccountSettings, 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, AccountSettings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response.py b/MimePost/models/api_response.py new file mode 100644 index 0000000..f03157f --- /dev/null +++ b/MimePost/models/api_response.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'error_code': 'int' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'error_code': 'error_code' + } + + def __init__(self, success=None, message=None, error_code=None): # noqa: E501 + """ApiResponse - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._error_code = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if error_code is not None: + self.error_code = error_code + + @property + def success(self): + """Gets the success of this ApiResponse. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponse. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponse. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponse. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponse. # noqa: E501 + + + :return: The message of this ApiResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponse. + + + :param message: The message of this ApiResponse. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def error_code(self): + """Gets the error_code of this ApiResponse. # noqa: E501 + + + :return: The error_code of this ApiResponse. # noqa: E501 + :rtype: int + """ + return self._error_code + + @error_code.setter + def error_code(self, error_code): + """Sets the error_code of this ApiResponse. + + + :param error_code: The error_code of this ApiResponse. # noqa: E501 + :type: int + """ + + self._error_code = error_code + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponse, 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, ApiResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_all_webhooks.py b/MimePost/models/api_response_all_webhooks.py new file mode 100644 index 0000000..f8b0e3c --- /dev/null +++ b/MimePost/models/api_response_all_webhooks.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseAllWebhooks(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'list[ApiResponseAllWebhooksData]' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """ApiResponseAllWebhooks - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this ApiResponseAllWebhooks. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponseAllWebhooks. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponseAllWebhooks. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponseAllWebhooks. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponseAllWebhooks. # noqa: E501 + + + :return: The message of this ApiResponseAllWebhooks. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseAllWebhooks. + + + :param message: The message of this ApiResponseAllWebhooks. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseAllWebhooks. # noqa: E501 + + + :return: The data of this ApiResponseAllWebhooks. # noqa: E501 + :rtype: list[ApiResponseAllWebhooksData] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseAllWebhooks. + + + :param data: The data of this ApiResponseAllWebhooks. # noqa: E501 + :type: list[ApiResponseAllWebhooksData] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseAllWebhooks, 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, ApiResponseAllWebhooks): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_all_webhooks_data.py b/MimePost/models/api_response_all_webhooks_data.py new file mode 100644 index 0000000..72ed90e --- /dev/null +++ b/MimePost/models/api_response_all_webhooks_data.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseAllWebhooksData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'id': 'int', + 'entered': 'str', + 'url': 'str', + 'active': 'int', + 'desc': 'str', + 'events': 'list[str]' + } + + attribute_map = { + 'id': 'id', + 'entered': 'entered', + 'url': 'url', + 'active': 'active', + 'desc': 'desc', + 'events': 'events' + } + + def __init__(self, id=None, entered=None, url=None, active=None, desc=None, events=None): # noqa: E501 + """ApiResponseAllWebhooksData - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._entered = None + self._url = None + self._active = None + self._desc = None + self._events = None + self.discriminator = None + + if id is not None: + self.id = id + if entered is not None: + self.entered = entered + if url is not None: + self.url = url + if active is not None: + self.active = active + if desc is not None: + self.desc = desc + if events is not None: + self.events = events + + @property + def id(self): + """Gets the id of this ApiResponseAllWebhooksData. # noqa: E501 + + + :return: The id of this ApiResponseAllWebhooksData. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiResponseAllWebhooksData. + + + :param id: The id of this ApiResponseAllWebhooksData. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def entered(self): + """Gets the entered of this ApiResponseAllWebhooksData. # noqa: E501 + + + :return: The entered of this ApiResponseAllWebhooksData. # noqa: E501 + :rtype: str + """ + return self._entered + + @entered.setter + def entered(self, entered): + """Sets the entered of this ApiResponseAllWebhooksData. + + + :param entered: The entered of this ApiResponseAllWebhooksData. # noqa: E501 + :type: str + """ + + self._entered = entered + + @property + def url(self): + """Gets the url of this ApiResponseAllWebhooksData. # noqa: E501 + + + :return: The url of this ApiResponseAllWebhooksData. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ApiResponseAllWebhooksData. + + + :param url: The url of this ApiResponseAllWebhooksData. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def active(self): + """Gets the active of this ApiResponseAllWebhooksData. # noqa: E501 + + + :return: The active of this ApiResponseAllWebhooksData. # noqa: E501 + :rtype: int + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this ApiResponseAllWebhooksData. + + + :param active: The active of this ApiResponseAllWebhooksData. # noqa: E501 + :type: int + """ + + self._active = active + + @property + def desc(self): + """Gets the desc of this ApiResponseAllWebhooksData. # noqa: E501 + + + :return: The desc of this ApiResponseAllWebhooksData. # noqa: E501 + :rtype: str + """ + return self._desc + + @desc.setter + def desc(self, desc): + """Sets the desc of this ApiResponseAllWebhooksData. + + + :param desc: The desc of this ApiResponseAllWebhooksData. # noqa: E501 + :type: str + """ + + self._desc = desc + + @property + def events(self): + """Gets the events of this ApiResponseAllWebhooksData. # noqa: E501 + + + :return: The events of this ApiResponseAllWebhooksData. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this ApiResponseAllWebhooksData. + + + :param events: The events of this ApiResponseAllWebhooksData. # noqa: E501 + :type: list[str] + """ + + self._events = events + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseAllWebhooksData, 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, ApiResponseAllWebhooksData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_domains_list.py b/MimePost/models/api_response_domains_list.py new file mode 100644 index 0000000..a901b46 --- /dev/null +++ b/MimePost/models/api_response_domains_list.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseDomainsList(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'list[ApiResponseDomainsListData]' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """ApiResponseDomainsList - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this ApiResponseDomainsList. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponseDomainsList. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponseDomainsList. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponseDomainsList. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponseDomainsList. # noqa: E501 + + + :return: The message of this ApiResponseDomainsList. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseDomainsList. + + + :param message: The message of this ApiResponseDomainsList. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseDomainsList. # noqa: E501 + + + :return: The data of this ApiResponseDomainsList. # noqa: E501 + :rtype: list[ApiResponseDomainsListData] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseDomainsList. + + + :param data: The data of this ApiResponseDomainsList. # noqa: E501 + :type: list[ApiResponseDomainsListData] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseDomainsList, 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, ApiResponseDomainsList): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_domains_list_data.py b/MimePost/models/api_response_domains_list_data.py new file mode 100644 index 0000000..8f80922 --- /dev/null +++ b/MimePost/models/api_response_domains_list_data.py @@ -0,0 +1,433 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseDomainsListData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'id': 'int', + 'domain': 'str', + 'selector': 'str', + 'instance_name': 'str', + 'spf_verified': 'int', + 'dkim_verified': 'int', + 'tracking_verified': 'int', + 'verified': 'int', + 'approved': 'int', + 'status': 'str', + 'status_desc': 'str', + 'entered': 'str', + 'active': 'int' + } + + attribute_map = { + 'id': 'id', + 'domain': 'domain', + 'selector': 'selector', + 'instance_name': 'instance_name', + 'spf_verified': 'spf_verified', + 'dkim_verified': 'dkim_verified', + 'tracking_verified': 'tracking_verified', + 'verified': 'verified', + 'approved': 'approved', + 'status': 'status', + 'status_desc': 'status_desc', + 'entered': 'entered', + 'active': 'active' + } + + def __init__(self, id=None, domain=None, selector=None, instance_name=None, spf_verified=None, dkim_verified=None, tracking_verified=None, verified=None, approved=None, status=None, status_desc=None, entered=None, active=None): # noqa: E501 + """ApiResponseDomainsListData - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._domain = None + self._selector = None + self._instance_name = None + self._spf_verified = None + self._dkim_verified = None + self._tracking_verified = None + self._verified = None + self._approved = None + self._status = None + self._status_desc = None + self._entered = None + self._active = None + self.discriminator = None + + if id is not None: + self.id = id + if domain is not None: + self.domain = domain + if selector is not None: + self.selector = selector + if instance_name is not None: + self.instance_name = instance_name + if spf_verified is not None: + self.spf_verified = spf_verified + if dkim_verified is not None: + self.dkim_verified = dkim_verified + if tracking_verified is not None: + self.tracking_verified = tracking_verified + if verified is not None: + self.verified = verified + if approved is not None: + self.approved = approved + if status is not None: + self.status = status + if status_desc is not None: + self.status_desc = status_desc + if entered is not None: + self.entered = entered + if active is not None: + self.active = active + + @property + def id(self): + """Gets the id of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The id of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiResponseDomainsListData. + + + :param id: The id of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def domain(self): + """Gets the domain of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The domain of this ApiResponseDomainsListData. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this ApiResponseDomainsListData. + + + :param domain: The domain of this ApiResponseDomainsListData. # noqa: E501 + :type: str + """ + + self._domain = domain + + @property + def selector(self): + """Gets the selector of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The selector of this ApiResponseDomainsListData. # noqa: E501 + :rtype: str + """ + return self._selector + + @selector.setter + def selector(self, selector): + """Sets the selector of this ApiResponseDomainsListData. + + + :param selector: The selector of this ApiResponseDomainsListData. # noqa: E501 + :type: str + """ + + self._selector = selector + + @property + def instance_name(self): + """Gets the instance_name of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The instance_name of this ApiResponseDomainsListData. # noqa: E501 + :rtype: str + """ + return self._instance_name + + @instance_name.setter + def instance_name(self, instance_name): + """Sets the instance_name of this ApiResponseDomainsListData. + + + :param instance_name: The instance_name of this ApiResponseDomainsListData. # noqa: E501 + :type: str + """ + + self._instance_name = instance_name + + @property + def spf_verified(self): + """Gets the spf_verified of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The spf_verified of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._spf_verified + + @spf_verified.setter + def spf_verified(self, spf_verified): + """Sets the spf_verified of this ApiResponseDomainsListData. + + + :param spf_verified: The spf_verified of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._spf_verified = spf_verified + + @property + def dkim_verified(self): + """Gets the dkim_verified of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The dkim_verified of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._dkim_verified + + @dkim_verified.setter + def dkim_verified(self, dkim_verified): + """Sets the dkim_verified of this ApiResponseDomainsListData. + + + :param dkim_verified: The dkim_verified of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._dkim_verified = dkim_verified + + @property + def tracking_verified(self): + """Gets the tracking_verified of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The tracking_verified of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._tracking_verified + + @tracking_verified.setter + def tracking_verified(self, tracking_verified): + """Sets the tracking_verified of this ApiResponseDomainsListData. + + + :param tracking_verified: The tracking_verified of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._tracking_verified = tracking_verified + + @property + def verified(self): + """Gets the verified of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The verified of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._verified + + @verified.setter + def verified(self, verified): + """Sets the verified of this ApiResponseDomainsListData. + + + :param verified: The verified of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._verified = verified + + @property + def approved(self): + """Gets the approved of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The approved of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._approved + + @approved.setter + def approved(self, approved): + """Sets the approved of this ApiResponseDomainsListData. + + + :param approved: The approved of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._approved = approved + + @property + def status(self): + """Gets the status of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The status of this ApiResponseDomainsListData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiResponseDomainsListData. + + + :param status: The status of this ApiResponseDomainsListData. # noqa: E501 + :type: str + """ + allowed_values = ["WAITING_APPROVA", "NOT_VERIFIED", "APPROVED"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def status_desc(self): + """Gets the status_desc of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The status_desc of this ApiResponseDomainsListData. # noqa: E501 + :rtype: str + """ + return self._status_desc + + @status_desc.setter + def status_desc(self, status_desc): + """Sets the status_desc of this ApiResponseDomainsListData. + + + :param status_desc: The status_desc of this ApiResponseDomainsListData. # noqa: E501 + :type: str + """ + + self._status_desc = status_desc + + @property + def entered(self): + """Gets the entered of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The entered of this ApiResponseDomainsListData. # noqa: E501 + :rtype: str + """ + return self._entered + + @entered.setter + def entered(self, entered): + """Sets the entered of this ApiResponseDomainsListData. + + + :param entered: The entered of this ApiResponseDomainsListData. # noqa: E501 + :type: str + """ + + self._entered = entered + + @property + def active(self): + """Gets the active of this ApiResponseDomainsListData. # noqa: E501 + + + :return: The active of this ApiResponseDomainsListData. # noqa: E501 + :rtype: int + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this ApiResponseDomainsListData. + + + :param active: The active of this ApiResponseDomainsListData. # noqa: E501 + :type: int + """ + + self._active = active + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseDomainsListData, 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, ApiResponseDomainsListData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_emaillogs.py b/MimePost/models/api_response_emaillogs.py new file mode 100644 index 0000000..f5b24f4 --- /dev/null +++ b/MimePost/models/api_response_emaillogs.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseEmaillogs(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'list[ApiResponseEmaillogsData]' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """ApiResponseEmaillogs - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this ApiResponseEmaillogs. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponseEmaillogs. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponseEmaillogs. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponseEmaillogs. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponseEmaillogs. # noqa: E501 + + + :return: The message of this ApiResponseEmaillogs. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseEmaillogs. + + + :param message: The message of this ApiResponseEmaillogs. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseEmaillogs. # noqa: E501 + + + :return: The data of this ApiResponseEmaillogs. # noqa: E501 + :rtype: list[ApiResponseEmaillogsData] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseEmaillogs. + + + :param data: The data of this ApiResponseEmaillogs. # noqa: E501 + :type: list[ApiResponseEmaillogsData] + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseEmaillogs, 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, ApiResponseEmaillogs): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_emaillogs_data.py b/MimePost/models/api_response_emaillogs_data.py new file mode 100644 index 0000000..13c203f --- /dev/null +++ b/MimePost/models/api_response_emaillogs_data.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseEmaillogsData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + '_datetime': 'str', + 'message_id': 'str', + 'to_email': 'str', + 'status': 'str', + 'details': 'str' + } + + attribute_map = { + '_datetime': 'datetime', + 'message_id': 'message_id', + 'to_email': 'to_email', + 'status': 'status', + 'details': 'details' + } + + def __init__(self, _datetime=None, message_id=None, to_email=None, status=None, details=None): # noqa: E501 + """ApiResponseEmaillogsData - a model defined in Swagger""" # noqa: E501 + + self.__datetime = None + self._message_id = None + self._to_email = None + self._status = None + self._details = None + self.discriminator = None + + if _datetime is not None: + self._datetime = _datetime + if message_id is not None: + self.message_id = message_id + if to_email is not None: + self.to_email = to_email + if status is not None: + self.status = status + if details is not None: + self.details = details + + @property + def _datetime(self): + """Gets the _datetime of this ApiResponseEmaillogsData. # noqa: E501 + + + :return: The _datetime of this ApiResponseEmaillogsData. # noqa: E501 + :rtype: str + """ + return self.__datetime + + @_datetime.setter + def _datetime(self, _datetime): + """Sets the _datetime of this ApiResponseEmaillogsData. + + + :param _datetime: The _datetime of this ApiResponseEmaillogsData. # noqa: E501 + :type: str + """ + + self.__datetime = _datetime + + @property + def message_id(self): + """Gets the message_id of this ApiResponseEmaillogsData. # noqa: E501 + + + :return: The message_id of this ApiResponseEmaillogsData. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this ApiResponseEmaillogsData. + + + :param message_id: The message_id of this ApiResponseEmaillogsData. # noqa: E501 + :type: str + """ + + self._message_id = message_id + + @property + def to_email(self): + """Gets the to_email of this ApiResponseEmaillogsData. # noqa: E501 + + + :return: The to_email of this ApiResponseEmaillogsData. # noqa: E501 + :rtype: str + """ + return self._to_email + + @to_email.setter + def to_email(self, to_email): + """Sets the to_email of this ApiResponseEmaillogsData. + + + :param to_email: The to_email of this ApiResponseEmaillogsData. # noqa: E501 + :type: str + """ + + self._to_email = to_email + + @property + def status(self): + """Gets the status of this ApiResponseEmaillogsData. # noqa: E501 + + + :return: The status of this ApiResponseEmaillogsData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiResponseEmaillogsData. + + + :param status: The status of this ApiResponseEmaillogsData. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def details(self): + """Gets the details of this ApiResponseEmaillogsData. # noqa: E501 + + + :return: The details of this ApiResponseEmaillogsData. # noqa: E501 + :rtype: str + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this ApiResponseEmaillogsData. + + + :param details: The details of this ApiResponseEmaillogsData. # noqa: E501 + :type: str + """ + + self._details = details + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseEmaillogsData, 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, ApiResponseEmaillogsData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_single_webhooks.py b/MimePost/models/api_response_single_webhooks.py new file mode 100644 index 0000000..a373cdd --- /dev/null +++ b/MimePost/models/api_response_single_webhooks.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseSingleWebhooks(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'ApiResponseAllWebhooksData' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """ApiResponseSingleWebhooks - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this ApiResponseSingleWebhooks. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponseSingleWebhooks. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponseSingleWebhooks. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponseSingleWebhooks. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponseSingleWebhooks. # noqa: E501 + + + :return: The message of this ApiResponseSingleWebhooks. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseSingleWebhooks. + + + :param message: The message of this ApiResponseSingleWebhooks. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseSingleWebhooks. # noqa: E501 + + + :return: The data of this ApiResponseSingleWebhooks. # noqa: E501 + :rtype: ApiResponseAllWebhooksData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseSingleWebhooks. + + + :param data: The data of this ApiResponseSingleWebhooks. # noqa: E501 + :type: ApiResponseAllWebhooksData + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseSingleWebhooks, 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, ApiResponseSingleWebhooks): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_stats.py b/MimePost/models/api_response_stats.py new file mode 100644 index 0000000..651cde2 --- /dev/null +++ b/MimePost/models/api_response_stats.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseStats(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'ApiResponseStatsData' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """ApiResponseStats - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this ApiResponseStats. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponseStats. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponseStats. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponseStats. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponseStats. # noqa: E501 + + + :return: The message of this ApiResponseStats. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseStats. + + + :param message: The message of this ApiResponseStats. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseStats. # noqa: E501 + + + :return: The data of this ApiResponseStats. # noqa: E501 + :rtype: ApiResponseStatsData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseStats. + + + :param data: The data of this ApiResponseStats. # noqa: E501 + :type: ApiResponseStatsData + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseStats, 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, ApiResponseStats): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_stats_data.py b/MimePost/models/api_response_stats_data.py new file mode 100644 index 0000000..6808041 --- /dev/null +++ b/MimePost/models/api_response_stats_data.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseStatsData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'total_summary': 'ApiResponseStatsDataTotalSummary', + 'datewise_summary': 'ApiResponseStatsDataDatewiseSummary', + 'graph_summary': 'ApiResponseStatsDataGraphSummary' + } + + attribute_map = { + 'total_summary': 'total_summary', + 'datewise_summary': 'datewise_summary', + 'graph_summary': 'graph_summary' + } + + def __init__(self, total_summary=None, datewise_summary=None, graph_summary=None): # noqa: E501 + """ApiResponseStatsData - a model defined in Swagger""" # noqa: E501 + + self._total_summary = None + self._datewise_summary = None + self._graph_summary = None + self.discriminator = None + + if total_summary is not None: + self.total_summary = total_summary + if datewise_summary is not None: + self.datewise_summary = datewise_summary + if graph_summary is not None: + self.graph_summary = graph_summary + + @property + def total_summary(self): + """Gets the total_summary of this ApiResponseStatsData. # noqa: E501 + + + :return: The total_summary of this ApiResponseStatsData. # noqa: E501 + :rtype: ApiResponseStatsDataTotalSummary + """ + return self._total_summary + + @total_summary.setter + def total_summary(self, total_summary): + """Sets the total_summary of this ApiResponseStatsData. + + + :param total_summary: The total_summary of this ApiResponseStatsData. # noqa: E501 + :type: ApiResponseStatsDataTotalSummary + """ + + self._total_summary = total_summary + + @property + def datewise_summary(self): + """Gets the datewise_summary of this ApiResponseStatsData. # noqa: E501 + + + :return: The datewise_summary of this ApiResponseStatsData. # noqa: E501 + :rtype: ApiResponseStatsDataDatewiseSummary + """ + return self._datewise_summary + + @datewise_summary.setter + def datewise_summary(self, datewise_summary): + """Sets the datewise_summary of this ApiResponseStatsData. + + + :param datewise_summary: The datewise_summary of this ApiResponseStatsData. # noqa: E501 + :type: ApiResponseStatsDataDatewiseSummary + """ + + self._datewise_summary = datewise_summary + + @property + def graph_summary(self): + """Gets the graph_summary of this ApiResponseStatsData. # noqa: E501 + + + :return: The graph_summary of this ApiResponseStatsData. # noqa: E501 + :rtype: ApiResponseStatsDataGraphSummary + """ + return self._graph_summary + + @graph_summary.setter + def graph_summary(self, graph_summary): + """Sets the graph_summary of this ApiResponseStatsData. + + + :param graph_summary: The graph_summary of this ApiResponseStatsData. # noqa: E501 + :type: ApiResponseStatsDataGraphSummary + """ + + self._graph_summary = graph_summary + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseStatsData, 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, ApiResponseStatsData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_stats_data_datewise_summary.py b/MimePost/models/api_response_stats_data_datewise_summary.py new file mode 100644 index 0000000..937040b --- /dev/null +++ b/MimePost/models/api_response_stats_data_datewise_summary.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseStatsDataDatewiseSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + '_date': 'ApiResponseStatsDataTotalSummary' + } + + attribute_map = { + '_date': 'date' + } + + def __init__(self, _date=None): # noqa: E501 + """ApiResponseStatsDataDatewiseSummary - a model defined in Swagger""" # noqa: E501 + + self.__date = None + self.discriminator = None + + if _date is not None: + self._date = _date + + @property + def _date(self): + """Gets the _date of this ApiResponseStatsDataDatewiseSummary. # noqa: E501 + + + :return: The _date of this ApiResponseStatsDataDatewiseSummary. # noqa: E501 + :rtype: ApiResponseStatsDataTotalSummary + """ + return self.__date + + @_date.setter + def _date(self, _date): + """Sets the _date of this ApiResponseStatsDataDatewiseSummary. + + + :param _date: The _date of this ApiResponseStatsDataDatewiseSummary. # noqa: E501 + :type: ApiResponseStatsDataTotalSummary + """ + + self.__date = _date + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseStatsDataDatewiseSummary, 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, ApiResponseStatsDataDatewiseSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_stats_data_graph_summary.py b/MimePost/models/api_response_stats_data_graph_summary.py new file mode 100644 index 0000000..74e2ff7 --- /dev/null +++ b/MimePost/models/api_response_stats_data_graph_summary.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseStatsDataGraphSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'dates': 'list[str]', + 'status_counts': 'list[int]' + } + + attribute_map = { + 'dates': 'dates', + 'status_counts': 'status_counts' + } + + def __init__(self, dates=None, status_counts=None): # noqa: E501 + """ApiResponseStatsDataGraphSummary - a model defined in Swagger""" # noqa: E501 + + self._dates = None + self._status_counts = None + self.discriminator = None + + if dates is not None: + self.dates = dates + if status_counts is not None: + self.status_counts = status_counts + + @property + def dates(self): + """Gets the dates of this ApiResponseStatsDataGraphSummary. # noqa: E501 + + + :return: The dates of this ApiResponseStatsDataGraphSummary. # noqa: E501 + :rtype: list[str] + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this ApiResponseStatsDataGraphSummary. + + + :param dates: The dates of this ApiResponseStatsDataGraphSummary. # noqa: E501 + :type: list[str] + """ + + self._dates = dates + + @property + def status_counts(self): + """Gets the status_counts of this ApiResponseStatsDataGraphSummary. # noqa: E501 + + + :return: The status_counts of this ApiResponseStatsDataGraphSummary. # noqa: E501 + :rtype: list[int] + """ + return self._status_counts + + @status_counts.setter + def status_counts(self, status_counts): + """Sets the status_counts of this ApiResponseStatsDataGraphSummary. + + + :param status_counts: The status_counts of this ApiResponseStatsDataGraphSummary. # noqa: E501 + :type: list[int] + """ + + self._status_counts = status_counts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseStatsDataGraphSummary, 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, ApiResponseStatsDataGraphSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_stats_data_total_summary.py b/MimePost/models/api_response_stats_data_total_summary.py new file mode 100644 index 0000000..7eed976 --- /dev/null +++ b/MimePost/models/api_response_stats_data_total_summary.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseStatsDataTotalSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'status': 'ApiResponseStatsDataTotalSummaryStatus' + } + + attribute_map = { + 'status': 'status' + } + + def __init__(self, status=None): # noqa: E501 + """ApiResponseStatsDataTotalSummary - a model defined in Swagger""" # noqa: E501 + + self._status = None + self.discriminator = None + + if status is not None: + self.status = status + + @property + def status(self): + """Gets the status of this ApiResponseStatsDataTotalSummary. # noqa: E501 + + + :return: The status of this ApiResponseStatsDataTotalSummary. # noqa: E501 + :rtype: ApiResponseStatsDataTotalSummaryStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiResponseStatsDataTotalSummary. + + + :param status: The status of this ApiResponseStatsDataTotalSummary. # noqa: E501 + :type: ApiResponseStatsDataTotalSummaryStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseStatsDataTotalSummary, 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, ApiResponseStatsDataTotalSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_stats_data_total_summary_status.py b/MimePost/models/api_response_stats_data_total_summary_status.py new file mode 100644 index 0000000..7e0dc7d --- /dev/null +++ b/MimePost/models/api_response_stats_data_total_summary_status.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseStatsDataTotalSummaryStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'count': 'int', + 'perc': 'str' + } + + attribute_map = { + 'count': 'count', + 'perc': 'perc' + } + + def __init__(self, count=None, perc=None): # noqa: E501 + """ApiResponseStatsDataTotalSummaryStatus - a model defined in Swagger""" # noqa: E501 + + self._count = None + self._perc = None + self.discriminator = None + + if count is not None: + self.count = count + if perc is not None: + self.perc = perc + + @property + def count(self): + """Gets the count of this ApiResponseStatsDataTotalSummaryStatus. # noqa: E501 + + + :return: The count of this ApiResponseStatsDataTotalSummaryStatus. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this ApiResponseStatsDataTotalSummaryStatus. + + + :param count: The count of this ApiResponseStatsDataTotalSummaryStatus. # noqa: E501 + :type: int + """ + + self._count = count + + @property + def perc(self): + """Gets the perc of this ApiResponseStatsDataTotalSummaryStatus. # noqa: E501 + + + :return: The perc of this ApiResponseStatsDataTotalSummaryStatus. # noqa: E501 + :rtype: str + """ + return self._perc + + @perc.setter + def perc(self, perc): + """Sets the perc of this ApiResponseStatsDataTotalSummaryStatus. + + + :param perc: The perc of this ApiResponseStatsDataTotalSummaryStatus. # noqa: E501 + :type: str + """ + + self._perc = perc + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseStatsDataTotalSummaryStatus, 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, ApiResponseStatsDataTotalSummaryStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_webhooks.py b/MimePost/models/api_response_webhooks.py new file mode 100644 index 0000000..f5432f7 --- /dev/null +++ b/MimePost/models/api_response_webhooks.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseWebhooks(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'success': 'int', + 'message': 'str', + 'data': 'ApiResponseWebhooksData' + } + + attribute_map = { + 'success': 'success', + 'message': 'message', + 'data': 'data' + } + + def __init__(self, success=None, message=None, data=None): # noqa: E501 + """ApiResponseWebhooks - a model defined in Swagger""" # noqa: E501 + + self._success = None + self._message = None + self._data = None + self.discriminator = None + + if success is not None: + self.success = success + if message is not None: + self.message = message + if data is not None: + self.data = data + + @property + def success(self): + """Gets the success of this ApiResponseWebhooks. # noqa: E501 + + Success status, 0 for failed 1 for success # noqa: E501 + + :return: The success of this ApiResponseWebhooks. # noqa: E501 + :rtype: int + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this ApiResponseWebhooks. + + Success status, 0 for failed 1 for success # noqa: E501 + + :param success: The success of this ApiResponseWebhooks. # noqa: E501 + :type: int + """ + + self._success = success + + @property + def message(self): + """Gets the message of this ApiResponseWebhooks. # noqa: E501 + + + :return: The message of this ApiResponseWebhooks. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiResponseWebhooks. + + + :param message: The message of this ApiResponseWebhooks. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def data(self): + """Gets the data of this ApiResponseWebhooks. # noqa: E501 + + + :return: The data of this ApiResponseWebhooks. # noqa: E501 + :rtype: ApiResponseWebhooksData + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ApiResponseWebhooks. + + + :param data: The data of this ApiResponseWebhooks. # noqa: E501 + :type: ApiResponseWebhooksData + """ + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseWebhooks, 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, ApiResponseWebhooks): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/api_response_webhooks_data.py b/MimePost/models/api_response_webhooks_data.py new file mode 100644 index 0000000..8727075 --- /dev/null +++ b/MimePost/models/api_response_webhooks_data.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ApiResponseWebhooksData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'id': 'int' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None): # noqa: E501 + """ApiResponseWebhooksData - a model defined in Swagger""" # noqa: E501 + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this ApiResponseWebhooksData. # noqa: E501 + + + :return: The id of this ApiResponseWebhooksData. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiResponseWebhooksData. + + + :param id: The id of this ApiResponseWebhooksData. # noqa: E501 + :type: int + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(ApiResponseWebhooksData, 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, ApiResponseWebhooksData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/domain.py b/MimePost/models/domain.py new file mode 100644 index 0000000..1a2169d --- /dev/null +++ b/MimePost/models/domain.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Domain(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'domain': 'str' + } + + attribute_map = { + 'domain': 'domain' + } + + def __init__(self, domain=None): # noqa: E501 + """Domain - a model defined in Swagger""" # noqa: E501 + + self._domain = None + self.discriminator = None + + self.domain = domain + + @property + def domain(self): + """Gets the domain of this Domain. # noqa: E501 + + + :return: The domain of this Domain. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this Domain. + + + :param domain: The domain of this Domain. # noqa: E501 + :type: str + """ + if domain is None: + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(Domain, 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, Domain): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/email.py b/MimePost/models/email.py new file mode 100644 index 0000000..3e163a6 --- /dev/null +++ b/MimePost/models/email.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Email(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'html': 'str', + 'subject': 'str', + 'from_email': 'str', + 'from_name': 'str', + 'global_merge_vars': 'list[EmailGlobalMergeVars]', + 'to': 'list[EmailTo]', + 'cc': 'list[str]', + 'bcc': 'list[str]', + 'attachments': 'list[EmailAttachments]', + 'vars': 'dict(str, str)' + } + + attribute_map = { + 'html': 'html', + 'subject': 'subject', + 'from_email': 'from_email', + 'from_name': 'from_name', + 'global_merge_vars': 'global_merge_vars', + 'to': 'to', + 'cc': 'cc', + 'bcc': 'bcc', + 'attachments': 'attachments', + 'vars': 'vars' + } + + def __init__(self, html=None, subject=None, from_email=None, from_name=None, global_merge_vars=None, to=None, cc=None, bcc=None, attachments=None, vars=None): # noqa: E501 + """Email - a model defined in Swagger""" # noqa: E501 + + self._html = None + self._subject = None + self._from_email = None + self._from_name = None + self._global_merge_vars = None + self._to = None + self._cc = None + self._bcc = None + self._attachments = None + self._vars = None + self.discriminator = None + + self.html = html + self.subject = subject + self.from_email = from_email + if from_name is not None: + self.from_name = from_name + if global_merge_vars is not None: + self.global_merge_vars = global_merge_vars + self.to = to + if cc is not None: + self.cc = cc + if bcc is not None: + self.bcc = bcc + if attachments is not None: + self.attachments = attachments + if vars is not None: + self.vars = vars + + @property + def html(self): + """Gets the html of this Email. # noqa: E501 + + + :return: The html of this Email. # noqa: E501 + :rtype: str + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this Email. + + + :param html: The html of this Email. # noqa: E501 + :type: str + """ + if html is None: + raise ValueError("Invalid value for `html`, must not be `None`") # noqa: E501 + + self._html = html + + @property + def subject(self): + """Gets the subject of this Email. # noqa: E501 + + + :return: The subject of this Email. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this Email. + + + :param subject: The subject of this Email. # noqa: E501 + :type: str + """ + if subject is None: + raise ValueError("Invalid value for `subject`, must not be `None`") # noqa: E501 + + self._subject = subject + + @property + def from_email(self): + """Gets the from_email of this Email. # noqa: E501 + + + :return: The from_email of this Email. # noqa: E501 + :rtype: str + """ + return self._from_email + + @from_email.setter + def from_email(self, from_email): + """Sets the from_email of this Email. + + + :param from_email: The from_email of this Email. # noqa: E501 + :type: str + """ + if from_email is None: + raise ValueError("Invalid value for `from_email`, must not be `None`") # noqa: E501 + + self._from_email = from_email + + @property + def from_name(self): + """Gets the from_name of this Email. # noqa: E501 + + + :return: The from_name of this Email. # noqa: E501 + :rtype: str + """ + return self._from_name + + @from_name.setter + def from_name(self, from_name): + """Sets the from_name of this Email. + + + :param from_name: The from_name of this Email. # noqa: E501 + :type: str + """ + + self._from_name = from_name + + @property + def global_merge_vars(self): + """Gets the global_merge_vars of this Email. # noqa: E501 + + + :return: The global_merge_vars of this Email. # noqa: E501 + :rtype: list[EmailGlobalMergeVars] + """ + return self._global_merge_vars + + @global_merge_vars.setter + def global_merge_vars(self, global_merge_vars): + """Sets the global_merge_vars of this Email. + + + :param global_merge_vars: The global_merge_vars of this Email. # noqa: E501 + :type: list[EmailGlobalMergeVars] + """ + + self._global_merge_vars = global_merge_vars + + @property + def to(self): + """Gets the to of this Email. # noqa: E501 + + + :return: The to of this Email. # noqa: E501 + :rtype: list[EmailTo] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this Email. + + + :param to: The to of this Email. # noqa: E501 + :type: list[EmailTo] + """ + if to is None: + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def cc(self): + """Gets the cc of this Email. # noqa: E501 + + + :return: The cc of this Email. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this Email. + + + :param cc: The cc of this Email. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this Email. # noqa: E501 + + + :return: The bcc of this Email. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this Email. + + + :param bcc: The bcc of this Email. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def attachments(self): + """Gets the attachments of this Email. # noqa: E501 + + + :return: The attachments of this Email. # noqa: E501 + :rtype: list[EmailAttachments] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this Email. + + + :param attachments: The attachments of this Email. # noqa: E501 + :type: list[EmailAttachments] + """ + + self._attachments = attachments + + @property + def vars(self): + """Gets the vars of this Email. # noqa: E501 + + + :return: The vars of this Email. # noqa: E501 + :rtype: dict(str, str) + """ + return self._vars + + @vars.setter + def vars(self, vars): + """Sets the vars of this Email. + + + :param vars: The vars of this Email. # noqa: E501 + :type: dict(str, str) + """ + + self._vars = vars + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(Email, 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, Email): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/email_attachments.py b/MimePost/models/email_attachments.py new file mode 100644 index 0000000..61be577 --- /dev/null +++ b/MimePost/models/email_attachments.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EmailAttachments(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'name': 'str', + 'type': 'str', + 'content': 'str' + } + + attribute_map = { + 'name': 'name', + 'type': 'type', + 'content': 'content' + } + + def __init__(self, name=None, type=None, content=None): # noqa: E501 + """EmailAttachments - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._type = None + self._content = None + self.discriminator = None + + if name is not None: + self.name = name + if type is not None: + self.type = type + if content is not None: + self.content = content + + @property + def name(self): + """Gets the name of this EmailAttachments. # noqa: E501 + + + :return: The name of this EmailAttachments. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EmailAttachments. + + + :param name: The name of this EmailAttachments. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def type(self): + """Gets the type of this EmailAttachments. # noqa: E501 + + + :return: The type of this EmailAttachments. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EmailAttachments. + + + :param type: The type of this EmailAttachments. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def content(self): + """Gets the content of this EmailAttachments. # noqa: E501 + + + :return: The content of this EmailAttachments. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EmailAttachments. + + + :param content: The content of this EmailAttachments. # noqa: E501 + :type: str + """ + + self._content = content + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(EmailAttachments, 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, EmailAttachments): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/email_global_merge_vars.py b/MimePost/models/email_global_merge_vars.py new file mode 100644 index 0000000..301b0fd --- /dev/null +++ b/MimePost/models/email_global_merge_vars.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EmailGlobalMergeVars(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """EmailGlobalMergeVars - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this EmailGlobalMergeVars. # noqa: E501 + + + :return: The name of this EmailGlobalMergeVars. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EmailGlobalMergeVars. + + + :param name: The name of this EmailGlobalMergeVars. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this EmailGlobalMergeVars. # noqa: E501 + + + :return: The value of this EmailGlobalMergeVars. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this EmailGlobalMergeVars. + + + :param value: The value of this EmailGlobalMergeVars. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(EmailGlobalMergeVars, 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, EmailGlobalMergeVars): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/email_merge_vars.py b/MimePost/models/email_merge_vars.py new file mode 100644 index 0000000..fafb8be --- /dev/null +++ b/MimePost/models/email_merge_vars.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EmailMergeVars(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """EmailMergeVars - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this EmailMergeVars. # noqa: E501 + + + :return: The name of this EmailMergeVars. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EmailMergeVars. + + + :param name: The name of this EmailMergeVars. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this EmailMergeVars. # noqa: E501 + + + :return: The value of this EmailMergeVars. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this EmailMergeVars. + + + :param value: The value of this EmailMergeVars. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(EmailMergeVars, 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, EmailMergeVars): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/email_to.py b/MimePost/models/email_to.py new file mode 100644 index 0000000..8603a34 --- /dev/null +++ b/MimePost/models/email_to.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EmailTo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'email': 'str', + 'merge_vars': 'list[EmailMergeVars]' + } + + attribute_map = { + 'email': 'email', + 'merge_vars': 'merge_vars' + } + + def __init__(self, email=None, merge_vars=None): # noqa: E501 + """EmailTo - a model defined in Swagger""" # noqa: E501 + + self._email = None + self._merge_vars = None + self.discriminator = None + + if email is not None: + self.email = email + if merge_vars is not None: + self.merge_vars = merge_vars + + @property + def email(self): + """Gets the email of this EmailTo. # noqa: E501 + + + :return: The email of this EmailTo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this EmailTo. + + + :param email: The email of this EmailTo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def merge_vars(self): + """Gets the merge_vars of this EmailTo. # noqa: E501 + + + :return: The merge_vars of this EmailTo. # noqa: E501 + :rtype: list[EmailMergeVars] + """ + return self._merge_vars + + @merge_vars.setter + def merge_vars(self, merge_vars): + """Sets the merge_vars of this EmailTo. + + + :param merge_vars: The merge_vars of this EmailTo. # noqa: E501 + :type: list[EmailMergeVars] + """ + + self._merge_vars = merge_vars + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(EmailTo, 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, EmailTo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/webhook.py b/MimePost/models/webhook.py new file mode 100644 index 0000000..16e1acc --- /dev/null +++ b/MimePost/models/webhook.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Webhook(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'desc': 'str', + 'url': 'str', + 'events': 'list[str]', + 'active': 'int' + } + + attribute_map = { + 'desc': 'desc', + 'url': 'url', + 'events': 'events', + 'active': 'active' + } + + def __init__(self, desc=None, url=None, events=None, active=None): # noqa: E501 + """Webhook - a model defined in Swagger""" # noqa: E501 + + self._desc = None + self._url = None + self._events = None + self._active = None + self.discriminator = None + + self.desc = desc + self.url = url + if events is not None: + self.events = events + if active is not None: + self.active = active + + @property + def desc(self): + """Gets the desc of this Webhook. # noqa: E501 + + + :return: The desc of this Webhook. # noqa: E501 + :rtype: str + """ + return self._desc + + @desc.setter + def desc(self, desc): + """Sets the desc of this Webhook. + + + :param desc: The desc of this Webhook. # noqa: E501 + :type: str + """ + if desc is None: + raise ValueError("Invalid value for `desc`, must not be `None`") # noqa: E501 + + self._desc = desc + + @property + def url(self): + """Gets the url of this Webhook. # noqa: E501 + + + :return: The url of this Webhook. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Webhook. + + + :param url: The url of this Webhook. # noqa: E501 + :type: str + """ + if url is None: + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def events(self): + """Gets the events of this Webhook. # noqa: E501 + + + :return: The events of this Webhook. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this Webhook. + + + :param events: The events of this Webhook. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def active(self): + """Gets the active of this Webhook. # noqa: E501 + + + :return: The active of this Webhook. # noqa: E501 + :rtype: int + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this Webhook. + + + :param active: The active of this Webhook. # noqa: E501 + :type: int + """ + + self._active = active + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(Webhook, 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, Webhook): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/models/webhook1.py b/MimePost/models/webhook1.py new file mode 100644 index 0000000..1245359 --- /dev/null +++ b/MimePost/models/webhook1.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Webhook1(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_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. + """ + swagger_types = { + 'desc': 'str', + 'url': 'str', + 'events': 'list[str]', + 'active': 'int' + } + + attribute_map = { + 'desc': 'desc', + 'url': 'url', + 'events': 'events', + 'active': 'active' + } + + def __init__(self, desc=None, url=None, events=None, active=None): # noqa: E501 + """Webhook1 - a model defined in Swagger""" # noqa: E501 + + self._desc = None + self._url = None + self._events = None + self._active = None + self.discriminator = None + + self.desc = desc + self.url = url + if events is not None: + self.events = events + if active is not None: + self.active = active + + @property + def desc(self): + """Gets the desc of this Webhook1. # noqa: E501 + + + :return: The desc of this Webhook1. # noqa: E501 + :rtype: str + """ + return self._desc + + @desc.setter + def desc(self, desc): + """Sets the desc of this Webhook1. + + + :param desc: The desc of this Webhook1. # noqa: E501 + :type: str + """ + if desc is None: + raise ValueError("Invalid value for `desc`, must not be `None`") # noqa: E501 + + self._desc = desc + + @property + def url(self): + """Gets the url of this Webhook1. # noqa: E501 + + + :return: The url of this Webhook1. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Webhook1. + + + :param url: The url of this Webhook1. # noqa: E501 + :type: str + """ + if url is None: + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def events(self): + """Gets the events of this Webhook1. # noqa: E501 + + + :return: The events of this Webhook1. # noqa: E501 + :rtype: list[str] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this Webhook1. + + + :param events: The events of this Webhook1. # noqa: E501 + :type: list[str] + """ + + self._events = events + + @property + def active(self): + """Gets the active of this Webhook1. # noqa: E501 + + + :return: The active of this Webhook1. # noqa: E501 + :rtype: int + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this Webhook1. + + + :param active: The active of this Webhook1. # noqa: E501 + :type: int + """ + + self._active = active + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_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(Webhook1, 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, Webhook1): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/MimePost/rest.py b/MimePost/rest.py new file mode 100644 index 0000000..7d0dd1e --- /dev/null +++ b/MimePost/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = '{}' + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/README.md b/README.md new file mode 100644 index 0000000..e834b2c --- /dev/null +++ b/README.md @@ -0,0 +1,144 @@ +# MimePost +MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 0.1.0 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/mimepost/mimepost-python.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/mimepost/mimepost-python.git`) + +Then import the package: +```python +import MimePost +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import MimePost +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) + +try: + # Get account profile details + api_response = api_instance.account_profile_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->account_profile_get: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.mimepost.com/v1/* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountsApi* | [**account_profile_get**](docs/AccountsApi.md#account_profile_get) | **GET** /account/profile/ | Get account profile details +*AccountsApi* | [**account_profile_post**](docs/AccountsApi.md#account_profile_post) | **POST** /account/profile/ | Update account profile details +*AccountsApi* | [**settings_get**](docs/AccountsApi.md#settings_get) | **GET** /settings/ | Get all the settings +*AccountsApi* | [**settings_post**](docs/AccountsApi.md#settings_post) | **POST** /settings/ | Set a setting +*DomainsApi* | [**domains_get**](docs/DomainsApi.md#domains_get) | **GET** /domains/ | Get a list of all the domains +*DomainsApi* | [**domains_id_approve_post**](docs/DomainsApi.md#domains_id_approve_post) | **POST** /domains/{id}/approve/ | Submit request for the approval of a verified domain +*DomainsApi* | [**domains_id_delete**](docs/DomainsApi.md#domains_id_delete) | **DELETE** /domains/{id} | Remove a single domain +*DomainsApi* | [**domains_id_get**](docs/DomainsApi.md#domains_id_get) | **GET** /domains/{id} | Get the details of a single domain +*DomainsApi* | [**domains_id_verify_dkim_post**](docs/DomainsApi.md#domains_id_verify_dkim_post) | **POST** /domains/{id}/verify_dkim/ | Request for the verification of DKIM record for a single domain +*DomainsApi* | [**domains_id_verify_spf_post**](docs/DomainsApi.md#domains_id_verify_spf_post) | **POST** /domains/{id}/verify_spf/ | Request for the verification of SPF record for a single domain +*DomainsApi* | [**domains_id_verify_tracking_post**](docs/DomainsApi.md#domains_id_verify_tracking_post) | **POST** /domains/{id}/verify_tracking/ | Request for the verification of tracking record for a single domain +*DomainsApi* | [**domains_post**](docs/DomainsApi.md#domains_post) | **POST** /domains/ | Add single domain +*EmailsApi* | [**send_email**](docs/EmailsApi.md#send_email) | **POST** /emails/ | Send email +*StatsApi* | [**emaillogs_get**](docs/StatsApi.md#emaillogs_get) | **GET** /emaillogs/ | Get the logs of a particular date +*StatsApi* | [**stats_get**](docs/StatsApi.md#stats_get) | **GET** /stats/ | Get the summary of stats for a range of dates +*WebhooksApi* | [**webhooks_get**](docs/WebhooksApi.md#webhooks_get) | **GET** /webhooks/ | Get the list of all the webhooks +*WebhooksApi* | [**webhooks_id_delete**](docs/WebhooksApi.md#webhooks_id_delete) | **DELETE** /webhooks/{id} | Remove a single webhook +*WebhooksApi* | [**webhooks_id_get**](docs/WebhooksApi.md#webhooks_id_get) | **GET** /webhooks/{id} | Get the details of a single webhook +*WebhooksApi* | [**webhooks_id_put**](docs/WebhooksApi.md#webhooks_id_put) | **PUT** /webhooks/{id} | Update the details of a single webhook +*WebhooksApi* | [**webhooks_post**](docs/WebhooksApi.md#webhooks_post) | **POST** /webhooks/ | Add single webhook + + +## Documentation For Models + + - [AccountProfile](docs/AccountProfile.md) + - [AccountProfileResponse](docs/AccountProfileResponse.md) + - [AccountSettings](docs/AccountSettings.md) + - [ApiResponse](docs/ApiResponse.md) + - [ApiResponseAllWebhooks](docs/ApiResponseAllWebhooks.md) + - [ApiResponseAllWebhooksData](docs/ApiResponseAllWebhooksData.md) + - [ApiResponseDomainsList](docs/ApiResponseDomainsList.md) + - [ApiResponseDomainsListData](docs/ApiResponseDomainsListData.md) + - [ApiResponseEmaillogs](docs/ApiResponseEmaillogs.md) + - [ApiResponseEmaillogsData](docs/ApiResponseEmaillogsData.md) + - [ApiResponseSingleWebhooks](docs/ApiResponseSingleWebhooks.md) + - [ApiResponseStats](docs/ApiResponseStats.md) + - [ApiResponseStatsData](docs/ApiResponseStatsData.md) + - [ApiResponseStatsDataDatewiseSummary](docs/ApiResponseStatsDataDatewiseSummary.md) + - [ApiResponseStatsDataGraphSummary](docs/ApiResponseStatsDataGraphSummary.md) + - [ApiResponseStatsDataTotalSummary](docs/ApiResponseStatsDataTotalSummary.md) + - [ApiResponseStatsDataTotalSummaryStatus](docs/ApiResponseStatsDataTotalSummaryStatus.md) + - [ApiResponseWebhooks](docs/ApiResponseWebhooks.md) + - [ApiResponseWebhooksData](docs/ApiResponseWebhooksData.md) + - [Domain](docs/Domain.md) + - [Email](docs/Email.md) + - [EmailAttachments](docs/EmailAttachments.md) + - [EmailGlobalMergeVars](docs/EmailGlobalMergeVars.md) + - [EmailMergeVars](docs/EmailMergeVars.md) + - [EmailTo](docs/EmailTo.md) + - [Webhook](docs/Webhook.md) + - [Webhook1](docs/Webhook1.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: X-Auth-Token +- **Location**: HTTP header + + +## Author + +support@mimepost.com + diff --git a/docs/AccountProfile.md b/docs/AccountProfile.md new file mode 100644 index 0000000..8a41ec7 --- /dev/null +++ b/docs/AccountProfile.md @@ -0,0 +1,25 @@ +# AccountProfile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **str** | First name of the user | [optional] +**last_name** | **str** | Last name of the user | [optional] +**address** | **str** | | [optional] +**city** | **str** | | [optional] +**country** | **str** | | [optional] +**phone_number** | **str** | | [optional] +**skype_id** | **str** | | [optional] +**company_name** | **str** | | [optional] +**website** | **str** | | [optional] +**twitter_handle** | **str** | | [optional] [default to ''] +**linkedin** | **str** | | [optional] +**billing_name** | **str** | | [optional] +**billing_company_name** | **str** | | [optional] +**billing_address** | **str** | | [optional] +**username** | **str** | username | [optional] +**email** | **str** | Account email address | [optional] + +[[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/AccountProfileResponse.md b/docs/AccountProfileResponse.md new file mode 100644 index 0000000..bd90394 --- /dev/null +++ b/docs/AccountProfileResponse.md @@ -0,0 +1,12 @@ +# AccountProfileResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**AccountProfile**](AccountProfile.md) | | [optional] + +[[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/AccountSettings.md b/docs/AccountSettings.md new file mode 100644 index 0000000..405a92d --- /dev/null +++ b/docs/AccountSettings.md @@ -0,0 +1,11 @@ +# AccountSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the config | [optional] +**value** | **str** | | [optional] + +[[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/AccountsApi.md b/docs/AccountsApi.md new file mode 100644 index 0000000..9465571 --- /dev/null +++ b/docs/AccountsApi.md @@ -0,0 +1,220 @@ +# MimePost.AccountsApi + +All URIs are relative to *https://api.mimepost.com/v1/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**account_profile_get**](AccountsApi.md#account_profile_get) | **GET** /account/profile/ | Get account profile details +[**account_profile_post**](AccountsApi.md#account_profile_post) | **POST** /account/profile/ | Update account profile details +[**settings_get**](AccountsApi.md#settings_get) | **GET** /settings/ | Get all the settings +[**settings_post**](AccountsApi.md#settings_post) | **POST** /settings/ | Set a setting + + +# **account_profile_get** +> AccountProfileResponse account_profile_get() + +Get account profile details + + + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) + +try: + # Get account profile details + api_response = api_instance.account_profile_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->account_profile_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AccountProfileResponse**](AccountProfileResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **account_profile_post** +> ApiResponse account_profile_post(body) + +Update account profile details + + + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) +body = MimePost.AccountProfile() # AccountProfile | + +try: + # Update account profile details + api_response = api_instance.account_profile_post(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->account_profile_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccountProfile**](AccountProfile.md)| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **settings_get** +> AccountSettings settings_get() + +Get all the settings + + + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) + +try: + # Get all the settings + api_response = api_instance.settings_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->settings_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AccountSettings**](AccountSettings.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **settings_post** +> ApiResponse settings_post(body) + +Set a setting + + + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) +body = MimePost.AccountSettings() # AccountSettings | + +try: + # Set a setting + api_response = api_instance.settings_post(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->settings_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccountSettings**](AccountSettings.md)| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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/docs/ApiResponse.md b/docs/ApiResponse.md new file mode 100644 index 0000000..a7aa86a --- /dev/null +++ b/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**error_code** | **int** | | [optional] + +[[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/ApiResponseAllWebhooks.md b/docs/ApiResponseAllWebhooks.md new file mode 100644 index 0000000..ef20956 --- /dev/null +++ b/docs/ApiResponseAllWebhooks.md @@ -0,0 +1,12 @@ +# ApiResponseAllWebhooks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**list[ApiResponseAllWebhooksData]**](ApiResponseAllWebhooksData.md) | | [optional] + +[[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/ApiResponseAllWebhooksData.md b/docs/ApiResponseAllWebhooksData.md new file mode 100644 index 0000000..d339ab7 --- /dev/null +++ b/docs/ApiResponseAllWebhooksData.md @@ -0,0 +1,15 @@ +# ApiResponseAllWebhooksData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**entered** | **str** | | [optional] +**url** | **str** | | [optional] +**active** | **int** | | [optional] +**desc** | **str** | | [optional] +**events** | **list[str]** | | [optional] + +[[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/ApiResponseDomainsList.md b/docs/ApiResponseDomainsList.md new file mode 100644 index 0000000..439060b --- /dev/null +++ b/docs/ApiResponseDomainsList.md @@ -0,0 +1,12 @@ +# ApiResponseDomainsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**list[ApiResponseDomainsListData]**](ApiResponseDomainsListData.md) | | [optional] + +[[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/ApiResponseDomainsListData.md b/docs/ApiResponseDomainsListData.md new file mode 100644 index 0000000..dba60b9 --- /dev/null +++ b/docs/ApiResponseDomainsListData.md @@ -0,0 +1,22 @@ +# ApiResponseDomainsListData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**domain** | **str** | | [optional] +**selector** | **str** | | [optional] +**instance_name** | **str** | | [optional] +**spf_verified** | **int** | | [optional] +**dkim_verified** | **int** | | [optional] +**tracking_verified** | **int** | | [optional] +**verified** | **int** | | [optional] +**approved** | **int** | | [optional] +**status** | **str** | | [optional] +**status_desc** | **str** | | [optional] +**entered** | **str** | | [optional] +**active** | **int** | | [optional] + +[[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/ApiResponseEmaillogs.md b/docs/ApiResponseEmaillogs.md new file mode 100644 index 0000000..293d1da --- /dev/null +++ b/docs/ApiResponseEmaillogs.md @@ -0,0 +1,12 @@ +# ApiResponseEmaillogs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**list[ApiResponseEmaillogsData]**](ApiResponseEmaillogsData.md) | | [optional] + +[[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/ApiResponseEmaillogsData.md b/docs/ApiResponseEmaillogsData.md new file mode 100644 index 0000000..2e87ec0 --- /dev/null +++ b/docs/ApiResponseEmaillogsData.md @@ -0,0 +1,14 @@ +# ApiResponseEmaillogsData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_datetime** | **str** | | [optional] +**message_id** | **str** | | [optional] +**to_email** | **str** | | [optional] +**status** | **str** | | [optional] +**details** | **str** | | [optional] + +[[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/ApiResponseSingleWebhooks.md b/docs/ApiResponseSingleWebhooks.md new file mode 100644 index 0000000..82fb35b --- /dev/null +++ b/docs/ApiResponseSingleWebhooks.md @@ -0,0 +1,12 @@ +# ApiResponseSingleWebhooks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**ApiResponseAllWebhooksData**](ApiResponseAllWebhooksData.md) | | [optional] + +[[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/ApiResponseStats.md b/docs/ApiResponseStats.md new file mode 100644 index 0000000..9baa527 --- /dev/null +++ b/docs/ApiResponseStats.md @@ -0,0 +1,12 @@ +# ApiResponseStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**ApiResponseStatsData**](ApiResponseStatsData.md) | | [optional] + +[[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/ApiResponseStatsData.md b/docs/ApiResponseStatsData.md new file mode 100644 index 0000000..05d40d0 --- /dev/null +++ b/docs/ApiResponseStatsData.md @@ -0,0 +1,12 @@ +# ApiResponseStatsData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_summary** | [**ApiResponseStatsDataTotalSummary**](ApiResponseStatsDataTotalSummary.md) | | [optional] +**datewise_summary** | [**ApiResponseStatsDataDatewiseSummary**](ApiResponseStatsDataDatewiseSummary.md) | | [optional] +**graph_summary** | [**ApiResponseStatsDataGraphSummary**](ApiResponseStatsDataGraphSummary.md) | | [optional] + +[[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/ApiResponseStatsDataDatewiseSummary.md b/docs/ApiResponseStatsDataDatewiseSummary.md new file mode 100644 index 0000000..350fcb8 --- /dev/null +++ b/docs/ApiResponseStatsDataDatewiseSummary.md @@ -0,0 +1,10 @@ +# ApiResponseStatsDataDatewiseSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_date** | [**ApiResponseStatsDataTotalSummary**](ApiResponseStatsDataTotalSummary.md) | | [optional] + +[[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/ApiResponseStatsDataGraphSummary.md b/docs/ApiResponseStatsDataGraphSummary.md new file mode 100644 index 0000000..5b27246 --- /dev/null +++ b/docs/ApiResponseStatsDataGraphSummary.md @@ -0,0 +1,11 @@ +# ApiResponseStatsDataGraphSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dates** | **list[str]** | | [optional] +**status_counts** | **list[int]** | | [optional] + +[[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/ApiResponseStatsDataTotalSummary.md b/docs/ApiResponseStatsDataTotalSummary.md new file mode 100644 index 0000000..42cc721 --- /dev/null +++ b/docs/ApiResponseStatsDataTotalSummary.md @@ -0,0 +1,10 @@ +# ApiResponseStatsDataTotalSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**ApiResponseStatsDataTotalSummaryStatus**](ApiResponseStatsDataTotalSummaryStatus.md) | | [optional] + +[[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/ApiResponseStatsDataTotalSummaryStatus.md b/docs/ApiResponseStatsDataTotalSummaryStatus.md new file mode 100644 index 0000000..ac7115f --- /dev/null +++ b/docs/ApiResponseStatsDataTotalSummaryStatus.md @@ -0,0 +1,11 @@ +# ApiResponseStatsDataTotalSummaryStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | [optional] +**perc** | **str** | | [optional] + +[[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/ApiResponseWebhooks.md b/docs/ApiResponseWebhooks.md new file mode 100644 index 0000000..b7179fc --- /dev/null +++ b/docs/ApiResponseWebhooks.md @@ -0,0 +1,12 @@ +# ApiResponseWebhooks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **int** | Success status, 0 for failed 1 for success | [optional] +**message** | **str** | | [optional] +**data** | [**ApiResponseWebhooksData**](ApiResponseWebhooksData.md) | | [optional] + +[[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/ApiResponseWebhooksData.md b/docs/ApiResponseWebhooksData.md new file mode 100644 index 0000000..57f48cf --- /dev/null +++ b/docs/ApiResponseWebhooksData.md @@ -0,0 +1,10 @@ +# ApiResponseWebhooksData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] + +[[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/Domain.md b/docs/Domain.md new file mode 100644 index 0000000..448ee23 --- /dev/null +++ b/docs/Domain.md @@ -0,0 +1,10 @@ +# Domain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | + +[[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/DomainsApi.md b/docs/DomainsApi.md new file mode 100644 index 0000000..f0e05a0 --- /dev/null +++ b/docs/DomainsApi.md @@ -0,0 +1,428 @@ +# MimePost.DomainsApi + +All URIs are relative to *https://api.mimepost.com/v1/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**domains_get**](DomainsApi.md#domains_get) | **GET** /domains/ | Get a list of all the domains +[**domains_id_approve_post**](DomainsApi.md#domains_id_approve_post) | **POST** /domains/{id}/approve/ | Submit request for the approval of a verified domain +[**domains_id_delete**](DomainsApi.md#domains_id_delete) | **DELETE** /domains/{id} | Remove a single domain +[**domains_id_get**](DomainsApi.md#domains_id_get) | **GET** /domains/{id} | Get the details of a single domain +[**domains_id_verify_dkim_post**](DomainsApi.md#domains_id_verify_dkim_post) | **POST** /domains/{id}/verify_dkim/ | Request for the verification of DKIM record for a single domain +[**domains_id_verify_spf_post**](DomainsApi.md#domains_id_verify_spf_post) | **POST** /domains/{id}/verify_spf/ | Request for the verification of SPF record for a single domain +[**domains_id_verify_tracking_post**](DomainsApi.md#domains_id_verify_tracking_post) | **POST** /domains/{id}/verify_tracking/ | Request for the verification of tracking record for a single domain +[**domains_post**](DomainsApi.md#domains_post) | **POST** /domains/ | Add single domain + + +# **domains_get** +> ApiResponseDomainsList domains_get() + +Get a list of all the domains + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) + +try: + # Get a list of all the domains + api_response = api_instance.domains_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiResponseDomainsList**](ApiResponseDomainsList.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_id_approve_post** +> ApiResponse domains_id_approve_post(id) + +Submit request for the approval of a verified domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Submit request for the approval of a verified domain + api_response = api_instance.domains_id_approve_post(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_id_approve_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_id_delete** +> ApiResponse domains_id_delete(id) + +Remove a single domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Remove a single domain + api_response = api_instance.domains_id_delete(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_id_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_id_get** +> ApiResponseDomainsList domains_id_get(id) + +Get the details of a single domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Get the details of a single domain + api_response = api_instance.domains_id_get(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_id_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponseDomainsList**](ApiResponseDomainsList.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_id_verify_dkim_post** +> ApiResponse domains_id_verify_dkim_post(id) + +Request for the verification of DKIM record for a single domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Request for the verification of DKIM record for a single domain + api_response = api_instance.domains_id_verify_dkim_post(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_id_verify_dkim_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_id_verify_spf_post** +> ApiResponse domains_id_verify_spf_post(id) + +Request for the verification of SPF record for a single domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Request for the verification of SPF record for a single domain + api_response = api_instance.domains_id_verify_spf_post(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_id_verify_spf_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_id_verify_tracking_post** +> ApiResponse domains_id_verify_tracking_post(id) + +Request for the verification of tracking record for a single domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Request for the verification of tracking record for a single domain + api_response = api_instance.domains_id_verify_tracking_post(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_id_verify_tracking_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **domains_post** +> ApiResponse domains_post(domain=domain) + +Add single domain + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.DomainsApi(MimePost.ApiClient(configuration)) +domain = MimePost.Domain() # Domain | The name of the domain name (optional) + +try: + # Add single domain + api_response = api_instance.domains_post(domain=domain) + pprint(api_response) +except ApiException as e: + print("Exception when calling DomainsApi->domains_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain** | [**Domain**](Domain.md)| The name of the domain name | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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/docs/Email.md b/docs/Email.md new file mode 100644 index 0000000..4a2c226 --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,19 @@ +# Email + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html** | **str** | | +**subject** | **str** | | +**from_email** | **str** | | +**from_name** | **str** | | [optional] +**global_merge_vars** | [**list[EmailGlobalMergeVars]**](EmailGlobalMergeVars.md) | | [optional] +**to** | [**list[EmailTo]**](EmailTo.md) | | +**cc** | **list[str]** | | [optional] +**bcc** | **list[str]** | | [optional] +**attachments** | [**list[EmailAttachments]**](EmailAttachments.md) | | [optional] +**vars** | **dict(str, str)** | | [optional] + +[[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/EmailAttachments.md b/docs/EmailAttachments.md new file mode 100644 index 0000000..9725d4b --- /dev/null +++ b/docs/EmailAttachments.md @@ -0,0 +1,12 @@ +# EmailAttachments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**type** | **str** | | [optional] +**content** | **str** | | [optional] + +[[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/EmailGlobalMergeVars.md b/docs/EmailGlobalMergeVars.md new file mode 100644 index 0000000..beb1679 --- /dev/null +++ b/docs/EmailGlobalMergeVars.md @@ -0,0 +1,11 @@ +# EmailGlobalMergeVars + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**value** | **str** | | [optional] + +[[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/EmailMergeVars.md b/docs/EmailMergeVars.md new file mode 100644 index 0000000..d909feb --- /dev/null +++ b/docs/EmailMergeVars.md @@ -0,0 +1,11 @@ +# EmailMergeVars + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**value** | **str** | | [optional] + +[[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/EmailTo.md b/docs/EmailTo.md new file mode 100644 index 0000000..fe2835d --- /dev/null +++ b/docs/EmailTo.md @@ -0,0 +1,11 @@ +# EmailTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**merge_vars** | [**list[EmailMergeVars]**](EmailMergeVars.md) | | [optional] + +[[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/EmailsApi.md b/docs/EmailsApi.md new file mode 100644 index 0000000..9cc3f19 --- /dev/null +++ b/docs/EmailsApi.md @@ -0,0 +1,63 @@ +# MimePost.EmailsApi + +All URIs are relative to *https://api.mimepost.com/v1/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**send_email**](EmailsApi.md#send_email) | **POST** /emails/ | Send email + + +# **send_email** +> ApiResponse send_email(body) + +Send email + + + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.EmailsApi(MimePost.ApiClient(configuration)) +body = MimePost.Email() # Email | Single Email object + +try: + # Send email + api_response = api_instance.send_email(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling EmailsApi->send_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Email**](Email.md)| Single Email object | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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/docs/StatsApi.md b/docs/StatsApi.md new file mode 100644 index 0000000..1e1f0fe --- /dev/null +++ b/docs/StatsApi.md @@ -0,0 +1,126 @@ +# MimePost.StatsApi + +All URIs are relative to *https://api.mimepost.com/v1/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**emaillogs_get**](StatsApi.md#emaillogs_get) | **GET** /emaillogs/ | Get the logs of a particular date +[**stats_get**](StatsApi.md#stats_get) | **GET** /stats/ | Get the summary of stats for a range of dates + + +# **emaillogs_get** +> ApiResponseEmaillogs emaillogs_get(start_date, end_date, status=status, to=to, page=page, limit=limit) + +Get the logs of a particular date + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.StatsApi(MimePost.ApiClient(configuration)) +start_date = 'start_date_example' # str | Start Date in yyyymmdd format example 20190801 +end_date = 'end_date_example' # str | End Date in yyyymmdd format example 20190803 +status = 'status_example' # str | (optional) +to = 'to_example' # str | (optional) +page = 56 # int | (optional) +limit = 56 # int | (optional) + +try: + # Get the logs of a particular date + api_response = api_instance.emaillogs_get(start_date, end_date, status=status, to=to, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling StatsApi->emaillogs_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **str**| Start Date in yyyymmdd format example 20190801 | + **end_date** | **str**| End Date in yyyymmdd format example 20190803 | + **status** | **str**| | [optional] + **to** | **str**| | [optional] + **page** | **int**| | [optional] + **limit** | **int**| | [optional] + +### Return type + +[**ApiResponseEmaillogs**](ApiResponseEmaillogs.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **stats_get** +> ApiResponseStats stats_get(start_date, end_date) + +Get the summary of stats for a range of dates + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.StatsApi(MimePost.ApiClient(configuration)) +start_date = 'start_date_example' # str | Start Date in yyyymmdd format example 20190801 +end_date = 'end_date_example' # str | End Date in yyyymmdd format example 20190803 + +try: + # Get the summary of stats for a range of dates + api_response = api_instance.stats_get(start_date, end_date) + pprint(api_response) +except ApiException as e: + print("Exception when calling StatsApi->stats_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start_date** | **str**| Start Date in yyyymmdd format example 20190801 | + **end_date** | **str**| End Date in yyyymmdd format example 20190803 | + +### Return type + +[**ApiResponseStats**](ApiResponseStats.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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/docs/Webhook.md b/docs/Webhook.md new file mode 100644 index 0000000..c6693e5 --- /dev/null +++ b/docs/Webhook.md @@ -0,0 +1,13 @@ +# Webhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**desc** | **str** | | +**url** | **str** | | +**events** | **list[str]** | | [optional] +**active** | **int** | | [optional] + +[[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/Webhook1.md b/docs/Webhook1.md new file mode 100644 index 0000000..0b88aa9 --- /dev/null +++ b/docs/Webhook1.md @@ -0,0 +1,13 @@ +# Webhook1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**desc** | **str** | | +**url** | **str** | | +**events** | **list[str]** | | [optional] +**active** | **int** | | [optional] + +[[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/WebhooksApi.md b/docs/WebhooksApi.md new file mode 100644 index 0000000..c96c07d --- /dev/null +++ b/docs/WebhooksApi.md @@ -0,0 +1,271 @@ +# MimePost.WebhooksApi + +All URIs are relative to *https://api.mimepost.com/v1/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**webhooks_get**](WebhooksApi.md#webhooks_get) | **GET** /webhooks/ | Get the list of all the webhooks +[**webhooks_id_delete**](WebhooksApi.md#webhooks_id_delete) | **DELETE** /webhooks/{id} | Remove a single webhook +[**webhooks_id_get**](WebhooksApi.md#webhooks_id_get) | **GET** /webhooks/{id} | Get the details of a single webhook +[**webhooks_id_put**](WebhooksApi.md#webhooks_id_put) | **PUT** /webhooks/{id} | Update the details of a single webhook +[**webhooks_post**](WebhooksApi.md#webhooks_post) | **POST** /webhooks/ | Add single webhook + + +# **webhooks_get** +> ApiResponseAllWebhooks webhooks_get() + +Get the list of all the webhooks + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration)) + +try: + # Get the list of all the webhooks + api_response = api_instance.webhooks_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ApiResponseAllWebhooks**](ApiResponseAllWebhooks.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **webhooks_id_delete** +> ApiResponse webhooks_id_delete(id) + +Remove a single webhook + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Remove a single webhook + api_response = api_instance.webhooks_id_delete(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_id_delete: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **webhooks_id_get** +> ApiResponseSingleWebhooks webhooks_id_get(id) + +Get the details of a single webhook + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration)) +id = 56 # int | + +try: + # Get the details of a single webhook + api_response = api_instance.webhooks_id_get(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_id_get: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ApiResponseSingleWebhooks**](ApiResponseSingleWebhooks.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **webhooks_id_put** +> ApiResponseSingleWebhooks webhooks_id_put(id, webhook=webhook) + +Update the details of a single webhook + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration)) +id = 56 # int | +webhook = MimePost.Webhook1() # Webhook1 | (optional) + +try: + # Update the details of a single webhook + api_response = api_instance.webhooks_id_put(id, webhook=webhook) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_id_put: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + **webhook** | [**Webhook1**](Webhook1.md)| | [optional] + +### Return type + +[**ApiResponseSingleWebhooks**](ApiResponseSingleWebhooks.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +# **webhooks_post** +> ApiResponseWebhooks webhooks_post(webhook=webhook) + +Add single webhook + +### Example +```python +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration)) +webhook = MimePost.Webhook() # Webhook | (optional) + +try: + # Add single webhook + api_response = api_instance.webhooks_post(webhook=webhook) + pprint(api_response) +except ApiException as e: + print("Exception when calling WebhooksApi->webhooks_post: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook** | [**Webhook**](Webhook.md)| | [optional] + +### Return type + +[**ApiResponseWebhooks**](ApiResponseWebhooks.md) + +### Authorization + +[api_key](../README.md#api_key) + +### 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/example.accounts.py b/example.accounts.py new file mode 100644 index 0000000..ad035ed --- /dev/null +++ b/example.accounts.py @@ -0,0 +1,22 @@ +from __future__ import print_function +import time +import MimePost +from MimePost.rest import ApiException +from pprint import pprint + +# Configure API key authorization: api_key +configuration = MimePost.Configuration() +configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' + +# create an instance of the API class +api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) + +try: + # Get account profile details + api_response = api_instance.account_profile_get() + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->account_profile_get: %s\n" % e) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..7f8e3b0 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="mimepost" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="mimepost-python" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bafdc07 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d7e5d40 --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "MimePost" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "certifi>=2017.4.17", + "python-dateutil>=2.1", + "six>=1.10", + "urllib3>=1.23" +] + + +setup( + name=NAME, + version=VERSION, + description="MimePost API Reference (Beta)", + author_email="support@mimepost.com", + url="", + keywords=["Swagger", "MimePost API Reference (Beta)"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + """ +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_account_profile.py b/test/test_account_profile.py new file mode 100644 index 0000000..e5bccf4 --- /dev/null +++ b/test/test_account_profile.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.account_profile import AccountProfile # noqa: E501 +from MimePost.rest import ApiException + + +class TestAccountProfile(unittest.TestCase): + """AccountProfile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountProfile(self): + """Test AccountProfile""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.account_profile.AccountProfile() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_account_profile_response.py b/test/test_account_profile_response.py new file mode 100644 index 0000000..928191a --- /dev/null +++ b/test/test_account_profile_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.account_profile_response import AccountProfileResponse # noqa: E501 +from MimePost.rest import ApiException + + +class TestAccountProfileResponse(unittest.TestCase): + """AccountProfileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountProfileResponse(self): + """Test AccountProfileResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.account_profile_response.AccountProfileResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_account_settings.py b/test/test_account_settings.py new file mode 100644 index 0000000..0705835 --- /dev/null +++ b/test/test_account_settings.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.account_settings import AccountSettings # noqa: E501 +from MimePost.rest import ApiException + + +class TestAccountSettings(unittest.TestCase): + """AccountSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountSettings(self): + """Test AccountSettings""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.account_settings.AccountSettings() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_accounts_api.py b/test/test_accounts_api.py new file mode 100644 index 0000000..0b00f5e --- /dev/null +++ b/test/test_accounts_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.api.accounts_api import AccountsApi # noqa: E501 +from MimePost.rest import ApiException + + +class TestAccountsApi(unittest.TestCase): + """AccountsApi unit test stubs""" + + def setUp(self): + self.api = MimePost.api.accounts_api.AccountsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_account_profile_get(self): + """Test case for account_profile_get + + Get account profile details # noqa: E501 + """ + pass + + def test_account_profile_post(self): + """Test case for account_profile_post + + Update account profile details # noqa: E501 + """ + pass + + def test_settings_get(self): + """Test case for settings_get + + Get all the settings # noqa: E501 + """ + pass + + def test_settings_post(self): + """Test case for settings_post + + Set a setting # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response.py b/test/test_api_response.py new file mode 100644 index 0000000..56a9ffb --- /dev/null +++ b/test/test_api_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response import ApiResponse # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponse(unittest.TestCase): + """ApiResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponse(self): + """Test ApiResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response.ApiResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_all_webhooks.py b/test/test_api_response_all_webhooks.py new file mode 100644 index 0000000..a0279f5 --- /dev/null +++ b/test/test_api_response_all_webhooks.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_all_webhooks import ApiResponseAllWebhooks # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseAllWebhooks(unittest.TestCase): + """ApiResponseAllWebhooks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseAllWebhooks(self): + """Test ApiResponseAllWebhooks""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_all_webhooks.ApiResponseAllWebhooks() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_all_webhooks_data.py b/test/test_api_response_all_webhooks_data.py new file mode 100644 index 0000000..b2bc28c --- /dev/null +++ b/test/test_api_response_all_webhooks_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_all_webhooks_data import ApiResponseAllWebhooksData # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseAllWebhooksData(unittest.TestCase): + """ApiResponseAllWebhooksData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseAllWebhooksData(self): + """Test ApiResponseAllWebhooksData""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_all_webhooks_data.ApiResponseAllWebhooksData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_domains_list.py b/test/test_api_response_domains_list.py new file mode 100644 index 0000000..a98694d --- /dev/null +++ b/test/test_api_response_domains_list.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_domains_list import ApiResponseDomainsList # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseDomainsList(unittest.TestCase): + """ApiResponseDomainsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseDomainsList(self): + """Test ApiResponseDomainsList""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_domains_list.ApiResponseDomainsList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_domains_list_data.py b/test/test_api_response_domains_list_data.py new file mode 100644 index 0000000..61e679f --- /dev/null +++ b/test/test_api_response_domains_list_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_domains_list_data import ApiResponseDomainsListData # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseDomainsListData(unittest.TestCase): + """ApiResponseDomainsListData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseDomainsListData(self): + """Test ApiResponseDomainsListData""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_domains_list_data.ApiResponseDomainsListData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_emaillogs.py b/test/test_api_response_emaillogs.py new file mode 100644 index 0000000..95b57d3 --- /dev/null +++ b/test/test_api_response_emaillogs.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_emaillogs import ApiResponseEmaillogs # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseEmaillogs(unittest.TestCase): + """ApiResponseEmaillogs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseEmaillogs(self): + """Test ApiResponseEmaillogs""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_emaillogs.ApiResponseEmaillogs() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_emaillogs_data.py b/test/test_api_response_emaillogs_data.py new file mode 100644 index 0000000..b980857 --- /dev/null +++ b/test/test_api_response_emaillogs_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_emaillogs_data import ApiResponseEmaillogsData # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseEmaillogsData(unittest.TestCase): + """ApiResponseEmaillogsData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseEmaillogsData(self): + """Test ApiResponseEmaillogsData""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_emaillogs_data.ApiResponseEmaillogsData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_single_webhooks.py b/test/test_api_response_single_webhooks.py new file mode 100644 index 0000000..4e39513 --- /dev/null +++ b/test/test_api_response_single_webhooks.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_single_webhooks import ApiResponseSingleWebhooks # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseSingleWebhooks(unittest.TestCase): + """ApiResponseSingleWebhooks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseSingleWebhooks(self): + """Test ApiResponseSingleWebhooks""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_single_webhooks.ApiResponseSingleWebhooks() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_stats.py b/test/test_api_response_stats.py new file mode 100644 index 0000000..fda2034 --- /dev/null +++ b/test/test_api_response_stats.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_stats import ApiResponseStats # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseStats(unittest.TestCase): + """ApiResponseStats unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseStats(self): + """Test ApiResponseStats""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_stats.ApiResponseStats() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_stats_data.py b/test/test_api_response_stats_data.py new file mode 100644 index 0000000..04d3976 --- /dev/null +++ b/test/test_api_response_stats_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_stats_data import ApiResponseStatsData # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseStatsData(unittest.TestCase): + """ApiResponseStatsData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseStatsData(self): + """Test ApiResponseStatsData""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_stats_data.ApiResponseStatsData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_stats_data_datewise_summary.py b/test/test_api_response_stats_data_datewise_summary.py new file mode 100644 index 0000000..8b18cfd --- /dev/null +++ b/test/test_api_response_stats_data_datewise_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_stats_data_datewise_summary import ApiResponseStatsDataDatewiseSummary # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseStatsDataDatewiseSummary(unittest.TestCase): + """ApiResponseStatsDataDatewiseSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseStatsDataDatewiseSummary(self): + """Test ApiResponseStatsDataDatewiseSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_stats_data_datewise_summary.ApiResponseStatsDataDatewiseSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_stats_data_graph_summary.py b/test/test_api_response_stats_data_graph_summary.py new file mode 100644 index 0000000..97ac85e --- /dev/null +++ b/test/test_api_response_stats_data_graph_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_stats_data_graph_summary import ApiResponseStatsDataGraphSummary # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseStatsDataGraphSummary(unittest.TestCase): + """ApiResponseStatsDataGraphSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseStatsDataGraphSummary(self): + """Test ApiResponseStatsDataGraphSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_stats_data_graph_summary.ApiResponseStatsDataGraphSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_stats_data_total_summary.py b/test/test_api_response_stats_data_total_summary.py new file mode 100644 index 0000000..9c4d30a --- /dev/null +++ b/test/test_api_response_stats_data_total_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_stats_data_total_summary import ApiResponseStatsDataTotalSummary # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseStatsDataTotalSummary(unittest.TestCase): + """ApiResponseStatsDataTotalSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseStatsDataTotalSummary(self): + """Test ApiResponseStatsDataTotalSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_stats_data_total_summary.ApiResponseStatsDataTotalSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_stats_data_total_summary_status.py b/test/test_api_response_stats_data_total_summary_status.py new file mode 100644 index 0000000..81c609c --- /dev/null +++ b/test/test_api_response_stats_data_total_summary_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_stats_data_total_summary_status import ApiResponseStatsDataTotalSummaryStatus # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseStatsDataTotalSummaryStatus(unittest.TestCase): + """ApiResponseStatsDataTotalSummaryStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseStatsDataTotalSummaryStatus(self): + """Test ApiResponseStatsDataTotalSummaryStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_stats_data_total_summary_status.ApiResponseStatsDataTotalSummaryStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_webhooks.py b/test/test_api_response_webhooks.py new file mode 100644 index 0000000..3dc3c6b --- /dev/null +++ b/test/test_api_response_webhooks.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_webhooks import ApiResponseWebhooks # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseWebhooks(unittest.TestCase): + """ApiResponseWebhooks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseWebhooks(self): + """Test ApiResponseWebhooks""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_webhooks.ApiResponseWebhooks() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_response_webhooks_data.py b/test/test_api_response_webhooks_data.py new file mode 100644 index 0000000..30dbcfe --- /dev/null +++ b/test/test_api_response_webhooks_data.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.api_response_webhooks_data import ApiResponseWebhooksData # noqa: E501 +from MimePost.rest import ApiException + + +class TestApiResponseWebhooksData(unittest.TestCase): + """ApiResponseWebhooksData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiResponseWebhooksData(self): + """Test ApiResponseWebhooksData""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.api_response_webhooks_data.ApiResponseWebhooksData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain.py b/test/test_domain.py new file mode 100644 index 0000000..f90c4e1 --- /dev/null +++ b/test/test_domain.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.domain import Domain # noqa: E501 +from MimePost.rest import ApiException + + +class TestDomain(unittest.TestCase): + """Domain unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDomain(self): + """Test Domain""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.domain.Domain() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domains_api.py b/test/test_domains_api.py new file mode 100644 index 0000000..594fec5 --- /dev/null +++ b/test/test_domains_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.api.domains_api import DomainsApi # noqa: E501 +from MimePost.rest import ApiException + + +class TestDomainsApi(unittest.TestCase): + """DomainsApi unit test stubs""" + + def setUp(self): + self.api = MimePost.api.domains_api.DomainsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_domains_get(self): + """Test case for domains_get + + Get a list of all the domains # noqa: E501 + """ + pass + + def test_domains_id_approve_post(self): + """Test case for domains_id_approve_post + + Submit request for the approval of a verified domain # noqa: E501 + """ + pass + + def test_domains_id_delete(self): + """Test case for domains_id_delete + + Remove a single domain # noqa: E501 + """ + pass + + def test_domains_id_get(self): + """Test case for domains_id_get + + Get the details of a single domain # noqa: E501 + """ + pass + + def test_domains_id_verify_dkim_post(self): + """Test case for domains_id_verify_dkim_post + + Request for the verification of DKIM record for a single domain # noqa: E501 + """ + pass + + def test_domains_id_verify_spf_post(self): + """Test case for domains_id_verify_spf_post + + Request for the verification of SPF record for a single domain # noqa: E501 + """ + pass + + def test_domains_id_verify_tracking_post(self): + """Test case for domains_id_verify_tracking_post + + Request for the verification of tracking record for a single domain # noqa: E501 + """ + pass + + def test_domains_post(self): + """Test case for domains_post + + Add single domain # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email.py b/test/test_email.py new file mode 100644 index 0000000..8b46351 --- /dev/null +++ b/test/test_email.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.email import Email # noqa: E501 +from MimePost.rest import ApiException + + +class TestEmail(unittest.TestCase): + """Email unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmail(self): + """Test Email""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.email.Email() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_attachments.py b/test/test_email_attachments.py new file mode 100644 index 0000000..b77f170 --- /dev/null +++ b/test/test_email_attachments.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.email_attachments import EmailAttachments # noqa: E501 +from MimePost.rest import ApiException + + +class TestEmailAttachments(unittest.TestCase): + """EmailAttachments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailAttachments(self): + """Test EmailAttachments""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.email_attachments.EmailAttachments() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_global_merge_vars.py b/test/test_email_global_merge_vars.py new file mode 100644 index 0000000..f4c709f --- /dev/null +++ b/test/test_email_global_merge_vars.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.email_global_merge_vars import EmailGlobalMergeVars # noqa: E501 +from MimePost.rest import ApiException + + +class TestEmailGlobalMergeVars(unittest.TestCase): + """EmailGlobalMergeVars unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailGlobalMergeVars(self): + """Test EmailGlobalMergeVars""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.email_global_merge_vars.EmailGlobalMergeVars() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_merge_vars.py b/test/test_email_merge_vars.py new file mode 100644 index 0000000..52a6f2e --- /dev/null +++ b/test/test_email_merge_vars.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.email_merge_vars import EmailMergeVars # noqa: E501 +from MimePost.rest import ApiException + + +class TestEmailMergeVars(unittest.TestCase): + """EmailMergeVars unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailMergeVars(self): + """Test EmailMergeVars""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.email_merge_vars.EmailMergeVars() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_to.py b/test/test_email_to.py new file mode 100644 index 0000000..5f416be --- /dev/null +++ b/test/test_email_to.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.email_to import EmailTo # noqa: E501 +from MimePost.rest import ApiException + + +class TestEmailTo(unittest.TestCase): + """EmailTo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEmailTo(self): + """Test EmailTo""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.email_to.EmailTo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_emails_api.py b/test/test_emails_api.py new file mode 100644 index 0000000..7420ffa --- /dev/null +++ b/test/test_emails_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.api.emails_api import EmailsApi # noqa: E501 +from MimePost.rest import ApiException + + +class TestEmailsApi(unittest.TestCase): + """EmailsApi unit test stubs""" + + def setUp(self): + self.api = MimePost.api.emails_api.EmailsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_send_email(self): + """Test case for send_email + + Send email # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stats_api.py b/test/test_stats_api.py new file mode 100644 index 0000000..e3e5d82 --- /dev/null +++ b/test/test_stats_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.api.stats_api import StatsApi # noqa: E501 +from MimePost.rest import ApiException + + +class TestStatsApi(unittest.TestCase): + """StatsApi unit test stubs""" + + def setUp(self): + self.api = MimePost.api.stats_api.StatsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_emaillogs_get(self): + """Test case for emaillogs_get + + Get the logs of a particular date # noqa: E501 + """ + pass + + def test_stats_get(self): + """Test case for stats_get + + Get the summary of stats for a range of dates # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook.py b/test/test_webhook.py new file mode 100644 index 0000000..6b2800d --- /dev/null +++ b/test/test_webhook.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.webhook import Webhook # noqa: E501 +from MimePost.rest import ApiException + + +class TestWebhook(unittest.TestCase): + """Webhook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWebhook(self): + """Test Webhook""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.webhook.Webhook() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook1.py b/test/test_webhook1.py new file mode 100644 index 0000000..1fdcea5 --- /dev/null +++ b/test/test_webhook1.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.models.webhook1 import Webhook1 # noqa: E501 +from MimePost.rest import ApiException + + +class TestWebhook1(unittest.TestCase): + """Webhook1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWebhook1(self): + """Test Webhook1""" + # FIXME: construct object with mandatory attributes with example values + # model = MimePost.models.webhook1.Webhook1() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhooks_api.py b/test/test_webhooks_api.py new file mode 100644 index 0000000..867c82a --- /dev/null +++ b/test/test_webhooks_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MimePost API Reference (Beta) + + MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters. # noqa: E501 + + OpenAPI spec version: 0.1.0 + Contact: support@mimepost.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import MimePost +from MimePost.api.webhooks_api import WebhooksApi # noqa: E501 +from MimePost.rest import ApiException + + +class TestWebhooksApi(unittest.TestCase): + """WebhooksApi unit test stubs""" + + def setUp(self): + self.api = MimePost.api.webhooks_api.WebhooksApi() # noqa: E501 + + def tearDown(self): + pass + + def test_webhooks_get(self): + """Test case for webhooks_get + + Get the list of all the webhooks # noqa: E501 + """ + pass + + def test_webhooks_id_delete(self): + """Test case for webhooks_id_delete + + Remove a single webhook # noqa: E501 + """ + pass + + def test_webhooks_id_get(self): + """Test case for webhooks_id_get + + Get the details of a single webhook # noqa: E501 + """ + pass + + def test_webhooks_id_put(self): + """Test case for webhooks_id_put + + Update the details of a single webhook # noqa: E501 + """ + pass + + def test_webhooks_post(self): + """Test case for webhooks_post + + Add single webhook # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..3d0be61 --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + []