text
stringlengths
0
828
:param async bool
:param int page: page number
:param int size: page size
:param str sort: page order
:return: page[FreeShippingPromotion]
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._list_all_free_shipping_promotions_with_http_info(**kwargs)
else:
(data) = cls._list_all_free_shipping_promotions_with_http_info(**kwargs)
return data"
4302,"def replace_free_shipping_promotion_by_id(cls, free_shipping_promotion_id, free_shipping_promotion, **kwargs):
""""""Replace FreeShippingPromotion
Replace all attributes of FreeShippingPromotion
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.replace_free_shipping_promotion_by_id(free_shipping_promotion_id, free_shipping_promotion, async=True)
>>> result = thread.get()
:param async bool
:param str free_shipping_promotion_id: ID of freeShippingPromotion to replace (required)
:param FreeShippingPromotion free_shipping_promotion: Attributes of freeShippingPromotion to replace (required)
:return: FreeShippingPromotion
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._replace_free_shipping_promotion_by_id_with_http_info(free_shipping_promotion_id, free_shipping_promotion, **kwargs)
else:
(data) = cls._replace_free_shipping_promotion_by_id_with_http_info(free_shipping_promotion_id, free_shipping_promotion, **kwargs)
return data"
4303,"def update_free_shipping_promotion_by_id(cls, free_shipping_promotion_id, free_shipping_promotion, **kwargs):
""""""Update FreeShippingPromotion
Update attributes of FreeShippingPromotion
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.update_free_shipping_promotion_by_id(free_shipping_promotion_id, free_shipping_promotion, async=True)
>>> result = thread.get()
:param async bool
:param str free_shipping_promotion_id: ID of freeShippingPromotion to update. (required)
:param FreeShippingPromotion free_shipping_promotion: Attributes of freeShippingPromotion to update. (required)
:return: FreeShippingPromotion
If the method is called asynchronously,
returns the request thread.
""""""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return cls._update_free_shipping_promotion_by_id_with_http_info(free_shipping_promotion_id, free_shipping_promotion, **kwargs)
else:
(data) = cls._update_free_shipping_promotion_by_id_with_http_info(free_shipping_promotion_id, free_shipping_promotion, **kwargs)
return data"
4304,"def append(self, electrode_id):
'''
Append the specified electrode to the route.
The route is not modified (i.e., electrode is not appended) if
electrode is not connected to the last electrode in the existing route.
Parameters
----------
electrode_id : str
Electrode identifier.
'''
do_append = False
if not self.electrode_ids:
do_append = True
elif self.device.shape_indexes.shape[0] > 0:
source = self.electrode_ids[-1]
target = electrode_id
if not (source == target):
source_id, target_id = self.device.shape_indexes[[source,
target]]
try:
if self.device.adjacency_matrix[source_id, target_id]:
# Electrodes are connected, so append target to current
# route.
do_append = True
except IndexError:
logger.warning('Electrodes `%s` and `%s` are not '
'connected.', source, target)
if do_append:
self.electrode_ids.append(electrode_id)
return do_append"
4305,"def df_routes(self, value):
'''
.. versionadded:: 0.11.3
'''
self._df_routes = value
try:
self.emit('routes-set', self._df_routes.copy())
except TypeError: