Subversion Repositories SmartDukaan

Rev

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

Rev 594 Rev 690
Line 241... Line 241...
241
     - cartId
241
     - cartId
242
     - addressId
242
     - addressId
243
    """
243
    """
244
    pass
244
    pass
245
 
245
 
246
  def commitCart(self, cartId):
246
  def createOrders(self, cartId):
247
    """
247
    """
-
 
248
    Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
-
 
249
    
248
    Parameters:
250
    Parameters:
249
     - cartId
251
     - cartId
250
    """
252
    """
251
    pass
253
    pass
252
 
254
 
253
  def validateCart(self, cartId):
255
  def validateCart(self, cartId):
254
    """
256
    """
-
 
257
    Validates that:
-
 
258
    1. The checkout timestamp is greater than the updatedOn timestamp.
-
 
259
    2. None of the lines in the cart for an inactive item.
-
 
260
    3. The estimate for any of the lines in cart doesn't change.
-
 
261
    Returns true only if all three hold.
-
 
262
    
255
    Parameters:
263
    Parameters:
256
     - cartId
264
     - cartId
257
    """
265
    """
258
    pass
266
    pass
259
 
267
 
-
 
268
  def mergeCart(self, fromCartId, toCartId):
-
 
269
    """
-
 
270
    Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
-
 
271
    
-
 
272
    Parameters:
-
 
273
     - fromCartId
-
 
274
     - toCartId
-
 
275
    """
-
 
276
    pass
-
 
277
 
260
  def refreshCart(self, cartId):
278
  def checkOut(self, cartId):
261
    """
279
    """
-
 
280
    Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
-
 
281
    
262
    Parameters:
282
    Parameters:
263
     - cartId
283
     - cartId
264
    """
284
    """
265
    pass
285
    pass
266
 
286
 
267
  def mergeCart(self, fromCartId, toCartId):
287
  def resetCart(self, cartId, items):
268
    """
288
    """
-
 
289
    The second parameter is a map of item ids and their quantities which have been successfully processed.
-
 
290
    This methods removes the specified quantiry of the specified item from the cart.
-
 
291
    
269
    Parameters:
292
    Parameters:
270
     - fromCartId
293
     - cartId
271
     - toCartId
294
     - items
272
    """
295
    """
273
    pass
296
    pass
274
 
297
 
275
  def addWidget(self, widget):
298
  def addWidget(self, widget):
276
    """
299
    """
Line 1345... Line 1368...
1345
    self._iprot.readMessageEnd()
1368
    self._iprot.readMessageEnd()
1346
    if result.scx != None:
1369
    if result.scx != None:
1347
      raise result.scx
1370
      raise result.scx
1348
    return
1371
    return
1349
 
1372
 
1350
  def commitCart(self, cartId):
1373
  def createOrders(self, cartId):
1351
    """
1374
    """
-
 
1375
    Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
-
 
1376
    
1352
    Parameters:
1377
    Parameters:
1353
     - cartId
1378
     - cartId
1354
    """
1379
    """
1355
    self.send_commitCart(cartId)
1380
    self.send_createOrders(cartId)
1356
    return self.recv_commitCart()
1381
    return self.recv_createOrders()
1357
 
1382
 
1358
  def send_commitCart(self, cartId):
1383
  def send_createOrders(self, cartId):
1359
    self._oprot.writeMessageBegin('commitCart', TMessageType.CALL, self._seqid)
1384
    self._oprot.writeMessageBegin('createOrders', TMessageType.CALL, self._seqid)
1360
    args = commitCart_args()
1385
    args = createOrders_args()
1361
    args.cartId = cartId
1386
    args.cartId = cartId
1362
    args.write(self._oprot)
1387
    args.write(self._oprot)
1363
    self._oprot.writeMessageEnd()
1388
    self._oprot.writeMessageEnd()
1364
    self._oprot.trans.flush()
1389
    self._oprot.trans.flush()
1365
 
1390
 
1366
  def recv_commitCart(self, ):
1391
  def recv_createOrders(self, ):
1367
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1392
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1368
    if mtype == TMessageType.EXCEPTION:
1393
    if mtype == TMessageType.EXCEPTION:
1369
      x = TApplicationException()
1394
      x = TApplicationException()
1370
      x.read(self._iprot)
1395
      x.read(self._iprot)
1371
      self._iprot.readMessageEnd()
1396
      self._iprot.readMessageEnd()
1372
      raise x
1397
      raise x
1373
    result = commitCart_result()
1398
    result = createOrders_result()
1374
    result.read(self._iprot)
1399
    result.read(self._iprot)
1375
    self._iprot.readMessageEnd()
1400
    self._iprot.readMessageEnd()
1376
    if result.success != None:
1401
    if result.success != None:
1377
      return result.success
1402
      return result.success
1378
    if result.scx != None:
1403
    if result.scx != None:
1379
      raise result.scx
1404
      raise result.scx
1380
    raise TApplicationException(TApplicationException.MISSING_RESULT, "commitCart failed: unknown result");
