Subversion Repositories SmartDukaan

Rev

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

Rev 10690 Rev 10864
Line 555... Line 555...
555
     - purchaseId
555
     - purchaseId
556
     - scanType
556
     - scanType
557
    """
557
    """
558
    pass
558
    pass
559
 
559
 
-
 
560
  def getCurrentBadQuantityForItem(self, itemId, currentWarehouseId, physicalWarehouseId):
-
 
561
    """
-
 
562
    Parameters:
-
 
563
     - itemId
-
 
564
     - currentWarehouseId
-
 
565
     - physicalWarehouseId
-
 
566
    """
-
 
567
    pass
-
 
568
 
-
 
569
  def scanForBadPurchaseReturn(self, saleReturnItems, vendorId, billingWarehouseId):
-
 
570
    """
-
 
571
    Parameters:
-
 
572
     - saleReturnItems
-
 
573
     - vendorId
-
 
574
     - billingWarehouseId
-
 
575
    """
-
 
576
    pass
-
 
577
 
-
 
578
  def getItemsInPurchaseReturn(self, purchaseReturnId):
-
 
579
    """
-
 
580
    Parameters:
-
 
581
     - purchaseReturnId
-
 
582
    """
-
 
583
    pass
-
 
584
 
560
 
585
 
561
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
586
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
562
  def __init__(self, iprot, oprot=None):
587
  def __init__(self, iprot, oprot=None):
563
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
588
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
564
 
589
 
Line 1234... Line 1259...
1234
     - saleReturnItems
1259
     - saleReturnItems
1235
     - vendorId
1260
     - vendorId
1236
     - billingWarehouseId
1261
     - billingWarehouseId
1237
    """
1262
    """
1238
    self.send_scanForPurchaseReturn(saleReturnItems, vendorId, billingWarehouseId)
1263
    self.send_scanForPurchaseReturn(saleReturnItems, vendorId, billingWarehouseId)
1239
    self.recv_scanForPurchaseReturn()
1264
    return self.recv_scanForPurchaseReturn()
1240
 
1265
 
1241
  def send_scanForPurchaseReturn(self, saleReturnItems, vendorId, billingWarehouseId):
1266
  def send_scanForPurchaseReturn(self, saleReturnItems, vendorId, billingWarehouseId):
1242
    self._oprot.writeMessageBegin('scanForPurchaseReturn', TMessageType.CALL, self._seqid)
1267
    self._oprot.writeMessageBegin('scanForPurchaseReturn', TMessageType.CALL, self._seqid)
1243
    args = scanForPurchaseReturn_args()
1268
    args = scanForPurchaseReturn_args()
1244
    args.saleReturnItems = saleReturnItems
1269
    args.saleReturnItems = saleReturnItems
Line 1256... Line 1281...
1256
      self._iprot.readMessageEnd()
1281
      self._iprot.readMessageEnd()
1257
      raise x
1282
      raise x
1258
    result = scanForPurchaseReturn_result()
1283
    result = scanForPurchaseReturn_result()
1259
    result.read(self._iprot)
1284
    result.read(self._iprot)
1260
    self._iprot.readMessageEnd()
1285
    self._iprot.readMessageEnd()
-
 
1286
    if result.success is not None:
-
 
1287
      return result.success
1261
    if result.ex is not None:
1288
    if result.ex is not None:
1262
      raise result.ex
1289
      raise result.ex
1263
    return
-
 
-
 
1290
    raise TApplicationException(TApplicationException.MISSING_RESULT, "scanForPurchaseReturn failed: unknown result");
1264
 
1291
 
1265
  def scanForLostItem(self, lostItems, vendorId, billingWarehouseId):
1292
  def scanForLostItem(self, lostItems, vendorId, billingWarehouseId):
1266
    """
1293
    """
1267
    Inserts scans for lost Items and updates lastScanType in InventoryItems
1294
    Inserts scans for lost Items and updates lastScanType in InventoryItems
1268
 
1295
 
Line 2542... Line 2569...
2542
      return result.success
2569
      return result.success
2543
    if result.wex is not None:
2570
    if result.wex is not None:
2544
      raise result.wex
2571
      raise result.wex
2545
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getScansforPurchase failed: unknown result");
2572
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getScansforPurchase failed: unknown result");
2546
 
2573
 
-
 
2574
  def getCurrentBadQuantityForItem(self, itemId, currentWarehouseId, physicalWarehouseId):
-
 
2575
    """
-
 
2576
    Parameters:
-
 
2577
     - itemId
-
 
2578
     - currentWarehouseId
-
 
2579
     - physicalWarehouseId
-
 
2580
    """
-
 
2581
    self.send_getCurrentBadQuantityForItem(itemId, currentWarehouseId, physicalWarehouseId)
-
 
2582
    return self.recv_getCurrentBadQuantityForItem()
-
 
2583
 
-
 
2584
  def send_getCurrentBadQuantityForItem(self, itemId, currentWarehouseId, physicalWarehouseId):
-
 
