Subversion Repositories SmartDukaan

Rev

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

Rev 6821 Rev 6906
Line 1450... Line 1450...
1450
     - fromDate
1450
     - fromDate
1451
     - toDate
1451
     - toDate
1452
    """
1452
    """
1453
    pass
1453
    pass
1454
 
1454
 
-
 
1455
  def getDocument(self, docType, docSource):
-
 
1456
    """
-
 
1457
    Parameters:
-
 
1458
     - docType
-
 
1459
     - docSource
-
 
1460
    """
-
 
1461
    pass
-
 
1462
 
1455
 
1463
 
1456
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1464
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1457
  def __init__(self, iprot, oprot=None):
1465
  def __init__(self, iprot, oprot=None):
1458
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1466
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1459
 
1467
 
Line 6584... Line 6592...
6584
    self._iprot.readMessageEnd()
6592
    self._iprot.readMessageEnd()
6585
    if result.success is not None:
6593
    if result.success is not None:
6586
      return result.success
6594
      return result.success
6587
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPhysicalOrders failed: unknown result");
6595
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPhysicalOrders failed: unknown result");
6588
 
6596
 
-
 
6597
  def getDocument(self, docType, docSource):
-
 
6598
    """
-
 
6599
    Parameters:
-
 
6600
     - docType
-
 
6601
     - docSource
-
 
6602
    """
-
 
6603
    self.send_getDocument(docType, docSource)
-
 
6604
    return self.recv_getDocument()
-
 
6605
 
-
 
6606
  def send_getDocument(self, docType, docSource):
-
 
6607
    self._oprot.writeMessageBegin('getDocument', TMessageType.CALL, self._seqid)
-
 
6608
    args = getDocument_args()
-
 
6609
    args.docType = docType
-
 
6610
    args.docSource = docSource
-
 
6611
    args.write(self._oprot)
-
 
6612
    self._oprot.writeMessageEnd()
-
 
6613
    self._oprot.trans.flush()
-
 
6614
 
-
 
6615
  def recv_getDocument(self, ):
-
 
6616
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6617
    if mtype == TMessageType.EXCEPTION:
-
 
6618
      x = TApplicationException()
-
 
6619
      x.read(self._iprot)
-
 
6620
      self._iprot.readMessageEnd()
-
 
6621
      raise x
-
 
6622
    result = getDocument_result()
-
 
6623
    result.read(self._iprot)
-
 
6624
    self._iprot.readMessageEnd()
-
 
6625
    if result.success is not None:
-
 
6626
      return result.success
-
 
6627
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDocument failed: unknown result");
-
 
6628
 
6589
 
6629
 
6590
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6630
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6591
  def __init__(self, handler):
6631
  def __init__(self, handler):
6592
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6632
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6593
    self._processMap["createTransaction"] = Processor.process_createTransaction
6633
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6737... Line 6777...
6737
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
6777
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
6738
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
6778
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
6739
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6779
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6740
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6780
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6741
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6781
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
-
 
6782
    self._processMap["getDocument"] = Processor.process_getDocument
6742
 
6783
 
6743
  def process(self, iprot, oprot):
6784
  def process(self, iprot, oprot):
6744
    (name, type, seqid) = iprot.readMessageBegin()
6785
    (name, type, seqid) = iprot.readMessageBegin()
6745
    if name not in self._processMap:
6786
    if name not in self._processMap:
6746
      iprot.skip(TType.STRUCT)
6787
      iprot.skip(TType.STRUCT)
Line 8686... Line 8727...
8686
    oprot.writeMessageBegin("getPhysicalOrders", TMessageType.REPLY, seqid)
8727
    oprot.writeMessageBegin("getPhysicalOrders", TMessageType.REPLY, seqid)
8687
    result.write(oprot)
8728
    result.write(oprot)
8688
    oprot.writeMessageEnd()
8729
    oprot.writeMessageEnd()
8689
    oprot.trans.flush()
8730
    oprot.trans.flush()
8690
 
8731
 
-
 
8732
  def process_getDocument(self, seqid, iprot, oprot):
-
 
8733
    args = getDocument_args()
-
 
8734
    args.read(iprot)
-
 
8735
    iprot.readMessageEnd()
-
 
8736
    result = getDocument_result()
-
 
8737
    result.success = self._handler.getDocument(args.docType, args.docSource)
-
 
8738
    oprot.writeMessageBegin("getDocument", TMessageType.REPLY, seqid)
-
 
8739
    result.write(oprot)
-
 
8740
    oprot.writeMessageEnd()
-
 
8741
    oprot.trans.flush()
-
 
8742
 
8691
 
8743
 
8692
# HELPER FUNCTIONS AND STRUCTURES
8744
# HELPER FUNCTIONS AND STRUCTURES
8693
 
8745
 
8694
class createTransaction_args:
8746
class createTransaction_args:
8695
  """
8747
  """
Line 29647... Line 29699...
29647
      oprot.writeFieldEnd()
29699
      oprot.writeFieldEnd()
29648
    oprot.writeFieldStop()
29700
    oprot.writeFieldStop()
29649
    oprot.writeStructEnd()
29701
    oprot.writeStructEnd()
29650
 
29702
 
