text stringlengths 0 828 |
|---|
"""""" |
Release all resources associated with this factory. |
"""""" |
if self.mdr is None: |
return |
exc = (None, None, None) |
try: |
self.cursor.close() |
except: |
exc = sys.exc_info() |
try: |
if self.mdr.__exit__(*exc): |
exc = (None, None, None) |
except: |
exc = sys.exc_info() |
self.mdr = None |
self.cursor = None |
if exc != (None, None, None): |
six.reraise(*exc)" |
4720,"def add_item(cls, item, **kwargs): |
""""""Add item. |
Add new item to the shopping cart. |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.add_item(item, async=True) |
>>> result = thread.get() |
:param async bool |
:param LineItem item: Line item to add to cart (required) |
:return: ShoppingCart |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._add_item_with_http_info(item, **kwargs) |
else: |
(data) = cls._add_item_with_http_info(item, **kwargs) |
return data" |
4721,"def checkout(cls, order, **kwargs): |
""""""Checkout cart. |
Checkout cart, Making an order. |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.checkout(order, async=True) |
>>> result = thread.get() |
:param async bool |
:param Order order: Required order details. (required) |
:return: Order |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._checkout_with_http_info(order, **kwargs) |
else: |
(data) = cls._checkout_with_http_info(order, **kwargs) |
return data" |
4722,"def delete_item(cls, item_id, **kwargs): |
""""""Remove item. |
Remove item from shopping cart |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.delete_item(item_id, async=True) |
>>> result = thread.get() |
:param async bool |
:param str item_id: Item ID to delete. (required) |
:return: ShoppingCart |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._delete_item_with_http_info(item_id, **kwargs) |
else: |
(data) = cls._delete_item_with_http_info(item_id, **kwargs) |
return data" |
4723,"def empty(cls, **kwargs): |
""""""Empty cart. |
Empty the shopping cart. |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.empty(async=True) |
>>> result = thread.get() |
:param async bool |
:return: ShoppingCart |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._empty_with_http_info(**kwargs) |
else: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.