2585
    self._oprot.writeMessageBegin('getCurrentBadQuantityForItem', TMessageType.CALL, self._seqid)
-
 
2586
    args = getCurrentBadQuantityForItem_args()
-
 
2587
    args.itemId = itemId
-
 
2588
    args.currentWarehouseId = currentWarehouseId
-
 
2589
    args.physicalWarehouseId = physicalWarehouseId
-
 
2590
    args.write(self._oprot)
-
 
2591
    self._oprot.writeMessageEnd()
-
 
2592
    self._oprot.trans.flush()
-
 
2593
 
-
 
2594
  def recv_getCurrentBadQuantityForItem(self, ):
-
 
2595
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2596
    if mtype == TMessageType.EXCEPTION:
-
 
2597
      x = TApplicationException()
-
 
2598
      x.read(self._iprot)
-
 
2599
      self._iprot.readMessageEnd()
-
 
2600
      raise x
-
 
2601
    result = getCurrentBadQuantityForItem_result()
-
 
2602
    result.read(self._iprot)
-
 
2603
    self._iprot.readMessageEnd()
-
 
2604
    if result.success is not None:
-
 
2605
      return result.success
-
 
2606
    if result.wex is not None:
-
 
2607
      raise result.wex
-
 
2608
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentBadQuantityForItem failed: unknown result");
-
 
2609
 
-
 
2610
  def scanForBadPurchaseReturn(self, saleReturnItems, vendorId, billingWarehouseId):
-
 
2611
    """
-
 
2612
    Parameters:
-
 
2613
     - saleReturnItems
-
 
2614
     - vendorId
-
 
2615
     - billingWarehouseId
-
 
2616
    """
-
 
2617
    self.send_scanForBadPurchaseReturn(saleReturnItems, vendorId, billingWarehouseId)
-
 
2618
    return self.recv_scanForBadPurchaseReturn()
-
 
2619
 
-
 
2620
  def send_scanForBadPurchaseReturn(self, saleReturnItems, vendorId, billingWarehouseId):
-
 
2621
    self._oprot.writeMessageBegin('scanForBadPurchaseReturn', TMessageType.CALL, self._seqid)
-
 
2622
    args = scanForBadPurchaseReturn_args()
-
 
2623
    args.saleReturnItems = saleReturnItems
-
 
2624
    args.vendorId = vendorId
-
 
2625
    args.billingWarehouseId = billingWarehouseId
-
 
2626
    args.write(self._oprot)
-
 
2627
    self._oprot.writeMessageEnd()
-
 
2628
    self._oprot.trans.flush()
-
 
2629
 
-
 
2630
  def recv_scanForBadPurchaseReturn(self, ):
-
 
2631
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2632
    if mtype == TMessageType.EXCEPTION:
-
 
2633
      x = TApplicationException()
-
 
2634
      x.read(self._iprot)
-
 
2635
      self._iprot.readMessageEnd()
-
 
2636
      raise x
-
 
2637
    result = scanForBadPurchaseReturn_result()
-
 
2638
    result.read(self._iprot)
-
 
2639
    self._iprot.readMessageEnd()
-
 
2640
    if result.success is not None:
-
 
2641
      return result.success
-
 
2642
    if result.ex is not None:
-
 
2643
      raise result.ex
-
 
2644
    raise TApplicationException(TApplicationException.MISSING_RESULT, "scanForBadPurchaseReturn failed: unknown result");
-
 
2645
 
-
 
2646
  def getItemsInPurchaseReturn(self, purchaseReturnId):
-
 
2647
    """
-
 
2648
    Parameters:
-
 
2649
     - purchaseReturnId
-
 
2650
    """
-
 
2651
    self.send_getItemsInPurchaseReturn(purchaseReturnId)
-
 
2652
    return self.recv_getItemsInPurchaseReturn()
-
 
2653
 
-
 
2654
  def send_getItemsInPurchaseReturn(self, purchaseReturnId):
-
 
2655
    self._oprot.writeMessageBegin('getItemsInPurchaseReturn', TMessageType.CALL, self._seqid)
-
 
2656
    args = getItemsInPurchaseReturn_args()
-
 
2657
    args.purchaseReturnId = purchaseReturnId
-
 
2658
    args.write(self._oprot)
-
 
2659
    self._oprot.writeMessageEnd()
-
 
2660
    self._oprot.trans.flush()
-
 
2661
 
-
 
2662
  def recv_getItemsInPurchaseReturn(self, ):
-
 
2663
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2664
    if mtype == TMessageType.EXCEPTION:
-
 
2665
      x = TApplicationException()
-
 
2666
      x.read(self._iprot)
-
 
2667
      self._iprot.readMessageEnd()
-
 
2668
      raise x
-
 
2669
    result = getItemsInPurchaseReturn_result()
-
 
2670
    result.read(self._iprot)
-
 
2671
    self._iprot.readMessageEnd()
-
 
2672
    if result.success is not None:
-
 
2673
      return result.success
-
 
