Subversion Repositories SmartDukaan

Rev

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

Rev 3986 Rev 4008
Line 619... Line 619...
619
     - xferTxnId
619
     - xferTxnId
620
     - xferDate
620
     - xferDate
621
    """
621
    """
622
    pass
622
    pass
623
 
623
 
-
 
624
  def getTransactionsRequiringExtraProcessing(self, category):
-
 
625
    """
-
 
626
    Returns the list of transactions that require some extra processing and
-
 
627
    which belong to a particular category. This is currently used by CRM
-
 
628
    application.
-
 
629
 
-
 
630
    Parameters:
-
 
631
     - category
-
 
632
    """
-
 
633
    pass
-
 
634
 
-
 
635
  def markTransactionAsProcessed(self, transactionId, category):
-
 
636
    """
-
 
637
    Marks a particular transaction as processed for a particular cateogory.
-
 
638
    It essentially deletes the transaction if it is processed for a particular
-
 
639
    category. This is currently used by CRM application.
-
 
640
 
-
 
641
    Parameters:
-
 
642
     - transactionId
-
 
643
     - category
-
 
644
    """
-
 
645
    pass
-
 
646
 
624
 
647
 
625
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
648
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
626
  def __init__(self, iprot, oprot=None):
649
  def __init__(self, iprot, oprot=None):
627
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
650
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
628
 
651
 
Line 2629... Line 2652...
2629
      return result.success
2652
      return result.success
2630
    if result.ex is not None:
2653
    if result.ex is not None:
2631
      raise result.ex
2654
      raise result.ex
2632
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reconcileCodCollection failed: unknown result");
2655
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reconcileCodCollection failed: unknown result");
2633
 
2656
 
-
 
2657
  def getTransactionsRequiringExtraProcessing(self, category):
-
 
2658
    """
-
 
2659
    Returns the list of transactions that require some extra processing and
-
 
2660
    which belong to a particular category. This is currently used by CRM
-
 
2661
    application.
-
 
2662
 
-
 
2663
    Parameters:
-
 
2664
     - category
-
 
2665
    """
-
 
2666
    self.send_getTransactionsRequiringExtraProcessing(category)
-
 
2667
    return self.recv_getTransactionsRequiringExtraProcessing()
-
 
2668
 
-
 
2669
  def send_getTransactionsRequiringExtraProcessing(self, category):
-
 
2670
    self._oprot.writeMessageBegin('getTransactionsRequiringExtraProcessing', TMessageType.CALL, self._seqid)
-
 
2671
    args = getTransactionsRequiringExtraProcessing_args()
-
 
2672
    args.category = category
-
 
2673
    args.write(self._oprot)
-
 
2674
    self._oprot.writeMessageEnd()
-
 
2675
    self._oprot.trans.flush()
-
 
2676
 
-
 
2677
  def recv_getTransactionsRequiringExtraProcessing(self, ):
-
 
2678
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2679
    if mtype == TMessageType.EXCEPTION:
-
 
2680
      x = TApplicationException()
-
 
2681
      x.read(self._iprot)
-
 
2682
      self._iprot.readMessageEnd()
-
 
2683
      raise x
-
 
2684
    result = getTransactionsRequiringExtraProcessing_result()
-
 
2685
    result.read(self._iprot)
-
 
2686
    self._iprot.readMessageEnd()
-
 
2687
    if result.success is not None:
-
 
2688
      return result.success
-
 
2689
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsRequiringExtraProcessing failed: unknown result");
-
 
2690
 
-
 
2691
  def markTransactionAsProcessed(self, transactionId, category):
-
 
2692
    """
-
 
2693
    Marks a particular transaction as processed for a particular cateogory.
-
 
2694
    It essentially deletes the transaction if it is processed for a particular
-
 
2695
    category. This is currently used by CRM application.
-
 
2696
 
-
 
2697
    Parameters:
-
 
2698
     - transactionId
-
 
2699
     - category
-
 
2700
    """
-
 
2701
    self.send_markTransactionAsProcessed(transactionId, category)
-
 
2702
    self.recv_markTransactionAsProcessed()
-
 
2703
 
-
 
2704
  def send_markTransactionAsProcessed(self, transactionId, category):
-
 
2705
    self._oprot.writeMessageBegin('markTransactionAsProcessed', TMessageType.CALL, self._seqid)
-
 
2706
    args = markTransactionAsProcessed_args()
-
 
2707
    args.transactionId = transactionId
-
 
2708
    args.category = category
-
 
2709
    args.write(self._oprot)
-
 
2710
    self._oprot.writeMessageEnd()
-
 
2711
    self._oprot.trans.flush()
-
 
2712
 
-
 
2713
  def recv_markTransactionAsProcessed(self, ):
-
 