1405
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
1381
 
1406
 
1382
  def validateCart(self, cartId):
1407
  def validateCart(self, cartId):
1383
    """
1408
    """
-
 
1409
    Validates that:
-
 
1410
    1. The checkout timestamp is greater than the updatedOn timestamp.
-
 
1411
    2. None of the lines in the cart for an inactive item.
-
 
1412
    3. The estimate for any of the lines in cart doesn't change.
-
 
1413
    Returns true only if all three hold.
-
 
1414
    
1384
    Parameters:
1415
    Parameters:
1385
     - cartId
1416
     - cartId
1386
    """
1417
    """
1387
    self.send_validateCart(cartId)
1418
    self.send_validateCart(cartId)
1388
    return self.recv_validateCart()
1419
    return self.recv_validateCart()
Line 1409... Line 1440...
1409
      return result.success
1440
      return result.success
1410
    if result.scex != None:
1441
    if result.scex != None:
1411
      raise result.scex
1442
      raise result.scex
1412
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1443
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1413
 
1444
 
1414
  def refreshCart(self, cartId):
1445
  def mergeCart(self, fromCartId, toCartId):
1415
    """
1446
    """
-
 
1447
    Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
-
 
1448
    
-
 
1449
    Parameters:
-
 
1450
     - fromCartId
-
 
1451
     - toCartId
-
 
1452
    """
-
 
1453
    self.send_mergeCart(fromCartId, toCartId)
-
 
1454
    self.recv_mergeCart()
-
 
1455
 
-
 
1456
  def send_mergeCart(self, fromCartId, toCartId):
-
 
1457
    self._oprot.writeMessageBegin('mergeCart', TMessageType.CALL, self._seqid)
-
 
1458
    args = mergeCart_args()
-
 
1459
    args.fromCartId = fromCartId
-
 
1460
    args.toCartId = toCartId
-
 
1461
    args.write(self._oprot)
-
 
1462
    self._oprot.writeMessageEnd()
-
 
1463
    self._oprot.trans.flush()
-
 
1464
 
-
 
1465
  def recv_mergeCart(self, ):
-
 
1466
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1467
    if mtype == TMessageType.EXCEPTION:
-
 
1468
      x = TApplicationException()
-
 
1469
      x.read(self._iprot)
-
 
1470
      self._iprot.readMessageEnd()
-
 
1471
      raise x
-
 
1472
    result = mergeCart_result()
-
 
1473
    result.read(self._iprot)
-
 
1474
    self._iprot.readMessageEnd()
-
 
1475
    return
-
 
1476
 
-
 
1477
  def checkOut(self, cartId):
-
 
1478
    """
-
 
1479
    Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
-
 
1480
    
1416
    Parameters:
1481
    Parameters:
1417
     - cartId
1482
     - cartId
1418
    """
1483
    """
1419
    self.send_refreshCart(cartId)
1484
    self.send_checkOut(cartId)
1420
    return self.recv_refreshCart()
1485
    return self.recv_checkOut()
1421
 
1486
 
1422
  def send_refreshCart(self, cartId):
1487
  def send_checkOut(self, cartId):
1423
    self._oprot.writeMessageBegin('refreshCart', TMessageType.CALL, self._seqid)
1488
    self._oprot.writeMessageBegin('checkOut', TMessageType.CALL, self._seqid)
1424
    args = refreshCart_args()
1489
    args = checkOut_args()
1425
    args.cartId = cartId
1490
    args.cartId = cartId
1426
    args.write(self._oprot)
1491
    args.write(self._oprot)
1427
    self._oprot.writeMessageEnd()
1492
    self._oprot.writeMessageEnd()
1428
    self._oprot.trans.flush()
1493
    self._oprot.trans.flush()
1429
 
1494
 
1430
  def recv_refreshCart(self, ):
1495
  def recv_checkOut(self, ):
1431
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1496
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1432
    if mtype == TMessageType.EXCEPTION:
1497
    if mtype == TMessageType.EXCEPTION:
1433
      x = TApplicationException()
1498
      x = TApplicationException()
1434
      x.read(self._iprot)
1499
      x.read(self._iprot)
1435
      self._iprot.readMessageEnd()
1500
      self._iprot.readMessageEnd()
1436
      raise x
1501
      raise x
1437
    result = refreshCart_result()
1502
    result = checkOut_result()
1438
    result.read(self._iprot)
1503
    result.read(self._iprot)
1439
    self._iprot.readMessageEnd()
1504
    self._iprot.readMessageEnd()
1440
    if result.success != None:
1505
    if result.success != None:
1441
      return result.success
1506
      return result.success
1442
    if result.scex != None:
1507
    if result.scex != None:
1443
      raise result.scex
1508
      raise result.scex
1444
    raise TApplicationException(TApplicationException.MISSING_RESULT, "refreshCart failed: unknown result");
1509
    raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
1445
 
1510
 
1446
  def mergeCart(self, fromCartId, toCartId):
1511
  def resetCart(self, cartId, items):