2674
    if result.ex is not None:
-
 
2675
      raise result.ex
-
 
2676
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemsInPurchaseReturn failed: unknown result");
-
 
2677
 
2547
 
2678
 
2548
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2679
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2549
  def __init__(self, handler):
2680
  def __init__(self, handler):
2550
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2681
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2551
    self._processMap["getInventoryItem"] = Processor.process_getInventoryItem
2682
    self._processMap["getInventoryItem"] = Processor.process_getInventoryItem
Line 2604... Line 2735...
2604
    self._processMap["markItemsAsReceivedForTransferLotPartial"] = Processor.process_markItemsAsReceivedForTransferLotPartial
2735
    self._processMap["markItemsAsReceivedForTransferLotPartial"] = Processor.process_markItemsAsReceivedForTransferLotPartial
2605
    self._processMap["markTransferLotAsReceivedPartial"] = Processor.process_markTransferLotAsReceivedPartial
2736
    self._processMap["markTransferLotAsReceivedPartial"] = Processor.process_markTransferLotAsReceivedPartial
2606
    self._processMap["getInventoryItemScannedInForPO"] = Processor.process_getInventoryItemScannedInForPO
2737
    self._processMap["getInventoryItemScannedInForPO"] = Processor.process_getInventoryItemScannedInForPO
2607
    self._processMap["getAmazonTransferredSkuDetails"] = Processor.process_getAmazonTransferredSkuDetails
2738
    self._processMap["getAmazonTransferredSkuDetails"] = Processor.process_getAmazonTransferredSkuDetails
2608
    self._processMap["getScansforPurchase"] = Processor.process_getScansforPurchase
2739
    self._processMap["getScansforPurchase"] = Processor.process_getScansforPurchase
-
 
2740
    self._processMap["getCurrentBadQuantityForItem"] = Processor.process_getCurrentBadQuantityForItem
-
 
2741
    self._processMap["scanForBadPurchaseReturn"] = Processor.process_scanForBadPurchaseReturn
-
 
2742
    self._processMap["getItemsInPurchaseReturn"] = Processor.process_getItemsInPurchaseReturn
2609
 
2743
 
2610
  def process(self, iprot, oprot):
2744
  def process(self, iprot, oprot):
2611
    (name, type, seqid) = iprot.readMessageBegin()
2745
    (name, type, seqid) = iprot.readMessageBegin()
2612
    if name not in self._processMap:
2746
    if name not in self._processMap:
2613
      iprot.skip(TType.STRUCT)
2747
      iprot.skip(TType.STRUCT)
Line 2862... Line 2996...
2862
    args = scanForPurchaseReturn_args()
2996
    args = scanForPurchaseReturn_args()
2863
    args.read(iprot)
2997
    args.read(iprot)
2864
    iprot.readMessageEnd()
2998
    iprot.readMessageEnd()
2865
    result = scanForPurchaseReturn_result()
2999
    result = scanForPurchaseReturn_result()
2866
    try:
3000
    try:
2867
      self._handler.scanForPurchaseReturn(args.saleReturnItems, args.vendorId, args.billingWarehouseId)
3001
      result.success = self._handler.scanForPurchaseReturn(args.saleReturnItems, args.vendorId, args.billingWarehouseId)
2868
    except WarehouseServiceException, ex:
3002
    except WarehouseServiceException, ex:
2869
      result.ex = ex
3003
      result.ex = ex
2870
    oprot.writeMessageBegin("scanForPurchaseReturn", TMessageType.REPLY, seqid)
3004
    oprot.writeMessageBegin("scanForPurchaseReturn", TMessageType.REPLY, seqid)
2871
    result.write(oprot)
3005
    result.write(oprot)
2872
    oprot.writeMessageEnd()
3006
    oprot.writeMessageEnd()
Line 3360... Line 3494...
3360
    oprot.writeMessageBegin("getScansforPurchase", TMessageType.REPLY, seqid)
3494
    oprot.writeMessageBegin("getScansforPurchase", TMessageType.REPLY, seqid)
3361
    result.write(oprot)
3495
    result.write(oprot)
3362
    oprot.writeMessageEnd()
3496
    oprot.writeMessageEnd()
3363
    oprot.trans.flush()
3497
    oprot.trans.flush()
3364
 
3498
 
-
 
3499
  def process_getCurrentBadQuantityForItem(self, seqid, iprot, oprot):
-
 
3500
    args = getCurrentBadQuantityForItem_args()
-
 
3501
    args.read(iprot)
-
 
3502
    iprot.readMessageEnd()
-
 
3503
    result = getCurrentBadQuantityForItem_result()
-
 
3504
    try:
-
 
3505
      result.success = self._handler.getCurrentBadQuantityForItem(args.itemId, args.currentWarehouseId, args.physicalWarehouseId)
-
 
3506
    except WarehouseServiceException, wex:
-
 
3507
      result.wex = wex
-
 
3508
    oprot.writeMessageBegin("getCurrentBadQuantityForItem", TMessageType.REPLY, seqid)
