text
stringlengths
0
828
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._create_product_with_http_info(product, **kwargs)
else:
(data) = cls._create_product_with_http_info(product, **kwargs)
return data"
4098,"def delete_product_by_id(cls, product_id, **kwargs):
""""""Delete Product
Delete an instance of Product by its ID.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.delete_product_by_id(product_id, async=True)
>>> result = thread.get()
:param async bool
:param str product_id: ID of product to delete. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._delete_product_by_id_with_http_info(product_id, **kwargs)
else:
(data) = cls._delete_product_by_id_with_http_info(product_id, **kwargs)
return data"
4099,"def get_product_by_id(cls, product_id, **kwargs):
""""""Find Product
Return single instance of Product by its ID.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_product_by_id(product_id, async=True)
>>> result = thread.get()
:param async bool
:param str product_id: ID of product to return (required)
:return: Product
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._get_product_by_id_with_http_info(product_id, **kwargs)
else:
(data) = cls._get_product_by_id_with_http_info(product_id, **kwargs)
return data"
4100,"def list_all_products(cls, **kwargs):
""""""List Products
Return a list of Products
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.list_all_products(async=True)
>>> result = thread.get()
:param async bool
:param int page: page number
:param int size: page size
:param str sort: page order
:return: page[Product]
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._list_all_products_with_http_info(**kwargs)
else:
(data) = cls._list_all_products_with_http_info(**kwargs)
return data"
4101,"def replace_product_by_id(cls, product_id, product, **kwargs):
""""""Replace Product
Replace all attributes of Product
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.replace_product_by_id(product_id, product, async=True)
>>> result = thread.get()
:param async bool
:param str product_id: ID of product to replace (required)
:param Product product: Attributes of product to replace (required)
:return: Product
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._replace_product_by_id_with_http_info(product_id, product, **kwargs)
else:
(data) = cls._replace_product_by_id_with_http_info(product_id, product, **kwargs)
return data"
4102,"def update_product_by_id(cls, product_id, product, **kwargs):
""""""Update Product
Update attributes of Product
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True