def product_create_with_http_info(self, **kwargs): # noqa: E501 """Upsert Products. # noqa: E501 Upsert (update or create) products. The parent serves as the 'base' product of the children.<br />For example, the children could be different sizes or colors of the parent product.<br />For channels where every size and color are different products this does not make any difference<br />(the children will just be sent separately, while ignoring the parent).<br />But there are channels where the parent and the children need to be sent together, for example<br />when there is one product with a list of sizes. In this case all the product information is retrieved<br />from the parent product while the size list is generated from the children.<br /> <br />Note that the parent itself is a 'blueprint' of the child products and we do our best to make sure it<br />does not end up on the marketplaces itself. Only the children can be purchased.<br /> <br />It's not possible to nest parent and children more than one level (A parent can have many children,<br />but any child cannot itself also have children).<br /> <br />The supplied MerchantProductNo needs to be unique. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.product_create_with_http_info(async_req=True) >>> result = thread.get() :param merchant_product_request: :type merchant_product_request: list[MerchantProductRequest] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SingleOfProductCreationResult, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['merchant_product_request'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method product_create" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'merchant_product_request' in local_var_params: body_params = local_var_params['merchant_product_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/products', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SingleOfProductCreationResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def notification_index_with_http_info(self, **kwargs): # noqa: E501 """Get Notifications. # noqa: E501 Gets all notifications based on filter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.notification_index_with_http_info(async_req=True) >>> result = thread.get() :param from_date: Filter on the notification date, starting from this date. This date is inclusive. :type from_date: datetime :param to_date: Filter on the notification date, until this date. This date is exclusive. :type to_date: datetime :param types: Notification type(s) to filter on. :type types: list[NotificationType] :param merchant_order_nos: Filter on unique order reference used by the merchant. :type merchant_order_nos: list[str] :param channel_order_nos: Filter on unique order reference used by the channel. :type channel_order_nos: list[str] :param merchant_return_nos: Filter on unique return reference used by the merchant. :type merchant_return_nos: list[str] :param channel_return_nos: Filter on unique return reference used by the channel. :type channel_return_nos: list[str] :param merchant_shipment_nos: Filter on unique shipment reference used by the merchant. :type merchant_shipment_nos: list[str] :param page: The page to filter on. Starts at 1. :type page: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfMerchantNotificationResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'from_date', 'to_date', 'types', 'merchant_order_nos', 'channel_order_nos', 'merchant_return_nos', 'channel_return_nos', 'merchant_shipment_nos', 'page' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method notification_index" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'from_date' in local_var_params and local_var_params[ 'from_date'] is not None: # noqa: E501 query_params.append( ('fromDate', local_var_params['from_date'])) # noqa: E501 if 'to_date' in local_var_params and local_var_params[ 'to_date'] is not None: # noqa: E501 query_params.append( ('toDate', local_var_params['to_date'])) # noqa: E501 if 'types' in local_var_params and local_var_params[ 'types'] is not None: # noqa: E501 query_params.append( ('types', local_var_params['types'])) # noqa: E501 collection_formats['types'] = 'multi' # noqa: E501 if 'merchant_order_nos' in local_var_params and local_var_params[ 'merchant_order_nos'] is not None: # noqa: E501 query_params.append( ('merchantOrderNos', local_var_params['merchant_order_nos'])) # noqa: E501 collection_formats['merchantOrderNos'] = 'multi' # noqa: E501 if 'channel_order_nos' in local_var_params and local_var_params[ 'channel_order_nos'] is not None: # noqa: E501 query_params.append( ('channelOrderNos', local_var_params['channel_order_nos'])) # noqa: E501 collection_formats['channelOrderNos'] = 'multi' # noqa: E501 if 'merchant_return_nos' in local_var_params and local_var_params[ 'merchant_return_nos'] is not None: # noqa: E501 query_params.append( ('merchantReturnNos', local_var_params['merchant_return_nos'])) # noqa: E501 collection_formats['merchantReturnNos'] = 'multi' # noqa: E501 if 'channel_return_nos' in local_var_params and local_var_params[ 'channel_return_nos'] is not None: # noqa: E501 query_params.append( ('channelReturnNos', local_var_params['channel_return_nos'])) # noqa: E501 collection_formats['channelReturnNos'] = 'multi' # noqa: E501 if 'merchant_shipment_nos' in local_var_params and local_var_params[ 'merchant_shipment_nos'] is not None: # noqa: E501 query_params.append( ('merchantShipmentNos', local_var_params['merchant_shipment_nos'])) # noqa: E501 collection_formats['merchantShipmentNos'] = 'multi' # noqa: E501 if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/notifications', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type= 'CollectionOfMerchantNotificationResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def product_get_by_merchant_product_no_with_http_info( self, merchant_product_no, **kwargs): # noqa: E501 """Get Product. # noqa: E501 Retrieve a product based on the merchant reference. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.product_get_by_merchant_product_no_with_http_info(merchant_product_no, async_req=True) >>> result = thread.get() :param merchant_product_no: (required) :type merchant_product_no: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SingleOfMerchantProductResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['merchant_product_no'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method product_get_by_merchant_product_no" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} if 'merchant_product_no' in local_var_params: path_params['merchantProductNo'] = local_var_params[ 'merchant_product_no'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/products/{merchantProductNo}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SingleOfMerchantProductResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def product_patch_with_http_info(self, merchant_product_no, **kwargs): # noqa: E501 """Patch products # noqa: E501 Patch products. This endpoint allows you to update single fields on a product using patch operations,<br />without having to supply the other product information.<br /><br />The format of this endpoint is a JsonPatchDocument. Examples of how this format works can be found here:<br />http://jsonpatch.com/<br /> <br />It's not possible to nest parent and children more than one level (A parent can have many children,<br />but any child cannot itself also have children).<br /> <br />The supplied MerchantProductNo needs to be unique.<br /><br /><br />Sample request:<br /> <br /> PATCH /v2/products/{merchantProductNo}<br /> {<br /> \"value\": \"Value\",<br /> \"path\": \"Name\",<br /> \"op\": \"replace\"<br /> } # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.product_patch_with_http_info(merchant_product_no, async_req=True) >>> result = thread.get() :param merchant_product_no: The MerchantProductNo of the product you wish to patch (required) :type merchant_product_no: str :param operation: The JsonPatchDocument providing the operations you wish to perform on the product. <br /> Value contains the value you wish to set on the property you're updating (used with operations \"add\" and \"replace\").<br /> Path contains the path to the property you're updating (e.g. Description). Every property in the model used for creation an updating can be used.<br /> Op contains the operation you wish to perform (\"add\",\"replace\",\"remove\").<br /> From is only used when using the \"move\" operation. It refers to the source path of the value to be moved. :type operation: list[Operation] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SingleOfProductCreationResult, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['merchant_product_no', 'operation'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method product_patch" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} if 'merchant_product_no' in local_var_params: path_params['merchantProductNo'] = local_var_params[ 'merchant_product_no'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'operation' in local_var_params: body_params = local_var_params['operation'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/products/{merchantProductNo}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SingleOfProductCreationResult', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def return_declare_for_merchant_with_http_info(self, **kwargs): # noqa: E501 """Create Return. # noqa: E501 Mark (part of) an order as returned by the 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.return_declare_for_merchant_with_http_info(async_req=True) >>> result = thread.get() :param merchant_return_request: :type merchant_return_request: MerchantReturnRequest :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ApiResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'merchant_return_request' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method return_declare_for_merchant" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'merchant_return_request' in local_var_params: body_params = local_var_params['merchant_return_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json-patch+json', 'application/json', 'application/*+json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/returns/merchant', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ApiResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def product_get_by_filter_with_http_info(self, **kwargs): # noqa: E501 """Get Products. # noqa: E501 Retrieve all 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.product_get_by_filter_with_http_info(async_req=True) >>> result = thread.get() :param search: Search product(s) by Name, MerchantProductNo, Ean or Brand<br />This search is applied to the result after applying the other filters. :type search: str :param ean_list: Search products by submitting a list of EAN's. :type ean_list: list[str] :param merchant_product_no_list: Search products by submitting a list of MerchantProductNo's. :type merchant_product_no_list: list[str] :param page: The page to filter on. Starts at 1. :type page: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfMerchantProductResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['search', 'ean_list', 'merchant_product_no_list', 'page'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method product_get_by_filter" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'search' in local_var_params and local_var_params[ 'search'] is not None: # noqa: E501 query_params.append( ('search', local_var_params['search'])) # noqa: E501 if 'ean_list' in local_var_params and local_var_params[ 'ean_list'] is not None: # noqa: E501 query_params.append( ('eanList', local_var_params['ean_list'])) # noqa: E501 collection_formats['eanList'] = 'multi' # noqa: E501 if 'merchant_product_no_list' in local_var_params and local_var_params[ 'merchant_product_no_list'] is not None: # noqa: E501 query_params.append( ('merchantProductNoList', local_var_params['merchant_product_no_list'])) # noqa: E501 collection_formats['merchantProductNoList'] = 'multi' # noqa: E501 if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/products', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CollectionOfMerchantProductResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def order_packing_slip_with_http_info(self, merchant_order_no, **kwargs): # noqa: E501 """Download Packing Slip. # noqa: E501 Generates the ChannelEngine packing slip for this order in PDF. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.order_packing_slip_with_http_info(merchant_order_no, async_req=True) >>> result = thread.get() :param merchant_order_no: The unique order reference as used by the merchant. (required) :type merchant_order_no: str :param use_customer_culture: Generate the invoice in the billing address' country's language. :type use_customer_culture: bool :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'merchant_order_no', 'use_customer_culture' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method order_packing_slip" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} if 'merchant_order_no' in local_var_params: path_params['merchantOrderNo'] = local_var_params['merchant_order_no'] # noqa: E501 query_params = [] if 'use_customer_culture' in local_var_params and local_var_params['use_customer_culture'] is not None: # noqa: E501 query_params.append(('useCustomerCulture', local_var_params['use_customer_culture'])) # 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/pdf', 'application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/orders/{merchantOrderNo}/packingslip', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='file', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def return_get_unhandled_with_http_info(self, **kwargs): # noqa: E501 """Get Unhandled Returns. # noqa: E501 Get all new / unhandled returns created by channels. This call is supposed<br />to be used by merchants. Channels should use the 'GET /v2/returns/channel'<br />call. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.return_get_unhandled_with_http_info(async_req=True) >>> result = thread.get() :param page: The page to filter on. Starts at 1. :type page: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfMerchantReturnResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'page' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method return_get_unhandled" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/returns/merchant/new', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CollectionOfMerchantReturnResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def order_get_by_filter_with_http_info(self, **kwargs): # noqa: E501 """Get Orders By Filter. # noqa: E501 Fetch orders based on the provided OrderFilter. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.order_get_by_filter_with_http_info(async_req=True) >>> result = thread.get() :param statuses: Order status(es) to filter on. :type statuses: list[OrderStatusView] :param email_addresses: Client emailaddresses to filter on. :type email_addresses: list[str] :param merchant_order_nos: Filter on unique order reference used by the merchant. :type merchant_order_nos: list[str] :param channel_order_nos: Filter on unique order reference used by the channel. :type channel_order_nos: list[str] :param from_date: Filter on the order date, starting from this date. This date is inclusive. :type from_date: datetime :param to_date: Filter on the order date, until this date. This date is exclusive. :type to_date: datetime :param exclude_marketplace_fulfilled_orders_and_lines: Exclude order (lines) fulfilled by the marketplace (amazon:FBA, bol:LVB, etc.) :type exclude_marketplace_fulfilled_orders_and_lines: bool :param fulfillment_type: Filter orders on fulfillment type. This will include all orders lines, even if they are partially fulfilled by the marketplace.<br />To exclude orders and lines that are fulfilled by the marketplace from the response, set ExcludeMarketplaceFulfilledOrdersAndLines to true. :type fulfillment_type: FulfillmentType :param only_with_cancellation_requests: Filter on orders containing cancellation requests.<br />Some channels allow a customer to cancel an order until it has been shipped.<br />When an order has already been acknowledged in ChannelEngine, it can only be cancelled by creating a cancellation. :type only_with_cancellation_requests: bool :param page: The page to filter on. Starts at 1. :type page: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfMerchantOrderResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'statuses', 'email_addresses', 'merchant_order_nos', 'channel_order_nos', 'from_date', 'to_date', 'exclude_marketplace_fulfilled_orders_and_lines', 'fulfillment_type', 'only_with_cancellation_requests', 'page' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method order_get_by_filter" % key ) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'statuses' in local_var_params and local_var_params['statuses'] is not None: # noqa: E501 query_params.append(('statuses', local_var_params['statuses'])) # noqa: E501 collection_formats['statuses'] = 'multi' # noqa: E501 if 'email_addresses' in local_var_params and local_var_params['email_addresses'] is not None: # noqa: E501 query_params.append(('emailAddresses', local_var_params['email_addresses'])) # noqa: E501 collection_formats['emailAddresses'] = 'multi' # noqa: E501 if 'merchant_order_nos' in local_var_params and local_var_params['merchant_order_nos'] is not None: # noqa: E501 query_params.append(('merchantOrderNos', local_var_params['merchant_order_nos'])) # noqa: E501 collection_formats['merchantOrderNos'] = 'multi' # noqa: E501 if 'channel_order_nos' in local_var_params and local_var_params['channel_order_nos'] is not None: # noqa: E501 query_params.append(('channelOrderNos', local_var_params['channel_order_nos'])) # noqa: E501 collection_formats['channelOrderNos'] = 'multi' # noqa: E501 if 'from_date' in local_var_params and local_var_params['from_date'] is not None: # noqa: E501 query_params.append(('fromDate', local_var_params['from_date'])) # noqa: E501 if 'to_date' in local_var_params and local_var_params['to_date'] is not None: # noqa: E501 query_params.append(('toDate', local_var_params['to_date'])) # noqa: E501 if 'exclude_marketplace_fulfilled_orders_and_lines' in local_var_params and local_var_params['exclude_marketplace_fulfilled_orders_and_lines'] is not None: # noqa: E501 query_params.append(('excludeMarketplaceFulfilledOrdersAndLines', local_var_params['exclude_marketplace_fulfilled_orders_and_lines'])) # noqa: E501 if 'fulfillment_type' in local_var_params and local_var_params['fulfillment_type'] is not None: # noqa: E501 query_params.append(('fulfillmentType', local_var_params['fulfillment_type'])) # noqa: E501 if 'only_with_cancellation_requests' in local_var_params and local_var_params['only_with_cancellation_requests'] is not None: # noqa: E501 query_params.append(('onlyWithCancellationRequests', local_var_params['only_with_cancellation_requests'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/orders', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CollectionOfMerchantOrderResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def offer_get_stock_with_http_info(self, skus, stock_location_ids, **kwargs): # noqa: E501 """Get stock for products. # noqa: E501 Get stock of products at stock location(s). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.offer_get_stock_with_http_info(skus, stock_location_ids, async_req=True) >>> result = thread.get() :param skus: List of your products' sku's. (required) :type skus: list[str] :param stock_location_ids: The ChannelEngine id of the stock location(s). (required) :type stock_location_ids: list[int] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfMerchantOfferGetStockResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['skus', 'stock_location_ids'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method offer_get_stock" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'skus' is set if self.api_client.client_side_validation and ( 'skus' not in local_var_params or # noqa: E501 local_var_params['skus'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `skus` when calling `offer_get_stock`" ) # noqa: E501 # verify the required parameter 'stock_location_ids' is set if self.api_client.client_side_validation and ( 'stock_location_ids' not in local_var_params or # noqa: E501 local_var_params['stock_location_ids'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `stock_location_ids` when calling `offer_get_stock`" ) # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'skus' in local_var_params and local_var_params[ 'skus'] is not None: # noqa: E501 query_params.append( ('skus', local_var_params['skus'])) # noqa: E501 collection_formats['skus'] = 'multi' # noqa: E501 if 'stock_location_ids' in local_var_params and local_var_params[ 'stock_location_ids'] is not None: # noqa: E501 query_params.append( ('stockLocationIds', local_var_params['stock_location_ids'])) # noqa: E501 collection_formats['stockLocationIds'] = 'multi' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/offer/stock', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type= 'CollectionOfMerchantOfferGetStockResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def offer_stock_price_update_with_http_info(self, **kwargs): # noqa: E501 """Update stock or price. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.offer_stock_price_update_with_http_info(async_req=True) >>> result = thread.get() :param merchant_stock_price_update_request: References to the products that should be updated, and the new values<br />for the stock or price fields. It is possible to supply only one of the two fields<br />or both. :type merchant_stock_price_update_request: list[MerchantStockPriceUpdateRequest] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(SingleOfDictionaryOfStringAndListOfString, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['merchant_stock_price_update_request'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method offer_stock_price_update" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'merchant_stock_price_update_request' in local_var_params: body_params = local_var_params[ 'merchant_stock_price_update_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/offer', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type= 'SingleOfDictionaryOfStringAndListOfString', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def stock_location_index_with_http_info(self, **kwargs): # noqa: E501 """Get the stock locations (or virtual warehouses). # noqa: E501 Get the different stock locations (or virtual warehouses) that are in use.<br />This may include stock locations for 'fulfillment by ... (Amazon/bol/CDiscount)' (FBA/LVB/FBC) solutions.<br />You can use the id's to get to stock of products in specific stock location, e.g. the FBA stock for the 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.stock_location_index_with_http_info(async_req=True) >>> result = thread.get() :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfMerchantStockLocationResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method stock_location_index" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/stocklocations', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type= 'CollectionOfMerchantStockLocationResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))
def listed_product_get_by_filter_with_http_info(self, channel_id, **kwargs): # noqa: E501 """Get Listed Products # noqa: E501 Gets the status of products listed for channel (export status) and on a channel (channel status).<br />Includes products that were previously deleted from but are now set to be created again.<br />Note: not all channels provide adequate options to retrieve the status on the channel. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.listed_product_get_by_filter_with_http_info(channel_id, async_req=True) >>> result = thread.get() :param channel_id: (required) :type channel_id: int :param page: The page to filter on. Starts at 1. :type page: int :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(CollectionOfChannelListedProductResponse, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = ['channel_id', 'page'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method listed_product_get_by_filter" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'channel_id' is set if self.api_client.client_side_validation and ( 'channel_id' not in local_var_params or # noqa: E501 local_var_params['channel_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `channel_id` when calling `listed_product_get_by_filter`" ) # noqa: E501 collection_formats = {} path_params = {} if 'channel_id' in local_var_params: path_params['channelId'] = local_var_params[ 'channel_id'] # noqa: E501 query_params = [] if 'page' in local_var_params and local_var_params[ 'page'] is not None: # noqa: E501 query_params.append( ('page', local_var_params['page'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['apiKey'] # noqa: E501 return self.api_client.call_api( '/v2/channels/{channelId}/products', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type= 'CollectionOfChannelListedProductResponse', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))