Subversion Repositories SmartDukaan

Rev

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

Rev 13691 Rev 13941
Line 1406... Line 1406...
1406
     - orderId
1406
     - orderId
1407
     - amount
1407
     - amount
1408
    """
1408
    """
1409
    pass
1409
    pass
1410
 
1410
 
-
 
1411
  def creditBatch(self, batchId, userAmount):
-
 
1412
    """
-
 
1413
    Parameters:
-
 
1414
     - batchId
-
 
1415
     - userAmount
-
 
1416
    """
-
 
1417
    pass
-
 
1418
 
1411
  def getRechargeStatistics(self, ):
1419
  def getRechargeStatistics(self, ):
1412
    pass
1420
    pass
1413
 
1421
 
1414
  def getRechargeOrdersForStatus(self, status):
1422
  def getRechargeOrdersForStatus(self, status):
1415
    """
1423
    """
Line 7125... Line 7133...
7125
    result = addAmountToWallet_result()
7133
    result = addAmountToWallet_result()
7126
    result.read(self._iprot)
7134
    result.read(self._iprot)
7127
    self._iprot.readMessageEnd()
7135
    self._iprot.readMessageEnd()
7128
    return
7136
    return
7129
 
7137
 
-
 
7138
  def creditBatch(self, batchId, userAmount):
-
 
7139
    """
-
 
7140
    Parameters:
-
 
7141
     - batchId
-
 
7142
     - userAmount
-
 
7143
    """
-
 
7144
    self.send_creditBatch(batchId, userAmount)
-
 
7145
    self.recv_creditBatch()
-
 
7146
 
-
 
7147
  def send_creditBatch(self, batchId, userAmount):
-
 
7148
    self._oprot.writeMessageBegin('creditBatch', TMessageType.CALL, self._seqid)
-
 
7149
    args = creditBatch_args()
-
 
7150
    args.batchId = batchId
-
 
7151
    args.userAmount = userAmount
-
 
7152
    args.write(self._oprot)
-
 
7153
    self._oprot.writeMessageEnd()
-
 
7154
    self._oprot.trans.flush()
-
 
7155
 
-
 
7156
  def recv_creditBatch(self, ):
-
 
7157
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7158
    if mtype == TMessageType.EXCEPTION:
-
 
7159
      x = TApplicationException()
-
 
7160
      x.read(self._iprot)
-
 
7161
      self._iprot.readMessageEnd()
-
 
7162
      raise x
-
 
7163
    result = creditBatch_result()
-
 
7164
    result.read(self._iprot)
-
 
7165
    self._iprot.readMessageEnd()
-
 
7166
    return
-
 
7167
 
7130
  def getRechargeStatistics(self, ):
7168
  def getRechargeStatistics(self, ):
7131
    self.send_getRechargeStatistics()
7169
    self.send_getRechargeStatistics()
7132
    return self.recv_getRechargeStatistics()
7170
    return self.recv_getRechargeStatistics()
7133
 
7171
 
7134
  def send_getRechargeStatistics(self, ):
7172
  def send_getRechargeStatistics(self, ):
Line 10616... Line 10654...
10616
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
10654
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
10617
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
10655
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
10618
    self._processMap["validateRecharge"] = Processor.process_validateRecharge
10656
    self._processMap["validateRecharge"] = Processor.process_validateRecharge
10619
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
10657
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
10620
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
10658
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
-
 
10659
    self._processMap["creditBatch"] = Processor.process_creditBatch
10621
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
10660
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
10622
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
10661
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
10623
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
10662
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
10624
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
10663
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
10625
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
10664
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
Line 12581... Line 12620...
12581
    oprot.writeMessageBegin("addAmountToWallet", TMessageType.REPLY, seqid)
12620
    oprot.writeMessageBegin("addAmountToWallet", TMessageType.REPLY, seqid)
12582
    result.write(oprot)
12621
    result.write(oprot)
12583
    oprot.writeMessageEnd()
12622
    oprot.writeMessageEnd()
12584
    oprot.trans.flush()
12623
    oprot.trans.flush()
12585
 
12624
 
-
 
12625
  def process_creditBatch(self, seqid, iprot, oprot):
-
 
12626
    args = creditBatch_args()
-
 
12627
    args.read(iprot)
-
 
12628
    iprot.readMessageEnd()
-
 
12629
    result = creditBatch_result()
-
 
12630
    self._handler.creditBatch(args.batchId, args.userAmount)
-
 
12631
    oprot.writeMessageBegin("creditBatch", TMessageType.REPLY, seqid)
-
 
12632
    result.write(oprot)
-
 
12633
    oprot.writeMessageEnd()
-
 
12634
    oprot.trans.flush()
-
 
12635
 
12586
  def process_getRechargeStatistics(self, seqid, iprot, oprot):
12636
  def process_getRechargeStatistics(self, seqid, iprot, oprot):
12587
    args = getRechargeStatistics_args()
12637
    args = getRechargeStatistics_args()
12588
    args.read(iprot)
12638
    args.read(iprot)
12589
    iprot.readMessageEnd()
12639
    iprot.readMessageEnd()