-
 
3509
    result.write(oprot)
-
 
3510
    oprot.writeMessageEnd()
-
 
3511
    oprot.trans.flush()
-
 
3512
 
-
 
3513
  def process_scanForBadPurchaseReturn(self, seqid, iprot, oprot):
-
 
3514
    args = scanForBadPurchaseReturn_args()
-
 
3515
    args.read(iprot)
-
 
3516
    iprot.readMessageEnd()
-
 
3517
    result = scanForBadPurchaseReturn_result()
-
 
3518
    try:
-
 
3519
      result.success = self._handler.scanForBadPurchaseReturn(args.saleReturnItems, args.vendorId, args.billingWarehouseId)
-
 
3520
    except WarehouseServiceException, ex:
-
 
3521
      result.ex = ex
-
 
3522
    oprot.writeMessageBegin("scanForBadPurchaseReturn", TMessageType.REPLY, seqid)
-
 
3523
    result.write(oprot)
-
 
3524
    oprot.writeMessageEnd()
-
 
3525
    oprot.trans.flush()
-
 
3526
 
-
 
3527
  def process_getItemsInPurchaseReturn(self, seqid, iprot, oprot):
-
 
3528
    args = getItemsInPurchaseReturn_args()
-
 
3529
    args.read(iprot)
-
 
3530
    iprot.readMessageEnd()
-
 
3531
    result = getItemsInPurchaseReturn_result()
-
 
3532
    try:
-
 
3533
      result.success = self._handler.getItemsInPurchaseReturn(args.purchaseReturnId)
-
 
3534
    except WarehouseServiceException, ex:
-
 
3535
      result.ex = ex
-
 
3536
    oprot.writeMessageBegin("getItemsInPurchaseReturn", TMessageType.REPLY, seqid)
-
 
3537
    result.write(oprot)
-
 
3538
    oprot.writeMessageEnd()
-
 
3539
    oprot.trans.flush()
-
 
3540
 
3365
 
3541
 
3366
# HELPER FUNCTIONS AND STRUCTURES
3542
# HELPER FUNCTIONS AND STRUCTURES
3367
 
3543
 
3368
class getInventoryItem_args:
3544
class getInventoryItem_args:
3369
  """
3545
  """
Line 6165... Line 6341...
6165
    return not (self == other)
6341
    return not (self == other)
6166
 
6342
 
6167
class scanForPurchaseReturn_result:
6343
class scanForPurchaseReturn_result:
6168
  """
6344
  """
6169
  Attributes:
6345
  Attributes:
-
 
6346
   - success
6170
   - ex
6347
   - ex
6171
  """
6348
  """
6172
 
6349
 
6173
  thrift_spec = (
6350
  thrift_spec = (
6174
    None, # 0
6351
    (0, TType.I64, 'success', None, None, ), # 0
6175
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
6352
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
6176
  )
6353
  )
6177
 
6354
 
6178
  def __init__(self, ex=None,):
6355
  def __init__(self, success=None, ex=None,):
-
 
6356
    self.success = success
6179
    self.ex = ex
6357
    self.ex = ex
6180
 
6358
 
6181
  def read(self, iprot):
6359
  def read(self, iprot):
6182
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6360
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6183
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6361
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 6185... Line 6363...
6185
    iprot.readStructBegin()
6363
    iprot.readStructBegin()
6186
    while True:
6364
    while True:
6187
      (fname, ftype, fid) = iprot.readFieldBegin()
6365
      (fname, ftype, fid) = iprot.readFieldBegin()
6188
      if ftype == TType.STOP:
6366
      if ftype == TType.STOP:
6189
        break
6367
        break
6190
      if fid == 1:
6368
      if fid == 0:
-
 
6369
        if ftype == TType.I64:
-
 
6370
          self.success = iprot.readI64();
-
 
6371
        else:
-
 
6372
          iprot.skip(ftype)
-
 
6373
      elif fid == 1:
6191
        if ftype == TType.STRUCT:
6374
        if ftype == TType.STRUCT:
6192
          self.ex = WarehouseServiceException()
6375
          self.ex = WarehouseServiceException()
6193
          self.ex.read(iprot)
6376
          self.ex.read(iprot)
6194
        else:
6377
        else:
6195
          iprot.skip(ftype)
6378
          iprot.skip(ftype)
Line 6201... Line 6384...
6201
  def write(self, oprot):
6384
  def write(self, oprot):
6202
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6385
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6203
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6386
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6204
      return
6387
      return
6205
    oprot.writeStructBegin('scanForPurchaseReturn_result')
6388
    oprot.writeStructBegin('scanForPurchaseReturn_result')
-
 
6389
    if self.success is not None:
-
 
6390
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
6391
      oprot.writeI64(self.success)
-
 
6392
      oprot.writeFieldEnd()
6206
    if self.ex is not None:
6393
    if self.ex is not None:
6207
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
6394
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
6208
      self.ex.write(oprot)
6395
      self.ex.write(oprot)