1447
    """
1512
    """
-
 
1513
    The second parameter is a map of item ids and their quantities which have been successfully processed.
-
 
1514
    This methods removes the specified quantiry of the specified item from the cart.
-
 
1515
    
1448
    Parameters:
1516
    Parameters:
1449
     - fromCartId
1517
     - cartId
1450
     - toCartId
1518
     - items
1451
    """
1519
    """
1452
    self.send_mergeCart(fromCartId, toCartId)
1520
    self.send_resetCart(cartId, items)
1453
    self.recv_mergeCart()
1521
    return self.recv_resetCart()
1454
 
1522
 
1455
  def send_mergeCart(self, fromCartId, toCartId):
1523
  def send_resetCart(self, cartId, items):
1456
    self._oprot.writeMessageBegin('mergeCart', TMessageType.CALL, self._seqid)
1524
    self._oprot.writeMessageBegin('resetCart', TMessageType.CALL, self._seqid)
1457
    args = mergeCart_args()
1525
    args = resetCart_args()
1458
    args.fromCartId = fromCartId
1526
    args.cartId = cartId
1459
    args.toCartId = toCartId
1527
    args.items = items
1460
    args.write(self._oprot)
1528
    args.write(self._oprot)
1461
    self._oprot.writeMessageEnd()
1529
    self._oprot.writeMessageEnd()
1462
    self._oprot.trans.flush()
1530
    self._oprot.trans.flush()
1463
 
1531
 
1464
  def recv_mergeCart(self, ):
1532
  def recv_resetCart(self, ):
1465
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1533
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1466
    if mtype == TMessageType.EXCEPTION:
1534
    if mtype == TMessageType.EXCEPTION:
1467
      x = TApplicationException()
1535
      x = TApplicationException()
1468
      x.read(self._iprot)
1536
      x.read(self._iprot)
1469
      self._iprot.readMessageEnd()
1537
      self._iprot.readMessageEnd()
1470
      raise x
1538
      raise x
1471
    result = mergeCart_result()
1539
    result = resetCart_result()
1472
    result.read(self._iprot)
1540
    result.read(self._iprot)
1473
    self._iprot.readMessageEnd()
1541
    self._iprot.readMessageEnd()
-
 
1542
    if result.success != None:
1474
    return
1543
      return result.success
-
 
1544
    if result.scex != None:
-
 
1545
      raise result.scex
-
 
1546
    raise TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
1475
 
1547
 
1476
  def addWidget(self, widget):
1548
  def addWidget(self, widget):
1477
    """
1549
    """
1478
    Parameters:
1550
    Parameters:
1479
     - widget
1551
     - widget
Line 1931... Line 2003...
1931
    self._processMap["addItemToCart"] = Processor.process_addItemToCart
2003
    self._processMap["addItemToCart"] = Processor.process_addItemToCart
1932
    self._processMap["deleteItemFromCart"] = Processor.process_deleteItemFromCart
2004
    self._processMap["deleteItemFromCart"] = Processor.process_deleteItemFromCart
1933
    self._processMap["changeQuantity"] = Processor.process_changeQuantity
2005
    self._processMap["changeQuantity"] = Processor.process_changeQuantity
1934
    self._processMap["changeItemStatus"] = Processor.process_changeItemStatus
2006
    self._processMap["changeItemStatus"] = Processor.process_changeItemStatus
1935
    self._processMap["addAddressToCart"] = Processor.process_addAddressToCart
2007
    self._processMap["addAddressToCart"] = Processor.process_addAddressToCart
1936
    self._processMap["commitCart"] = Processor.process_commitCart
2008
    self._processMap["createOrders"] = Processor.process_createOrders
1937
    self._processMap["validateCart"] = Processor.process_validateCart
2009
    self._processMap["validateCart"] = Processor.process_validateCart
1938
    self._processMap["refreshCart"] = Processor.process_refreshCart
-
 
1939
    self._processMap["mergeCart"] = Processor.process_mergeCart
2010
    self._processMap["mergeCart"] = Processor.process_mergeCart
-
 
2011
    self._processMap["checkOut"] = Processor.process_checkOut
-
 
2012
    self._processMap["resetCart"] = Processor.process_resetCart
1940
    self._processMap["addWidget"] = Processor.process_addWidget
2013
    self._processMap["addWidget"] = Processor.process_addWidget
1941
    self._processMap["addItemToWidget"] = Processor.process_addItemToWidget
2014
    self._processMap["addItemToWidget"] = Processor.process_addItemToWidget
1942
    self._processMap["deleteItemFromWidget"] = Processor.process_deleteItemFromWidget
2015
    self._processMap["deleteItemFromWidget"] = Processor.process_deleteItemFromWidget
1943
    self._processMap["updateWidget"] = Processor.process_updateWidget
2016
    self._processMap["updateWidget"] = Processor.process_updateWidget
1944
    self._processMap["updateWidgetItem"] = Processor.process_updateWidgetItem
2017
    self._processMap["updateWidgetItem"] = Processor.process_updateWidgetItem
Line 2370... Line 2443...
2370
    oprot.writeMessageBegin("addAddressToCart", TMessageType.REPLY, seqid)
2443
    oprot.writeMessageBegin("addAddressToCart", TMessageType.REPLY, seqid)
2371
    result.write(oprot)
2444
    result.write(oprot)
2372
    oprot.writeMessageEnd()
2445
    oprot.writeMessageEnd()
2373
    oprot.trans.flush()
2446
    oprot.trans.flush()
2374
 
2447
 
2375
  def process_commitCart(self, seqid, iprot, oprot):
2448
  def process_createOrders(self, seqid, iprot, oprot):
2376
    args = commitCart_args()
2449
    args = createOrders_args()
2377
    args.read(iprot)
2450
    args.read(iprot)
2378
    iprot.readMessageEnd()
2451
    iprot.readMessageEnd()
2379
    result = commitCart_result()
2452
    result = createOrders_result()
2380
    try:
2453
    try:
2381
      result.success = self._handler.commitCart(args.cartId)
2454
      result.success = self._handler.createOrders(args.cartId)
2382
    except ShoppingCartException, scx:
2455
    except ShoppingCartException, scx:
2383
      result.scx = scx
2456
      result.scx = scx
2384
    oprot.writeMessageBegin("commitCart", TMessageType.REPLY, seqid)
2457
    oprot.writeMessageBegin("createOrders", TMessageType.REPLY, seqid)
2385
    result.write(oprot)
2458
    result.write(oprot)
2386
    oprot.writeMessageEnd()
2459
    oprot.writeMessageEnd()
2387
    oprot.trans.flush()
2460
    oprot.trans.flush()
2388
 
2461
 
2389
  def process_validateCart(self, seqid, iprot, oprot):
2462
  def process_validateCart(self, seqid, iprot, oprot):
Line 2398... Line 2471...
2398
    oprot.writeMessageBegin("validateCart", TMessageType.REPLY, seqid)
2471
    oprot.writeMessageBegin("validateCart", TMessageType.REPLY, seqid)
2399
    result.write(oprot)
2472
    result.write(oprot)
2400
    oprot.writeMessageEnd()
2473
    oprot.writeMessageEnd()
2401
    oprot.trans.flush()
2474
    oprot.trans.flush()
2402
 
2475
 
2403
  def process_refreshCart(self, seqid, iprot, oprot):
2476
  def process_mergeCart(self, seqid, iprot, oprot):
2404
    args = refreshCart_args()
2477
    args = mergeCart_args()
-
 
2478
    args.read(iprot)
-
 
2479
    iprot.readMessageEnd()
-
 
2480
    result = mergeCart_result()
-
 
2481
    self._handler.mergeCart(args.fromCartId, args.toCartId)
-
 
2482
    oprot.writeMessageBegin("mergeCart", TMessageType.REPLY, seqid)
-
 
2483
    result.write(oprot)
-
 
2484
    oprot.writeMessageEnd()
-
 
2485
    oprot.trans.flush()
-
 
2486
 
-
 
2487
  def process_checkOut(self, seqid, iprot, oprot):
-
 
2488
    args = checkOut_args()
2405
    args.read(iprot)
2489
    args.read(iprot)
2406
    iprot.readMessageEnd()
2490
    iprot.readMessageEnd()
2407
    result = refreshCart_result()
2491
    result = checkOut_result()
2408
    try:
2492
    try:
2409
      result.success = self._handler.refreshCart(args.cartId)
2493
      result.success = self._handler.checkOut(args.cartId)
2410
    except ShoppingCartException, scex:
2494
    except ShoppingCartException, scex:
2411
      result.scex = scex
2495
      result.scex = scex
2412
    oprot.writeMessageBegin("refreshCart", TMessageType.REPLY, seqid)
2496
    oprot.writeMessageBegin("checkOut", TMessageType.REPLY, seqid)
2413
    result.write(oprot)
2497
    result.write(oprot)
2414
    oprot.writeMessageEnd()
2498
    oprot.writeMessageEnd()
2415
    oprot.trans.flush()
2499
    oprot.trans.flush()
2416
 
2500
 
2417
  def process_mergeCart(self, seqid, iprot, oprot):
2501
  def process_resetCart(self, seqid, iprot, oprot):
2418
    args = mergeCart_args()
2502
    args = resetCart_args()
2419
    args.read(iprot)
2503
    args.read(iprot)
2420
    iprot.readMessageEnd()
2504
    iprot.readMessageEnd()
2421
    result = mergeCart_result()
2505
    result = resetCart_result()
-
 
2506
    try:
2422
    self._handler.mergeCart(args.fromCartId, args.toCartId)
2507
      result.success = self._handler.resetCart(args.cartId, args.items)
-
 
2508
    except ShoppingCartException, scex:
-
 
2509
      result.scex = scex
2423
    oprot.writeMessageBegin("mergeCart", TMessageType.REPLY, seqid)
2510
    oprot.writeMessageBegin("resetCart", TMessageType.REPLY, seqid)
2424
    result.write(oprot)
2511
    result.write(oprot)
2425
    oprot.writeMessageEnd()
2512
    oprot.writeMessageEnd()
2426
    oprot.trans.flush()
2513
    oprot.trans.flush()
2427
 
2514
 
2428
  def process_addWidget(self, seqid, iprot, oprot):
2515
  def process_addWidget(self, seqid, iprot, oprot):
Line 6431... Line 6518...
6431
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6518
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6432
 
6519
 
6433
  def __ne__(self, other):
6520
  def __ne__(self, other):
6434
    return not (self == other)
6521
    return not (self == other)
6435
 
6522
 
6436
class commitCart_args:
6523
class createOrders_args:
6437
  """
6524
  """
6438
  Attributes:
6525
  Attributes:
6439
   - cartId
6526
   - cartId
6440
  """
6527
  """
6441
 
6528
 
Line 6468... Line 6555...
6468
 
6555
 
6469
  def write(self, oprot):
6556
  def write(self, oprot):
6470
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6557
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6471
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6558
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6472
      return
6559
      return
6473
    oprot.writeStructBegin('commitCart_args')
6560
    oprot.writeStructBegin('createOrders_args')
6474
    if self.cartId != None:
6561
    if self.cartId != None:
6475
      oprot.writeFieldBegin('cartId', TType.I64, 1)
6562
      oprot.writeFieldBegin('cartId', TType.I64, 1)
6476
      oprot.writeI64(self.cartId)
6563
      oprot.writeI64(self.cartId)
6477
      oprot.writeFieldEnd()
6564
      oprot.writeFieldEnd()
6478
    oprot.writeFieldStop()
6565
    oprot.writeFieldStop()
Line 6487... Line 6574...
6487
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6574
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6488
 
6575
 
6489
  def __ne__(self, other):
6576
  def __ne__(self, other):
6490
    return not (self == other)
6577
    return not (self == other)
6491
 
6578
 
6492
class commitCart_result:
6579
class createOrders_result:
6493
  """
6580
  """
6494
  Attributes:
6581
  Attributes:
6495
   - success
6582
   - success
6496
   - scx
6583
   - scx
6497
  """
6584
  """
Line 6532... Line 6619...
6532
 
6619
 
6533
  def write(self, oprot):
6620
  def write(self, oprot):
6534
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6621
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6535
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6622
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6536
      return
6623
      return
6537
    oprot.writeStructBegin('commitCart_result')
6624
    oprot.writeStructBegin('createOrders_result')
6538
    if self.success != None:
6625
    if self.success != None:
6539
      oprot.writeFieldBegin('success', TType.I64, 0)
6626
      oprot.writeFieldBegin('success', TType.I64, 0)
6540
      oprot.writeI64(self.success)
6627
      oprot.writeI64(self.success)
6541
      oprot.writeFieldEnd()
6628
      oprot.writeFieldEnd()
6542
    if self.scx != None:
6629
    if self.scx != None:
Line 6679... Line 6766...
6679
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6766
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6680
 
6767
 
6681
  def __ne__(self, other):
6768
  def __ne__(self, other):
6682
    return not (self == other)
6769
    return not (self == other)
6683
 
6770
 
6684
class refreshCart_args:
6771
class mergeCart_args:
-
 
6772
  """
-
 
6773
  Attributes:
-
 
6774
   - fromCartId
-
 
6775
   - toCartId
-
 
6776
  """
-
 
6777
 
-
 
6778
  thrift_spec = (
-
 
6779
    None, # 0
-
 
6780
    (1, TType.I64, 'fromCartId', None, None, ), # 1
-
 
6781
    (2, TType.I64, 'toCartId', None, None, ), # 2
-
 
6782
  )
-
 
6783
 
-
 
6784
  def __init__(self, fromCartId=None, toCartId=None,):
-
 
6785
    self.fromCartId = fromCartId
-
 
6786
    self.toCartId = toCartId
-
 
6787
 
-
 
6788
  def read(self, iprot):
-
 
6789
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
6790
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
6791
      return
-
 
6792
    iprot.readStructBegin()
-
 
6793
    while True:
-
 
6794
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
6795
      if ftype == TType.STOP:
-
 
6796
        break
-
 
6797
      if fid == 1:
-
 
6798
        if ftype == TType.I64:
-
 
6799
          self.fromCartId = iprot.readI64();
-
 
6800
        else:
-
 
6801
          iprot.skip(ftype)
-
 
6802
      elif fid == 2:
-
 
6803
        if ftype == TType.I64:
-
 
6804
          self.toCartId = iprot.readI64();
-
 
6805
        else:
-
 
6806
          iprot.skip(ftype)
-
 
6807
      else:
-
 
6808
        iprot.skip(ftype)
-
 
6809
      iprot.readFieldEnd()
-
 
6810
    iprot.readStructEnd()
-
 
6811
 
-
 
6812
  def write(self, oprot):
-
 
6813
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
6814
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
6815
      return
-
 
6816
    oprot.writeStructBegin('mergeCart_args')
-
 
6817
    if self.fromCartId != None:
-
 
6818
      oprot.writeFieldBegin('fromCartId', TType.I64, 1)
-
 
6819
      oprot.writeI64(self.fromCartId)
-
 
6820
      oprot.writeFieldEnd()
-
 
6821
    if self.toCartId != None:
-
 
6822
      oprot.writeFieldBegin('toCartId', TType.I64, 2)
-
 
6823
      oprot.writeI64(self.toCartId)
-
 
6824
      oprot.writeFieldEnd()
-
 
6825
    oprot.writeFieldStop()
-
 
6826
    oprot.writeStructEnd()
-
 
6827
 
-
 
6828
  def __repr__(self):
-
 
6829
    L = ['%s=%r' % (key, value)
-
 
6830
      for key, value in self.__dict__.iteritems()]
-
 
6831
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
6832
 
-
 
6833
  def __eq__(self, other):
-
 
6834
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
6835
 
-
 
6836
  def __ne__(self, other):
-
 
6837
    return not (self == other)
-
 
6838
 
-
 
6839
class mergeCart_result:
-
 
6840
 
-
 
6841
  thrift_spec = (
-
 
6842
  )
-
 
6843
 
-
 
6844
  def read(self, iprot):
-
 
6845
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
6846
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
6847
      return
-
 
6848
    iprot.readStructBegin()
-
 
6849
    while True:
-
 
6850
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
6851
      if ftype == TType.STOP:
-
 
6852
        break
-
 
6853
      else:
-
 
6854
        iprot.skip(ftype)
-
 
6855
      iprot.readFieldEnd()
-
 
6856
    iprot.readStructEnd()
-
 
6857
 
-
 
6858
  def write(self, oprot):
-
 
6859
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
6860
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
6861
      return
-
 
6862
    oprot.writeStructBegin('mergeCart_result')
-
 
6863
    oprot.writeFieldStop()
-
 
6864
    oprot.writeStructEnd()
-
 
6865
 
-
 
6866
  def __repr__(self):
-
 
6867
    L = ['%s=%r' % (key, value)
-
 
6868
      for key, value in self.__dict__.iteritems()]
-
 
6869
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
6870
 
-
 
6871
  def __eq__(self, other):
-
 
6872
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
6873
 
-
 
6874
  def __ne__(self, other):
-
 
6875
    return not (self == other)
-
 
6876
 
-
 
6877
class checkOut_args:
6685
  """
6878
  """
6686
  Attributes:
6879
  Attributes:
6687
   - cartId
6880
   - cartId
6688
  """
6881
  """
6689
 
6882
 
Line 6716... Line 6909...
6716
 
6909
 
6717
  def write(self, oprot):
6910
  def write(self, oprot):
6718
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6911
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6719
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6912
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6720
      return
6913
      return
6721
    oprot.writeStructBegin('refreshCart_args')
6914
    oprot.writeStructBegin('checkOut_args')
6722
    if self.cartId != None:
6915
    if self.cartId != None:
6723
      oprot.writeFieldBegin('cartId', TType.I64, 1)
6916
      oprot.writeFieldBegin('cartId', TType.I64, 1)
6724
      oprot.writeI64(self.cartId)
6917
      oprot.writeI64(self.cartId)
6725
      oprot.writeFieldEnd()
6918
      oprot.writeFieldEnd()
6726
    oprot.writeFieldStop()
6919
    oprot.writeFieldStop()
Line 6735... Line 6928...
6735
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6928
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6736
 
6929
 
6737
  def __ne__(self, other):
6930
  def __ne__(self, other):
6738
    return not (self == other)
6931
    return not (self == other)
6739
 
6932
 
6740
class refreshCart_result:
6933
class checkOut_result:
6741
  """
6934
  """
6742
  Attributes:
6935
  Attributes:
6743
   - success
6936
   - success
6744
   - scex
6937
   - scex
6745
  """
6938
  """
Line 6780... Line 6973...
6780
 
6973
 
6781
  def write(self, oprot):
6974
  def write(self, oprot):
6782
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6975
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6783
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6976
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6784
      return
6977
      return
6785
    oprot.writeStructBegin('refreshCart_result')
6978
    oprot.writeStructBegin('checkOut_result')
6786
    if self.success != None:
6979
    if self.success != None:
6787
      oprot.writeFieldBegin('success', TType.BOOL, 0)
6980
      oprot.writeFieldBegin('success', TType.BOOL, 0)
6788
      oprot.writeBool(self.success)
6981
      oprot.writeBool(self.success)
6789
      oprot.writeFieldEnd()
6982
      oprot.writeFieldEnd()
6790
    if self.scex != None:
6983
    if self.scex != None:
Line 6803... Line 6996...
6803
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6996
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6804
 
6997
 
6805
  def __ne__(self, other):
6998
  def __ne__(self, other):
