index
int64 0
731k
| package
stringlengths 2
98
⌀ | name
stringlengths 1
76
| docstring
stringlengths 0
281k
⌀ | code
stringlengths 4
1.07M
⌀ | signature
stringlengths 2
42.8k
⌀ |
---|---|---|---|---|---|
69,138 |
mailchimp_marketing.api.connected_sites_api
|
create_with_http_info
|
Add connected site # noqa: E501
Create a new Mailchimp connected site. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ConnectedSite1 body: (required)
:return: ConnectedSite
If the method is called asynchronously,
returns the request thread.
|
def create_with_http_info(self, body, **kwargs): # noqa: E501
"""Add connected site # noqa: E501
Create a new Mailchimp connected site. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ConnectedSite1 body: (required)
:return: ConnectedSite
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method create" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/connected-sites', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ConnectedSite', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, body, **kwargs)
|
69,139 |
mailchimp_marketing.api.connected_sites_api
|
get
|
Get connected site # noqa: E501
Get information about a specific connected site. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConnectedSite
If the method is called asynchronously,
returns the request thread.
|
def get(self, connected_site_id, **kwargs): # noqa: E501
"""Get connected site # noqa: E501
Get information about a specific connected site. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConnectedSite
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_with_http_info(connected_site_id, **kwargs) # noqa: E501
else:
(data) = self.get_with_http_info(connected_site_id, **kwargs) # noqa: E501
return data
|
(self, connected_site_id, **kwargs)
|
69,140 |
mailchimp_marketing.api.connected_sites_api
|
get_with_http_info
|
Get connected site # noqa: E501
Get information about a specific connected site. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_with_http_info(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConnectedSite
If the method is called asynchronously,
returns the request thread.
|
def get_with_http_info(self, connected_site_id, **kwargs): # noqa: E501
"""Get connected site # noqa: E501
Get information about a specific connected site. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_with_http_info(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConnectedSite
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['connected_site_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'connected_site_id' is set
if ('connected_site_id' not in params or
params['connected_site_id'] is None):
raise ValueError("Missing the required parameter `connected_site_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'connected_site_id' in params:
path_params['connected_site_id'] = params['connected_site_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/connected-sites/{connected_site_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ConnectedSite', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, connected_site_id, **kwargs)
|
69,141 |
mailchimp_marketing.api.connected_sites_api
|
list
|
List connected sites # noqa: E501
Get all connected sites in an account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: ConnectedSites
If the method is called asynchronously,
returns the request thread.
|
def list(self, **kwargs): # noqa: E501
"""List connected sites # noqa: E501
Get all connected sites in an account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: ConnectedSites
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.list_with_http_info(**kwargs) # noqa: E501
return data
|
(self, **kwargs)
|
69,142 |
mailchimp_marketing.api.connected_sites_api
|
list_with_http_info
|
List connected sites # noqa: E501
Get all connected sites in an account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: ConnectedSites
If the method is called asynchronously,
returns the request thread.
|
def list_with_http_info(self, **kwargs): # noqa: E501
"""List connected sites # noqa: E501
Get all connected sites in an account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: ConnectedSites
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list" % key
)
params[key] = val
del params['kwargs']
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/connected-sites', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ConnectedSites', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, **kwargs)
|
69,143 |
mailchimp_marketing.api.connected_sites_api
|
remove
|
Delete connected site # noqa: E501
Remove a connected site from your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def remove(self, connected_site_id, **kwargs): # noqa: E501
"""Delete connected site # noqa: E501
Remove a connected site from your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.remove_with_http_info(connected_site_id, **kwargs) # noqa: E501
else:
(data) = self.remove_with_http_info(connected_site_id, **kwargs) # noqa: E501
return data
|
(self, connected_site_id, **kwargs)
|
69,144 |
mailchimp_marketing.api.connected_sites_api
|
remove_with_http_info
|
Delete connected site # noqa: E501
Remove a connected site from your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_with_http_info(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def remove_with_http_info(self, connected_site_id, **kwargs): # noqa: E501
"""Delete connected site # noqa: E501
Remove a connected site from your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_with_http_info(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['connected_site_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method remove" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'connected_site_id' is set
if ('connected_site_id' not in params or
params['connected_site_id'] is None):
raise ValueError("Missing the required parameter `connected_site_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'connected_site_id' in params:
path_params['connected_site_id'] = params['connected_site_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/connected-sites/{connected_site_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, connected_site_id, **kwargs)
|
69,145 |
mailchimp_marketing.api.connected_sites_api
|
verify_script_installation
|
Verify connected site script # noqa: E501
Verify that the connected sites script has been installed, either via the script URL or fragment. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.verify_script_installation(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def verify_script_installation(self, connected_site_id, **kwargs): # noqa: E501
"""Verify connected site script # noqa: E501
Verify that the connected sites script has been installed, either via the script URL or fragment. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.verify_script_installation(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.verify_script_installation_with_http_info(connected_site_id, **kwargs) # noqa: E501
else:
(data) = self.verify_script_installation_with_http_info(connected_site_id, **kwargs) # noqa: E501
return data
|
(self, connected_site_id, **kwargs)
|
69,146 |
mailchimp_marketing.api.connected_sites_api
|
verify_script_installation_with_http_info
|
Verify connected site script # noqa: E501
Verify that the connected sites script has been installed, either via the script URL or fragment. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.verify_script_installation_with_http_info(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def verify_script_installation_with_http_info(self, connected_site_id, **kwargs): # noqa: E501
"""Verify connected site script # noqa: E501
Verify that the connected sites script has been installed, either via the script URL or fragment. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.verify_script_installation_with_http_info(connected_site_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str connected_site_id: The unique identifier for the site. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['connected_site_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method verify_script_installation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'connected_site_id' is set
if ('connected_site_id' not in params or
params['connected_site_id'] is None):
raise ValueError("Missing the required parameter `connected_site_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'connected_site_id' in params:
path_params['connected_site_id'] = params['connected_site_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/connected-sites/{connected_site_id}/actions/verify-script-installation', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, connected_site_id, **kwargs)
|
69,147 |
mailchimp_marketing.api.conversations_api
|
ConversationsApi
|
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
|
class ConversationsApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client):
self.api_client = api_client
def list(self, **kwargs): # noqa: E501
"""List conversations # noqa: E501
Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str has_unread_messages: Whether the conversation has any unread messages.
:param str list_id: The unique id for the list.
:param str campaign_id: The unique id for the campaign.
:return: TrackedConversations
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.list_with_http_info(**kwargs) # noqa: E501
return data
def list_with_http_info(self, **kwargs): # noqa: E501
"""List conversations # noqa: E501
Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str has_unread_messages: Whether the conversation has any unread messages.
:param str list_id: The unique id for the list.
:param str campaign_id: The unique id for the campaign.
:return: TrackedConversations
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['fields', 'exclude_fields', 'count', 'offset', 'has_unread_messages', 'list_id', 'campaign_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list" % key
)
params[key] = val
del params['kwargs']
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'has_unread_messages' in params:
query_params.append(('has_unread_messages', params['has_unread_messages'])) # noqa: E501
if 'list_id' in params:
query_params.append(('list_id', params['list_id'])) # noqa: E501
if 'campaign_id' in params:
query_params.append(('campaign_id', params['campaign_id'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TrackedConversations', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get(self, conversation_id, **kwargs): # noqa: E501
"""Get conversation # noqa: E501
Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: Conversation
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_with_http_info(conversation_id, **kwargs) # noqa: E501
else:
(data) = self.get_with_http_info(conversation_id, **kwargs) # noqa: E501
return data
def get_with_http_info(self, conversation_id, **kwargs): # noqa: E501
"""Get conversation # noqa: E501
Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_with_http_info(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: Conversation
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['conversation_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'conversation_id' is set
if ('conversation_id' not in params or
params['conversation_id'] is None):
raise ValueError("Missing the required parameter `conversation_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'conversation_id' in params:
path_params['conversation_id'] = params['conversation_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations/{conversation_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Conversation', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_conversation_messages(self, conversation_id, **kwargs): # noqa: E501
"""List messages # noqa: E501
Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_messages(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param str is_read: Whether a conversation message has been marked as read.
:param datetime before_timestamp: Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:param datetime since_timestamp: Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:return: CollectionOfConversationMessages
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_conversation_messages_with_http_info(conversation_id, **kwargs) # noqa: E501
else:
(data) = self.get_conversation_messages_with_http_info(conversation_id, **kwargs) # noqa: E501
return data
def get_conversation_messages_with_http_info(self, conversation_id, **kwargs): # noqa: E501
"""List messages # noqa: E501
Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_messages_with_http_info(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param str is_read: Whether a conversation message has been marked as read.
:param datetime before_timestamp: Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:param datetime since_timestamp: Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:return: CollectionOfConversationMessages
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['conversation_id', 'fields', 'exclude_fields', 'is_read', 'before_timestamp', 'since_timestamp'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_conversation_messages" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'conversation_id' is set
if ('conversation_id' not in params or
params['conversation_id'] is None):
raise ValueError("Missing the required parameter `conversation_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'conversation_id' in params:
path_params['conversation_id'] = params['conversation_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'is_read' in params:
query_params.append(('is_read', params['is_read'])) # noqa: E501
if 'before_timestamp' in params:
query_params.append(('before_timestamp', params['before_timestamp'])) # noqa: E501
if 'since_timestamp' in params:
query_params.append(('since_timestamp', params['since_timestamp'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations/{conversation_id}/messages', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='CollectionOfConversationMessages', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_conversation_message(self, conversation_id, message_id, **kwargs): # noqa: E501
"""Get message # noqa: E501
Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_message(conversation_id, message_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param str message_id: The unique id for the conversation message. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConversationMessage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_conversation_message_with_http_info(conversation_id, message_id, **kwargs) # noqa: E501
else:
(data) = self.get_conversation_message_with_http_info(conversation_id, message_id, **kwargs) # noqa: E501
return data
def get_conversation_message_with_http_info(self, conversation_id, message_id, **kwargs): # noqa: E501
"""Get message # noqa: E501
Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_message_with_http_info(conversation_id, message_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param str message_id: The unique id for the conversation message. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConversationMessage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['conversation_id', 'message_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_conversation_message" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'conversation_id' is set
if ('conversation_id' not in params or
params['conversation_id'] is None):
raise ValueError("Missing the required parameter `conversation_id` when calling ``") # noqa: E501
# verify the required parameter 'message_id' is set
if ('message_id' not in params or
params['message_id'] is None):
raise ValueError("Missing the required parameter `message_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'conversation_id' in params:
path_params['conversation_id'] = params['conversation_id'] # noqa: E501
if 'message_id' in params:
path_params['message_id'] = params['message_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations/{conversation_id}/messages/{message_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ConversationMessage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(api_client)
|
69,149 |
mailchimp_marketing.api.conversations_api
|
get
|
Get conversation # noqa: E501
Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: Conversation
If the method is called asynchronously,
returns the request thread.
|
def get(self, conversation_id, **kwargs): # noqa: E501
"""Get conversation # noqa: E501
Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: Conversation
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_with_http_info(conversation_id, **kwargs) # noqa: E501
else:
(data) = self.get_with_http_info(conversation_id, **kwargs) # noqa: E501
return data
|
(self, conversation_id, **kwargs)
|
69,150 |
mailchimp_marketing.api.conversations_api
|
get_conversation_message
|
Get message # noqa: E501
Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_message(conversation_id, message_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param str message_id: The unique id for the conversation message. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConversationMessage
If the method is called asynchronously,
returns the request thread.
|
def get_conversation_message(self, conversation_id, message_id, **kwargs): # noqa: E501
"""Get message # noqa: E501
Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_message(conversation_id, message_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param str message_id: The unique id for the conversation message. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConversationMessage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_conversation_message_with_http_info(conversation_id, message_id, **kwargs) # noqa: E501
else:
(data) = self.get_conversation_message_with_http_info(conversation_id, message_id, **kwargs) # noqa: E501
return data
|
(self, conversation_id, message_id, **kwargs)
|
69,151 |
mailchimp_marketing.api.conversations_api
|
get_conversation_message_with_http_info
|
Get message # noqa: E501
Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_message_with_http_info(conversation_id, message_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param str message_id: The unique id for the conversation message. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConversationMessage
If the method is called asynchronously,
returns the request thread.
|
def get_conversation_message_with_http_info(self, conversation_id, message_id, **kwargs): # noqa: E501
"""Get message # noqa: E501
Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_message_with_http_info(conversation_id, message_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param str message_id: The unique id for the conversation message. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: ConversationMessage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['conversation_id', 'message_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_conversation_message" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'conversation_id' is set
if ('conversation_id' not in params or
params['conversation_id'] is None):
raise ValueError("Missing the required parameter `conversation_id` when calling ``") # noqa: E501
# verify the required parameter 'message_id' is set
if ('message_id' not in params or
params['message_id'] is None):
raise ValueError("Missing the required parameter `message_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'conversation_id' in params:
path_params['conversation_id'] = params['conversation_id'] # noqa: E501
if 'message_id' in params:
path_params['message_id'] = params['message_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations/{conversation_id}/messages/{message_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ConversationMessage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, conversation_id, message_id, **kwargs)
|
69,152 |
mailchimp_marketing.api.conversations_api
|
get_conversation_messages
|
List messages # noqa: E501
Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_messages(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param str is_read: Whether a conversation message has been marked as read.
:param datetime before_timestamp: Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:param datetime since_timestamp: Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:return: CollectionOfConversationMessages
If the method is called asynchronously,
returns the request thread.
|
def get_conversation_messages(self, conversation_id, **kwargs): # noqa: E501
"""List messages # noqa: E501
Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_messages(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param str is_read: Whether a conversation message has been marked as read.
:param datetime before_timestamp: Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:param datetime since_timestamp: Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:return: CollectionOfConversationMessages
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_conversation_messages_with_http_info(conversation_id, **kwargs) # noqa: E501
else:
(data) = self.get_conversation_messages_with_http_info(conversation_id, **kwargs) # noqa: E501
return data
|
(self, conversation_id, **kwargs)
|
69,153 |
mailchimp_marketing.api.conversations_api
|
get_conversation_messages_with_http_info
|
List messages # noqa: E501
Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_messages_with_http_info(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param str is_read: Whether a conversation message has been marked as read.
:param datetime before_timestamp: Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:param datetime since_timestamp: Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:return: CollectionOfConversationMessages
If the method is called asynchronously,
returns the request thread.
|
def get_conversation_messages_with_http_info(self, conversation_id, **kwargs): # noqa: E501
"""List messages # noqa: E501
Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_conversation_messages_with_http_info(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param str is_read: Whether a conversation message has been marked as read.
:param datetime before_timestamp: Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:param datetime since_timestamp: Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
:return: CollectionOfConversationMessages
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['conversation_id', 'fields', 'exclude_fields', 'is_read', 'before_timestamp', 'since_timestamp'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_conversation_messages" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'conversation_id' is set
if ('conversation_id' not in params or
params['conversation_id'] is None):
raise ValueError("Missing the required parameter `conversation_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'conversation_id' in params:
path_params['conversation_id'] = params['conversation_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'is_read' in params:
query_params.append(('is_read', params['is_read'])) # noqa: E501
if 'before_timestamp' in params:
query_params.append(('before_timestamp', params['before_timestamp'])) # noqa: E501
if 'since_timestamp' in params:
query_params.append(('since_timestamp', params['since_timestamp'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations/{conversation_id}/messages', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='CollectionOfConversationMessages', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, conversation_id, **kwargs)
|
69,154 |
mailchimp_marketing.api.conversations_api
|
get_with_http_info
|
Get conversation # noqa: E501
Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_with_http_info(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: Conversation
If the method is called asynchronously,
returns the request thread.
|
def get_with_http_info(self, conversation_id, **kwargs): # noqa: E501
"""Get conversation # noqa: E501
Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_with_http_info(conversation_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str conversation_id: The unique id for the conversation. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: Conversation
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['conversation_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'conversation_id' is set
if ('conversation_id' not in params or
params['conversation_id'] is None):
raise ValueError("Missing the required parameter `conversation_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'conversation_id' in params:
path_params['conversation_id'] = params['conversation_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations/{conversation_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Conversation', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, conversation_id, **kwargs)
|
69,155 |
mailchimp_marketing.api.conversations_api
|
list
|
List conversations # noqa: E501
Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str has_unread_messages: Whether the conversation has any unread messages.
:param str list_id: The unique id for the list.
:param str campaign_id: The unique id for the campaign.
:return: TrackedConversations
If the method is called asynchronously,
returns the request thread.
|
def list(self, **kwargs): # noqa: E501
"""List conversations # noqa: E501
Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str has_unread_messages: Whether the conversation has any unread messages.
:param str list_id: The unique id for the list.
:param str campaign_id: The unique id for the campaign.
:return: TrackedConversations
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.list_with_http_info(**kwargs) # noqa: E501
return data
|
(self, **kwargs)
|
69,156 |
mailchimp_marketing.api.conversations_api
|
list_with_http_info
|
List conversations # noqa: E501
Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str has_unread_messages: Whether the conversation has any unread messages.
:param str list_id: The unique id for the list.
:param str campaign_id: The unique id for the campaign.
:return: TrackedConversations
If the method is called asynchronously,
returns the request thread.
|
def list_with_http_info(self, **kwargs): # noqa: E501
"""List conversations # noqa: E501
Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str has_unread_messages: Whether the conversation has any unread messages.
:param str list_id: The unique id for the list.
:param str campaign_id: The unique id for the campaign.
:return: TrackedConversations
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['fields', 'exclude_fields', 'count', 'offset', 'has_unread_messages', 'list_id', 'campaign_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list" % key
)
params[key] = val
del params['kwargs']
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'has_unread_messages' in params:
query_params.append(('has_unread_messages', params['has_unread_messages'])) # noqa: E501
if 'list_id' in params:
query_params.append(('list_id', params['list_id'])) # noqa: E501
if 'campaign_id' in params:
query_params.append(('campaign_id', params['campaign_id'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/conversations', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='TrackedConversations', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, **kwargs)
|
69,157 |
mailchimp_marketing.api.customer_journeys_api
|
CustomerJourneysApi
|
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
|
class CustomerJourneysApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client):
self.api_client = api_client
def trigger(self, journey_id, step_id, body, **kwargs): # noqa: E501
"""Customer Journeys API trigger for a contact # noqa: E501
A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.trigger(journey_id, step_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int journey_id: The id for the Journey. (required)
:param int step_id: The id for the Step. (required)
:param SubscriberInCustomerJourneysAudience body: (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.trigger_with_http_info(journey_id, step_id, body, **kwargs) # noqa: E501
else:
(data) = self.trigger_with_http_info(journey_id, step_id, body, **kwargs) # noqa: E501
return data
def trigger_with_http_info(self, journey_id, step_id, body, **kwargs): # noqa: E501
"""Customer Journeys API trigger for a contact # noqa: E501
A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.trigger_with_http_info(journey_id, step_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int journey_id: The id for the Journey. (required)
:param int step_id: The id for the Step. (required)
:param SubscriberInCustomerJourneysAudience body: (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['journey_id', 'step_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method trigger" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'journey_id' is set
if ('journey_id' not in params or
params['journey_id'] is None):
raise ValueError("Missing the required parameter `journey_id` when calling ``") # noqa: E501
# verify the required parameter 'step_id' is set
if ('step_id' not in params or
params['step_id'] is None):
raise ValueError("Missing the required parameter `step_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'journey_id' in params:
path_params['journey_id'] = params['journey_id'] # noqa: E501
if 'step_id' in params:
path_params['step_id'] = params['step_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(api_client)
|
69,159 |
mailchimp_marketing.api.customer_journeys_api
|
trigger
|
Customer Journeys API trigger for a contact # noqa: E501
A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.trigger(journey_id, step_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int journey_id: The id for the Journey. (required)
:param int step_id: The id for the Step. (required)
:param SubscriberInCustomerJourneysAudience body: (required)
:return: object
If the method is called asynchronously,
returns the request thread.
|
def trigger(self, journey_id, step_id, body, **kwargs): # noqa: E501
"""Customer Journeys API trigger for a contact # noqa: E501
A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.trigger(journey_id, step_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int journey_id: The id for the Journey. (required)
:param int step_id: The id for the Step. (required)
:param SubscriberInCustomerJourneysAudience body: (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.trigger_with_http_info(journey_id, step_id, body, **kwargs) # noqa: E501
else:
(data) = self.trigger_with_http_info(journey_id, step_id, body, **kwargs) # noqa: E501
return data
|
(self, journey_id, step_id, body, **kwargs)
|
69,160 |
mailchimp_marketing.api.customer_journeys_api
|
trigger_with_http_info
|
Customer Journeys API trigger for a contact # noqa: E501
A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.trigger_with_http_info(journey_id, step_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int journey_id: The id for the Journey. (required)
:param int step_id: The id for the Step. (required)
:param SubscriberInCustomerJourneysAudience body: (required)
:return: object
If the method is called asynchronously,
returns the request thread.
|
def trigger_with_http_info(self, journey_id, step_id, body, **kwargs): # noqa: E501
"""Customer Journeys API trigger for a contact # noqa: E501
A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.trigger_with_http_info(journey_id, step_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param int journey_id: The id for the Journey. (required)
:param int step_id: The id for the Step. (required)
:param SubscriberInCustomerJourneysAudience body: (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['journey_id', 'step_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method trigger" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'journey_id' is set
if ('journey_id' not in params or
params['journey_id'] is None):
raise ValueError("Missing the required parameter `journey_id` when calling ``") # noqa: E501
# verify the required parameter 'step_id' is set
if ('step_id' not in params or
params['step_id'] is None):
raise ValueError("Missing the required parameter `step_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'journey_id' in params:
path_params['journey_id'] = params['journey_id'] # noqa: E501
if 'step_id' in params:
path_params['step_id'] = params['step_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, journey_id, step_id, body, **kwargs)
|
69,161 |
mailchimp_marketing.api.ecommerce_api
|
EcommerceApi
|
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
|
class EcommerceApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client):
self.api_client = api_client
def delete_store(self, store_id, **kwargs): # noqa: E501
"""Delete store # noqa: E501
Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_with_http_info(store_id, **kwargs) # noqa: E501
return data
def delete_store_with_http_info(self, store_id, **kwargs): # noqa: E501
"""Delete store # noqa: E501
Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_store_cart(self, store_id, cart_id, **kwargs): # noqa: E501
"""Delete cart # noqa: E501
Delete a cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_cart(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
return data
def delete_store_cart_with_http_info(self, store_id, cart_id, **kwargs): # noqa: E501
"""Delete cart # noqa: E501
Delete a cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_cart_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_cart_line_item(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Delete cart line item # noqa: E501
Delete a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_cart_line_item(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
return data
def delete_cart_line_item_with_http_info(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Delete cart line item # noqa: E501
Delete a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'line_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_store_customer(self, store_id, customer_id, **kwargs): # noqa: E501
"""Delete customer # noqa: E501
Delete a customer from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_customer(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_customer_with_http_info(store_id, customer_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_customer_with_http_info(store_id, customer_id, **kwargs) # noqa: E501
return data
def delete_store_customer_with_http_info(self, store_id, customer_id, **kwargs): # noqa: E501
"""Delete customer # noqa: E501
Delete a customer from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_customer_with_http_info(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'customer_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params or
params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'customer_id' in params:
path_params['customer_id'] = params['customer_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers/{customer_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_order(self, store_id, order_id, **kwargs): # noqa: E501
"""Delete order # noqa: E501
Delete an order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
else:
(data) = self.delete_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
return data
def delete_order_with_http_info(self, store_id, order_id, **kwargs): # noqa: E501
"""Delete order # noqa: E501
Delete an order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_order_line_item(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Delete order line item # noqa: E501
Delete a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_line_item(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.delete_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
return data
def delete_order_line_item_with_http_info(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Delete order line item # noqa: E501
Delete a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_line_item_with_http_info(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'line_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_store_product(self, store_id, product_id, **kwargs): # noqa: E501
"""Delete product # noqa: E501
Delete a product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_product(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_product_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_product_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
def delete_store_product_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""Delete product # noqa: E501
Delete a product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_product_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store_product" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_product_image(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Delete product image # noqa: E501
Delete a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_image(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
else:
(data) = self.delete_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
return data
def delete_product_image_with_http_info(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Delete product image # noqa: E501
Delete a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_image_with_http_info(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'image_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'image_id' is set
if ('image_id' not in params or
params['image_id'] is None):
raise ValueError("Missing the required parameter `image_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'image_id' in params:
path_params['image_id'] = params['image_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_product_variant(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Delete product variant # noqa: E501
Delete a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_variant(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
else:
(data) = self.delete_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
return data
def delete_product_variant_with_http_info(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Delete product variant # noqa: E501
Delete a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_variant_with_http_info(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_promo_code(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Delete promo code # noqa: E501
Delete a promo code from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_code(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
else:
(data) = self.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
return data
def delete_promo_code_with_http_info(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Delete promo code # noqa: E501
Delete a promo code from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'promo_code_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_code_id' is set
if ('promo_code_id' not in params or
params['promo_code_id'] is None):
raise ValueError("Missing the required parameter `promo_code_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'promo_code_id' in params:
path_params['promo_code_id'] = params['promo_code_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def delete_promo_rule(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Delete promo rule # noqa: E501
Delete a promo rule from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_rule(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
else:
(data) = self.delete_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
return data
def delete_promo_rule_with_http_info(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Delete promo rule # noqa: E501
Delete a promo rule from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_rule_with_http_info(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_promo_rule" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def orders(self, **kwargs): # noqa: E501
"""List account orders # noqa: E501
Get information about an account's orders. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.orders(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str campaign_id: Restrict results to orders with a specific `campaign_id` value.
:param str outreach_id: Restrict results to orders with a specific `outreach_id` value.
:param str customer_id: Restrict results to orders made by a specific customer.
:param bool has_outreach: Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
:return: Orders
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.orders_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.orders_with_http_info(**kwargs) # noqa: E501
return data
def orders_with_http_info(self, **kwargs): # noqa: E501
"""List account orders # noqa: E501
Get information about an account's orders. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.orders_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str campaign_id: Restrict results to orders with a specific `campaign_id` value.
:param str outreach_id: Restrict results to orders with a specific `outreach_id` value.
:param str customer_id: Restrict results to orders made by a specific customer.
:param bool has_outreach: Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
:return: Orders
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['fields', 'exclude_fields', 'count', 'offset', 'campaign_id', 'outreach_id', 'customer_id', 'has_outreach'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method orders" % key
)
params[key] = val
del params['kwargs']
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'campaign_id' in params:
query_params.append(('campaign_id', params['campaign_id'])) # noqa: E501
if 'outreach_id' in params:
query_params.append(('outreach_id', params['outreach_id'])) # noqa: E501
if 'customer_id' in params:
query_params.append(('customer_id', params['customer_id'])) # noqa: E501
if 'has_outreach' in params:
query_params.append(('has_outreach', params['has_outreach'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/orders', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Orders', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def stores(self, **kwargs): # noqa: E501
"""List stores # noqa: E501
Get information about all stores in the account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.stores(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceStores
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.stores_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.stores_with_http_info(**kwargs) # noqa: E501
return data
def stores_with_http_info(self, **kwargs): # noqa: E501
"""List stores # noqa: E501
Get information about all stores in the account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.stores_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceStores
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method stores" % key
)
params[key] = val
del params['kwargs']
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceStores', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_store(self, store_id, **kwargs): # noqa: E501
"""Get store info # noqa: E501
Get information about a specific store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_with_http_info(store_id, **kwargs) # noqa: E501
return data
def get_store_with_http_info(self, store_id, **kwargs): # noqa: E501
"""Get store info # noqa: E501
Get information about a specific store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceStore', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_store_carts(self, store_id, **kwargs): # noqa: E501
"""List carts # noqa: E501
Get information about a store's carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_carts(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Carts
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_carts_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_carts_with_http_info(store_id, **kwargs) # noqa: E501
return data
def get_store_carts_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List carts # noqa: E501
Get information about a store's carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_carts_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Carts
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store_carts" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Carts', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_store_cart(self, store_id, cart_id, **kwargs): # noqa: E501
"""Get cart info # noqa: E501
Get information about a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_cart(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
return data
def get_store_cart_with_http_info(self, store_id, cart_id, **kwargs): # noqa: E501
"""Get cart info # noqa: E501
Get information about a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_cart_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCart', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_all_cart_line_items(self, store_id, cart_id, **kwargs): # noqa: E501
"""List cart line items # noqa: E501
Get information about a cart's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_cart_line_items(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: CartLines
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_cart_line_items_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_cart_line_items_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
return data
def get_all_cart_line_items_with_http_info(self, store_id, cart_id, **kwargs): # noqa: E501
"""List cart line items # noqa: E501
Get information about a cart's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_cart_line_items_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: CartLines
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_cart_line_items" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='CartLines', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_cart_line_item(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Get cart line item # noqa: E501
Get information about a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_cart_line_item(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.get_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
return data
def get_cart_line_item_with_http_info(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Get cart line item # noqa: E501
Get information about a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_cart_line_item_with_http_info(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'line_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCartLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_all_store_customers(self, store_id, **kwargs): # noqa: E501
"""List customers # noqa: E501
Get information about a store's customers. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_customers(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str email_address: Restrict the response to customers with the email address.
:return: Customers
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_store_customers_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_store_customers_with_http_info(store_id, **kwargs) # noqa: E501
return data
def get_all_store_customers_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List customers # noqa: E501
Get information about a store's customers. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_customers_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str email_address: Restrict the response to customers with the email address.
:return: Customers
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset', 'email_address'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_store_customers" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'email_address' in params:
query_params.append(('email_address', params['email_address'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Customers', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_store_customer(self, store_id, customer_id, **kwargs): # noqa: E501
"""Get customer info # noqa: E501
Get information about a specific customer. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_customer(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_customer_with_http_info(store_id, customer_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_customer_with_http_info(store_id, customer_id, **kwargs) # noqa: E501
return data
def get_store_customer_with_http_info(self, store_id, customer_id, **kwargs): # noqa: E501
"""Get customer info # noqa: E501
Get information about a specific customer. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_customer_with_http_info(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'customer_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params or
params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'customer_id' in params:
path_params['customer_id'] = params['customer_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers/{customer_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCustomer', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_store_orders(self, store_id, **kwargs): # noqa: E501
"""List orders # noqa: E501
Get information about a store's orders. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_orders(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str customer_id: Restrict results to orders made by a specific customer.
:param bool has_outreach: Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
:param str campaign_id: Restrict results to orders with a specific `campaign_id` value.
:param str outreach_id: Restrict results to orders with a specific `outreach_id` value.
:return: Orders1
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_orders_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_orders_with_http_info(store_id, **kwargs) # noqa: E501
return data
def get_store_orders_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List orders # noqa: E501
Get information about a store's orders. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_orders_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str customer_id: Restrict results to orders made by a specific customer.
:param bool has_outreach: Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.
:param str campaign_id: Restrict results to orders with a specific `campaign_id` value.
:param str outreach_id: Restrict results to orders with a specific `outreach_id` value.
:return: Orders1
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset', 'customer_id', 'has_outreach', 'campaign_id', 'outreach_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store_orders" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'customer_id' in params:
query_params.append(('customer_id', params['customer_id'])) # noqa: E501
if 'has_outreach' in params:
query_params.append(('has_outreach', params['has_outreach'])) # noqa: E501
if 'campaign_id' in params:
query_params.append(('campaign_id', params['campaign_id'])) # noqa: E501
if 'outreach_id' in params:
query_params.append(('outreach_id', params['outreach_id'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Orders1', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_order(self, store_id, order_id, **kwargs): # noqa: E501
"""Get order info # noqa: E501
Get information about a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
else:
(data) = self.get_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
return data
def get_order_with_http_info(self, store_id, order_id, **kwargs): # noqa: E501
"""Get order info # noqa: E501
Get information about a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrder', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_all_order_line_items(self, store_id, order_id, **kwargs): # noqa: E501
"""List order line items # noqa: E501
Get information about an order's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_order_line_items(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: OrderLines
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_order_line_items_with_http_info(store_id, order_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_order_line_items_with_http_info(store_id, order_id, **kwargs) # noqa: E501
return data
def get_all_order_line_items_with_http_info(self, store_id, order_id, **kwargs): # noqa: E501
"""List order line items # noqa: E501
Get information about an order's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_order_line_items_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: OrderLines
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_order_line_items" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='OrderLines', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_order_line_item(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Get order line item # noqa: E501
Get information about a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_line_item(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.get_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
return data
def get_order_line_item_with_http_info(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Get order line item # noqa: E501
Get information about a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_line_item_with_http_info(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'line_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrderLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_all_store_products(self, store_id, **kwargs): # noqa: E501
"""List product # noqa: E501
Get information about a store's products. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_products(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Products
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_store_products_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_store_products_with_http_info(store_id, **kwargs) # noqa: E501
return data
def get_all_store_products_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List product # noqa: E501
Get information about a store's products. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_products_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Products
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_store_products" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Products', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_store_product(self, store_id, product_id, **kwargs): # noqa: E501
"""Get product info # noqa: E501
Get information about a specific product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_product(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_product_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_product_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
def get_store_product_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""Get product info # noqa: E501
Get information about a specific product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_product_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store_product" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProduct', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_product_images(self, store_id, product_id, **kwargs): # noqa: E501
"""List product images # noqa: E501
Get information about a product's images. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_images(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductImages
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_images_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_images_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
def get_product_images_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""List product images # noqa: E501
Get information about a product's images. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_images_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductImages
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_images" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImages', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_product_image(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Get product image info # noqa: E501
Get information about a specific product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_image(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
return data
def get_product_image_with_http_info(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Get product image info # noqa: E501
Get information about a specific product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_image_with_http_info(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'image_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'image_id' is set
if ('image_id' not in params or
params['image_id'] is None):
raise ValueError("Missing the required parameter `image_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'image_id' in params:
path_params['image_id'] = params['image_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_product_variants(self, store_id, product_id, **kwargs): # noqa: E501
"""List product variants # noqa: E501
Get information about a product's variants. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variants(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductVariants
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_variants_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_variants_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
def get_product_variants_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""List product variants # noqa: E501
Get information about a product's variants. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variants_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductVariants
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_variants" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariants', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_product_variant(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Get product variant info # noqa: E501
Get information about a specific product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variant(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
return data
def get_product_variant_with_http_info(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Get product variant info # noqa: E501
Get information about a specific product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variant_with_http_info(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_promo_codes(self, promo_rule_id, store_id, **kwargs): # noqa: E501
"""List promo codes # noqa: E501
Get information about a store's promo codes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_codes(promo_rule_id, store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoCodes
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_promo_codes_with_http_info(promo_rule_id, store_id, **kwargs) # noqa: E501
else:
(data) = self.get_promo_codes_with_http_info(promo_rule_id, store_id, **kwargs) # noqa: E501
return data
def get_promo_codes_with_http_info(self, promo_rule_id, store_id, **kwargs): # noqa: E501
"""List promo codes # noqa: E501
Get information about a store's promo codes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_codes_with_http_info(promo_rule_id, store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoCodes
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['promo_rule_id', 'store_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_promo_codes" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PromoCodes', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_promo_code(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Get promo code # noqa: E501
Get information about a specific promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_code(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
else:
(data) = self.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
return data
def get_promo_code_with_http_info(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Get promo code # noqa: E501
Get information about a specific promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'promo_code_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_code_id' is set
if ('promo_code_id' not in params or
params['promo_code_id'] is None):
raise ValueError("Missing the required parameter `promo_code_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'promo_code_id' in params:
path_params['promo_code_id'] = params['promo_code_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoCode', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def list_promo_rules(self, store_id, **kwargs): # noqa: E501
"""List promo rules # noqa: E501
Get information about a store's promo rules. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_promo_rules(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoRules
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_promo_rules_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.list_promo_rules_with_http_info(store_id, **kwargs) # noqa: E501
return data
def list_promo_rules_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List promo rules # noqa: E501
Get information about a store's promo rules. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_promo_rules_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoRules
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list_promo_rules" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PromoRules', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_promo_rule(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Get promo rule # noqa: E501
Get information about a specific promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_rule(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
else:
(data) = self.get_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
return data
def get_promo_rule_with_http_info(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Get promo rule # noqa: E501
Get information about a specific promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_rule_with_http_info(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_promo_rule" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoRule', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_store(self, store_id, body, **kwargs): # noqa: E501
"""Update store # noqa: E501
Update a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceStore2 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_store_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_store_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
def update_store_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Update store # noqa: E501
Update a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceStore2 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_store" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceStore', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_store_cart(self, store_id, cart_id, body, **kwargs): # noqa: E501
"""Update cart # noqa: E501
Update a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_cart(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCart2 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_store_cart_with_http_info(store_id, cart_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_store_cart_with_http_info(store_id, cart_id, body, **kwargs) # noqa: E501
return data
def update_store_cart_with_http_info(self, store_id, cart_id, body, **kwargs): # noqa: E501
"""Update cart # noqa: E501
Update a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_cart_with_http_info(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCart2 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCart', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_cart_line_item(self, store_id, cart_id, line_id, body, **kwargs): # noqa: E501
"""Update cart line item # noqa: E501
Update a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_cart_line_item(store_id, cart_id, line_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param EcommerceCartLineItem4 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, **kwargs) # noqa: E501
return data
def update_cart_line_item_with_http_info(self, store_id, cart_id, line_id, body, **kwargs): # noqa: E501
"""Update cart line item # noqa: E501
Update a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_cart_line_item_with_http_info(store_id, cart_id, line_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param EcommerceCartLineItem4 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'line_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCartLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_store_customer(self, store_id, customer_id, body, **kwargs): # noqa: E501
"""Update customer # noqa: E501
Update a customer. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_customer(store_id, customer_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:param EcommerceCustomer5 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_store_customer_with_http_info(store_id, customer_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_store_customer_with_http_info(store_id, customer_id, body, **kwargs) # noqa: E501
return data
def update_store_customer_with_http_info(self, store_id, customer_id, body, **kwargs): # noqa: E501
"""Update customer # noqa: E501
Update a customer. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_customer_with_http_info(store_id, customer_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:param EcommerceCustomer5 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'customer_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params or
params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'customer_id' in params:
path_params['customer_id'] = params['customer_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers/{customer_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCustomer', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_order(self, store_id, order_id, body, **kwargs): # noqa: E501
"""Update order # noqa: E501
Update a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_order(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrder2 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_order_with_http_info(store_id, order_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_order_with_http_info(store_id, order_id, body, **kwargs) # noqa: E501
return data
def update_order_with_http_info(self, store_id, order_id, body, **kwargs): # noqa: E501
"""Update order # noqa: E501
Update a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_order_with_http_info(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrder2 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrder', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_order_line_item(self, store_id, order_id, line_id, body, **kwargs): # noqa: E501
"""Update order line item # noqa: E501
Update a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_order_line_item(store_id, order_id, line_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param EcommerceOrderLineItem4 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_order_line_item_with_http_info(store_id, order_id, line_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_order_line_item_with_http_info(store_id, order_id, line_id, body, **kwargs) # noqa: E501
return data
def update_order_line_item_with_http_info(self, store_id, order_id, line_id, body, **kwargs): # noqa: E501
"""Update order line item # noqa: E501
Update a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_order_line_item_with_http_info(store_id, order_id, line_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param EcommerceOrderLineItem4 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'line_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrderLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_store_product(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Update product # noqa: E501
Update a specific product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_product(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProduct2 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_store_product_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_store_product_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
return data
def update_store_product_with_http_info(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Update product # noqa: E501
Update a specific product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_store_product_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProduct2 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_store_product" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProduct', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_product_image(self, store_id, product_id, image_id, body, **kwargs): # noqa: E501
"""Update product image # noqa: E501
Update a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_product_image(store_id, product_id, image_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param EcommerceProductImage4 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_product_image_with_http_info(store_id, product_id, image_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_product_image_with_http_info(store_id, product_id, image_id, body, **kwargs) # noqa: E501
return data
def update_product_image_with_http_info(self, store_id, product_id, image_id, body, **kwargs): # noqa: E501
"""Update product image # noqa: E501
Update a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_product_image_with_http_info(store_id, product_id, image_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param EcommerceProductImage4 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'image_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'image_id' is set
if ('image_id' not in params or
params['image_id'] is None):
raise ValueError("Missing the required parameter `image_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'image_id' in params:
path_params['image_id'] = params['image_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_product_variant(self, store_id, product_id, variant_id, body, **kwargs): # noqa: E501
"""Update product variant # noqa: E501
Update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_product_variant(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant5 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_product_variant_with_http_info(store_id, product_id, variant_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_product_variant_with_http_info(store_id, product_id, variant_id, body, **kwargs) # noqa: E501
return data
def update_product_variant_with_http_info(self, store_id, product_id, variant_id, body, **kwargs): # noqa: E501
"""Update product variant # noqa: E501
Update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_product_variant_with_http_info(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant5 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_promo_code(self, store_id, promo_rule_id, promo_code_id, body, **kwargs): # noqa: E501
"""Update promo code # noqa: E501
Update a promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_promo_code(store_id, promo_rule_id, promo_code_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param EcommercePromoCode2 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, **kwargs) # noqa: E501
return data
def update_promo_code_with_http_info(self, store_id, promo_rule_id, promo_code_id, body, **kwargs): # noqa: E501
"""Update promo code # noqa: E501
Update a promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param EcommercePromoCode2 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'promo_code_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_code_id' is set
if ('promo_code_id' not in params or
params['promo_code_id'] is None):
raise ValueError("Missing the required parameter `promo_code_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'promo_code_id' in params:
path_params['promo_code_id'] = params['promo_code_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoCode', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def update_promo_rule(self, store_id, promo_rule_id, body, **kwargs): # noqa: E501
"""Update promo rule # noqa: E501
Update a promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_promo_rule(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoRule2 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.update_promo_rule_with_http_info(store_id, promo_rule_id, body, **kwargs) # noqa: E501
else:
(data) = self.update_promo_rule_with_http_info(store_id, promo_rule_id, body, **kwargs) # noqa: E501
return data
def update_promo_rule_with_http_info(self, store_id, promo_rule_id, body, **kwargs): # noqa: E501
"""Update promo rule # noqa: E501
Update a promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_promo_rule_with_http_info(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoRule2 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method update_promo_rule" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoRule', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_store(self, body, **kwargs): # noqa: E501
"""Add store # noqa: E501
Add a new store to your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EcommerceStore1 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.add_store_with_http_info(body, **kwargs) # noqa: E501
return data
def add_store_with_http_info(self, body, **kwargs): # noqa: E501
"""Add store # noqa: E501
Add a new store to your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EcommerceStore1 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceStore', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_store_cart(self, store_id, body, **kwargs): # noqa: E501
"""Add cart # noqa: E501
Add a new cart to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_cart(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCart1 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_cart_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_cart_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
def add_store_cart_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add cart # noqa: E501
Add a new cart to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_cart_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCart1 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCart', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_cart_line_item(self, store_id, cart_id, body, **kwargs): # noqa: E501
"""Add cart line item # noqa: E501
Add a new line item to an existing cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_cart_line_item(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCartLineItem3 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_cart_line_item_with_http_info(store_id, cart_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_cart_line_item_with_http_info(store_id, cart_id, body, **kwargs) # noqa: E501
return data
def add_cart_line_item_with_http_info(self, store_id, cart_id, body, **kwargs): # noqa: E501
"""Add cart line item # noqa: E501
Add a new line item to an existing cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_cart_line_item_with_http_info(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCartLineItem3 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCartLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_store_customer(self, store_id, body, **kwargs): # noqa: E501
"""Add customer # noqa: E501
Add a new customer to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_customer(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCustomer3 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_customer_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_customer_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
def add_store_customer_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add customer # noqa: E501
Add a new customer to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_customer_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCustomer3 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCustomer', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_store_order(self, store_id, body, **kwargs): # noqa: E501
"""Add order # noqa: E501
Add a new order to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_order(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceOrder1 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_order_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_order_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
def add_store_order_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add order # noqa: E501
Add a new order to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_order_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceOrder1 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrder', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_order_line_item(self, store_id, order_id, body, **kwargs): # noqa: E501
"""Add order line item # noqa: E501
Add a new line item to an existing order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_order_line_item(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrderLineItem3 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_order_line_item_with_http_info(store_id, order_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_order_line_item_with_http_info(store_id, order_id, body, **kwargs) # noqa: E501
return data
def add_order_line_item_with_http_info(self, store_id, order_id, body, **kwargs): # noqa: E501
"""Add order line item # noqa: E501
Add a new line item to an existing order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_order_line_item_with_http_info(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrderLineItem3 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrderLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_store_product(self, store_id, body, **kwargs): # noqa: E501
"""Add product # noqa: E501
Add a new product to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_product(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceProduct1 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_product_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_product_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
def add_store_product_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add product # noqa: E501
Add a new product to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_product_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceProduct1 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_product" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProduct', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_product_image(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product image # noqa: E501
Add a new image to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_image(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductImage3 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_product_image_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_product_image_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
return data
def add_product_image_with_http_info(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product image # noqa: E501
Add a new image to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_image_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductImage3 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_product_variants(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product variant # noqa: E501
Add a new variant to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variants(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductVariant3 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_product_variants_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_product_variants_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
return data
def add_product_variants_with_http_info(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product variant # noqa: E501
Add a new variant to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variants_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductVariant3 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_product_variants" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_promo_code(self, store_id, promo_rule_id, body, **kwargs): # noqa: E501
"""Add promo code # noqa: E501
Add a new promo code to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_code(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoCode1 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_promo_code_with_http_info(store_id, promo_rule_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_promo_code_with_http_info(store_id, promo_rule_id, body, **kwargs) # noqa: E501
return data
def add_promo_code_with_http_info(self, store_id, promo_rule_id, body, **kwargs): # noqa: E501
"""Add promo code # noqa: E501
Add a new promo code to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_code_with_http_info(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoCode1 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoCode', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_promo_rules(self, store_id, body, **kwargs): # noqa: E501
"""Add promo rule # noqa: E501
Add a new promo rule to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_rules(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommercePromoRule1 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_promo_rules_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_promo_rules_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
def add_promo_rules_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add promo rule # noqa: E501
Add a new promo rule to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_rules_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommercePromoRule1 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_promo_rules" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoRule', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def set_store_customer(self, store_id, customer_id, body, **kwargs): # noqa: E501
"""Add or update customer # noqa: E501
Add or update a customer. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_store_customer(store_id, customer_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:param EcommerceCustomer4 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.set_store_customer_with_http_info(store_id, customer_id, body, **kwargs) # noqa: E501
else:
(data) = self.set_store_customer_with_http_info(store_id, customer_id, body, **kwargs) # noqa: E501
return data
def set_store_customer_with_http_info(self, store_id, customer_id, body, **kwargs): # noqa: E501
"""Add or update customer # noqa: E501
Add or update a customer. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_store_customer_with_http_info(store_id, customer_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:param EcommerceCustomer4 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'customer_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method set_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params or
params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'customer_id' in params:
path_params['customer_id'] = params['customer_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers/{customer_id}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCustomer', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def add_product_variant(self, store_id, product_id, variant_id, body, **kwargs): # noqa: E501
"""Add or update product variant # noqa: E501
Add or update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variant(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant4 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_product_variant_with_http_info(store_id, product_id, variant_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_product_variant_with_http_info(store_id, product_id, variant_id, body, **kwargs) # noqa: E501
return data
def add_product_variant_with_http_info(self, store_id, product_id, variant_id, body, **kwargs): # noqa: E501
"""Add or update product variant # noqa: E501
Add or update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variant_with_http_info(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant4 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(api_client)
|
69,163 |
mailchimp_marketing.api.ecommerce_api
|
add_cart_line_item
|
Add cart line item # noqa: E501
Add a new line item to an existing cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_cart_line_item(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCartLineItem3 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
|
def add_cart_line_item(self, store_id, cart_id, body, **kwargs): # noqa: E501
"""Add cart line item # noqa: E501
Add a new line item to an existing cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_cart_line_item(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCartLineItem3 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_cart_line_item_with_http_info(store_id, cart_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_cart_line_item_with_http_info(store_id, cart_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, cart_id, body, **kwargs)
|
69,164 |
mailchimp_marketing.api.ecommerce_api
|
add_cart_line_item_with_http_info
|
Add cart line item # noqa: E501
Add a new line item to an existing cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_cart_line_item_with_http_info(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCartLineItem3 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
|
def add_cart_line_item_with_http_info(self, store_id, cart_id, body, **kwargs): # noqa: E501
"""Add cart line item # noqa: E501
Add a new line item to an existing cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_cart_line_item_with_http_info(store_id, cart_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param EcommerceCartLineItem3 body: (required)
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCartLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, cart_id, body, **kwargs)
|
69,165 |
mailchimp_marketing.api.ecommerce_api
|
add_order_line_item
|
Add order line item # noqa: E501
Add a new line item to an existing order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_order_line_item(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrderLineItem3 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
|
def add_order_line_item(self, store_id, order_id, body, **kwargs): # noqa: E501
"""Add order line item # noqa: E501
Add a new line item to an existing order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_order_line_item(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrderLineItem3 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_order_line_item_with_http_info(store_id, order_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_order_line_item_with_http_info(store_id, order_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, order_id, body, **kwargs)
|
69,166 |
mailchimp_marketing.api.ecommerce_api
|
add_order_line_item_with_http_info
|
Add order line item # noqa: E501
Add a new line item to an existing order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_order_line_item_with_http_info(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrderLineItem3 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
|
def add_order_line_item_with_http_info(self, store_id, order_id, body, **kwargs): # noqa: E501
"""Add order line item # noqa: E501
Add a new line item to an existing order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_order_line_item_with_http_info(store_id, order_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param EcommerceOrderLineItem3 body: (required)
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrderLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, order_id, body, **kwargs)
|
69,167 |
mailchimp_marketing.api.ecommerce_api
|
add_product_image
|
Add product image # noqa: E501
Add a new image to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_image(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductImage3 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
|
def add_product_image(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product image # noqa: E501
Add a new image to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_image(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductImage3 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_product_image_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_product_image_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, body, **kwargs)
|
69,168 |
mailchimp_marketing.api.ecommerce_api
|
add_product_image_with_http_info
|
Add product image # noqa: E501
Add a new image to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_image_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductImage3 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
|
def add_product_image_with_http_info(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product image # noqa: E501
Add a new image to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_image_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductImage3 body: (required)
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, body, **kwargs)
|
69,169 |
mailchimp_marketing.api.ecommerce_api
|
add_product_variant
|
Add or update product variant # noqa: E501
Add or update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variant(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant4 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
|
def add_product_variant(self, store_id, product_id, variant_id, body, **kwargs): # noqa: E501
"""Add or update product variant # noqa: E501
Add or update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variant(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant4 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_product_variant_with_http_info(store_id, product_id, variant_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_product_variant_with_http_info(store_id, product_id, variant_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, variant_id, body, **kwargs)
|
69,170 |
mailchimp_marketing.api.ecommerce_api
|
add_product_variant_with_http_info
|
Add or update product variant # noqa: E501
Add or update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variant_with_http_info(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant4 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
|
def add_product_variant_with_http_info(self, store_id, product_id, variant_id, body, **kwargs): # noqa: E501
"""Add or update product variant # noqa: E501
Add or update a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variant_with_http_info(store_id, product_id, variant_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param EcommerceProductVariant4 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, variant_id, body, **kwargs)
|
69,171 |
mailchimp_marketing.api.ecommerce_api
|
add_product_variants
|
Add product variant # noqa: E501
Add a new variant to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variants(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductVariant3 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
|
def add_product_variants(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product variant # noqa: E501
Add a new variant to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variants(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductVariant3 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_product_variants_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_product_variants_with_http_info(store_id, product_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, body, **kwargs)
|
69,172 |
mailchimp_marketing.api.ecommerce_api
|
add_product_variants_with_http_info
|
Add product variant # noqa: E501
Add a new variant to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variants_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductVariant3 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
|
def add_product_variants_with_http_info(self, store_id, product_id, body, **kwargs): # noqa: E501
"""Add product variant # noqa: E501
Add a new variant to the product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_product_variants_with_http_info(store_id, product_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param EcommerceProductVariant3 body: (required)
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_product_variants" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, body, **kwargs)
|
69,173 |
mailchimp_marketing.api.ecommerce_api
|
add_promo_code
|
Add promo code # noqa: E501
Add a new promo code to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_code(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoCode1 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
|
def add_promo_code(self, store_id, promo_rule_id, body, **kwargs): # noqa: E501
"""Add promo code # noqa: E501
Add a new promo code to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_code(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoCode1 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_promo_code_with_http_info(store_id, promo_rule_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_promo_code_with_http_info(store_id, promo_rule_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, promo_rule_id, body, **kwargs)
|
69,174 |
mailchimp_marketing.api.ecommerce_api
|
add_promo_code_with_http_info
|
Add promo code # noqa: E501
Add a new promo code to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_code_with_http_info(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoCode1 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
|
def add_promo_code_with_http_info(self, store_id, promo_rule_id, body, **kwargs): # noqa: E501
"""Add promo code # noqa: E501
Add a new promo code to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_code_with_http_info(store_id, promo_rule_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param EcommercePromoCode1 body: (required)
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoCode', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, promo_rule_id, body, **kwargs)
|
69,175 |
mailchimp_marketing.api.ecommerce_api
|
add_promo_rules
|
Add promo rule # noqa: E501
Add a new promo rule to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_rules(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommercePromoRule1 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
|
def add_promo_rules(self, store_id, body, **kwargs): # noqa: E501
"""Add promo rule # noqa: E501
Add a new promo rule to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_rules(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommercePromoRule1 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_promo_rules_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_promo_rules_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, body, **kwargs)
|
69,176 |
mailchimp_marketing.api.ecommerce_api
|
add_promo_rules_with_http_info
|
Add promo rule # noqa: E501
Add a new promo rule to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_rules_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommercePromoRule1 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
|
def add_promo_rules_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add promo rule # noqa: E501
Add a new promo rule to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_promo_rules_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommercePromoRule1 body: (required)
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_promo_rules" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoRule', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, body, **kwargs)
|
69,177 |
mailchimp_marketing.api.ecommerce_api
|
add_store
|
Add store # noqa: E501
Add a new store to your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EcommerceStore1 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
|
def add_store(self, body, **kwargs): # noqa: E501
"""Add store # noqa: E501
Add a new store to your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EcommerceStore1 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.add_store_with_http_info(body, **kwargs) # noqa: E501
return data
|
(self, body, **kwargs)
|
69,178 |
mailchimp_marketing.api.ecommerce_api
|
add_store_cart
|
Add cart # noqa: E501
Add a new cart to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_cart(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCart1 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
|
def add_store_cart(self, store_id, body, **kwargs): # noqa: E501
"""Add cart # noqa: E501
Add a new cart to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_cart(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCart1 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_cart_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_cart_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, body, **kwargs)
|
69,179 |
mailchimp_marketing.api.ecommerce_api
|
add_store_cart_with_http_info
|
Add cart # noqa: E501
Add a new cart to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_cart_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCart1 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
|
def add_store_cart_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add cart # noqa: E501
Add a new cart to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_cart_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCart1 body: (required)
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCart', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, body, **kwargs)
|
69,180 |
mailchimp_marketing.api.ecommerce_api
|
add_store_customer
|
Add customer # noqa: E501
Add a new customer to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_customer(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCustomer3 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
|
def add_store_customer(self, store_id, body, **kwargs): # noqa: E501
"""Add customer # noqa: E501
Add a new customer to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_customer(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCustomer3 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_customer_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_customer_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, body, **kwargs)
|
69,181 |
mailchimp_marketing.api.ecommerce_api
|
add_store_customer_with_http_info
|
Add customer # noqa: E501
Add a new customer to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_customer_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCustomer3 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
|
def add_store_customer_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add customer # noqa: E501
Add a new customer to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_customer_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceCustomer3 body: (required)
:return: EcommerceCustomer
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCustomer', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, body, **kwargs)
|
69,182 |
mailchimp_marketing.api.ecommerce_api
|
add_store_order
|
Add order # noqa: E501
Add a new order to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_order(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceOrder1 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
|
def add_store_order(self, store_id, body, **kwargs): # noqa: E501
"""Add order # noqa: E501
Add a new order to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_order(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceOrder1 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_order_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_order_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, body, **kwargs)
|
69,183 |
mailchimp_marketing.api.ecommerce_api
|
add_store_order_with_http_info
|
Add order # noqa: E501
Add a new order to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_order_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceOrder1 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
|
def add_store_order_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add order # noqa: E501
Add a new order to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_order_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceOrder1 body: (required)
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrder', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, body, **kwargs)
|
69,184 |
mailchimp_marketing.api.ecommerce_api
|
add_store_product
|
Add product # noqa: E501
Add a new product to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_product(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceProduct1 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
|
def add_store_product(self, store_id, body, **kwargs): # noqa: E501
"""Add product # noqa: E501
Add a new product to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_product(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceProduct1 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.add_store_product_with_http_info(store_id, body, **kwargs) # noqa: E501
else:
(data) = self.add_store_product_with_http_info(store_id, body, **kwargs) # noqa: E501
return data
|
(self, store_id, body, **kwargs)
|
69,185 |
mailchimp_marketing.api.ecommerce_api
|
add_store_product_with_http_info
|
Add product # noqa: E501
Add a new product to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_product_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceProduct1 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
|
def add_store_product_with_http_info(self, store_id, body, **kwargs): # noqa: E501
"""Add product # noqa: E501
Add a new product to a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_product_with_http_info(store_id, body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param EcommerceProduct1 body: (required)
:return: EcommerceProduct
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store_product" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProduct', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, body, **kwargs)
|
69,186 |
mailchimp_marketing.api.ecommerce_api
|
add_store_with_http_info
|
Add store # noqa: E501
Add a new store to your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EcommerceStore1 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
|
def add_store_with_http_info(self, body, **kwargs): # noqa: E501
"""Add store # noqa: E501
Add a new store to your Mailchimp account. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_store_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EcommerceStore1 body: (required)
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method add_store" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in params:
body_params = params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceStore', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, body, **kwargs)
|
69,187 |
mailchimp_marketing.api.ecommerce_api
|
delete_cart_line_item
|
Delete cart line item # noqa: E501
Delete a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_cart_line_item(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_cart_line_item(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Delete cart line item # noqa: E501
Delete a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_cart_line_item(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
return data
|
(self, store_id, cart_id, line_id, **kwargs)
|
69,188 |
mailchimp_marketing.api.ecommerce_api
|
delete_cart_line_item_with_http_info
|
Delete cart line item # noqa: E501
Delete a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_cart_line_item_with_http_info(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Delete cart line item # noqa: E501
Delete a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_cart_line_item_with_http_info(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'line_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, cart_id, line_id, **kwargs)
|
69,189 |
mailchimp_marketing.api.ecommerce_api
|
delete_order
|
Delete order # noqa: E501
Delete an order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_order(self, store_id, order_id, **kwargs): # noqa: E501
"""Delete order # noqa: E501
Delete an order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
else:
(data) = self.delete_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
return data
|
(self, store_id, order_id, **kwargs)
|
69,190 |
mailchimp_marketing.api.ecommerce_api
|
delete_order_line_item
|
Delete order line item # noqa: E501
Delete a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_line_item(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_order_line_item(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Delete order line item # noqa: E501
Delete a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_line_item(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.delete_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
return data
|
(self, store_id, order_id, line_id, **kwargs)
|
69,191 |
mailchimp_marketing.api.ecommerce_api
|
delete_order_line_item_with_http_info
|
Delete order line item # noqa: E501
Delete a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_line_item_with_http_info(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_order_line_item_with_http_info(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Delete order line item # noqa: E501
Delete a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_line_item_with_http_info(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'line_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, order_id, line_id, **kwargs)
|
69,192 |
mailchimp_marketing.api.ecommerce_api
|
delete_order_with_http_info
|
Delete order # noqa: E501
Delete an order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_order_with_http_info(self, store_id, order_id, **kwargs): # noqa: E501
"""Delete order # noqa: E501
Delete an order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, order_id, **kwargs)
|
69,193 |
mailchimp_marketing.api.ecommerce_api
|
delete_product_image
|
Delete product image # noqa: E501
Delete a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_image(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_product_image(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Delete product image # noqa: E501
Delete a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_image(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
else:
(data) = self.delete_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, image_id, **kwargs)
|
69,194 |
mailchimp_marketing.api.ecommerce_api
|
delete_product_image_with_http_info
|
Delete product image # noqa: E501
Delete a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_image_with_http_info(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_product_image_with_http_info(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Delete product image # noqa: E501
Delete a product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_image_with_http_info(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'image_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'image_id' is set
if ('image_id' not in params or
params['image_id'] is None):
raise ValueError("Missing the required parameter `image_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'image_id' in params:
path_params['image_id'] = params['image_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, image_id, **kwargs)
|
69,195 |
mailchimp_marketing.api.ecommerce_api
|
delete_product_variant
|
Delete product variant # noqa: E501
Delete a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_variant(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_product_variant(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Delete product variant # noqa: E501
Delete a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_variant(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
else:
(data) = self.delete_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, variant_id, **kwargs)
|
69,196 |
mailchimp_marketing.api.ecommerce_api
|
delete_product_variant_with_http_info
|
Delete product variant # noqa: E501
Delete a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_variant_with_http_info(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_product_variant_with_http_info(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Delete product variant # noqa: E501
Delete a product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_product_variant_with_http_info(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, variant_id, **kwargs)
|
69,197 |
mailchimp_marketing.api.ecommerce_api
|
delete_promo_code
|
Delete promo code # noqa: E501
Delete a promo code from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_code(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_promo_code(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Delete promo code # noqa: E501
Delete a promo code from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_code(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
else:
(data) = self.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
return data
|
(self, store_id, promo_rule_id, promo_code_id, **kwargs)
|
69,198 |
mailchimp_marketing.api.ecommerce_api
|
delete_promo_code_with_http_info
|
Delete promo code # noqa: E501
Delete a promo code from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_promo_code_with_http_info(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Delete promo code # noqa: E501
Delete a promo code from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'promo_code_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_code_id' is set
if ('promo_code_id' not in params or
params['promo_code_id'] is None):
raise ValueError("Missing the required parameter `promo_code_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'promo_code_id' in params:
path_params['promo_code_id'] = params['promo_code_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, promo_rule_id, promo_code_id, **kwargs)
|
69,199 |
mailchimp_marketing.api.ecommerce_api
|
delete_promo_rule
|
Delete promo rule # noqa: E501
Delete a promo rule from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_rule(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_promo_rule(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Delete promo rule # noqa: E501
Delete a promo rule from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_rule(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
else:
(data) = self.delete_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
return data
|
(self, store_id, promo_rule_id, **kwargs)
|
69,200 |
mailchimp_marketing.api.ecommerce_api
|
delete_promo_rule_with_http_info
|
Delete promo rule # noqa: E501
Delete a promo rule from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_rule_with_http_info(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_promo_rule_with_http_info(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Delete promo rule # noqa: E501
Delete a promo rule from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_promo_rule_with_http_info(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_promo_rule" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, promo_rule_id, **kwargs)
|
69,201 |
mailchimp_marketing.api.ecommerce_api
|
delete_store
|
Delete store # noqa: E501
Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
|
def delete_store(self, store_id, **kwargs): # noqa: E501
"""Delete store # noqa: E501
Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_with_http_info(store_id, **kwargs) # noqa: E501
return data
|
(self, store_id, **kwargs)
|
69,202 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_cart
|
Delete cart # noqa: E501
Delete a cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_cart(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_store_cart(self, store_id, cart_id, **kwargs): # noqa: E501
"""Delete cart # noqa: E501
Delete a cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_cart(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
return data
|
(self, store_id, cart_id, **kwargs)
|
69,203 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_cart_with_http_info
|
Delete cart # noqa: E501
Delete a cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_cart_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_store_cart_with_http_info(self, store_id, cart_id, **kwargs): # noqa: E501
"""Delete cart # noqa: E501
Delete a cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_cart_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, cart_id, **kwargs)
|
69,204 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_customer
|
Delete customer # noqa: E501
Delete a customer from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_customer(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_store_customer(self, store_id, customer_id, **kwargs): # noqa: E501
"""Delete customer # noqa: E501
Delete a customer from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_customer(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_customer_with_http_info(store_id, customer_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_customer_with_http_info(store_id, customer_id, **kwargs) # noqa: E501
return data
|
(self, store_id, customer_id, **kwargs)
|
69,205 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_customer_with_http_info
|
Delete customer # noqa: E501
Delete a customer from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_customer_with_http_info(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_store_customer_with_http_info(self, store_id, customer_id, **kwargs): # noqa: E501
"""Delete customer # noqa: E501
Delete a customer from a store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_customer_with_http_info(store_id, customer_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str customer_id: The id for the customer of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'customer_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store_customer" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'customer_id' is set
if ('customer_id' not in params or
params['customer_id'] is None):
raise ValueError("Missing the required parameter `customer_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'customer_id' in params:
path_params['customer_id'] = params['customer_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers/{customer_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, customer_id, **kwargs)
|
69,206 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_product
|
Delete product # noqa: E501
Delete a product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_product(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_store_product(self, store_id, product_id, **kwargs): # noqa: E501
"""Delete product # noqa: E501
Delete a product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_product(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_store_product_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.delete_store_product_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, **kwargs)
|
69,207 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_product_with_http_info
|
Delete product # noqa: E501
Delete a product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_product_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
|
def delete_store_product_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""Delete product # noqa: E501
Delete a product. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_product_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store_product" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, **kwargs)
|
69,208 |
mailchimp_marketing.api.ecommerce_api
|
delete_store_with_http_info
|
Delete store # noqa: E501
Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
|
def delete_store_with_http_info(self, store_id, **kwargs): # noqa: E501
"""Delete store # noqa: E501
Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_store_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_store" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='object', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, **kwargs)
|
69,209 |
mailchimp_marketing.api.ecommerce_api
|
get_all_cart_line_items
|
List cart line items # noqa: E501
Get information about a cart's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_cart_line_items(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: CartLines
If the method is called asynchronously,
returns the request thread.
|
def get_all_cart_line_items(self, store_id, cart_id, **kwargs): # noqa: E501
"""List cart line items # noqa: E501
Get information about a cart's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_cart_line_items(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: CartLines
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_cart_line_items_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_cart_line_items_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
return data
|
(self, store_id, cart_id, **kwargs)
|
69,210 |
mailchimp_marketing.api.ecommerce_api
|
get_all_cart_line_items_with_http_info
|
List cart line items # noqa: E501
Get information about a cart's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_cart_line_items_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: CartLines
If the method is called asynchronously,
returns the request thread.
|
def get_all_cart_line_items_with_http_info(self, store_id, cart_id, **kwargs): # noqa: E501
"""List cart line items # noqa: E501
Get information about a cart's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_cart_line_items_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: CartLines
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_cart_line_items" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='CartLines', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, cart_id, **kwargs)
|
69,211 |
mailchimp_marketing.api.ecommerce_api
|
get_all_order_line_items
|
List order line items # noqa: E501
Get information about an order's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_order_line_items(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: OrderLines
If the method is called asynchronously,
returns the request thread.
|
def get_all_order_line_items(self, store_id, order_id, **kwargs): # noqa: E501
"""List order line items # noqa: E501
Get information about an order's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_order_line_items(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: OrderLines
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_order_line_items_with_http_info(store_id, order_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_order_line_items_with_http_info(store_id, order_id, **kwargs) # noqa: E501
return data
|
(self, store_id, order_id, **kwargs)
|
69,212 |
mailchimp_marketing.api.ecommerce_api
|
get_all_order_line_items_with_http_info
|
List order line items # noqa: E501
Get information about an order's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_order_line_items_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: OrderLines
If the method is called asynchronously,
returns the request thread.
|
def get_all_order_line_items_with_http_info(self, store_id, order_id, **kwargs): # noqa: E501
"""List order line items # noqa: E501
Get information about an order's line items. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_order_line_items_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: OrderLines
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_order_line_items" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='OrderLines', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, order_id, **kwargs)
|
69,213 |
mailchimp_marketing.api.ecommerce_api
|
get_all_store_customers
|
List customers # noqa: E501
Get information about a store's customers. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_customers(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str email_address: Restrict the response to customers with the email address.
:return: Customers
If the method is called asynchronously,
returns the request thread.
|
def get_all_store_customers(self, store_id, **kwargs): # noqa: E501
"""List customers # noqa: E501
Get information about a store's customers. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_customers(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str email_address: Restrict the response to customers with the email address.
:return: Customers
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_store_customers_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_store_customers_with_http_info(store_id, **kwargs) # noqa: E501
return data
|
(self, store_id, **kwargs)
|
69,214 |
mailchimp_marketing.api.ecommerce_api
|
get_all_store_customers_with_http_info
|
List customers # noqa: E501
Get information about a store's customers. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_customers_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str email_address: Restrict the response to customers with the email address.
:return: Customers
If the method is called asynchronously,
returns the request thread.
|
def get_all_store_customers_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List customers # noqa: E501
Get information about a store's customers. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_customers_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:param str email_address: Restrict the response to customers with the email address.
:return: Customers
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset', 'email_address'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_store_customers" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'email_address' in params:
query_params.append(('email_address', params['email_address'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/customers', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Customers', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, **kwargs)
|
69,215 |
mailchimp_marketing.api.ecommerce_api
|
get_all_store_products
|
List product # noqa: E501
Get information about a store's products. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_products(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Products
If the method is called asynchronously,
returns the request thread.
|
def get_all_store_products(self, store_id, **kwargs): # noqa: E501
"""List product # noqa: E501
Get information about a store's products. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_products(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Products
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_store_products_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_all_store_products_with_http_info(store_id, **kwargs) # noqa: E501
return data
|
(self, store_id, **kwargs)
|
69,216 |
mailchimp_marketing.api.ecommerce_api
|
get_all_store_products_with_http_info
|
List product # noqa: E501
Get information about a store's products. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_products_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Products
If the method is called asynchronously,
returns the request thread.
|
def get_all_store_products_with_http_info(self, store_id, **kwargs): # noqa: E501
"""List product # noqa: E501
Get information about a store's products. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_store_products_with_http_info(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Products
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_store_products" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Products', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, **kwargs)
|
69,217 |
mailchimp_marketing.api.ecommerce_api
|
get_cart_line_item
|
Get cart line item # noqa: E501
Get information about a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_cart_line_item(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
|
def get_cart_line_item(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Get cart line item # noqa: E501
Get information about a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_cart_line_item(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.get_cart_line_item_with_http_info(store_id, cart_id, line_id, **kwargs) # noqa: E501
return data
|
(self, store_id, cart_id, line_id, **kwargs)
|
69,218 |
mailchimp_marketing.api.ecommerce_api
|
get_cart_line_item_with_http_info
|
Get cart line item # noqa: E501
Get information about a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_cart_line_item_with_http_info(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
|
def get_cart_line_item_with_http_info(self, store_id, cart_id, line_id, **kwargs): # noqa: E501
"""Get cart line item # noqa: E501
Get information about a specific cart line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_cart_line_item_with_http_info(store_id, cart_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param str line_id: The id for the line item of a cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCartLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'line_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_cart_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCartLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, cart_id, line_id, **kwargs)
|
69,219 |
mailchimp_marketing.api.ecommerce_api
|
get_order
|
Get order info # noqa: E501
Get information about a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
|
def get_order(self, store_id, order_id, **kwargs): # noqa: E501
"""Get order info # noqa: E501
Get information about a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
else:
(data) = self.get_order_with_http_info(store_id, order_id, **kwargs) # noqa: E501
return data
|
(self, store_id, order_id, **kwargs)
|
69,220 |
mailchimp_marketing.api.ecommerce_api
|
get_order_line_item
|
Get order line item # noqa: E501
Get information about a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_line_item(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
|
def get_order_line_item(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Get order line item # noqa: E501
Get information about a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_line_item(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
else:
(data) = self.get_order_line_item_with_http_info(store_id, order_id, line_id, **kwargs) # noqa: E501
return data
|
(self, store_id, order_id, line_id, **kwargs)
|
69,221 |
mailchimp_marketing.api.ecommerce_api
|
get_order_line_item_with_http_info
|
Get order line item # noqa: E501
Get information about a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_line_item_with_http_info(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
|
def get_order_line_item_with_http_info(self, store_id, order_id, line_id, **kwargs): # noqa: E501
"""Get order line item # noqa: E501
Get information about a specific order line item. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_line_item_with_http_info(store_id, order_id, line_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param str line_id: The id for the line item of an order. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrderLineItem
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'line_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_order_line_item" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
# verify the required parameter 'line_id' is set
if ('line_id' not in params or
params['line_id'] is None):
raise ValueError("Missing the required parameter `line_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
if 'line_id' in params:
path_params['line_id'] = params['line_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrderLineItem', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, order_id, line_id, **kwargs)
|
69,222 |
mailchimp_marketing.api.ecommerce_api
|
get_order_with_http_info
|
Get order info # noqa: E501
Get information about a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
|
def get_order_with_http_info(self, store_id, order_id, **kwargs): # noqa: E501
"""Get order info # noqa: E501
Get information about a specific order. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_with_http_info(store_id, order_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str order_id: The id for the order in a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceOrder
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'order_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_order" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'order_id' is set
if ('order_id' not in params or
params['order_id'] is None):
raise ValueError("Missing the required parameter `order_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'order_id' in params:
path_params['order_id'] = params['order_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/orders/{order_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceOrder', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, order_id, **kwargs)
|
69,223 |
mailchimp_marketing.api.ecommerce_api
|
get_product_image
|
Get product image info # noqa: E501
Get information about a specific product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_image(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
|
def get_product_image(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Get product image info # noqa: E501
Get information about a specific product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_image(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_image_with_http_info(store_id, product_id, image_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, image_id, **kwargs)
|
69,224 |
mailchimp_marketing.api.ecommerce_api
|
get_product_image_with_http_info
|
Get product image info # noqa: E501
Get information about a specific product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_image_with_http_info(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
|
def get_product_image_with_http_info(self, store_id, product_id, image_id, **kwargs): # noqa: E501
"""Get product image info # noqa: E501
Get information about a specific product image. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_image_with_http_info(store_id, product_id, image_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str image_id: The id for the product image. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductImage
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'image_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_image" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'image_id' is set
if ('image_id' not in params or
params['image_id'] is None):
raise ValueError("Missing the required parameter `image_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'image_id' in params:
path_params['image_id'] = params['image_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImage', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, image_id, **kwargs)
|
69,225 |
mailchimp_marketing.api.ecommerce_api
|
get_product_images
|
List product images # noqa: E501
Get information about a product's images. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_images(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductImages
If the method is called asynchronously,
returns the request thread.
|
def get_product_images(self, store_id, product_id, **kwargs): # noqa: E501
"""List product images # noqa: E501
Get information about a product's images. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_images(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductImages
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_images_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_images_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, **kwargs)
|
69,226 |
mailchimp_marketing.api.ecommerce_api
|
get_product_images_with_http_info
|
List product images # noqa: E501
Get information about a product's images. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_images_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductImages
If the method is called asynchronously,
returns the request thread.
|
def get_product_images_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""List product images # noqa: E501
Get information about a product's images. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_images_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductImages
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_images" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/images', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductImages', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, **kwargs)
|
69,227 |
mailchimp_marketing.api.ecommerce_api
|
get_product_variant
|
Get product variant info # noqa: E501
Get information about a specific product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variant(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
|
def get_product_variant(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Get product variant info # noqa: E501
Get information about a specific product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variant(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_variant_with_http_info(store_id, product_id, variant_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, variant_id, **kwargs)
|
69,228 |
mailchimp_marketing.api.ecommerce_api
|
get_product_variant_with_http_info
|
Get product variant info # noqa: E501
Get information about a specific product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variant_with_http_info(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
|
def get_product_variant_with_http_info(self, store_id, product_id, variant_id, **kwargs): # noqa: E501
"""Get product variant info # noqa: E501
Get information about a specific product variant. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variant_with_http_info(store_id, product_id, variant_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param str variant_id: The id for the product variant. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceProductVariant
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'variant_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_variant" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
# verify the required parameter 'variant_id' is set
if ('variant_id' not in params or
params['variant_id'] is None):
raise ValueError("Missing the required parameter `variant_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
if 'variant_id' in params:
path_params['variant_id'] = params['variant_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariant', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, variant_id, **kwargs)
|
69,229 |
mailchimp_marketing.api.ecommerce_api
|
get_product_variants
|
List product variants # noqa: E501
Get information about a product's variants. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variants(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductVariants
If the method is called asynchronously,
returns the request thread.
|
def get_product_variants(self, store_id, product_id, **kwargs): # noqa: E501
"""List product variants # noqa: E501
Get information about a product's variants. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variants(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductVariants
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_product_variants_with_http_info(store_id, product_id, **kwargs) # noqa: E501
else:
(data) = self.get_product_variants_with_http_info(store_id, product_id, **kwargs) # noqa: E501
return data
|
(self, store_id, product_id, **kwargs)
|
69,230 |
mailchimp_marketing.api.ecommerce_api
|
get_product_variants_with_http_info
|
List product variants # noqa: E501
Get information about a product's variants. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variants_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductVariants
If the method is called asynchronously,
returns the request thread.
|
def get_product_variants_with_http_info(self, store_id, product_id, **kwargs): # noqa: E501
"""List product variants # noqa: E501
Get information about a product's variants. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_product_variants_with_http_info(store_id, product_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str product_id: The id for the product of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: EcommerceProductVariants
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'product_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_product_variants" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'product_id' is set
if ('product_id' not in params or
params['product_id'] is None):
raise ValueError("Missing the required parameter `product_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'product_id' in params:
path_params['product_id'] = params['product_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/products/{product_id}/variants', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceProductVariants', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, product_id, **kwargs)
|
69,231 |
mailchimp_marketing.api.ecommerce_api
|
get_promo_code
|
Get promo code # noqa: E501
Get information about a specific promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_code(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
|
def get_promo_code(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Get promo code # noqa: E501
Get information about a specific promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_code(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
else:
(data) = self.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, **kwargs) # noqa: E501
return data
|
(self, store_id, promo_rule_id, promo_code_id, **kwargs)
|
69,232 |
mailchimp_marketing.api.ecommerce_api
|
get_promo_code_with_http_info
|
Get promo code # noqa: E501
Get information about a specific promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
|
def get_promo_code_with_http_info(self, store_id, promo_rule_id, promo_code_id, **kwargs): # noqa: E501
"""Get promo code # noqa: E501
Get information about a specific promo code. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_code_with_http_info(store_id, promo_rule_id, promo_code_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str promo_code_id: The id for the promo code of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoCode
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'promo_code_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_promo_code" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_code_id' is set
if ('promo_code_id' not in params or
params['promo_code_id'] is None):
raise ValueError("Missing the required parameter `promo_code_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'promo_code_id' in params:
path_params['promo_code_id'] = params['promo_code_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoCode', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, promo_rule_id, promo_code_id, **kwargs)
|
69,233 |
mailchimp_marketing.api.ecommerce_api
|
get_promo_codes
|
List promo codes # noqa: E501
Get information about a store's promo codes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_codes(promo_rule_id, store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoCodes
If the method is called asynchronously,
returns the request thread.
|
def get_promo_codes(self, promo_rule_id, store_id, **kwargs): # noqa: E501
"""List promo codes # noqa: E501
Get information about a store's promo codes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_codes(promo_rule_id, store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoCodes
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_promo_codes_with_http_info(promo_rule_id, store_id, **kwargs) # noqa: E501
else:
(data) = self.get_promo_codes_with_http_info(promo_rule_id, store_id, **kwargs) # noqa: E501
return data
|
(self, promo_rule_id, store_id, **kwargs)
|
69,234 |
mailchimp_marketing.api.ecommerce_api
|
get_promo_codes_with_http_info
|
List promo codes # noqa: E501
Get information about a store's promo codes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_codes_with_http_info(promo_rule_id, store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoCodes
If the method is called asynchronously,
returns the request thread.
|
def get_promo_codes_with_http_info(self, promo_rule_id, store_id, **kwargs): # noqa: E501
"""List promo codes # noqa: E501
Get information about a store's promo codes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_codes_with_http_info(promo_rule_id, store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: PromoCodes
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['promo_rule_id', 'store_id', 'fields', 'exclude_fields', 'count', 'offset'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_promo_codes" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
if 'count' in params and params['count'] > 1000: # noqa: E501
raise ValueError("Invalid value for parameter `count` when calling ``, must be a value less than or equal to `1000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
if 'count' in params:
query_params.append(('count', params['count'])) # noqa: E501
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='PromoCodes', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, promo_rule_id, store_id, **kwargs)
|
69,235 |
mailchimp_marketing.api.ecommerce_api
|
get_promo_rule
|
Get promo rule # noqa: E501
Get information about a specific promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_rule(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
|
def get_promo_rule(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Get promo rule # noqa: E501
Get information about a specific promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_rule(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
else:
(data) = self.get_promo_rule_with_http_info(store_id, promo_rule_id, **kwargs) # noqa: E501
return data
|
(self, store_id, promo_rule_id, **kwargs)
|
69,236 |
mailchimp_marketing.api.ecommerce_api
|
get_promo_rule_with_http_info
|
Get promo rule # noqa: E501
Get information about a specific promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_rule_with_http_info(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
|
def get_promo_rule_with_http_info(self, store_id, promo_rule_id, **kwargs): # noqa: E501
"""Get promo rule # noqa: E501
Get information about a specific promo rule. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_promo_rule_with_http_info(store_id, promo_rule_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str promo_rule_id: The id for the promo rule of a store. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommercePromoRule
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'promo_rule_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_promo_rule" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'promo_rule_id' is set
if ('promo_rule_id' not in params or
params['promo_rule_id'] is None):
raise ValueError("Missing the required parameter `promo_rule_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'promo_rule_id' in params:
path_params['promo_rule_id'] = params['promo_rule_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommercePromoRule', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, promo_rule_id, **kwargs)
|
69,237 |
mailchimp_marketing.api.ecommerce_api
|
get_store
|
Get store info # noqa: E501
Get information about a specific store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
|
def get_store(self, store_id, **kwargs): # noqa: E501
"""Get store info # noqa: E501
Get information about a specific store. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceStore
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_with_http_info(store_id, **kwargs) # noqa: E501
return data
|
(self, store_id, **kwargs)
|
69,238 |
mailchimp_marketing.api.ecommerce_api
|
get_store_cart
|
Get cart info # noqa: E501
Get information about a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_cart(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
|
def get_store_cart(self, store_id, cart_id, **kwargs): # noqa: E501
"""Get cart info # noqa: E501
Get information about a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_cart(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_cart_with_http_info(store_id, cart_id, **kwargs) # noqa: E501
return data
|
(self, store_id, cart_id, **kwargs)
|
69,239 |
mailchimp_marketing.api.ecommerce_api
|
get_store_cart_with_http_info
|
Get cart info # noqa: E501
Get information about a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_cart_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
|
def get_store_cart_with_http_info(self, store_id, cart_id, **kwargs): # noqa: E501
"""Get cart info # noqa: E501
Get information about a specific cart. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_cart_with_http_info(store_id, cart_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param str cart_id: The id for the cart. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:return: EcommerceCart
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['store_id', 'cart_id', 'fields', 'exclude_fields'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_store_cart" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'store_id' is set
if ('store_id' not in params or
params['store_id'] is None):
raise ValueError("Missing the required parameter `store_id` when calling ``") # noqa: E501
# verify the required parameter 'cart_id' is set
if ('cart_id' not in params or
params['cart_id'] is None):
raise ValueError("Missing the required parameter `cart_id` when calling ``") # noqa: E501
collection_formats = {}
path_params = {}
if 'store_id' in params:
path_params['store_id'] = params['store_id'] # noqa: E501
if 'cart_id' in params:
path_params['cart_id'] = params['cart_id'] # noqa: E501
query_params = []
if 'fields' in params:
query_params.append(('fields', params['fields'])) # noqa: E501
collection_formats['fields'] = 'csv' # noqa: E501
if 'exclude_fields' in params:
query_params.append(('exclude_fields', params['exclude_fields'])) # noqa: E501
collection_formats['exclude_fields'] = 'csv' # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/problem+json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['basicAuth'] # noqa: E501
return self.api_client.call_api(
'/ecommerce/stores/{store_id}/carts/{cart_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EcommerceCart', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
(self, store_id, cart_id, **kwargs)
|
69,240 |
mailchimp_marketing.api.ecommerce_api
|
get_store_carts
|
List carts # noqa: E501
Get information about a store's carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_carts(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Carts
If the method is called asynchronously,
returns the request thread.
|
def get_store_carts(self, store_id, **kwargs): # noqa: E501
"""List carts # noqa: E501
Get information about a store's carts. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_store_carts(store_id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str store_id: The store id. (required)
:param list[str] fields: A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
:param list[str] exclude_fields: A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
:param int count: The number of records to return. Default value is 10. Maximum value is 1000
:param int offset: Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0.
:return: Carts
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_store_carts_with_http_info(store_id, **kwargs) # noqa: E501
else:
(data) = self.get_store_carts_with_http_info(store_id, **kwargs) # noqa: E501
return data
|
(self, store_id, **kwargs)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.