6209
      oprot.writeFieldEnd()
6396
      oprot.writeFieldEnd()
6210
    oprot.writeFieldStop()
6397
    oprot.writeFieldStop()
Line 11685... Line 11872...
11685
      oprot.writeFieldEnd()
11872
      oprot.writeFieldEnd()
11686
    oprot.writeFieldStop()
11873
    oprot.writeFieldStop()
11687
    oprot.writeStructEnd()
11874
    oprot.writeStructEnd()
11688
 
11875
 
11689
  def validate(self):
11876
  def validate(self):
-
 
11877
    return
-
 
11878
 
-
 
11879
 
-
 
11880
  def __repr__(self):
-
 
11881
    L = ['%s=%r' % (key, value)
-
 
11882
      for key, value in self.__dict__.iteritems()]
-
 
11883
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11884
 
-
 
11885
  def __eq__(self, other):
-
 
11886
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11887
 
-
 
11888
  def __ne__(self, other):
-
 
11889
    return not (self == other)
-
 
11890
 
-
 
11891
class getCurrentBadQuantityForItem_args:
-
 
11892
  """
-
 
11893
  Attributes:
-
 
11894
   - itemId
-
 
11895
   - currentWarehouseId
-
 
11896
   - physicalWarehouseId
-
 
11897
  """
-
 
11898
 
-
 
11899
  thrift_spec = (
-
 
11900
    None, # 0
-
 
11901
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
11902
    (2, TType.I64, 'currentWarehouseId', None, None, ), # 2
-
 
11903
    (3, TType.I64, 'physicalWarehouseId', None, None, ), # 3
-
 
11904
  )
-
 
11905
 
-
 
11906
  def __init__(self, itemId=None, currentWarehouseId=None, physicalWarehouseId=None,):
-
 
11907
    self.itemId = itemId
-
 
11908
    self.currentWarehouseId = currentWarehouseId
-
 
11909
    self.physicalWarehouseId = physicalWarehouseId
-
 
11910
 
-
 
11911
  def read(self, iprot):
-
 
11912
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11913
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11914
      return
-
 
11915
    iprot.readStructBegin()
-
 
11916
    while True:
-
 
11917
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11918
      if ftype == TType.STOP:
-
 
11919
        break
-
 
11920
      if fid == 1:
-
 
11921
        if ftype == TType.I64:
-
 
11922
          self.itemId = iprot.readI64();
-
 
11923
        else:
-
 
11924
          iprot.skip(ftype)
-
 
11925
      elif fid == 2:
-
 
11926
        if ftype == TType.I64:
-
 
11927
          self.currentWarehouseId = iprot.readI64();
-
 
11928
        else:
-
 
11929
          iprot.skip(ftype)
-
 
11930
      elif fid == 3:
-
 
11931
        if ftype == TType.I64:
-
 
11932
          self.physicalWarehouseId = iprot.readI64();
-
 
11933
        else:
-
 
11934
          iprot.skip(ftype)
-
 
11935
      else:
-
 
11936
        iprot.skip(ftype)
-
 
11937
      iprot.readFieldEnd()
-
 
11938
    iprot.readStructEnd()
-
 
11939
 
-
 
11940
  def write(self, oprot):
-
 
11941
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11942
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11943
      return
-
 
11944
    oprot.writeStructBegin('getCurrentBadQuantityForItem_args')
-
 
11945
    if self.itemId is not None:
-
 
11946
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
11947
      oprot.writeI64(self.itemId)
-
 
11948
      oprot.writeFieldEnd()
-
 
11949
    if self.currentWarehouseId is not None:
-
 
11950
      oprot.writeFieldBegin('currentWarehouseId', TType.I64, 2)
-
 
11951
      oprot.writeI64(self.currentWarehouseId)
-
 
11952
      oprot.writeFieldEnd()
-
 
11953
    if self.physicalWarehouseId is not None:
-
 
11954
      oprot.writeFieldBegin('physicalWarehouseId', TType.I64, 3)
-
 
11955
      oprot.writeI64(self.physicalWarehouseId)
-
 
11956
      oprot.writeFieldEnd()
-
 
11957
    oprot.writeFieldStop()
-
 
11958
    oprot.writeStructEnd()
-
 
11959
 
-
 
11960
  def validate(self):
-
 
11961
    return
-
 
11962
 
-
 
11963
 
-
 
11964
  def __repr__(self):
-
 
11965
    L = ['%s=%r' % (key, value)
-
 
11966
      for key, value in self.__dict__.iteritems()]
-
 
11967
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11968
 
-
 
11969
  def __eq__(self, other):
-
 
11970
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11971
 
-
 
11972
  def __ne__(self, other):
-
 
11973
    return not (self == other)
-
 
11974
 
-
 
11975
class getCurrentBadQuantityForItem_result:
-
 
11976
  """
-
 
11977
  Attributes:
-
 
11978
   - success
-
 
11979
   - wex
-
 
11980
  """
-
 
11981
 
-
 