6806
    return not (self == other)
6999
    return not (self == other)
6807
 
7000
 
6808
class mergeCart_args:
7001
class resetCart_args:
6809
  """
7002
  """
6810
  Attributes:
7003
  Attributes:
6811
   - fromCartId
7004
   - cartId
6812
   - toCartId
7005
   - items
6813
  """
7006
  """
6814
 
7007
 
6815
  thrift_spec = (
7008
  thrift_spec = (
6816
    None, # 0
7009
    None, # 0
6817
    (1, TType.I64, 'fromCartId', None, None, ), # 1
7010
    (1, TType.I64, 'cartId', None, None, ), # 1
6818
    (2, TType.I64, 'toCartId', None, None, ), # 2
7011
    (2, TType.MAP, 'items', (TType.I64,None,TType.I64,None), None, ), # 2
6819
  )
7012
  )
6820
 
7013
 
6821
  def __init__(self, fromCartId=None, toCartId=None,):
7014
  def __init__(self, cartId=None, items=None,):
6822
    self.fromCartId = fromCartId
7015
    self.cartId = cartId
6823
    self.toCartId = toCartId
7016
    self.items = items
6824
 
7017
 
6825
  def read(self, iprot):
7018
  def read(self, iprot):
6826
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7019
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6827
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7020
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6828
      return
7021
      return
Line 6831... Line 7024...
6831
      (fname, ftype, fid) = iprot.readFieldBegin()
7024
      (fname, ftype, fid) = iprot.readFieldBegin()
6832
      if ftype == TType.STOP:
7025
      if ftype == TType.STOP:
6833
        break
7026
        break
6834
      if fid == 1:
7027
      if fid == 1:
6835
        if ftype == TType.I64:
7028
        if ftype == TType.I64:
6836
          self.fromCartId = iprot.readI64();
7029
          self.cartId = iprot.readI64();
6837
        else:
7030
        else:
6838
          iprot.skip(ftype)
7031
          iprot.skip(ftype)
6839
      elif fid == 2:
7032
      elif fid == 2:
6840
        if ftype == TType.I64:
7033
        if ftype == TType.MAP:
-
 
7034
          self.items = {}
-
 
7035
          (_ktype66, _vtype67, _size65 ) = iprot.readMapBegin() 
-
 
7036
          for _i69 in xrange(_size65):
-
 
7037
            _key70 = iprot.readI64();
6841
          self.toCartId = iprot.readI64();
7038
            _val71 = iprot.readI64();
-
 
7039
            self.items[_key70] = _val71
-
 
7040
          iprot.readMapEnd()
6842
        else:
7041
        else:
6843
          iprot.skip(ftype)
7042
          iprot.skip(ftype)
6844
      else:
7043
      else:
6845
        iprot.skip(ftype)
7044
        iprot.skip(ftype)
6846
      iprot.readFieldEnd()
7045
      iprot.readFieldEnd()
Line 6848... Line 7047...
6848
 
7047
 
6849
  def write(self, oprot):
7048
  def write(self, oprot):
6850
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7049
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6851
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7050
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6852
      return
7051
      return
6853
    oprot.writeStructBegin('mergeCart_args')
7052
    oprot.writeStructBegin('resetCart_args')
6854
    if self.fromCartId != None:
7053
    if self.cartId != None:
6855
      oprot.writeFieldBegin('fromCartId', TType.I64, 1)
7054
      oprot.writeFieldBegin('cartId', TType.I64, 1)
6856
      oprot.writeI64(self.fromCartId)
7055
      oprot.writeI64(self.cartId)
6857
      oprot.writeFieldEnd()
7056
      oprot.writeFieldEnd()
6858
    if self.toCartId != None:
7057
    if self.items != None:
6859
      oprot.writeFieldBegin('toCartId', TType.I64, 2)
7058
      oprot.writeFieldBegin('items', TType.MAP, 2)
-
 
7059
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.items))
-
 
7060
      for kiter72,viter73 in self.items.items():
6860
      oprot.writeI64(self.toCartId)
7061
        oprot.writeI64(kiter72)
-
 
7062
        oprot.writeI64(viter73)
-
 
7063
      oprot.writeMapEnd()
6861
      oprot.writeFieldEnd()
7064
      oprot.writeFieldEnd()
6862
    oprot.writeFieldStop()
7065
    oprot.writeFieldStop()
6863
    oprot.writeStructEnd()
7066
    oprot.writeStructEnd()
6864
 
7067
 
6865
  def __repr__(self):
7068
  def __repr__(self):
Line 6871... Line 7074...
6871
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7074
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6872
 
7075
 
6873
  def __ne__(self, other):
7076
  def __ne__(self, other):
6874
    return not (self == other)
7077
    return not (self == other)
6875
 
7078
 
6876
class mergeCart_result:
7079
class resetCart_result:
-
 
7080
  """
-
 
7081
  Attributes:
-
 
7082
   - success
-
 
7083
   - scex
-
 
7084
  """
6877
 
7085
 