29651
  def validate(self):
29703
  def validate(self):
-
 
29704
    return
-
 
29705
 
-
 
29706
 
-
 
29707
  def __repr__(self):
-
 
29708
    L = ['%s=%r' % (key, value)
-
 
29709
      for key, value in self.__dict__.iteritems()]
-
 
29710
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29711
 
-
 
29712
  def __eq__(self, other):
-
 
29713
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29714
 
-
 
29715
  def __ne__(self, other):
-
 
29716
    return not (self == other)
-
 
29717
 
-
 
29718
class getDocument_args:
-
 
29719
  """
-
 
29720
  Attributes:
-
 
29721
   - docType
-
 
29722
   - docSource
-
 
29723
  """
-
 
29724
 
-
 
29725
  thrift_spec = (
-
 
29726
    None, # 0
-
 
29727
    (1, TType.I64, 'docType', None, None, ), # 1
-
 
29728
    (2, TType.I64, 'docSource', None, None, ), # 2
-
 
29729
  )
-
 
29730
 
-
 
29731
  def __init__(self, docType=None, docSource=None,):
-
 
29732
    self.docType = docType
-
 
29733
    self.docSource = docSource
-
 
29734
 
-
 
29735
  def read(self, iprot):
-
 
29736
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29737
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29738
      return
-
 
29739
    iprot.readStructBegin()
-
 
29740
    while True:
-
 
29741
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29742
      if ftype == TType.STOP:
-
 
29743
        break
-
 
29744
      if fid == 1:
-
 
29745
        if ftype == TType.I64:
-
 
29746
          self.docType = iprot.readI64();
-
 
29747
        else:
-
 
29748
          iprot.skip(ftype)
-
 
29749
      elif fid == 2:
-
 
29750
        if ftype == TType.I64:
-
 
29751
          self.docSource = iprot.readI64();
-
 
29752
        else:
-
 
29753
          iprot.skip(ftype)
-
 
29754
      else:
-
 
29755
        iprot.skip(ftype)
-
 
29756
      iprot.readFieldEnd()
-
 
29757
    iprot.readStructEnd()
-
 
29758
 
-
 
29759
  def write(self, oprot):
-
 
29760
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29761
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29762
      return
-
 
29763
    oprot.writeStructBegin('getDocument_args')
-
 
29764
    if self.docType is not None:
-
 
29765
      oprot.writeFieldBegin('docType', TType.I64, 1)
-
 
29766
      oprot.writeI64(self.docType)
-
 
29767
      oprot.writeFieldEnd()
-
 
29768
    if self.docSource is not None:
-
 
29769
      oprot.writeFieldBegin('docSource', TType.I64, 2)
-
 
29770
      oprot.writeI64(self.docSource)
-
 
29771
      oprot.writeFieldEnd()
-
 
29772
    oprot.writeFieldStop()
-
 
29773
    oprot.writeStructEnd()
-
 
29774
 
-
 
29775
  def validate(self):
-
 
29776
    return
-
 
29777
 
-
 
29778
 
-
 
29779
  def __repr__(self):
-
 
29780
    L = ['%s=%r' % (key, value)
-
 
29781
      for key, value in self.__dict__.iteritems()]
-
 
29782
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29783
 
-
 
29784
  def __eq__(self, other):
-
 
29785
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29786
 
-
 
29787
  def __ne__(self, other):
-
 
29788
    return not (self == other)
-
 
29789
 
-
 
29790
class getDocument_result:
-
 
29791
  """
-
 
29792
  Attributes:
-
 
29793
   - success
-
 
29794
  """
-
 
29795
 
-
 
29796
  thrift_spec = (
-
 
29797
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
29798
  )
-
 
29799
 
-
 
29800
  def __init__(self, success=None,):
-
 
29801
    self.success = success
-
 
29802
 
-
 
29803
  def read(self, iprot):
-
 
29804
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29805
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29806
      return
-
 
29807
    iprot.readStructBegin()
-
 
29808
    while True:
-
 
29809
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29810
      if ftype == TType.STOP:
-
 
29811
        break
-
 
29812
      if fid == 0:
-
 
29813
        if ftype == TType.STRING:
-
 
29814
          self.success = iprot.readString();
-
 
29815
        else:
-
 
29816
          iprot.skip(ftype)
-
 
29817
      else:
-
 
29818
        iprot.skip(ftype)
-
 
29819
      iprot.readFieldEnd()
-
 
29820
    iprot.readStructEnd()
-
 
29821
 
-
 
29822
  def write(self, oprot):
-
 
29823
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29824
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29825
      return
-
 
29826
    oprot.writeStructBegin('getDocument_result')
-
 
29827
    if self.success is not None:
-
 
29828
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
29829
      oprot.writeString(self.success)
-
 
29830
      oprot.writeFieldEnd()
-
 
29831
    oprot.writeFieldStop()
-
 
29832
    oprot.writeStructEnd()
-
 
29833
 
-
 
29834
  def validate(self):
29652
    return
29835
    return
29653
 
29836
 
29654
 
29837
 
29655
  def __repr__(self):
29838
  def __repr__(self):
29656
    L = ['%s=%r' % (key, value)
29839
    L = ['%s=%r' % (key, value)