11982
  thrift_spec = (
-
 
11983
    (0, TType.I64, 'success', None, None, ), # 0
-
 
11984
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
11985
  )
-
 
11986
 
-
 
11987
  def __init__(self, success=None, wex=None,):
-
 
11988
    self.success = success
-
 
11989
    self.wex = wex
-
 
11990
 
-
 
11991
  def read(self, iprot):
-
 
11992
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11993
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11994
      return
-
 
11995
    iprot.readStructBegin()
-
 
11996
    while True:
-
 
11997
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11998
      if ftype == TType.STOP:
-
 
11999
        break
-
 
12000
      if fid == 0:
-
 
12001
        if ftype == TType.I64:
-
 
12002
          self.success = iprot.readI64();
-
 
12003
        else:
-
 
12004
          iprot.skip(ftype)
-
 
12005
      elif fid == 1:
-
 
12006
        if ftype == TType.STRUCT:
-
 
12007
          self.wex = WarehouseServiceException()
-
 
12008
          self.wex.read(iprot)
-
 
12009
        else:
-
 
12010
          iprot.skip(ftype)
-
 
12011
      else:
-
 
12012
        iprot.skip(ftype)
-
 
12013
      iprot.readFieldEnd()
-
 
12014
    iprot.readStructEnd()
-
 
12015
 
-
 
12016
  def write(self, oprot):
-
 
12017
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12018
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12019
      return
-
 
12020
    oprot.writeStructBegin('getCurrentBadQuantityForItem_result')
-
 
12021
    if self.success is not None:
-
 
12022
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
12023
      oprot.writeI64(self.success)
-
 
12024
      oprot.writeFieldEnd()
-
 
12025
    if self.wex is not None:
-
 
12026
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
-
 
12027
      self.wex.write(oprot)
-
 
12028
      oprot.writeFieldEnd()
-
 
12029
    oprot.writeFieldStop()
-
 
12030
    oprot.writeStructEnd()
-
 
12031
 
-
 
12032
  def validate(self):
-
 
12033
    return
-
 
12034
 
-
 
12035
 
-
 
12036
  def __repr__(self):
-
 
12037
    L = ['%s=%r' % (key, value)
-
 
12038
      for key, value in self.__dict__.iteritems()]
-
 
12039
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
12040
 
-
 
12041
  def __eq__(self, other):
-
 
12042
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
12043
 
-
 
12044
  def __ne__(self, other):
-
 
12045
    return not (self == other)
-
 
12046
 
-
 
12047
class scanForBadPurchaseReturn_args:
-
 
12048
  """
-
 
12049
  Attributes:
-
 
12050
   - saleReturnItems
-
 
12051
   - vendorId
-
 
12052
   - billingWarehouseId
-
 
12053
  """
-
 
12054
 
-
 
12055
  thrift_spec = (
-
 
12056
    None, # 0
-
 
12057
    (1, TType.LIST, 'saleReturnItems', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 1
-
 
12058
    (2, TType.I64, 'vendorId', None, None, ), # 2
-
 
12059
    (3, TType.I64, 'billingWarehouseId', None, None, ), # 3
-
 
12060
  )
-
 
12061
 
-
 
12062
  def __init__(self, saleReturnItems=None, vendorId=None, billingWarehouseId=None,):
-
 
12063
    self.saleReturnItems = saleReturnItems
-
 
12064
    self.vendorId = vendorId
-
 
12065
    self.billingWarehouseId = billingWarehouseId
-
 
12066
 
-
 
12067
  def read(self, iprot):
-
 
12068
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
12069
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
12070
      return
-
 
12071
    iprot.readStructBegin()
-
 
12072
    while True:
-
 
12073
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
12074
      if ftype == TType.STOP:
-
 
12075
        break
-
 
12076
      if fid == 1:
-
 
12077
        if ftype == TType.LIST:
-
 
12078
          self.saleReturnItems = []
-
 
12079
          (_etype264, _size261) = iprot.readListBegin()
-
 
12080
          for _i265 in xrange(_size261):
-
 
12081
            _elem266 = InventoryItem()
-
 
12082
            _elem266.read(iprot)
-
 
12083
            self.saleReturnItems.append(_elem266)
-
 
12084
          iprot.readListEnd()
-
 
12085
        else:
-
 
12086
          iprot.skip(ftype)
-
 
12087
      elif fid == 2:
-
 
12088
        if ftype == TType.I64:
-
 
12089
          self.vendorId = iprot.readI64();
-
 
12090
        else:
-
 
12091
          iprot.skip(ftype)
-
 
12092
      elif fid == 3:
-
 
12093
        if ftype == TType.I64:
-
 
12094
          self.billingWarehouseId = iprot.readI64();
-
 
12095
        else:
-
 
12096
          iprot.skip(ftype)
-
 
12097
      else:
-
 
12098
        iprot.skip(ftype)
-
 
12099
      iprot.readFieldEnd()
-
 
12100
    iprot.readStructEnd()
-
 
12101
 
-
 
12102
  def write(self, oprot):
-
 
12103
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12104
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12105
      return
-
 
12106
    oprot.writeStructBegin('scanForBadPurchaseReturn_args')
-
 
12107
    if self.saleReturnItems is not None:
-
 
12108
      oprot.writeFieldBegin('saleReturnItems', TType.LIST, 1)
-
 
12109
      oprot.writeListBegin(TType.STRUCT, len(self.saleReturnItems))
-
 
12110
      for iter267 in self.saleReturnItems:
-
 
12111
        iter267.write(oprot)
-
 
12112
      oprot.writeListEnd()
-
 
12113
      oprot.writeFieldEnd()
-
 
12114
    if self.vendorId is not None:
-
 
12115
      oprot.writeFieldBegin('vendorId', TType.I64, 2)
-
 
12116
      oprot.writeI64(self.vendorId)
-
 
12117
      oprot.writeFieldEnd()
-
 
12118
    if self.billingWarehouseId is not None:
-
 
12119
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 3)
-
 
