Module mailslurp_client.api.consent_controller_api
MailSlurp API
MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501
The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech
Classes
class ConsentControllerApi (api_client=None)
-
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
Expand source code
class ConsentControllerApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def check_sending_consent_for_email_address(self, email_address, **kwargs): # noqa: E501 """check_sending_consent_for_email_address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_sending_consent_for_email_address(email_address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_address: Email address to check consent for (required) :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: OptInSendingConsentDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.check_sending_consent_for_email_address_with_http_info(email_address, **kwargs) # noqa: E501 def check_sending_consent_for_email_address_with_http_info(self, email_address, **kwargs): # noqa: E501 """check_sending_consent_for_email_address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_sending_consent_for_email_address_with_http_info(email_address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_address: Email address to check consent for (required) :param _return_http_data_only: response data without head status code and headers :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: tuple(OptInSendingConsentDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_address' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method check_sending_consent_for_email_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_address' is set if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501 local_var_params['email_address'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_address` when calling `check_sending_consent_for_email_address`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/consent/opt-in/sending-consent', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OptInSendingConsentDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def get_opt_in_identities(self, **kwargs): # noqa: E501 """get_opt_in_identities # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_opt_in_identities(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: Optional page index in list pagination :param int size: Optional page size in list pagination :param str sort: Optional createdAt sort direction ASC or DESC :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: PageOptInIdentityProjection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.get_opt_in_identities_with_http_info(**kwargs) # noqa: E501 def get_opt_in_identities_with_http_info(self, **kwargs): # noqa: E501 """get_opt_in_identities # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_opt_in_identities_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param int page: Optional page index in list pagination :param int size: Optional page size in list pagination :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :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: tuple(PageOptInIdentityProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'page', 'size', 'sort' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_opt_in_identities" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 query_params.append(('size', local_var_params['size'])) # noqa: E501 if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 query_params.append(('sort', local_var_params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/consent/opt-in', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PageOptInIdentityProjection', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def revoke_opt_in_consent_for_email_address(self, email_address, **kwargs): # noqa: E501 """revoke_opt_in_consent_for_email_address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.revoke_opt_in_consent_for_email_address(email_address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_address: Email address to revoke consent for (required) :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: OptInSendingConsentDto If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.revoke_opt_in_consent_for_email_address_with_http_info(email_address, **kwargs) # noqa: E501 def revoke_opt_in_consent_for_email_address_with_http_info(self, email_address, **kwargs): # noqa: E501 """revoke_opt_in_consent_for_email_address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.revoke_opt_in_consent_for_email_address_with_http_info(email_address, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str email_address: Email address to revoke consent for (required) :param _return_http_data_only: response data without head status code and headers :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: tuple(OptInSendingConsentDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'email_address' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method revoke_opt_in_consent_for_email_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'email_address' is set if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501 local_var_params['email_address'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `email_address` when calling `revoke_opt_in_consent_for_email_address`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['API_KEY'] # noqa: E501 return self.api_client.call_api( '/consent/opt-in', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OptInSendingConsentDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) def send_opt_in_consent_for_email_address(self, opt_in_consent_options, **kwargs): # noqa: E501 """Send a verification code to a user once they have explicitly submitted their email address # noqa: E501 Send double-opt in consent for an email address # 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_opt_in_consent_for_email_address(opt_in_consent_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param OptInConsentOptions opt_in_consent_options: (required) :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: OptInConsentSendResult If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True return self.send_opt_in_consent_for_email_address_with_http_info(opt_in_consent_options, **kwargs) # noqa: E501 def send_opt_in_consent_for_email_address_with_http_info(self, opt_in_consent_options, **kwargs): # noqa: E501 """Send a verification code to a user once they have explicitly submitted their email address # noqa: E501 Send double-opt in consent for an email address # 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_opt_in_consent_for_email_address_with_http_info(opt_in_consent_options, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param OptInConsentOptions opt_in_consent_options: (required) :param _return_http_data_only: response data without head status code and headers :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: tuple(OptInConsentSendResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'opt_in_consent_options' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method send_opt_in_consent_for_email_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'opt_in_consent_options' is set if self.api_client.client_side_validation and ('opt_in_consent_options' not in local_var_params or # noqa: E501 local_var_params['opt_in_consent_options'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `opt_in_consent_options` when calling `send_opt_in_consent_for_email_address`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'opt_in_consent_options' in local_var_params: body_params = local_var_params['opt_in_consent_options'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/consent/opt-in/send', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='OptInConsentSendResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
Methods
def check_sending_consent_for_email_address(self, email_address, **kwargs)
-
check_sending_consent_for_email_address # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_sending_consent_for_email_address(email_address, async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param str email_address: Email address to check consent for (required) :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: OptInSendingConsentDto If the method is called asynchronously, returns the request thread.
def check_sending_consent_for_email_address_with_http_info(self, email_address, **kwargs)
-
check_sending_consent_for_email_address # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.check_sending_consent_for_email_address_with_http_info(email_address, async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param str email_address: Email address to check consent for (required) :param _return_http_data_only: response data without head status code and headers :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: tuple(OptInSendingConsentDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def get_opt_in_identities(self, **kwargs)
-
get_opt_in_identities # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_opt_in_identities(async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param int page: Optional page index in list pagination :param int size: Optional page size in list pagination :param str sort: Optional createdAt sort direction ASC or DESC :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: PageOptInIdentityProjection If the method is called asynchronously, returns the request thread.
def get_opt_in_identities_with_http_info(self, **kwargs)
-
get_opt_in_identities # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_opt_in_identities_with_http_info(async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param int page: Optional page index in list pagination :param int size: Optional page size in list pagination :param str sort: Optional createdAt sort direction ASC or DESC :param _return_http_data_only: response data without head status code and headers :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: tuple(PageOptInIdentityProjection, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def revoke_opt_in_consent_for_email_address(self, email_address, **kwargs)
-
revoke_opt_in_consent_for_email_address # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.revoke_opt_in_consent_for_email_address(email_address, async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param str email_address: Email address to revoke consent for (required) :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: OptInSendingConsentDto If the method is called asynchronously, returns the request thread.
def revoke_opt_in_consent_for_email_address_with_http_info(self, email_address, **kwargs)
-
revoke_opt_in_consent_for_email_address # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
>>> thread = api.revoke_opt_in_consent_for_email_address_with_http_info(email_address, async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param str email_address: Email address to revoke consent for (required) :param _return_http_data_only: response data without head status code and headers :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: tuple(OptInSendingConsentDto, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
def send_opt_in_consent_for_email_address(self, opt_in_consent_options, **kwargs)
-
Send a verification code to a user once they have explicitly submitted their email address # noqa: E501
Send double-opt in consent for an email address # 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_opt_in_consent_for_email_address(opt_in_consent_options, async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param OptInConsentOptions opt_in_consent_options: (required) :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: OptInConsentSendResult If the method is called asynchronously, returns the request thread.
def send_opt_in_consent_for_email_address_with_http_info(self, opt_in_consent_options, **kwargs)
-
Send a verification code to a user once they have explicitly submitted their email address # noqa: E501
Send double-opt in consent for an email address # 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_opt_in_consent_for_email_address_with_http_info(opt_in_consent_options, async_req=True) >>> result = thread.get()
:param async_req bool: execute request asynchronously :param OptInConsentOptions opt_in_consent_options: (required) :param _return_http_data_only: response data without head status code and headers :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: tuple(OptInConsentSendResult, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.