Subversion Repositories SmartDukaan

Rev

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

Rev 6756 Rev 6821
Line 1442... Line 1442...
1442
    Parameters:
1442
    Parameters:
1443
     - rechargeOrderId
1443
     - rechargeOrderId
1444
    """
1444
    """
1445
    pass
1445
    pass
1446
 
1446
 
-
 
1447
  def getPhysicalOrders(self, fromDate, toDate):
-
 
1448
    """
-
 
1449
    Parameters:
-
 
1450
     - fromDate
-
 
1451
     - toDate
-
 
1452
    """
-
 
1453
    pass
-
 
1454
 
1447
 
1455
 
1448
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1456
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1449
  def __init__(self, iprot, oprot=None):
1457
  def __init__(self, iprot, oprot=None):
1450
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1458
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1451
 
1459
 
Line 6544... Line 6552...
6544
      return result.success
6552
      return result.success
6545
    if result.ex is not None:
6553
    if result.ex is not None:
6546
      raise result.ex
6554
      raise result.ex
6547
    raise TApplicationException(TApplicationException.MISSING_RESULT, "refundRechargeOrder failed: unknown result");
6555
    raise TApplicationException(TApplicationException.MISSING_RESULT, "refundRechargeOrder failed: unknown result");
6548
 
6556
 
-
 
6557
  def getPhysicalOrders(self, fromDate, toDate):
-
 
6558
    """
-
 
6559
    Parameters:
-
 
6560
     - fromDate
-
 
6561
     - toDate
-
 
6562
    """
-
 
6563
    self.send_getPhysicalOrders(fromDate, toDate)
-
 
6564
    return self.recv_getPhysicalOrders()
-
 
6565
 
-
 
6566
  def send_getPhysicalOrders(self, fromDate, toDate):
-
 
6567
    self._oprot.writeMessageBegin('getPhysicalOrders', TMessageType.CALL, self._seqid)
-
 
6568
    args = getPhysicalOrders_args()
-
 
6569
    args.fromDate = fromDate
-
 
6570
    args.toDate = toDate
-
 
6571
    args.write(self._oprot)
-
 
6572
    self._oprot.writeMessageEnd()
-
 
6573
    self._oprot.trans.flush()
-
 
6574
 
-
 
6575
  def recv_getPhysicalOrders(self, ):
-
 
6576
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6577
    if mtype == TMessageType.EXCEPTION:
-
 
6578
      x = TApplicationException()
-
 
6579
      x.read(self._iprot)
-
 
6580
      self._iprot.readMessageEnd()
-
 
6581
      raise x
-
 
6582
    result = getPhysicalOrders_result()
-
 
6583
    result.read(self._iprot)
-
 
6584
    self._iprot.readMessageEnd()
-
 
6585
    if result.success is not None:
-
 
6586
      return result.success
-
 
6587
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPhysicalOrders failed: unknown result");
-
 
6588
 
6549
 
6589
 
6550
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6590
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6551
  def __init__(self, handler):
6591
  def __init__(self, handler):
6552
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6592
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6553
    self._processMap["createTransaction"] = Processor.process_createTransaction
6593
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6696... Line 6736...
6696
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
6736
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
6697
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
6737
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
6698
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
6738
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
6699
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6739
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6700
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6740
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
-
 
6741
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6701
 
6742
 
6702
  def process(self, iprot, oprot):
6743
  def process(self, iprot, oprot):
6703
    (name, type, seqid) = iprot.readMessageBegin()
6744
    (name, type, seqid) = iprot.readMessageBegin()
6704
    if name not in self._processMap:
6745
    if name not in self._processMap:
6705
      iprot.skip(TType.STRUCT)
6746
      iprot.skip(TType.STRUCT)
Line 8634... Line 8675...
8634
    oprot.writeMessageBegin("refundRechargeOrder", TMessageType.REPLY, seqid)
8675
    oprot.writeMessageBegin("refundRechargeOrder", TMessageType.REPLY, seqid)
8635
    result.write(oprot)
8676
    result.write(oprot)
8636
    oprot.writeMessageEnd()
8677
    oprot.writeMessageEnd()
8637
    oprot.trans.flush()
8678
    oprot.trans.flush()
8638
 
8679
 
-
 
8680
  def process_getPhysicalOrders(self, seqid, iprot, oprot):
-
 
8681
    args = getPhysicalOrders_args()
-
 
8682
    args.read(iprot)
-
 
8683
    iprot.readMessageEnd()
-
 
8684
    result = getPhysicalOrders_result()
-
 
8685
    result.success = self._handler.getPhysicalOrders(args.fromDate, args.toDate)
-
 
8686
    oprot.writeMessageBegin("getPhysicalOrders", TMessageType.REPLY, seqid)
-
 
8687
    result.write(oprot)
-
 
8688
    oprot.writeMessageEnd()
-
 
8689
    oprot.trans.flush()
-
 
8690
 
8639
 
8691
 
8640
# HELPER FUNCTIONS AND STRUCTURES
8692
# HELPER FUNCTIONS AND STRUCTURES
8641
 
8693
 
8642
class createTransaction_args:
8694
class createTransaction_args:
8643
  """
8695
  """
Line 29455... Line 29507...
29455
      oprot.writeFieldEnd()
29507
      oprot.writeFieldEnd()
29456
    oprot.writeFieldStop()
29508
    oprot.writeFieldStop()
29457
    oprot.writeStructEnd()
29509
    oprot.writeStructEnd()
29458
 
29510
 
29459
  def validate(self):
29511
  def validate(self):
-
 
29512
    return
-
 
29513
 
-
 