2714
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2715
    if mtype == TMessageType.EXCEPTION:
-
 
2716
      x = TApplicationException()
-
 
2717
      x.read(self._iprot)
-
 
2718
      self._iprot.readMessageEnd()
-
 
2719
      raise x
-
 
2720
    result = markTransactionAsProcessed_result()
-
 
2721
    result.read(self._iprot)
-
 
2722
    self._iprot.readMessageEnd()
-
 
2723
    return
-
 
2724
 
2634
 
2725
 
2635
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2726
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2636
  def __init__(self, handler):
2727
  def __init__(self, handler):
2637
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2728
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2638
    self._processMap["createTransaction"] = Processor.process_createTransaction
2729
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 2688... Line 2779...
2688
    self._processMap["updateWeight"] = Processor.process_updateWeight
2779
    self._processMap["updateWeight"] = Processor.process_updateWeight
2689
    self._processMap["changeItem"] = Processor.process_changeItem
2780
    self._processMap["changeItem"] = Processor.process_changeItem
2690
    self._processMap["shiftToWarehouse"] = Processor.process_shiftToWarehouse
2781
    self._processMap["shiftToWarehouse"] = Processor.process_shiftToWarehouse
2691
    self._processMap["addDelayReason"] = Processor.process_addDelayReason
2782
    self._processMap["addDelayReason"] = Processor.process_addDelayReason
2692
    self._processMap["reconcileCodCollection"] = Processor.process_reconcileCodCollection
2783
    self._processMap["reconcileCodCollection"] = Processor.process_reconcileCodCollection
-
 
2784
    self._processMap["getTransactionsRequiringExtraProcessing"] = Processor.process_getTransactionsRequiringExtraProcessing
-
 
2785
    self._processMap["markTransactionAsProcessed"] = Processor.process_markTransactionAsProcessed
2693
 
2786
 
2694
  def process(self, iprot, oprot):
2787
  def process(self, iprot, oprot):
2695
    (name, type, seqid) = iprot.readMessageBegin()
2788
    (name, type, seqid) = iprot.readMessageBegin()
2696
    if name not in self._processMap:
2789
    if name not in self._processMap:
2697
      iprot.skip(TType.STRUCT)
2790
      iprot.skip(TType.STRUCT)
Line 3447... Line 3540...
3447
    oprot.writeMessageBegin("reconcileCodCollection", TMessageType.REPLY, seqid)
3540
    oprot.writeMessageBegin("reconcileCodCollection", TMessageType.REPLY, seqid)
3448
    result.write(oprot)
3541
    result.write(oprot)
3449
    oprot.writeMessageEnd()
3542
    oprot.writeMessageEnd()
3450
    oprot.trans.flush()
3543
    oprot.trans.flush()
3451
 
3544
 
-
 
3545
  def process_getTransactionsRequiringExtraProcessing(self, seqid, iprot, oprot):
-
 
3546
    args = getTransactionsRequiringExtraProcessing_args()
-
 
3547
    args.read(iprot)
-
 
3548
    iprot.readMessageEnd()
-
 
3549
    result = getTransactionsRequiringExtraProcessing_result()
-
 
3550
    result.success = self._handler.getTransactionsRequiringExtraProcessing(args.category)
-
 
3551
    oprot.writeMessageBegin("getTransactionsRequiringExtraProcessing", TMessageType.REPLY, seqid)
-
 
3552
    result.write(oprot)
-
 
3553
    oprot.writeMessageEnd()
-
 
3554
    oprot.trans.flush()
-
 
3555
 
-
 
3556
  def process_markTransactionAsProcessed(self, seqid, iprot, oprot):
-
 
3557
    args = markTransactionAsProcessed_args()
-
 
3558
    args.read(iprot)
-
 
3559
    iprot.readMessageEnd()
-
 
3560
    result = markTransactionAsProcessed_result()
-
 
3561
    self._handler.markTransactionAsProcessed(args.transactionId, args.category)
-
 
3562
    oprot.writeMessageBegin("markTransactionAsProcessed", TMessageType.REPLY, seqid)
-
 
3563
    result.write(oprot)
-
 
3564
    oprot.writeMessageEnd()
-
 
3565
    oprot.trans.flush()
-
 
3566
 
3452
 
3567
 
3453
# HELPER FUNCTIONS AND STRUCTURES
3568
# HELPER FUNCTIONS AND STRUCTURES
3454
 
3569
 
3455
class createTransaction_args:
3570
class createTransaction_args:
3456
  """
3571
  """
Line 11395... Line 11510...
11395
    oprot.writeFieldStop()
11510
    oprot.writeFieldStop()
11396
    oprot.writeStructEnd()
11511
    oprot.writeStructEnd()
11397
 
11512
 
11398
  def validate(self):
11513
  def validate(self):
