Subversion Repositories SmartDukaan

Rev

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

Rev 20873 Rev 20931
Line 1404... Line 1404...
1404
    Parameters:
1404
    Parameters:
1405
     - deviceNumber
1405
     - deviceNumber
1406
    """
1406
    """
1407
    pass
1407
    pass
1408
 
1408
 
1409
  def addAmountToWallet(self, userId, orderId, amount):
-
 
1410
    """
-
 
1411
    Parameters:
-
 
1412
     - userId
-
 
1413
     - orderId
-
 
1414
     - amount
-
 
1415
    """
-
 
1416
    pass
-
 
1417
 
-
 
1418
  def creditBatch(self, batchId, userAmount):
1409
  def creditBatch(self, batchId, userAmount):
1419
    """
1410
    """
1420
    Parameters:
1411
    Parameters:
1421
     - batchId
1412
     - batchId
1422
     - userAmount
1413
     - userAmount
Line 7622... Line 7613...
7622
    self._iprot.readMessageEnd()
7613
    self._iprot.readMessageEnd()
7623
    if result.success is not None:
7614
    if result.success is not None:
7624
      return result.success
7615
      return result.success
7625
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeOrdersForDevice failed: unknown result");
7616
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeOrdersForDevice failed: unknown result");
7626
 
7617
 
7627
  def addAmountToWallet(self, userId, orderId, amount):
-
 
7628
    """
-
 
7629
    Parameters:
-
 
7630
     - userId
-
 
7631
     - orderId
-
 
7632
     - amount
-
 
7633
    """
-
 
7634
    self.send_addAmountToWallet(userId, orderId, amount)
-
 
7635
    self.recv_addAmountToWallet()
-
 
7636
 
-
 
7637
  def send_addAmountToWallet(self, userId, orderId, amount):
-
 
7638
    self._oprot.writeMessageBegin('addAmountToWallet', TMessageType.CALL, self._seqid)
-
 
7639
    args = addAmountToWallet_args()
-
 
7640
    args.userId = userId
-
 
7641
    args.orderId = orderId
-
 
7642
    args.amount = amount
-
 
7643
    args.write(self._oprot)
-
 
7644
    self._oprot.writeMessageEnd()
-
 
7645
    self._oprot.trans.flush()
-
 
7646
 
-
 
7647
  def recv_addAmountToWallet(self, ):
-
 
7648
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7649
    if mtype == TMessageType.EXCEPTION:
-
 
7650
      x = TApplicationException()
-
 
7651
      x.read(self._iprot)
-
 
7652
      self._iprot.readMessageEnd()
-
 
7653
      raise x
-
 
7654
    result = addAmountToWallet_result()
-
 
7655
    result.read(self._iprot)
-
 
7656
    self._iprot.readMessageEnd()
-
 
7657
    return
-
 
7658
 
-
 
7659
  def creditBatch(self, batchId, userAmount):
7618
  def creditBatch(self, batchId, userAmount):
7660
    """
7619
    """
7661
    Parameters:
7620
    Parameters:
7662
     - batchId
7621
     - batchId
7663
     - userAmount
7622
     - userAmount
Line 13140... Line 13099...
13140
    self._processMap["getRechargeOrdersForTransaction"] = Processor.process_getRechargeOrdersForTransaction
13099
    self._processMap["getRechargeOrdersForTransaction"] = Processor.process_getRechargeOrdersForTransaction
13141
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
13100
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
13142
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
13101
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
13143
    self._processMap["validateRecharge"] = Processor.process_validateRecharge
13102
    self._processMap["validateRecharge"] = Processor.process_validateRecharge
13144
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
13103
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
13145
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
-
 
13146
    self._processMap["creditBatch"] = Processor.process_creditBatch
13104
    self._processMap["creditBatch"] = Processor.process_creditBatch
13147
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
13105
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
13148
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
13106
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
13149
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
13107
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
13150
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
13108
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
Line 15167... Line 15125...
15167
    oprot.writeMessageBegin("getRechargeOrdersForDevice", TMessageType.REPLY, seqid)
15125
    oprot.writeMessageBegin("getRechargeOrdersForDevice", TMessageType.REPLY, seqid)
15168
    result.write(oprot)
15126
    result.write(oprot)
15169
    oprot.writeMessageEnd()
15127
    oprot.writeMessageEnd()
15170
    oprot.trans.flush()
15128
    oprot.trans.flush()
15171
 
15129
 
15172
  def process_addAmountToWallet(self, seqid, iprot, oprot):
-
 
15173
    args = addAmountToWallet_args()
-
 
15174
    args.read(iprot)
-
 
15175
    iprot.readMessageEnd()
-
 
15176
    result = addAmountToWallet_result()
-
 
15177
    self._handler.addAmountToWallet(args.userId, args.orderId, args.amount)
-
 
15178
    oprot.writeMessageBegin("addAmountToWallet", TMessageType.REPLY, seqid)
-
 
15179
    result.write(oprot)
-
 
15180
    oprot.writeMessageEnd()
-
 
15181
    oprot.trans.flush()
-
 
15182
 
-
 
15183
  def process_creditBatch(self, seqid, iprot, oprot):
15130
  def process_creditBatch(self, seqid, iprot, oprot):
15184
    args = creditBatch_args()
15131
    args = creditBatch_args()
15185
    args.read(iprot)
15132
    args.read(iprot)
15186
    iprot.readMessageEnd()
15133
    iprot.readMessageEnd()
15187
    result = creditBatch_result()
