class TagsApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def all_time_series(self, body={}, **kwargs): # noqa: E501 """View all tags history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for all tags. # noqa: E501 """ (data) = self.all_time_series_with_http_info(body, **kwargs) # noqa: E501 return data def all_time_series_with_http_info(self, body, **kwargs): # noqa: E501 """View all tags history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for all tags. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 all_time_series" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/tags/all-time-series', 'POST', body=body_params, response_type='list[InlineResponse20028]') # noqa: E501 def delete(self, body={}, **kwargs): # noqa: E501 """Delete tag # noqa: E501 Deletes a tag permanently. Deleting a tag removes the tag from any messages that have been sent, and also deletes the tag's stats. There is no way to undo this operation, so use it carefully. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete tag # noqa: E501 Deletes a tag permanently. Deleting a tag removes the tag from any messages that have been sent, and also deletes the tag's stats. There is no way to undo this operation, so use it carefully. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/tags/delete', 'POST', body=body_params, response_type='InlineResponse20055') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get tag info # noqa: E501 Return more detailed information about a single tag, including aggregates of recent stats. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get tag info # noqa: E501 Return more detailed information about a single tag, including aggregates of recent stats. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/tags/info', 'POST', body=body_params, response_type='InlineResponse20056') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List tags # noqa: E501 Return all of the user-defined tag information. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List tags # noqa: E501 Return all of the user-defined tag information. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/tags/list', 'POST', body=body_params, response_type='list[InlineResponse20054]') # noqa: E501 def time_series(self, body={}, **kwargs): # noqa: E501 """View tag history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a tag. # noqa: E501 """ (data) = self.time_series_with_http_info(body, **kwargs) # noqa: E501 return data def time_series_with_http_info(self, body, **kwargs): # noqa: E501 """View tag history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a tag. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 time_series" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/tags/time-series', 'POST', body=body_params, response_type='list[InlineResponse20028]') # noqa: E501
class WhitelistsApi(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_key='', api_client = None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add(self, body = {}, **kwargs): # noqa: E501 """Add email to whitelist # noqa: E501 Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically. # noqa: E501 """ (data) = self.add_with_http_info(body, **kwargs) # noqa: E501 return data def add_with_http_info(self, body, **kwargs): # noqa: E501 """Add email to whitelist # noqa: E501 Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/whitelists/add', 'POST', body=body_params, response_type='InlineResponse20076') # noqa: E501 def delete(self, body = {}, **kwargs): # noqa: E501 """Remove email from whitelist # noqa: E501 Removes an email address from the whitelist. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Remove email from whitelist # noqa: E501 Removes an email address from the whitelist. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/whitelists/delete', 'POST', body=body_params, response_type='InlineResponse20078') # noqa: E501 def list(self, body = {}, **kwargs): # noqa: E501 """List whitelisted emails # noqa: E501 Retrieves your email rejection whitelist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List whitelisted emails # noqa: E501 Retrieves your email rejection whitelist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/whitelists/list', 'POST', body=body_params, response_type='list[InlineResponse20077]') # noqa: E501
class UrlsApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add_tracking_domain(self, body={}, **kwargs): # noqa: E501 """Add tracking domains # noqa: E501 Add a tracking domain to your account. # noqa: E501 """ (data) = self.add_tracking_domain_with_http_info( body, **kwargs) # noqa: E501 return data def add_tracking_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Add tracking domains # noqa: E501 Add a tracking domain to your account. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add_tracking_domain" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/urls/add-tracking-domain', 'POST', body=body_params, response_type='InlineResponse20068') # noqa: E501 def check_tracking_domain(self, body={}, **kwargs): # noqa: E501 """Check cname settings # noqa: E501 Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call. # noqa: E501 """ (data) = self.check_tracking_domain_with_http_info( body, **kwargs) # noqa: E501 return data def check_tracking_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Check cname settings # noqa: E501 Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 check_tracking_domain" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/urls/check-tracking-domain', 'POST', body=body_params, response_type='InlineResponse20068') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List most clicked urls # noqa: E501 Get the 100 most clicked URLs. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List most clicked urls # noqa: E501 Get the 100 most clicked URLs. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/urls/list', 'POST', body=body_params, response_type='list[InlineResponse20064]') # noqa: E501 def search(self, body={}, **kwargs): # noqa: E501 """Search most clicked urls # noqa: E501 Return the 100 most clicked URLs that match the search query given. # noqa: E501 """ (data) = self.search_with_http_info(body, **kwargs) # noqa: E501 return data def search_with_http_info(self, body, **kwargs): # noqa: E501 """Search most clicked urls # noqa: E501 Return the 100 most clicked URLs that match the search query given. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 search" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/urls/search', 'POST', body=body_params, response_type='list[InlineResponse20065]') # noqa: E501 def time_series(self, body={}, **kwargs): # noqa: E501 """Get url history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a URL # noqa: E501 """ (data) = self.time_series_with_http_info(body, **kwargs) # noqa: E501 return data def time_series_with_http_info(self, body, **kwargs): # noqa: E501 """Get url history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a URL # noqa: E501 """ all_params = ['body'] # noqa: E501 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 time_series" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/urls/time-series', 'POST', body=body_params, response_type='list[InlineResponse20066]') # noqa: E501 def tracking_domains(self, body={}, **kwargs): # noqa: E501 """List tracking domains # noqa: E501 Get the list of tracking domains set up for this account. # noqa: E501 """ (data) = self.tracking_domains_with_http_info(body, **kwargs) # noqa: E501 return data def tracking_domains_with_http_info(self, body, **kwargs): # noqa: E501 """List tracking domains # noqa: E501 Get the list of tracking domains set up for this account. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 tracking_domains" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/urls/tracking-domains', 'POST', body=body_params, response_type='list[InlineResponse20067]') # noqa: E501
class SendersApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add_domain(self, body={}, **kwargs): # noqa: E501 """Add sender domain # noqa: E501 Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time. # noqa: E501 """ (data) = self.add_domain_with_http_info(body, **kwargs) # noqa: E501 return data def add_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Add sender domain # noqa: E501 Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add_domain" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/add-domain', 'POST', body=body_params, response_type='InlineResponse20042') # noqa: E501 def check_domain(self, body={}, **kwargs): # noqa: E501 """Check domain settings # noqa: E501 Checks the SPF and DKIM settings for a domain. If you haven't already added this domain to your account, it will be added automatically. # noqa: E501 """ (data) = self.check_domain_with_http_info(body, **kwargs) # noqa: E501 return data def check_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Check domain settings # noqa: E501 Checks the SPF and DKIM settings for a domain. If you haven't already added this domain to your account, it will be added automatically. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 check_domain" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/check-domain', 'POST', body=body_params, response_type='InlineResponse20043') # noqa: E501 def domains(self, body={}, **kwargs): # noqa: E501 """List sender domains # noqa: E501 Returns the sender domains that have been added to this account. # noqa: E501 """ (data) = self.domains_with_http_info(body, **kwargs) # noqa: E501 return data def domains_with_http_info(self, body, **kwargs): # noqa: E501 """List sender domains # noqa: E501 Returns the sender domains that have been added to this account. # noqa: E501 """ all_params = ['body'] # noqa: E501 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" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/domains', 'POST', body=body_params, response_type='list[InlineResponse20041]') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get sender info # noqa: E501 Return more detailed information about a single sender, including aggregates of recent stats. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get sender info # noqa: E501 Return more detailed information about a single sender, including aggregates of recent stats. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/info', 'POST', body=body_params, response_type='InlineResponse20045') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List account senders # noqa: E501 Return the senders that have tried to use this account. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List account senders # noqa: E501 Return the senders that have tried to use this account. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/list', 'POST', body=body_params, response_type='list[InlineResponse20040]') # noqa: E501 def time_series(self, body={}, **kwargs): # noqa: E501 """View sender history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a sender. # noqa: E501 """ (data) = self.time_series_with_http_info(body, **kwargs) # noqa: E501 return data def time_series_with_http_info(self, body, **kwargs): # noqa: E501 """View sender history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a sender. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 time_series" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/time-series', 'POST', body=body_params, response_type='list[InlineResponse20046]') # noqa: E501 def verify_domain(self, body={}, **kwargs): # noqa: E501 """Verify domain # noqa: E501 Sends a verification email in order to verify ownership of a domain. Domain verification is a required step to confirm ownership of a domain. Once a domain has been verified in a Transactional API account, other accounts may not have their messages signed by that domain unless they also verify the domain. This prevents other Transactional API accounts from sending mail signed by your domain. # noqa: E501 """ (data) = self.verify_domain_with_http_info(body, **kwargs) # noqa: E501 return data def verify_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Verify domain # noqa: E501 Sends a verification email in order to verify ownership of a domain. Domain verification is a required step to confirm ownership of a domain. Once a domain has been verified in a Transactional API account, other accounts may not have their messages signed by that domain unless they also verify the domain. This prevents other Transactional API accounts from sending mail signed by your domain. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 verify_domain" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/senders/verify-domain', 'POST', body=body_params, response_type='InlineResponse20044') # noqa: E501
class UsersApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def info(self, body={}, **kwargs): # noqa: E501 """Get user info # noqa: E501 Return the information about the API-connected user. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get user info # noqa: E501 Return the information about the API-connected user. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/users/info', 'POST', body=body_params, response_type='InlineResponse20069') # noqa: E501 def ping(self, body={}, **kwargs): # noqa: E501 """Ping # noqa: E501 Validate an API key and respond to a ping. # noqa: E501 """ (data) = self.ping_with_http_info(body, **kwargs) # noqa: E501 return data def ping_with_http_info(self, body, **kwargs): # noqa: E501 """Ping # noqa: E501 Validate an API key and respond to a ping. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 ping" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api('/users/ping', 'POST', body=body_params, response_type='str') # noqa: E501 def ping2(self, body={}, **kwargs): # noqa: E501 """Ping 2 # noqa: E501 Validate an API key and respond to a ping (JSON parser version). # noqa: E501 """ (data) = self.ping2_with_http_info(body, **kwargs) # noqa: E501 return data def ping2_with_http_info(self, body, **kwargs): # noqa: E501 """Ping 2 # noqa: E501 Validate an API key and respond to a ping (JSON parser version). # noqa: E501 """ all_params = ['body'] # noqa: E501 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 ping2" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/users/ping2', 'POST', body=body_params, response_type='InlineResponse20070') # noqa: E501 def senders(self, body={}, **kwargs): # noqa: E501 """List account senders # noqa: E501 Return the senders that have tried to use this account, both verified and unverified. # noqa: E501 """ (data) = self.senders_with_http_info(body, **kwargs) # noqa: E501 return data def senders_with_http_info(self, body, **kwargs): # noqa: E501 """List account senders # noqa: E501 Return the senders that have tried to use this account, both verified and unverified. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 senders" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/users/senders', 'POST', body=body_params, response_type='list[InlineResponse20040]') # noqa: E501
class ExportsApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def activity(self, body={}, **kwargs): # noqa: E501 """Export activity history # noqa: E501 Begins an export of your activity history. The activity will be exported to a zip archive containing a single file named activity.csv in the same format as you would be able to export from your account's activity view. It includes the following fields: Date, Email Address, Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom metadata fields, they will be included in the exported data. # noqa: E501 """ (data) = self.activity_with_http_info(body, **kwargs) # noqa: E501 return data def activity_with_http_info(self, body, **kwargs): # noqa: E501 """Export activity history # noqa: E501 Begins an export of your activity history. The activity will be exported to a zip archive containing a single file named activity.csv in the same format as you would be able to export from your account's activity view. It includes the following fields: Date, Email Address, Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom metadata fields, they will be included in the exported data. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 activity" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/exports/activity', 'POST', body=body_params, response_type='InlineResponse2004') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """View export info # noqa: E501 Returns information about an export job. If the export job's state is 'complete', the returned data will include a URL you can use to fetch the results. Every export job produces a zip archive, but the format of the archive is distinct for each job type. The api calls that initiate exports include more details about the output format for that job type. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """View export info # noqa: E501 Returns information about an export job. If the export job's state is 'complete', the returned data will include a URL you can use to fetch the results. Every export job produces a zip archive, but the format of the archive is distinct for each job type. The api calls that initiate exports include more details about the output format for that job type. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/exports/info', 'POST', body=body_params, response_type='InlineResponse200') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List exports # noqa: E501 Returns a list of your exports. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List exports # noqa: E501 Returns a list of your exports. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/exports/list', 'POST', body=body_params, response_type='list[InlineResponse2001]') # noqa: E501 def rejects(self, body={}, **kwargs): # noqa: E501 """Export blacklist # noqa: E501 Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive containing a single file named rejects.csv that includes the following fields: email, reason, detail, created_at, expires_at, last_event_at, expires_at. # noqa: E501 """ (data) = self.rejects_with_http_info(body, **kwargs) # noqa: E501 return data def rejects_with_http_info(self, body, **kwargs): # noqa: E501 """Export blacklist # noqa: E501 Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive containing a single file named rejects.csv that includes the following fields: email, reason, detail, created_at, expires_at, last_event_at, expires_at. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 rejects" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/exports/rejects', 'POST', body=body_params, response_type='InlineResponse2002') # noqa: E501 def whitelist(self, body={}, **kwargs): # noqa: E501 """Export whitelist # noqa: E501 Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at. # noqa: E501 """ (data) = self.whitelist_with_http_info(body, **kwargs) # noqa: E501 return data def whitelist_with_http_info(self, body, **kwargs): # noqa: E501 """Export whitelist # noqa: E501 Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 whitelist" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/exports/whitelist', 'POST', body=body_params, response_type='InlineResponse2003') # noqa: E501
class RejectsApi(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_key='', api_client = None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add(self, body = {}, **kwargs): # noqa: E501 """Add email to blacklist # noqa: E501 Adds an email to your email rejection blacklist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your blacklist. Attempting to blacklist an address that has been whitelisted will have no effect. # noqa: E501 """ (data) = self.add_with_http_info(body, **kwargs) # noqa: E501 return data def add_with_http_info(self, body, **kwargs): # noqa: E501 """Add email to blacklist # noqa: E501 Adds an email to your email rejection blacklist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your blacklist. Attempting to blacklist an address that has been whitelisted will have no effect. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/rejects/add', 'POST', body=body_params, response_type='InlineResponse20037') # noqa: E501 def delete(self, body = {}, **kwargs): # noqa: E501 """Delete email from blacklist # noqa: E501 Deletes an email rejection. There is no limit to how many rejections you can remove from your blacklist, but keep in mind that each deletion has an affect on your reputation. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete email from blacklist # noqa: E501 Deletes an email rejection. There is no limit to how many rejections you can remove from your blacklist, but keep in mind that each deletion has an affect on your reputation. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/rejects/delete', 'POST', body=body_params, response_type='InlineResponse20039') # noqa: E501 def list(self, body = {}, **kwargs): # noqa: E501 """List blacklisted emails # noqa: E501 Retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List blacklisted emails # noqa: E501 Retrieves your email rejection blacklist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/rejects/list', 'POST', body=body_params, response_type='list[InlineResponse20038]') # noqa: E501
class MessagesApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def cancel_scheduled(self, body={}, **kwargs): # noqa: E501 """Cancel scheduled email # noqa: E501 Cancels a scheduled email. # noqa: E501 """ (data) = self.cancel_scheduled_with_http_info(body, **kwargs) # noqa: E501 return data def cancel_scheduled_with_http_info(self, body, **kwargs): # noqa: E501 """Cancel scheduled email # noqa: E501 Cancels a scheduled email. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 cancel_scheduled" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/cancel-scheduled', 'POST', body=body_params, response_type='list[InlineResponse20032]') # noqa: E501 def content(self, body={}, **kwargs): # noqa: E501 """Get message content # noqa: E501 Get the full content of a recently sent message. # noqa: E501 """ (data) = self.content_with_http_info(body, **kwargs) # noqa: E501 return data def content_with_http_info(self, body, **kwargs): # noqa: E501 """Get message content # noqa: E501 Get the full content of a recently sent message. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 content" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/content', 'POST', body=body_params, response_type='InlineResponse20030') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get message info # noqa: E501 Get the information for a single recently sent message. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get message info # noqa: E501 Get the information for a single recently sent message. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/info', 'POST', body=body_params, response_type='InlineResponse20029') # noqa: E501 def list_scheduled(self, body={}, **kwargs): # noqa: E501 """List scheduled emails # noqa: E501 Queries your scheduled emails. # noqa: E501 """ (data) = self.list_scheduled_with_http_info(body, **kwargs) # noqa: E501 return data def list_scheduled_with_http_info(self, body, **kwargs): # noqa: E501 """List scheduled emails # noqa: E501 Queries your scheduled emails. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list_scheduled" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/list-scheduled', 'POST', body=body_params, response_type='list[InlineResponse20032]') # noqa: E501 def parse(self, body={}, **kwargs): # noqa: E501 """Parse mime document # noqa: E501 Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces. # noqa: E501 """ (data) = self.parse_with_http_info(body, **kwargs) # noqa: E501 return data def parse_with_http_info(self, body, **kwargs): # noqa: E501 """Parse mime document # noqa: E501 Parse the full MIME document for an email message, returning the content of the message broken into its constituent pieces. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 parse" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/parse', 'POST', body=body_params, response_type='InlineResponse20031') # noqa: E501 def reschedule(self, body={}, **kwargs): # noqa: E501 """Reschedule email # noqa: E501 Reschedules a scheduled email. # noqa: E501 """ (data) = self.reschedule_with_http_info(body, **kwargs) # noqa: E501 return data def reschedule_with_http_info(self, body, **kwargs): # noqa: E501 """Reschedule email # noqa: E501 Reschedules a scheduled email. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 reschedule" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/reschedule', 'POST', body=body_params, response_type='list[InlineResponse20032]') # noqa: E501 def search(self, body={}, **kwargs): # noqa: E501 """Search messages by date # noqa: E501 Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use /messages/info.json to get the information for a single message, or webhooks to push activity to your own application for querying. # noqa: E501 """ (data) = self.search_with_http_info(body, **kwargs) # noqa: E501 return data def search_with_http_info(self, body, **kwargs): # noqa: E501 """Search messages by date # noqa: E501 Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use /messages/info.json to get the information for a single message, or webhooks to push activity to your own application for querying. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 search" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/search', 'POST', body=body_params, response_type='list[InlineResponse20027]') # noqa: E501 def search_time_series(self, body={}, **kwargs): # noqa: E501 """Search messages by hour # noqa: E501 Search the content of recently sent messages and return the aggregated hourly stats for matching messages. # noqa: E501 """ (data) = self.search_time_series_with_http_info(body, **kwargs) # noqa: E501 return data def search_time_series_with_http_info(self, body, **kwargs): # noqa: E501 """Search messages by hour # noqa: E501 Search the content of recently sent messages and return the aggregated hourly stats for matching messages. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 search_time_series" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/search-time-series', 'POST', body=body_params, response_type='list[InlineResponse20028]') # noqa: E501 def send(self, body={}, **kwargs): # noqa: E501 """Send new message # noqa: E501 Send a new transactional message through the Transactional API. # noqa: E501 """ (data) = self.send_with_http_info(body, **kwargs) # noqa: E501 return data def send_with_http_info(self, body, **kwargs): # noqa: E501 """Send new message # noqa: E501 Send a new transactional message through the Transactional API. # noqa: E501 """ all_params = ['body'] # noqa: E501 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" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/send', 'POST', body=body_params, response_type='list[InlineResponse20025]') # noqa: E501 def send_raw(self, body={}, **kwargs): # noqa: E501 """Send mime document # noqa: E501 Take a raw MIME document for a message, and send it exactly as if it were sent through the Transactional API's SMTP servers. # noqa: E501 """ (data) = self.send_raw_with_http_info(body, **kwargs) # noqa: E501 return data def send_raw_with_http_info(self, body, **kwargs): # noqa: E501 """Send mime document # noqa: E501 Take a raw MIME document for a message, and send it exactly as if it were sent through the Transactional API's SMTP servers. # noqa: E501 """ all_params = ['body'] # noqa: E501 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_raw" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api('/messages/send-raw', 'POST', body=body_params, response_type='object') # noqa: E501 def send_template(self, body={}, **kwargs): # noqa: E501 """Send using message template # noqa: E501 Send a new transactional message through the Transactional API using a template. # noqa: E501 """ (data) = self.send_template_with_http_info(body, **kwargs) # noqa: E501 return data def send_template_with_http_info(self, body, **kwargs): # noqa: E501 """Send using message template # noqa: E501 Send a new transactional message through the Transactional API using a template. # noqa: E501 """ all_params = ['body'] # noqa: E501 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_template" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/messages/send-template', 'POST', body=body_params, response_type='list[InlineResponse20026]') # noqa: E501
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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add(self, body={}, **kwargs): # noqa: E501 """Add webhook # noqa: E501 Add a new webhook. # noqa: E501 """ (data) = self.add_with_http_info(body, **kwargs) # noqa: E501 return data def add_with_http_info(self, body, **kwargs): # noqa: E501 """Add webhook # noqa: E501 Add a new webhook. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/webhooks/add', 'POST', body=body_params, response_type='InlineResponse20072') # noqa: E501 def delete(self, body={}, **kwargs): # noqa: E501 """Delete webhook # noqa: E501 Delete an existing webhook. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete webhook # noqa: E501 Delete an existing webhook. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/webhooks/delete', 'POST', body=body_params, response_type='InlineResponse20075') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get webhook info # noqa: E501 Given the ID of an existing webhook, return the data about it. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get webhook info # noqa: E501 Given the ID of an existing webhook, return the data about it. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/webhooks/info', 'POST', body=body_params, response_type='InlineResponse20073') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List webhooks # noqa: E501 Get the list of all webhooks defined on the account. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List webhooks # noqa: E501 Get the list of all webhooks defined on the account. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/webhooks/list', 'POST', body=body_params, response_type='list[InlineResponse20071]') # noqa: E501 def update(self, body={}, **kwargs): # noqa: E501 """Update webhook # noqa: E501 Update an existing webhook. # noqa: E501 """ (data) = self.update_with_http_info(body, **kwargs) # noqa: E501 return data def update_with_http_info(self, body, **kwargs): # noqa: E501 """Update webhook # noqa: E501 Update an existing webhook. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 update" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/webhooks/update', 'POST', body=body_params, response_type='InlineResponse20074') # noqa: E501
class InboundApi(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_key='', api_client = None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add_domain(self, body = {}, **kwargs): # noqa: E501 """Add inbound domain # noqa: E501 Add an inbound domain to your account. # noqa: E501 """ (data) = self.add_domain_with_http_info(body, **kwargs) # noqa: E501 return data def add_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Add inbound domain # noqa: E501 Add an inbound domain to your account. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add_domain" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/add-domain', 'POST', body=body_params, response_type='InlineResponse2006') # noqa: E501 def add_route(self, body = {}, **kwargs): # noqa: E501 """Add mailbox route # noqa: E501 Add a new mailbox route to an inbound domain. # noqa: E501 """ (data) = self.add_route_with_http_info(body, **kwargs) # noqa: E501 return data def add_route_with_http_info(self, body, **kwargs): # noqa: E501 """Add mailbox route # noqa: E501 Add a new mailbox route to an inbound domain. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add_route" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/add-route', 'POST', body=body_params, response_type='InlineResponse20010') # noqa: E501 def check_domain(self, body = {}, **kwargs): # noqa: E501 """Check domain settings # noqa: E501 Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call. # noqa: E501 """ (data) = self.check_domain_with_http_info(body, **kwargs) # noqa: E501 return data def check_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Check domain settings # noqa: E501 Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 check_domain" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/check-domain', 'POST', body=body_params, response_type='InlineResponse2007') # noqa: E501 def delete_domain(self, body = {}, **kwargs): # noqa: E501 """Delete inbound domain # noqa: E501 Delete an inbound domain from the account. All mail will stop routing for this domain immediately. # noqa: E501 """ (data) = self.delete_domain_with_http_info(body, **kwargs) # noqa: E501 return data def delete_domain_with_http_info(self, body, **kwargs): # noqa: E501 """Delete inbound domain # noqa: E501 Delete an inbound domain from the account. All mail will stop routing for this domain immediately. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete_domain" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/delete-domain', 'POST', body=body_params, response_type='InlineResponse2008') # noqa: E501 def delete_route(self, body = {}, **kwargs): # noqa: E501 """Delete mailbox route # noqa: E501 Delete an existing inbound mailbox route. # noqa: E501 """ (data) = self.delete_route_with_http_info(body, **kwargs) # noqa: E501 return data def delete_route_with_http_info(self, body, **kwargs): # noqa: E501 """Delete mailbox route # noqa: E501 Delete an existing inbound mailbox route. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete_route" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/delete-route', 'POST', body=body_params, response_type='InlineResponse20012') # noqa: E501 def domains(self, body = {}, **kwargs): # noqa: E501 """List inbound domains # noqa: E501 List the domains that have been configured for inbound delivery. # noqa: E501 """ (data) = self.domains_with_http_info(body, **kwargs) # noqa: E501 return data def domains_with_http_info(self, body, **kwargs): # noqa: E501 """List inbound domains # noqa: E501 List the domains that have been configured for inbound delivery. # noqa: E501 """ all_params = ['body'] # noqa: E501 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" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/domains', 'POST', body=body_params, response_type='list[InlineResponse2005]') # noqa: E501 def routes(self, body = {}, **kwargs): # noqa: E501 """List mailbox routes # noqa: E501 List the mailbox routes defined for an inbound domain. # noqa: E501 """ (data) = self.routes_with_http_info(body, **kwargs) # noqa: E501 return data def routes_with_http_info(self, body, **kwargs): # noqa: E501 """List mailbox routes # noqa: E501 List the mailbox routes defined for an inbound domain. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 routes" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/routes', 'POST', body=body_params, response_type='list[InlineResponse2009]') # noqa: E501 def send_raw(self, body = {}, **kwargs): # noqa: E501 """Send mime document # noqa: E501 Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP. # noqa: E501 """ (data) = self.send_raw_with_http_info(body, **kwargs) # noqa: E501 return data def send_raw_with_http_info(self, body, **kwargs): # noqa: E501 """Send mime document # noqa: E501 Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP. # noqa: E501 """ all_params = ['body'] # noqa: E501 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_raw" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/send-raw', 'POST', body=body_params, response_type='list[InlineResponse20013]') # noqa: E501 def update_route(self, body = {}, **kwargs): # noqa: E501 """Update mailbox route # noqa: E501 Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged. # noqa: E501 """ (data) = self.update_route_with_http_info(body, **kwargs) # noqa: E501 return data def update_route_with_http_info(self, body, **kwargs): # noqa: E501 """Update mailbox route # noqa: E501 Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 update_route" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/inbound/update-route', 'POST', body=body_params, response_type='InlineResponse20011') # noqa: E501
class IpsApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def cancel_warmup(self, body={}, **kwargs): # noqa: E501 """Cancel ip warmup # noqa: E501 Cancels the warmup process for a dedicated IP. # noqa: E501 """ (data) = self.cancel_warmup_with_http_info(body, **kwargs) # noqa: E501 return data def cancel_warmup_with_http_info(self, body, **kwargs): # noqa: E501 """Cancel ip warmup # noqa: E501 Cancels the warmup process for a dedicated IP. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 cancel_warmup" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/cancel-warmup', 'POST', body=body_params, response_type='InlineResponse20017') # noqa: E501 def check_custom_dns(self, body={}, **kwargs): # noqa: E501 """Test custom dns # noqa: E501 Tests whether a domain name is valid for use as the custom reverse DNS for a dedicated IP. # noqa: E501 """ (data) = self.check_custom_dns_with_http_info(body, **kwargs) # noqa: E501 return data def check_custom_dns_with_http_info(self, body, **kwargs): # noqa: E501 """Test custom dns # noqa: E501 Tests whether a domain name is valid for use as the custom reverse DNS for a dedicated IP. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 check_custom_dns" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/check-custom-dns', 'POST', body=body_params, response_type='InlineResponse20023') # noqa: E501 def create_pool(self, body={}, **kwargs): # noqa: E501 """Add ip pool # noqa: E501 Creates a pool and returns it. If a pool already exists with this name, no action will be performed. # noqa: E501 """ (data) = self.create_pool_with_http_info(body, **kwargs) # noqa: E501 return data def create_pool_with_http_info(self, body, **kwargs): # noqa: E501 """Add ip pool # noqa: E501 Creates a pool and returns it. If a pool already exists with this name, no action will be performed. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 create_pool" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/create-pool', 'POST', body=body_params, response_type='InlineResponse20021') # noqa: E501 def delete(self, body={}, **kwargs): # noqa: E501 """Delete ip address # noqa: E501 Deletes a dedicated IP. This is permanent and cannot be undone. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete ip address # noqa: E501 Deletes a dedicated IP. This is permanent and cannot be undone. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/delete', 'POST', body=body_params, response_type='InlineResponse20019') # noqa: E501 def delete_pool(self, body={}, **kwargs): # noqa: E501 """Delete ip pool # noqa: E501 Deletes a pool. A pool must be empty before you can delete it, and you cannot delete your default pool. # noqa: E501 """ (data) = self.delete_pool_with_http_info(body, **kwargs) # noqa: E501 return data def delete_pool_with_http_info(self, body, **kwargs): # noqa: E501 """Delete ip pool # noqa: E501 Deletes a pool. A pool must be empty before you can delete it, and you cannot delete your default pool. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete_pool" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/delete-pool', 'POST', body=body_params, response_type='InlineResponse20022') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get ip info # noqa: E501 Retrieves information about a single dedicated IP. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get ip info # noqa: E501 Retrieves information about a single dedicated IP. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/info', 'POST', body=body_params, response_type='InlineResponse20015') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List ip addresses # noqa: E501 Lists your dedicated IPs. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List ip addresses # noqa: E501 Lists your dedicated IPs. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/list', 'POST', body=body_params, response_type='list[InlineResponse20014]') # noqa: E501 def list_pools(self, body={}, **kwargs): # noqa: E501 """List ip pools # noqa: E501 Lists your dedicated IP pools. # noqa: E501 """ (data) = self.list_pools_with_http_info(body, **kwargs) # noqa: E501 return data def list_pools_with_http_info(self, body, **kwargs): # noqa: E501 """List ip pools # noqa: E501 Lists your dedicated IP pools. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list_pools" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/list-pools', 'POST', body=body_params, response_type='list[InlineResponse20020]') # noqa: E501 def pool_info(self, body={}, **kwargs): # noqa: E501 """Get ip pool info # noqa: E501 Describes a single dedicated IP pool. # noqa: E501 """ (data) = self.pool_info_with_http_info(body, **kwargs) # noqa: E501 return data def pool_info_with_http_info(self, body, **kwargs): # noqa: E501 """Get ip pool info # noqa: E501 Describes a single dedicated IP pool. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 pool_info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/pool-info', 'POST', body=body_params, response_type='InlineResponse20021') # noqa: E501 def provision(self, body={}, **kwargs): # noqa: E501 """Request additional ip # noqa: E501 Requests an additional dedicated IP for your account. Accounts may have one outstanding request at any time, and provisioning requests are processed within 24 hours. # noqa: E501 """ (data) = self.provision_with_http_info(body, **kwargs) # noqa: E501 return data def provision_with_http_info(self, body, **kwargs): # noqa: E501 """Request additional ip # noqa: E501 Requests an additional dedicated IP for your account. Accounts may have one outstanding request at any time, and provisioning requests are processed within 24 hours. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 provision" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/provision', 'POST', body=body_params, response_type='InlineResponse20016') # noqa: E501 def set_custom_dns(self, body={}, **kwargs): # noqa: E501 """Set custom dns # noqa: E501 Configures the custom DNS name for a dedicated IP. # noqa: E501 """ (data) = self.set_custom_dns_with_http_info(body, **kwargs) # noqa: E501 return data def set_custom_dns_with_http_info(self, body, **kwargs): # noqa: E501 """Set custom dns # noqa: E501 Configures the custom DNS name for a dedicated IP. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 set_custom_dns" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/set-custom-dns', 'POST', body=body_params, response_type='InlineResponse20024') # noqa: E501 def set_pool(self, body={}, **kwargs): # noqa: E501 """Move ip to different pool # noqa: E501 Moves a dedicated IP to a different pool. # noqa: E501 """ (data) = self.set_pool_with_http_info(body, **kwargs) # noqa: E501 return data def set_pool_with_http_info(self, body, **kwargs): # noqa: E501 """Move ip to different pool # noqa: E501 Moves a dedicated IP to a different pool. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 set_pool" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/set-pool', 'POST', body=body_params, response_type='InlineResponse20018') # noqa: E501 def start_warmup(self, body={}, **kwargs): # noqa: E501 """Start ip warmup # noqa: E501 Begins the warmup process for a dedicated IP. During the warmup process, the Transactional API will gradually increase the percentage of your mail that is sent over the warming-up IP, over a period of roughly 30 days. The rest of your mail will be sent over shared IPs or other dedicated IPs in the same pool. # noqa: E501 """ (data) = self.start_warmup_with_http_info(body, **kwargs) # noqa: E501 return data def start_warmup_with_http_info(self, body, **kwargs): # noqa: E501 """Start ip warmup # noqa: E501 Begins the warmup process for a dedicated IP. During the warmup process, the Transactional API will gradually increase the percentage of your mail that is sent over the warming-up IP, over a period of roughly 30 days. The rest of your mail will be sent over shared IPs or other dedicated IPs in the same pool. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 start_warmup" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/ips/start-warmup', 'POST', body=body_params, response_type='InlineResponse20017') # noqa: E501
class SubaccountsApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add(self, body={}, **kwargs): # noqa: E501 """Add subaccount # noqa: E501 Add a new subaccount. # noqa: E501 """ (data) = self.add_with_http_info(body, **kwargs) # noqa: E501 return data def add_with_http_info(self, body, **kwargs): # noqa: E501 """Add subaccount # noqa: E501 Add a new subaccount. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/add', 'POST', body=body_params, response_type='InlineResponse20048') # noqa: E501 def delete(self, body={}, **kwargs): # noqa: E501 """Delete subaccount # noqa: E501 Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete subaccount # noqa: E501 Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/delete', 'POST', body=body_params, response_type='InlineResponse20051') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get subaccount info # noqa: E501 Given the ID of an existing subaccount, return the data about it. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get subaccount info # noqa: E501 Given the ID of an existing subaccount, return the data about it. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/info', 'POST', body=body_params, response_type='InlineResponse20049') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List subaccounts # noqa: E501 Get the list of subaccounts defined for the account, optionally filtered by a prefix. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List subaccounts # noqa: E501 Get the list of subaccounts defined for the account, optionally filtered by a prefix. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/list', 'POST', body=body_params, response_type='list[InlineResponse20047]') # noqa: E501 def pause(self, body={}, **kwargs): # noqa: E501 """Pause subaccount # noqa: E501 Pause a subaccount's sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed. # noqa: E501 """ (data) = self.pause_with_http_info(body, **kwargs) # noqa: E501 return data def pause_with_http_info(self, body, **kwargs): # noqa: E501 """Pause subaccount # noqa: E501 Pause a subaccount's sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 pause" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/pause', 'POST', body=body_params, response_type='InlineResponse20052') # noqa: E501 def resume(self, body={}, **kwargs): # noqa: E501 """Resume subaccount # noqa: E501 Resume a paused subaccount's sending. # noqa: E501 """ (data) = self.resume_with_http_info(body, **kwargs) # noqa: E501 return data def resume_with_http_info(self, body, **kwargs): # noqa: E501 """Resume subaccount # noqa: E501 Resume a paused subaccount's sending. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 resume" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/resume', 'POST', body=body_params, response_type='InlineResponse20053') # noqa: E501 def update(self, body={}, **kwargs): # noqa: E501 """Update subaccount # noqa: E501 Update an existing subaccount. # noqa: E501 """ (data) = self.update_with_http_info(body, **kwargs) # noqa: E501 return data def update_with_http_info(self, body, **kwargs): # noqa: E501 """Update subaccount # noqa: E501 Update an existing subaccount. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 update" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/subaccounts/update', 'POST', body=body_params, response_type='InlineResponse20050') # noqa: E501
class MetadataApi(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_key='', api_client = None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add(self, body = {}, **kwargs): # noqa: E501 """Add metadata field # noqa: E501 Add a new custom metadata field to be indexed for the account. # noqa: E501 """ (data) = self.add_with_http_info(body, **kwargs) # noqa: E501 return data def add_with_http_info(self, body, **kwargs): # noqa: E501 """Add metadata field # noqa: E501 Add a new custom metadata field to be indexed for the account. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/metadata/add', 'POST', body=body_params, response_type='InlineResponse20034') # noqa: E501 def delete(self, body = {}, **kwargs): # noqa: E501 """Delete metadata field # noqa: E501 Delete an existing custom metadata field. Deletion isn't instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete metadata field # noqa: E501 Delete an existing custom metadata field. Deletion isn't instataneous, and /metadata/list will continue to return the field until the asynchronous deletion process is complete. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/metadata/delete', 'POST', body=body_params, response_type='InlineResponse20036') # noqa: E501 def list(self, body = {}, **kwargs): # noqa: E501 """List metadata fields # noqa: E501 Get the list of custom metadata fields indexed for the account. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List metadata fields # noqa: E501 Get the list of custom metadata fields indexed for the account. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/metadata/list', 'POST', body=body_params, response_type='list[InlineResponse20033]') # noqa: E501 def update(self, body = {}, **kwargs): # noqa: E501 """Update metadata field # noqa: E501 Update an existing custom metadata field. # noqa: E501 """ (data) = self.update_with_http_info(body, **kwargs) # noqa: E501 return data def update_with_http_info(self, body, **kwargs): # noqa: E501 """Update metadata field # noqa: E501 Update an existing custom metadata field. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 update" % key ) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/metadata/update', 'POST', body=body_params, response_type='InlineResponse20035') # noqa: E501
class TemplatesApi(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_key='', api_client=None): self.api_key = api_key if api_client: self.api_client = api_client else: self.api_client = ApiClient() def add(self, body={}, **kwargs): # noqa: E501 """Add template # noqa: E501 Add a new template. # noqa: E501 """ (data) = self.add_with_http_info(body, **kwargs) # noqa: E501 return data def add_with_http_info(self, body, **kwargs): # noqa: E501 """Add template # noqa: E501 Add a new template. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 add" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/add', 'POST', body=body_params, response_type='InlineResponse20057') # noqa: E501 def delete(self, body={}, **kwargs): # noqa: E501 """Delete template # noqa: E501 Delete a template. # noqa: E501 """ (data) = self.delete_with_http_info(body, **kwargs) # noqa: E501 return data def delete_with_http_info(self, body, **kwargs): # noqa: E501 """Delete template # noqa: E501 Delete a template. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 delete" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/delete', 'POST', body=body_params, response_type='InlineResponse20061') # noqa: E501 def info(self, body={}, **kwargs): # noqa: E501 """Get template info # noqa: E501 Get the information for an existing template. # noqa: E501 """ (data) = self.info_with_http_info(body, **kwargs) # noqa: E501 return data def info_with_http_info(self, body, **kwargs): # noqa: E501 """Get template info # noqa: E501 Get the information for an existing template. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 info" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/info', 'POST', body=body_params, response_type='InlineResponse20058') # noqa: E501 def list(self, body={}, **kwargs): # noqa: E501 """List templates # noqa: E501 Return a list of all the templates available to this user. # noqa: E501 """ (data) = self.list_with_http_info(body, **kwargs) # noqa: E501 return data def list_with_http_info(self, body, **kwargs): # noqa: E501 """List templates # noqa: E501 Return a list of all the templates available to this user. # noqa: E501 """ all_params = ['body'] # noqa: E501 params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError("Got an unexpected keyword argument '%s'" " to method list" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/list', 'POST', body=body_params, response_type='list[InlineResponse20062]') # noqa: E501 def publish(self, body={}, **kwargs): # noqa: E501 """Publish template content # noqa: E501 Publish the content for the template. Any new messages sent using this template will start using the content that was previously in draft. # noqa: E501 """ (data) = self.publish_with_http_info(body, **kwargs) # noqa: E501 return data def publish_with_http_info(self, body, **kwargs): # noqa: E501 """Publish template content # noqa: E501 Publish the content for the template. Any new messages sent using this template will start using the content that was previously in draft. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 publish" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/publish', 'POST', body=body_params, response_type='InlineResponse20060') # noqa: E501 def render(self, body={}, **kwargs): # noqa: E501 """Render html template # noqa: E501 Inject content and optionally merge fields into a template, returning the HTML that results. # noqa: E501 """ (data) = self.render_with_http_info(body, **kwargs) # noqa: E501 return data def render_with_http_info(self, body, **kwargs): # noqa: E501 """Render html template # noqa: E501 Inject content and optionally merge fields into a template, returning the HTML that results. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 render" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/render', 'POST', body=body_params, response_type='InlineResponse20063') # noqa: E501 def time_series(self, body={}, **kwargs): # noqa: E501 """Get template history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a template. # noqa: E501 """ (data) = self.time_series_with_http_info(body, **kwargs) # noqa: E501 return data def time_series_with_http_info(self, body, **kwargs): # noqa: E501 """Get template history # noqa: E501 Return the recent history (hourly stats for the last 30 days) for a template. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 time_series" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/time-series', 'POST', body=body_params, response_type='list[InlineResponse20046]') # noqa: E501 def update(self, body={}, **kwargs): # noqa: E501 """Update template # noqa: E501 Update the code for an existing template. If null is provided for any fields, the values will remain unchanged. # noqa: E501 """ (data) = self.update_with_http_info(body, **kwargs) # noqa: E501 return data def update_with_http_info(self, body, **kwargs): # noqa: E501 """Update template # noqa: E501 Update the code for an existing template. If null is provided for any fields, the values will remain unchanged. # noqa: E501 """ all_params = ['body'] # noqa: E501 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 update" % key) params[key] = val del params['kwargs'] # add api_key to body params params['body']['key'] = self.api_key body_params = None if 'body' in params: body_params = params['body'] return self.api_client.call_api( '/templates/update', 'POST', body=body_params, response_type='InlineResponse20059') # noqa: E501