11399
    return
11514
    return
-
 
11515
 
-
 
11516
 
-
 
11517
  def __repr__(self):
-
 
11518
    L = ['%s=%r' % (key, value)
-
 
11519
      for key, value in self.__dict__.iteritems()]
-
 
11520
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11521
 
-
 
11522
  def __eq__(self, other):
-
 
11523
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11524
 
-
 
11525
  def __ne__(self, other):
-
 
11526
    return not (self == other)
-
 
11527
 
-
 
11528
class getTransactionsRequiringExtraProcessing_args:
-
 
11529
  """
-
 
11530
  Attributes:
-
 
11531
   - category
-
 
11532
  """
-
 
11533
 
-
 
11534
  thrift_spec = (
-
 
11535
    None, # 0
-
 
11536
    (1, TType.I32, 'category', None, None, ), # 1
-
 
11537
  )
-
 
11538
 
-
 
11539
  def __init__(self, category=None,):
-
 
11540
    self.category = category
-
 
11541
 
-
 
11542
  def read(self, iprot):
-
 
11543
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11544
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11545
      return
-
 
11546
    iprot.readStructBegin()
-
 
11547
    while True:
-
 
11548
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11549
      if ftype == TType.STOP:
-
 
11550
        break
-
 
11551
      if fid == 1:
-
 
11552
        if ftype == TType.I32:
-
 
11553
          self.category = iprot.readI32();
-
 
11554
        else:
-
 
11555
          iprot.skip(ftype)
-
 
11556
      else:
-
 
11557
        iprot.skip(ftype)
-
 
11558
      iprot.readFieldEnd()
-
 
11559
    iprot.readStructEnd()
-
 
11560
 
-
 
11561
  def write(self, oprot):
-
 
11562
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11563
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11564
      return
-
 
11565
    oprot.writeStructBegin('getTransactionsRequiringExtraProcessing_args')
-
 
11566
    if self.category is not None:
-
 
11567
      oprot.writeFieldBegin('category', TType.I32, 1)
-
 
11568
      oprot.writeI32(self.category)
-
 
11569
      oprot.writeFieldEnd()
-
 
11570
    oprot.writeFieldStop()
-
 
11571
    oprot.writeStructEnd()
-
 
11572
 
-
 
11573
  def validate(self):
-
 
11574
    return
-
 
11575
 
-
 
11576
 
-
 
11577
  def __repr__(self):
-
 
11578
    L = ['%s=%r' % (key, value)
-
 
11579
      for key, value in self.__dict__.iteritems()]
-
 
11580
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11581
 
-
 
11582
  def __eq__(self, other):
-
 
11583
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11584
 
-
 
11585
  def __ne__(self, other):
-
 
11586
    return not (self == other)
-
 
11587
 
-
 
11588
class getTransactionsRequiringExtraProcessing_result:
-
 
11589
  """
-
 
11590
  Attributes:
-
 
11591
   - success
-
 
11592
  """
-
 
11593
 
-
 
11594
  thrift_spec = (
-
 
11595
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
-
 
11596
  )
-
 
11597
 
-
 
11598
  def __init__(self, success=None,):
-
 
11599
    self.success = success
-
 
11600
 
-
 
11601
  def read(self, iprot):
-
 
11602
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11603
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11604
      return
-
 
11605
    iprot.readStructBegin()
-
 
11606
    while True:
-
 
11607
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11608
      if ftype == TType.STOP:
-
 
11609
        break
-
 
11610
      if fid == 0:
-
 
11611
        if ftype == TType.LIST:
-
 
11612
          self.success = []
-
 
11613
          (_etype213, _size210) = iprot.readListBegin()
-
 
11614
          for _i214 in xrange(_size210):
-
 
11615
            _elem215 = iprot.readI64();
-
 
11616
            self.success.append(_elem215)
-
 
11617
          iprot.readListEnd()
-
 
11618
        else:
-
 
11619
          iprot.skip(ftype)
-
 
11620
      else:
-
 
11621
        iprot.skip(ftype)
-
 
11622
      iprot.readFieldEnd()
-
 
11623
    iprot.readStructEnd()
-
 
11624
 
-
 
11625
  def write(self, oprot):
-
 
11626
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11627
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11628
      return
-
 
11629
    oprot.writeStructBegin('getTransactionsRequiringExtraProcessing_result')
-
 
11630
    if self.success is not None:
-
 
11631
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
11632
      oprot.writeListBegin(TType.I64, len(self.success))
-
 
11633
      for iter216 in self.success:
-
 
11634
        oprot.writeI64(iter216)
-
 
11635
      oprot.writeListEnd()
-
 
11636
      oprot.writeFieldEnd()
-
 
11637
    oprot.writeFieldStop()
-
 