15134
    result = creditBatch_result()
Line 37220... Line 37167...
37220
    oprot.writeFieldStop()
37167
    oprot.writeFieldStop()
37221
    oprot.writeStructEnd()
37168
    oprot.writeStructEnd()
37222
 
37169
 
37223
  def validate(self):
37170
  def validate(self):
37224
    return
37171
    return
37225
 
-
 
37226
 
-
 
37227
  def __repr__(self):
-
 
37228
    L = ['%s=%r' % (key, value)
-
 
37229
      for key, value in self.__dict__.iteritems()]
-
 
37230
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37231
 
-
 
37232
  def __eq__(self, other):
-
 
37233
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37234
 
-
 
37235
  def __ne__(self, other):
-
 
37236
    return not (self == other)
-
 
37237
 
-
 
37238
class addAmountToWallet_args:
-
 
37239
  """
-
 
37240
  Attributes:
-
 
37241
   - userId
-
 
37242
   - orderId
-
 
37243
   - amount
-
 
37244
  """
-
 
37245
 
-
 
37246
  thrift_spec = (
-
 
37247
    None, # 0
-
 
37248
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
37249
    (2, TType.I64, 'orderId', None, None, ), # 2
-
 
37250
    (3, TType.I64, 'amount', None, None, ), # 3
-
 
37251
  )
-
 
37252
 
-
 
37253
  def __init__(self, userId=None, orderId=None, amount=None,):
-
 
37254
    self.userId = userId
-
 
37255
    self.orderId = orderId
-
 
37256
    self.amount = amount
-
 
37257
 
-
 
37258
  def read(self, iprot):
-
 
37259
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37260
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
37261
      return
-
 
37262
    iprot.readStructBegin()
-
 
37263
    while True:
-
 
37264
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
37265
      if ftype == TType.STOP:
-
 
37266
        break
-
 
37267
      if fid == 1:
-
 
37268
        if ftype == TType.I64:
-
 
37269
          self.userId = iprot.readI64();
-
 
37270
        else:
-
 
37271
          iprot.skip(ftype)
-
 
37272
      elif fid == 2:
-
 
37273
        if ftype == TType.I64:
-
 
37274
          self.orderId = iprot.readI64();
-
 
37275
        else:
-
 
37276
          iprot.skip(ftype)
-
 
37277
      elif fid == 3:
-
 
37278
        if ftype == TType.I64:
-
 
37279
          self.amount = iprot.readI64();
-
 
37280
        else:
-
 
37281
          iprot.skip(ftype)
-
 
37282
      else:
-
 
37283
        iprot.skip(ftype)
-
 
37284
      iprot.readFieldEnd()
-
 
37285
    iprot.readStructEnd()
-
 
37286
 
-
 
37287
  def write(self, oprot):
-
 
37288
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
37289
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
37290
      return
-
 
37291
    oprot.writeStructBegin('addAmountToWallet_args')
-
 
37292
    if self.userId is not None:
-
 
37293
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
37294
      oprot.writeI64(self.userId)
-
 
37295
      oprot.writeFieldEnd()
-
 
37296
    if self.orderId is not None:
-
 
37297
      oprot.writeFieldBegin('orderId', TType.I64, 2)
-
 
37298
      oprot.writeI64(self.orderId)
-
 
37299
      oprot.writeFieldEnd()
-
 
37300
    if self.amount is not None:
-
 
37301
      oprot.writeFieldBegin('amount', TType.I64, 3)
-
 
37302
      oprot.writeI64(self.amount)
-
 
37303
      oprot.writeFieldEnd()
-
 
37304
    oprot.writeFieldStop()
-
 
37305
    oprot.writeStructEnd()
-
 
37306
 
-
 
37307
  def validate(self):
-
 
37308
    return
-
 
37309
 
-
 
37310
 
-
 
37311
  def __repr__(self):
-
 
37312
    L = ['%s=%r' % (key, value)
-
 
37313
      for key, value in self.__dict__.iteritems()]
-
 
37314
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37315
 
-
 
37316
  def __eq__(self, other):
-
 
37317
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37318
 
-
 
37319
  def __ne__(self, other):
-
 
37320
    return not (self == other)
-
 
37321
 
-
 
37322
class addAmountToWallet_result:
-
 
37323
 
-
 
37324
  thrift_spec = (
-
 
37325
  )
-
 
37326
 
-
 
37327
  def read(self, iprot):
-
 
37328
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37329
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
37330
      return
-
 
37331
    iprot.readStructBegin()
-
 
37332
    while True:
-
 
37333
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
37334
      if ftype == TType.STOP:
-
 
37335
        break
-
 
37336
      else:
-
 
37337
        iprot.skip(ftype)
-
 
37338
      iprot.readFieldEnd()
-
 
37339
    iprot.readStructEnd()
-
 
37340
 
-
 
37341
  def write(self, oprot):
-
 
37342
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
37343
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
37344
      return
-
 
37345
    oprot.writeStructBegin('addAmountToWallet_result')
-
 
37346
    oprot.writeFieldStop()
-
 
37347
    oprot.writeStructEnd()
-
 
37348
 
-
 
37349
  def validate(self):
-
 
37350
    return
-
 
37351
 
37172
 
37352
 
37173
 
37353
  def __repr__(self):
37174
  def __repr__(self):
37354
    L = ['%s=%r' % (key, value)
37175
    L = ['%s=%r' % (key, value)
37355
      for key, value in self.__dict__.iteritems()]
37176
      for key, value in self.__dict__.iteritems()]