Subversion Repositories SmartDukaan

Rev

Rev 690 | Rev 766 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 690 Rev 691
Line 10... Line 10...
10
    create_anonymous_user, forgot_password, get_all_addresses_for_user, get_default_addredd_id
10
    create_anonymous_user, forgot_password, get_all_addresses_for_user, get_default_addredd_id
11
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
11
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
12
    get_cart_by_id, get_cart_by_user_id_and_status, get_carts_by_status,\
12
    get_cart_by_id, get_cart_by_user_id_and_status, get_carts_by_status,\
13
    get_carts_between, change_cart_status, add_item_to_cart,\
13
    get_carts_between, change_cart_status, add_item_to_cart,\
14
    change_item_status, add_address_to_cart, commit_cart,\
14
    change_item_status, add_address_to_cart, commit_cart,\
15
    validate_cart, merge_cart, delete_item_from_cart
15
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart
16
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_user_state, to_t_cart, to_t_address
16
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_user_state, to_t_cart, to_t_address
17
 
17
 
18
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
18
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
19
 
19
 
20
from shop2020.model.v1.user.impl.WidgetDataAccessor import add_widget,\
20
from shop2020.model.v1.user.impl.WidgetDataAccessor import add_widget,\
Line 312... Line 312...
312
         - fromCartId
312
         - fromCartId
313
         - toCartId
313
         - toCartId
314
        """
314
        """
315
        merge_cart(fromCartId, toCartId)
315
        merge_cart(fromCartId, toCartId)
316
 
316
 
-
 
317
    def checkOut(self, cartId):
-
 
318
        """
-
 
319
        Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
-
 
320
        
-
 
321
        Parameters:
-
 
322
         - cartId
-
 
323
        """
-
 
324
        return check_out(cartId)
-
 
325
    
-
 
326
    def resetCart(self, cartId, items):
-
 
327
        """
-
 
328
        The second parameter is a map of item ids and their quantities which have been successfully processed.
-
 
329
        This methods removes the specified quantiry of the specified item from the cart.
-
 
330
        
-
 
331
        Parameters:
-
 
332
         - cartId
-
 
333
         - items
-
 
334
        """
-
 
335
        return reset_cart(cartId, items)
-
 
336
 
317
    def addWidget(self, widget):
337
    def addWidget(self, widget):
318
        """
338
        """
319
        Parameters:
339
        Parameters:
320
         - widget
340
         - widget
321
        """
341
        """