6878
  thrift_spec = (
7086
  thrift_spec = (
-
 
7087
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
7088
    (1, TType.STRUCT, 'scex', (ShoppingCartException, ShoppingCartException.thrift_spec), None, ), # 1
6879
  )
7089
  )
6880
 
7090
 
-
 
7091
  def __init__(self, success=None, scex=None,):
-
 
7092
    self.success = success
-
 
7093
    self.scex = scex
-
 
7094
 
6881
  def read(self, iprot):
7095
  def read(self, iprot):
6882
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7096
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6883
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7097
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6884
      return
7098
      return
6885
    iprot.readStructBegin()
7099
    iprot.readStructBegin()
6886
    while True:
7100
    while True:
6887
      (fname, ftype, fid) = iprot.readFieldBegin()
7101
      (fname, ftype, fid) = iprot.readFieldBegin()
6888
      if ftype == TType.STOP:
7102
      if ftype == TType.STOP:
6889
        break
7103
        break
-
 
7104
      if fid == 0:
-
 
7105
        if ftype == TType.BOOL:
-
 
7106
          self.success = iprot.readBool();
-
 
7107
        else:
-
 
7108
          iprot.skip(ftype)
-
 
7109
      elif fid == 1:
-
 
7110
        if ftype == TType.STRUCT:
-
 
7111
          self.scex = ShoppingCartException()
-
 
7112
          self.scex.read(iprot)
-
 
7113
        else:
-
 
7114
          iprot.skip(ftype)
6890
      else:
7115
      else:
6891
        iprot.skip(ftype)
7116
        iprot.skip(ftype)
6892
      iprot.readFieldEnd()
7117
      iprot.readFieldEnd()
6893
    iprot.readStructEnd()
7118
    iprot.readStructEnd()
6894
 
7119
 
6895
  def write(self, oprot):
7120
  def write(self, oprot):
6896
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7121
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6897
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7122
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6898
      return
7123
      return
6899
    oprot.writeStructBegin('mergeCart_result')
7124
    oprot.writeStructBegin('resetCart_result')
-
 
7125
    if self.success != None:
-
 
7126
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
7127
      oprot.writeBool(self.success)
-
 
7128
      oprot.writeFieldEnd()
-
 
7129
    if self.scex != None:
-
 
7130
      oprot.writeFieldBegin('scex', TType.STRUCT, 1)
-
 
7131
      self.scex.write(oprot)
-
 
7132
      oprot.writeFieldEnd()
6900
    oprot.writeFieldStop()
7133
    oprot.writeFieldStop()
6901
    oprot.writeStructEnd()
7134
    oprot.writeStructEnd()
6902
 
7135
 
6903
  def __repr__(self):
7136
  def __repr__(self):
6904
    L = ['%s=%r' % (key, value)
7137
    L = ['%s=%r' % (key, value)
Line 7057... Line 7290...
7057
        else:
7290
        else:
7058
          iprot.skip(ftype)
7291
          iprot.skip(ftype)
7059
      elif fid == 2:
7292
      elif fid == 2:
7060
        if ftype == TType.LIST:
7293
        if ftype == TType.LIST:
7061
          self.items = []
7294
          self.items = []
7062
          (_etype68, _size65) = iprot.readListBegin()
7295
          (_etype77, _size74) = iprot.readListBegin()
7063
          for _i69 in xrange(_size65):
7296
          for _i78 in xrange(_size74):
7064
            _elem70 = iprot.readI64();
7297
            _elem79 = iprot.readI64();
7065
            self.items.append(_elem70)
7298
            self.items.append(_elem79)
7066
          iprot.readListEnd()
7299
          iprot.readListEnd()
7067
        else:
7300
        else:
7068
          iprot.skip(ftype)
7301
          iprot.skip(ftype)
7069
      else:
7302
      else:
7070
        iprot.skip(ftype)
7303
        iprot.skip(ftype)
Line 7081... Line 7314...
7081
      oprot.writeI64(self.widget_id)
7314
      oprot.writeI64(self.widget_id)
7082
      oprot.writeFieldEnd()
7315
      oprot.writeFieldEnd()
7083
    if self.items != None:
7316
    if self.items != None:
7084
      oprot.writeFieldBegin('items', TType.LIST, 2)
7317
      oprot.writeFieldBegin('items', TType.LIST, 2)
7085
      oprot.writeListBegin(TType.I64, len(self.items))
7318
      oprot.writeListBegin(TType.I64, len(self.items))
7086
      for iter71 in self.items:
7319
      for iter80 in self.items:
7087
        oprot.writeI64(iter71)
7320
        oprot.writeI64(iter80)
7088
      oprot.writeListEnd()
7321
      oprot.writeListEnd()
7089
      oprot.writeFieldEnd()
7322
      oprot.writeFieldEnd()
7090
    oprot.writeFieldStop()
7323
    oprot.writeFieldStop()
7091
    oprot.writeStructEnd()
7324
    oprot.writeStructEnd()
7092
 
7325