12590
    result = getRechargeStatistics_result()
12640
    result = getRechargeStatistics_result()
Line 33893... Line 33943...
33893
    oprot.writeFieldStop()
33943
    oprot.writeFieldStop()
33894
    oprot.writeStructEnd()
33944
    oprot.writeStructEnd()
33895
 
33945
 
33896
  def validate(self):
33946
  def validate(self):
33897
    return
33947
    return
-
 
33948
 
-
 
33949
 
-
 
33950
  def __repr__(self):
-
 
33951
    L = ['%s=%r' % (key, value)
-
 
33952
      for key, value in self.__dict__.iteritems()]
-
 
33953
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33954
 
-
 
33955
  def __eq__(self, other):
-
 
33956
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33957
 
-
 
33958
  def __ne__(self, other):
-
 
33959
    return not (self == other)
-
 
33960
 
-
 
33961
class creditBatch_args:
-
 
33962
  """
-
 
33963
  Attributes:
-
 
33964
   - batchId
-
 
33965
   - userAmount
-
 
33966
  """
-
 
33967
 
-
 
33968
  thrift_spec = (
-
 
33969
    None, # 0
-
 
33970
    (1, TType.I64, 'batchId', None, None, ), # 1
-
 
33971
    (2, TType.STRING, 'userAmount', None, None, ), # 2
-
 
33972
  )
-
 
33973
 
-
 
33974
  def __init__(self, batchId=None, userAmount=None,):
-
 
33975
    self.batchId = batchId
-
 
33976
    self.userAmount = userAmount
-
 
33977
 
-
 
33978
  def read(self, iprot):
-
 
33979
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33980
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33981
      return
-
 
33982
    iprot.readStructBegin()
-
 
33983
    while True:
-
 
33984
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33985
      if ftype == TType.STOP:
-
 
33986
        break
-
 
33987
      if fid == 1:
-
 
33988
        if ftype == TType.I64:
-
 
33989
          self.batchId = iprot.readI64();
-
 
33990
        else:
-
 
33991
          iprot.skip(ftype)
-
 
33992
      elif fid == 2:
-
 
33993
        if ftype == TType.STRING:
-
 
33994
          self.userAmount = iprot.readString();
-
 
33995
        else:
-
 
33996
          iprot.skip(ftype)
-
 
33997
      else:
-
 
33998
        iprot.skip(ftype)
-
 
33999
      iprot.readFieldEnd()
-
 
34000
    iprot.readStructEnd()
-
 
34001
 
-
 
34002
  def write(self, oprot):
-
 
34003
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34004
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34005
      return
-
 
34006
    oprot.writeStructBegin('creditBatch_args')
-
 
34007
    if self.batchId is not None:
-
 
34008
      oprot.writeFieldBegin('batchId', TType.I64, 1)
-
 
34009
      oprot.writeI64(self.batchId)
-
 
34010
      oprot.writeFieldEnd()
-
 
34011
    if self.userAmount is not None:
-
 
34012
      oprot.writeFieldBegin('userAmount', TType.STRING, 2)
-
 
34013
      oprot.writeString(self.userAmount)
-
 
34014
      oprot.writeFieldEnd()
-
 
34015
    oprot.writeFieldStop()
-
 
34016
    oprot.writeStructEnd()
-
 
34017
 
-
 
34018
  def validate(self):
-
 
34019
    return
-
 
34020
 
-
 
34021
 
-
 
34022
  def __repr__(self):
-
 
34023
    L = ['%s=%r' % (key, value)
-
 
34024
      for key, value in self.__dict__.iteritems()]
-
 
34025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34026
 
-
 
34027
  def __eq__(self, other):
-
 
34028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34029
 
-
 
34030
  def __ne__(self, other):
-
 
34031
    return not (self == other)
-
 
34032
 
-
 
34033
class creditBatch_result:
-
 
34034
 
-
 
34035
  thrift_spec = (
-
 
34036
  )
-
 
34037
 
-
 
34038
  def read(self, iprot):
-
 
34039
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34040
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34041
      return
-
 
34042
    iprot.readStructBegin()
-
 
34043
    while True:
-
 
34044
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34045
      if ftype == TType.STOP:
-
 
34046
        break
-
 
34047
      else:
-
 
34048
        iprot.skip(ftype)
-
 
34049
      iprot.readFieldEnd()
-
 
34050
    iprot.readStructEnd()
-
 
34051
 
-
 
34052
  def write(self, oprot):
-
 
34053
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34054
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34055
      return
-
 
34056
    oprot.writeStructBegin('creditBatch_result')
-
 
34057
    oprot.writeFieldStop()
-
 
34058
    oprot.writeStructEnd()
-
 
34059
 
-
 
34060
  def validate(self):
-
 
34061
    return
33898
 
34062
 
33899
 
34063
 
33900
  def __repr__(self):
34064
  def __repr__(self):
33901
    L = ['%s=%r' % (key, value)
34065
    L = ['%s=%r' % (key, value)
33902
      for key, value in self.__dict__.iteritems()]
34066
      for key, value in self.__dict__.iteritems()]