29514
 
-
 
29515
  def __repr__(self):
-
 
29516
    L = ['%s=%r' % (key, value)
-
 
29517
      for key, value in self.__dict__.iteritems()]
-
 
29518
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29519
 
-
 
29520
  def __eq__(self, other):
-
 
29521
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29522
 
-
 
29523
  def __ne__(self, other):
-
 
29524
    return not (self == other)
-
 
29525
 
-
 
29526
class getPhysicalOrders_args:
-
 
29527
  """
-
 
29528
  Attributes:
-
 
29529
   - fromDate
-
 
29530
   - toDate
-
 
29531
  """
-
 
29532
 
-
 
29533
  thrift_spec = (
-
 
29534
    None, # 0
-
 
29535
    (1, TType.I64, 'fromDate', None, None, ), # 1
-
 
29536
    (2, TType.I64, 'toDate', None, None, ), # 2
-
 
29537
  )
-
 
29538
 
-
 
29539
  def __init__(self, fromDate=None, toDate=None,):
-
 
29540
    self.fromDate = fromDate
-
 
29541
    self.toDate = toDate
-
 
29542
 
-
 
29543
  def read(self, iprot):
-
 
29544
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29545
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29546
      return
-
 
29547
    iprot.readStructBegin()
-
 
29548
    while True:
-
 
29549
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29550
      if ftype == TType.STOP:
-
 
29551
        break
-
 
29552
      if fid == 1:
-
 
29553
        if ftype == TType.I64:
-
 
29554
          self.fromDate = iprot.readI64();
-
 
29555
        else:
-
 
29556
          iprot.skip(ftype)
-
 
29557
      elif fid == 2:
-
 
29558
        if ftype == TType.I64:
-
 
29559
          self.toDate = iprot.readI64();
-
 
29560
        else:
-
 
29561
          iprot.skip(ftype)
-
 
29562
      else:
-
 
29563
        iprot.skip(ftype)
-
 
29564
      iprot.readFieldEnd()
-
 
29565
    iprot.readStructEnd()
-
 
29566
 
-
 
29567
  def write(self, oprot):
-
 
29568
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29569
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29570
      return
-
 
29571
    oprot.writeStructBegin('getPhysicalOrders_args')
-
 
29572
    if self.fromDate is not None:
-
 
29573
      oprot.writeFieldBegin('fromDate', TType.I64, 1)
-
 
29574
      oprot.writeI64(self.fromDate)
-
 
29575
      oprot.writeFieldEnd()
-
 
29576
    if self.toDate is not None:
-
 
29577
      oprot.writeFieldBegin('toDate', TType.I64, 2)
-
 
29578
      oprot.writeI64(self.toDate)
-
 
29579
      oprot.writeFieldEnd()
-
 
29580
    oprot.writeFieldStop()
-
 
29581
    oprot.writeStructEnd()
-
 
29582
 
-
 
29583
  def validate(self):
-
 
29584
    return
-
 
29585
 
-
 
29586
 
-
 
29587
  def __repr__(self):
-
 
29588
    L = ['%s=%r' % (key, value)
-
 
29589
      for key, value in self.__dict__.iteritems()]
-
 
29590
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29591
 
-
 
29592
  def __eq__(self, other):
-
 
29593
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29594
 
-
 
29595
  def __ne__(self, other):
-
 
29596
    return not (self == other)
-
 
29597
 
-
 
29598
class getPhysicalOrders_result:
-
 
29599
  """
-
 
29600
  Attributes:
-
 
29601
   - success
-
 
29602
  """
-
 
29603
 
-
 
29604
  thrift_spec = (
-
 
29605
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
-
 
29606
  )
-
 
29607
 
-
 
29608
  def __init__(self, success=None,):
-
 
29609
    self.success = success
-
 
29610
 
-
 
29611
  def read(self, iprot):
-
 
29612
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29613
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29614
      return
-
 
29615
    iprot.readStructBegin()
-
 
29616
    while True:
-
 
29617
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29618
      if ftype == TType.STOP:
-
 
29619
        break
-
 
29620
      if fid == 0:
-
 
29621
        if ftype == TType.LIST:
-
 
29622
          self.success = []
-
 
29623
          (_etype726, _size723) = iprot.readListBegin()
-
 
29624
          for _i727 in xrange(_size723):
-
 
29625
            _elem728 = Order()
-
 
29626
            _elem728.read(iprot)
-
 
29627
            self.success.append(_elem728)
-
 
29628
          iprot.readListEnd()
-
 
29629
        else:
-
 
29630
          iprot.skip(ftype)
-
 
29631
      else:
-
 
29632
        iprot.skip(ftype)
-
 
29633
      iprot.readFieldEnd()
-
 
29634
    iprot.readStructEnd()
-
 
29635
 
-
 
29636
  def write(self, oprot):
-
 
29637
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29638
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29639
      return
-
 
29640
    oprot.writeStructBegin('getPhysicalOrders_result')
-
 
29641
    if self.success is not None:
-
 
29642
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
29643
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
29644
      for iter729 in self.success:
-
 
29645
        iter729.write(oprot)
-
 
29646
      oprot.writeListEnd()
-
 
29647
      oprot.writeFieldEnd()
-
 
29648
    oprot.writeFieldStop()
-
 
29649
    oprot.writeStructEnd()
-
 
29650
 
-
 
29651
  def validate(self):
29460
    return
29652
    return
29461
 
29653
 
29462
 
29654
 
29463
  def __repr__(self):
29655
  def __repr__(self):
29464
    L = ['%s=%r' % (key, value)
29656
    L = ['%s=%r' % (key, value)