11638
    oprot.writeStructEnd()
-
 
11639
 
-
 
11640
  def validate(self):
-
 
11641
    return
-
 
11642
 
-
 
11643
 
-
 
11644
  def __repr__(self):
-
 
11645
    L = ['%s=%r' % (key, value)
-
 
11646
      for key, value in self.__dict__.iteritems()]
-
 
11647
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11648
 
-
 
11649
  def __eq__(self, other):
-
 
11650
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11651
 
-
 
11652
  def __ne__(self, other):
-
 
11653
    return not (self == other)
-
 
11654
 
-
 
11655
class markTransactionAsProcessed_args:
-
 
11656
  """
-
 
11657
  Attributes:
-
 
11658
   - transactionId
-
 
11659
   - category
-
 
11660
  """
-
 
11661
 
-
 
11662
  thrift_spec = (
-
 
11663
    None, # 0
-
 
11664
    (1, TType.I64, 'transactionId', None, None, ), # 1
-
 
11665
    (2, TType.I32, 'category', None, None, ), # 2
-
 
11666
  )
-
 
11667
 
-
 
11668
  def __init__(self, transactionId=None, category=None,):
-
 
11669
    self.transactionId = transactionId
-
 
11670
    self.category = category
-
 
11671
 
-
 
11672
  def read(self, iprot):
-
 
11673
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11674
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11675
      return
-
 
11676
    iprot.readStructBegin()
-
 
11677
    while True:
-
 
11678
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11679
      if ftype == TType.STOP:
-
 
11680
        break
-
 
11681
      if fid == 1:
-
 
11682
        if ftype == TType.I64:
-
 
11683
          self.transactionId = iprot.readI64();
-
 
11684
        else:
-
 
11685
          iprot.skip(ftype)
-
 
11686
      elif fid == 2:
-
 
11687
        if ftype == TType.I32:
-
 
11688
          self.category = iprot.readI32();
-
 
11689
        else:
-
 
11690
          iprot.skip(ftype)
-
 
11691
      else:
-
 
11692
        iprot.skip(ftype)
-
 
11693
      iprot.readFieldEnd()
-
 
11694
    iprot.readStructEnd()
-
 
11695
 
-
 
11696
  def write(self, oprot):
-
 
11697
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11698
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11699
      return
-
 
11700
    oprot.writeStructBegin('markTransactionAsProcessed_args')
-
 
11701
    if self.transactionId is not None:
-
 
11702
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
-
 
11703
      oprot.writeI64(self.transactionId)
-
 
11704
      oprot.writeFieldEnd()
-
 
11705
    if self.category is not None:
-
 
11706
      oprot.writeFieldBegin('category', TType.I32, 2)
-
 
11707
      oprot.writeI32(self.category)
-
 
11708
      oprot.writeFieldEnd()
-
 
11709
    oprot.writeFieldStop()
-
 
11710
    oprot.writeStructEnd()
-
 
11711
 
-
 
11712
  def validate(self):
-
 
11713
    return
-
 
11714
 
-
 
11715
 
-
 
11716
  def __repr__(self):
-
 
11717
    L = ['%s=%r' % (key, value)
-
 
11718
      for key, value in self.__dict__.iteritems()]
-
 
11719
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
11720
 
-
 
11721
  def __eq__(self, other):
-
 
11722
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
11723
 
-
 
11724
  def __ne__(self, other):
-
 
11725
    return not (self == other)
-
 
11726
 
-
 
11727
class markTransactionAsProcessed_result:
-
 
11728
 
-
 
11729
  thrift_spec = (
-
 
11730
  )
-
 
11731
 
-
 
11732
  def read(self, iprot):
-
 
11733
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
11734
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
11735
      return
-
 
11736
    iprot.readStructBegin()
-
 
11737
    while True:
-
 
11738
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
11739
      if ftype == TType.STOP:
-
 
11740
        break
-
 
11741
      else:
-
 
11742
        iprot.skip(ftype)
-
 
11743
      iprot.readFieldEnd()
-
 
11744
    iprot.readStructEnd()
-
 
11745
 
-
 
11746
  def write(self, oprot):
-
 
11747
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
11748
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
11749
      return
-
 
11750
    oprot.writeStructBegin('markTransactionAsProcessed_result')
-
 
11751
    oprot.writeFieldStop()
-
 
11752
    oprot.writeStructEnd()
-
 
11753
 
-
 
11754
  def validate(self):
-
 
11755
    return
11400
 
11756
 
11401
 
11757
 
11402
  def __repr__(self):
11758
  def __repr__(self):
11403
    L = ['%s=%r' % (key, value)
11759
    L = ['%s=%r' % (key, value)
11404
      for key, value in self.__dict__.iteritems()]
11760
      for key, value in self.__dict__.iteritems()]