12120
      oprot.writeI64(self.billingWarehouseId)
-
 
12121
      oprot.writeFieldEnd()
-
 
12122
    oprot.writeFieldStop()
-
 
12123
    oprot.writeStructEnd()
-
 
12124
 
-
 
12125
  def validate(self):
-
 
12126
    return
-
 
12127
 
-
 
12128
 
-
 
12129
  def __repr__(self):
-
 
12130
    L = ['%s=%r' % (key, value)
-
 
12131
      for key, value in self.__dict__.iteritems()]
-
 
12132
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
12133
 
-
 
12134
  def __eq__(self, other):
-
 
12135
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
12136
 
-
 
12137
  def __ne__(self, other):
-
 
12138
    return not (self == other)
-
 
12139
 
-
 
12140
class scanForBadPurchaseReturn_result:
-
 
12141
  """
-
 
12142
  Attributes:
-
 
12143
   - success
-
 
12144
   - ex
-
 
12145
  """
-
 
12146
 
-
 
12147
  thrift_spec = (
-
 
12148
    (0, TType.I64, 'success', None, None, ), # 0
-
 
12149
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
12150
  )
-
 
12151
 
-
 
12152
  def __init__(self, success=None, ex=None,):
-
 
12153
    self.success = success
-
 
12154
    self.ex = ex
-
 
12155
 
-
 
12156
  def read(self, iprot):
-
 
12157
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
12158
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
12159
      return
-
 
12160
    iprot.readStructBegin()
-
 
12161
    while True:
-
 
12162
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
12163
      if ftype == TType.STOP:
-
 
12164
        break
-
 
12165
      if fid == 0:
-
 
12166
        if ftype == TType.I64:
-
 
12167
          self.success = iprot.readI64();
-
 
12168
        else:
-
 
12169
          iprot.skip(ftype)
-
 
12170
      elif fid == 1:
-
 
12171
        if ftype == TType.STRUCT:
-
 
12172
          self.ex = WarehouseServiceException()
-
 
12173
          self.ex.read(iprot)
-
 
12174
        else:
-
 
12175
          iprot.skip(ftype)
-
 
12176
      else:
-
 
12177
        iprot.skip(ftype)
-
 
12178
      iprot.readFieldEnd()
-
 
12179
    iprot.readStructEnd()
-
 
12180
 
-
 
12181
  def write(self, oprot):
-
 
12182
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12183
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12184
      return
-
 
12185
    oprot.writeStructBegin('scanForBadPurchaseReturn_result')
-
 
12186
    if self.success is not None:
-
 
12187
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
12188
      oprot.writeI64(self.success)
-
 
12189
      oprot.writeFieldEnd()
-
 
12190
    if self.ex is not None:
-
 
12191
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
12192
      self.ex.write(oprot)
-
 
12193
      oprot.writeFieldEnd()
-
 
12194
    oprot.writeFieldStop()
-
 
12195
    oprot.writeStructEnd()
-
 
12196
 
-
 
12197
  def validate(self):
-
 
12198
    return
-
 
12199
 
-
 
12200
 
-
 
12201
  def __repr__(self):
-
 
12202
    L = ['%s=%r' % (key, value)
-
 
12203
      for key, value in self.__dict__.iteritems()]
-
 
12204
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
12205
 
-
 
12206
  def __eq__(self, other):
-
 
12207
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
12208
 
-
 
12209
  def __ne__(self, other):
-
 
12210
    return not (self == other)
-
 
12211
 
-
 
12212
class getItemsInPurchaseReturn_args:
-
 
12213
  """
-
 
12214
  Attributes:
-
 
12215
   - purchaseReturnId
-
 
12216
  """
-
 
12217
 
-
 
12218
  thrift_spec = (
-
 
12219
    None, # 0
-
 
12220
    (1, TType.I64, 'purchaseReturnId', None, None, ), # 1
-
 
12221
  )
-
 
12222
 
-
 
12223
  def __init__(self, purchaseReturnId=None,):
-
 
12224
    self.purchaseReturnId = purchaseReturnId
-
 
12225
 
-
 
12226
  def read(self, iprot):
-
 
12227
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
12228
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
12229
      return
-
 
12230
    iprot.readStructBegin()
-
 
12231
    while True:
-
 
12232
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
12233
      if ftype == TType.STOP:
-
 
12234
        break
-
 
12235
      if fid == 1:
-
 
12236
        if ftype == TType.I64:
-
 
12237
          self.purchaseReturnId = iprot.readI64();
-
 
12238
        else:
-
 
12239
          iprot.skip(ftype)
-
 
12240
      else:
-
 
12241
        iprot.skip(ftype)
-
 
12242
      iprot.readFieldEnd()
-
 
12243
    iprot.readStructEnd()
-
 
12244
 
-
 
12245
  def write(self, oprot):
-
 
12246
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12247
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12248
      return
-
 
12249
    oprot.writeStructBegin('getItemsInPurchaseReturn_args')
-
 
12250
    if self.purchaseReturnId is not None:
-
 
12251
      oprot.writeFieldBegin('purchaseReturnId', TType.I64, 1)
-
 
12252
      oprot.writeI64(self.purchaseReturnId)
-
 
12253
      oprot.writeFieldEnd()
-
 
12254
    oprot.writeFieldStop()
-
 
12255
    oprot.writeStructEnd()
-
 
12256
 
-
 
12257
  def validate(self):
-
 
12258
    return
-
 
12259
 
-
 
12260
 
-
 
12261
  def __repr__(self):
-
 
12262
    L = ['%s=%r' % (key, value)
-
 
12263
      for key, value in self.__dict__.iteritems()]
-
 
12264
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
12265
 
-
 
12266
  def __eq__(self, other):
-
 
12267
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
12268
 
-
 
12269
  def __ne__(self, other):
-
 
12270
    return not (self == other)
-
 
12271
 
-
 
12272
class getItemsInPurchaseReturn_result:
-
 
12273
  """
-
 
12274
  Attributes:
-
 
12275
   - success
-
 
12276
   - ex
-
 
12277
  """
-
 
12278
 
-
 
12279
  thrift_spec = (
-
 
12280
    (0, TType.MAP, 'success', (TType.I64,None,TType.I64,None), None, ), # 0
-
 
12281
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
12282
  )
-
 
12283
 
-
 
12284
  def __init__(self, success=None, ex=None,):
-
 
12285
    self.success = success
-
 
12286
    self.ex = ex
-
 
12287
 
-
 
12288
  def read(self, iprot):
-
 
12289
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
12290
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
12291
      return
-
 
12292
    iprot.readStructBegin()
-
 
12293
    while True:
-
 
12294
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
12295
      if ftype == TType.STOP:
-
 
12296
        break
-
 
12297
      if fid == 0:
-
 
12298
        if ftype == TType.MAP:
-
 
12299
          self.success = {}
-
 
12300
          (_ktype269, _vtype270, _size268 ) = iprot.readMapBegin() 
-
 
12301
          for _i272 in xrange(_size268):
-
 
12302
            _key273 = iprot.readI64();
-
 
12303
            _val274 = iprot.readI64();
-
 
12304
            self.success[_key273] = _val274
-
 
12305
          iprot.readMapEnd()
-
 
12306
        else:
-
 
12307
          iprot.skip(ftype)
-
 
12308
      elif fid == 1:
-
 
12309
        if ftype == TType.STRUCT:
-
 
12310
          self.ex = WarehouseServiceException()
-
 
12311
          self.ex.read(iprot)
-
 
12312
        else:
-
 
12313
          iprot.skip(ftype)
-
 
12314
      else:
-
 
12315
        iprot.skip(ftype)
-
 
12316
      iprot.readFieldEnd()
-
 
12317
    iprot.readStructEnd()
-
 
12318
 
-
 
12319
  def write(self, oprot):
-
 
12320
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12321
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12322
      return
-
 
12323
    oprot.writeStructBegin('getItemsInPurchaseReturn_result')
-
 
12324
    if self.success is not None:
-
 
12325
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
12326
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.success))
-
 
12327
      for kiter275,viter276 in self.success.items():
-
 
12328
        oprot.writeI64(kiter275)
-
 
12329
        oprot.writeI64(viter276)
-
 
12330
      oprot.writeMapEnd()
-
 
12331
      oprot.writeFieldEnd()
-
 
12332
    if self.ex is not None:
-
 
12333
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
12334
      self.ex.write(oprot)
-
 
12335
      oprot.writeFieldEnd()
-
 
12336
    oprot.writeFieldStop()
-
 
12337
    oprot.writeStructEnd()
-
 
12338
 
-
 
12339
  def validate(self):
11690
    return
12340
    return
11691
 
12341
 
11692
 
12342
 
11693
  def __repr__(self):
12343
  def __repr__(self):
11694
    L = ['%s=%r' % (key, value)
12344
    L = ['%s=%r' % (key, value)