Subversion Repositories SmartDukaan

Rev

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

Rev 6371 Rev 6389
Line 1422... Line 1422...
1422
     - circleId
1422
     - circleId
1423
     - isAvailable
1423
     - isAvailable
1424
    """
1424
    """
1425
    pass
1425
    pass
1426
 
1426
 
-
 
1427
  def getAvailableEmiSchemes(self, ):
-
 
1428
    pass
-
 
1429
 
-
 
1430
  def getMiscCharges(self, transactionId):
-
 
1431
    """
-
 
1432
    Parameters:
-
 
1433
     - transactionId
-
 
1434
    """
-
 
1435
    pass
-
 
1436
 
1427
 
1437
 
1428
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1438
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1429
  def __init__(self, iprot, oprot=None):
1439
  def __init__(self, iprot, oprot=None):
1430
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1440
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1431
 
1441
 
Line 6431... Line 6441...
6431
    result = updateAvailabilityStatus_result()
6441
    result = updateAvailabilityStatus_result()
6432
    result.read(self._iprot)
6442
    result.read(self._iprot)
6433
    self._iprot.readMessageEnd()
6443
    self._iprot.readMessageEnd()
6434
    return
6444
    return
6435
 
6445
 
-
 
6446
  def getAvailableEmiSchemes(self, ):
-
 
6447
    self.send_getAvailableEmiSchemes()
-
 
6448
    return self.recv_getAvailableEmiSchemes()
-
 
6449
 
-
 
6450
  def send_getAvailableEmiSchemes(self, ):
-
 
6451
    self._oprot.writeMessageBegin('getAvailableEmiSchemes', TMessageType.CALL, self._seqid)
-
 
6452
    args = getAvailableEmiSchemes_args()
-
 
6453
    args.write(self._oprot)
-
 
6454
    self._oprot.writeMessageEnd()
-
 
6455
    self._oprot.trans.flush()
-
 
6456
 
-
 
6457
  def recv_getAvailableEmiSchemes(self, ):
-
 
6458
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6459
    if mtype == TMessageType.EXCEPTION:
-
 
6460
      x = TApplicationException()
-
 
6461
      x.read(self._iprot)
-
 
6462
      self._iprot.readMessageEnd()
-
 
6463
      raise x
-
 
6464
    result = getAvailableEmiSchemes_result()
-
 
6465
    result.read(self._iprot)
-
 
6466
    self._iprot.readMessageEnd()
-
 
6467
    if result.success is not None:
-
 
6468
      return result.success
-
 
6469
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAvailableEmiSchemes failed: unknown result");
-
 
6470
 
-
 
6471
  def getMiscCharges(self, transactionId):
-
 
6472
    """
-
 
6473
    Parameters:
-
 
6474
     - transactionId
-
 
6475
    """
-
 
6476
    self.send_getMiscCharges(transactionId)
-
 
6477
    return self.recv_getMiscCharges()
-
 
6478
 
-
 
6479
  def send_getMiscCharges(self, transactionId):
-
 
6480
    self._oprot.writeMessageBegin('getMiscCharges', TMessageType.CALL, self._seqid)
-
 
6481
    args = getMiscCharges_args()
-
 
6482
    args.transactionId = transactionId
-
 
6483
    args.write(self._oprot)
-
 
6484
    self._oprot.writeMessageEnd()
-
 
6485
    self._oprot.trans.flush()
-
 
6486
 
-
 
6487
  def recv_getMiscCharges(self, ):
-
 
6488
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6489
    if mtype == TMessageType.EXCEPTION:
-
 
6490
      x = TApplicationException()
-
 
6491
      x.read(self._iprot)
-
 
6492
      self._iprot.readMessageEnd()
-
 
6493
      raise x
-
 
6494
    result = getMiscCharges_result()
-
 
6495
    result.read(self._iprot)
-
 
6496
    self._iprot.readMessageEnd()
-
 
6497
    if result.success is not None:
-
 
6498
      return result.success
-
 
6499
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMiscCharges failed: unknown result");
-
 
6500
 
6436
 
6501
 
6437
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6502
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6438
  def __init__(self, handler):
6503
  def __init__(self, handler):
6439
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6504
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6440
    self._processMap["createTransaction"] = Processor.process_createTransaction
6505
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6580... Line 6645...
6580
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
6645
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
6581
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
6646
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
6582
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
6647
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
6583
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
6648
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
6584
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
6649
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
-
 
6650
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
-
 
6651
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6585
 
6652
 
6586
  def process(self, iprot, oprot):
6653
  def process(self, iprot, oprot):
6587
    (name, type, seqid) = iprot.readMessageBegin()
6654
    (name, type, seqid) = iprot.readMessageBegin()
6588
    if name not in self._processMap:
6655
    if name not in self._processMap:
6589
      iprot.skip(TType.STRUCT)
6656
      iprot.skip(TType.STRUCT)
Line 8482... Line 8549...
8482
    oprot.writeMessageBegin("updateAvailabilityStatus", TMessageType.REPLY, seqid)
8549
    oprot.writeMessageBegin("updateAvailabilityStatus", TMessageType.REPLY, seqid)
8483
    result.write(oprot)
8550
    result.write(oprot)
8484
    oprot.writeMessageEnd()
8551
    oprot.writeMessageEnd()
8485
    oprot.trans.flush()
8552
    oprot.trans.flush()
8486
 
8553
 
-
 
8554
  def process_getAvailableEmiSchemes(self, seqid, iprot, oprot):
-
 
8555
    args = getAvailableEmiSchemes_args()
-
 
8556
    args.read(iprot)
-
 
8557
    iprot.readMessageEnd()
-
 
8558
    result = getAvailableEmiSchemes_result()
-
 
8559
    result.success = self._handler.getAvailableEmiSchemes()
-
 
8560
    oprot.writeMessageBegin("getAvailableEmiSchemes", TMessageType.REPLY, seqid)
-
 
8561
    result.write(oprot)
-
 
8562
    oprot.writeMessageEnd()
-
 
8563
    oprot.trans.flush()
-
 
8564
 
-
 
8565
  def process_getMiscCharges(self, seqid, iprot, oprot):
-
 
8566
    args = getMiscCharges_args()
-
 
8567
    args.read(iprot)
-
 
8568
    iprot.readMessageEnd()
-
 
8569
    result = getMiscCharges_result()
-
 
8570
    result.success = self._handler.getMiscCharges(args.transactionId)
-
 
8571
    oprot.writeMessageBegin("getMiscCharges", TMessageType.REPLY, seqid)
-
 
8572
    result.write(oprot)
-
 
8573
    oprot.writeMessageEnd()
-
 
8574
    oprot.trans.flush()
-
 
8575
 
8487
 
8576
 
8488
# HELPER FUNCTIONS AND STRUCTURES
8577
# HELPER FUNCTIONS AND STRUCTURES
8489
 
8578
 
8490
class createTransaction_args:
8579
class createTransaction_args:
8491
  """
8580
  """
Line 28897... Line 28986...
28897
    oprot.writeFieldStop()
28986
    oprot.writeFieldStop()
28898
    oprot.writeStructEnd()
28987
    oprot.writeStructEnd()
28899
 
28988
 
28900
  def validate(self):
28989
  def validate(self):
28901
    return
28990
    return
-
 
28991
 
-
 
28992
 
-
 
28993
  def __repr__(self):
-
 
28994
    L = ['%s=%r' % (key, value)
-
 
28995
      for key, value in self.__dict__.iteritems()]
-
 
28996
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
28997
 
-
 
28998
  def __eq__(self, other):
-
 
28999
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29000
 
-
 
29001
  def __ne__(self, other):
-
 
29002
    return not (self == other)
-
 
29003
 
-
 
29004
class getAvailableEmiSchemes_args:
-
 
29005
 
-
 
29006
  thrift_spec = (
-
 
29007
  )
-
 
29008
 
-
 
29009
  def read(self, iprot):
-
 
29010
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29011
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29012
      return
-
 
29013
    iprot.readStructBegin()
-
 
29014
    while True:
-
 
29015
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29016
      if ftype == TType.STOP:
-
 
29017
        break
-
 
29018
      else:
-
 
29019
        iprot.skip(ftype)
-
 
29020
      iprot.readFieldEnd()
-
 
29021
    iprot.readStructEnd()
-
 
29022
 
-
 
29023
  def write(self, oprot):
-
 
29024
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29025
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29026
      return
-
 
29027
    oprot.writeStructBegin('getAvailableEmiSchemes_args')
-
 
29028
    oprot.writeFieldStop()
-
 
29029
    oprot.writeStructEnd()
-
 
29030
 
-
 
29031
  def validate(self):
-
 
29032
    return
-
 
29033
 
-
 
29034
 
-
 
29035
  def __repr__(self):
-
 
29036
    L = ['%s=%r' % (key, value)
-
 
29037
      for key, value in self.__dict__.iteritems()]
-
 
29038
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29039
 
-
 
29040
  def __eq__(self, other):
-
 
29041
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29042
 
-
 
29043
  def __ne__(self, other):
-
 
29044
    return not (self == other)
-
 
29045
 
-
 
29046
class getAvailableEmiSchemes_result:
-
 
29047
  """
-
 
29048
  Attributes:
-
 
29049
   - success
-
 
29050
  """
-
 
29051
 
-
 
29052
  thrift_spec = (
-
 
29053
    (0, TType.LIST, 'success', (TType.STRUCT,(EmiScheme, EmiScheme.thrift_spec)), None, ), # 0
-
 
29054
  )
-
 
29055
 
-
 
29056
  def __init__(self, success=None,):
-
 
29057
    self.success = success
-
 
29058
 
-
 
29059
  def read(self, iprot):
-
 
29060
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29061
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29062
      return
-
 
29063
    iprot.readStructBegin()
-
 
29064
    while True:
-
 
29065
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29066
      if ftype == TType.STOP:
-
 
29067
        break
-
 
29068
      if fid == 0:
-
 
29069
        if ftype == TType.LIST:
-
 
29070
          self.success = []
-
 
29071
          (_etype710, _size707) = iprot.readListBegin()
-
 
29072
          for _i711 in xrange(_size707):
-
 
29073
            _elem712 = EmiScheme()
-
 
29074
            _elem712.read(iprot)
-
 
29075
            self.success.append(_elem712)
-
 
29076
          iprot.readListEnd()
-
 
29077
        else:
-
 
29078
          iprot.skip(ftype)
-
 
29079
      else:
-
 
29080
        iprot.skip(ftype)
-
 
29081
      iprot.readFieldEnd()
-
 
29082
    iprot.readStructEnd()
-
 
29083
 
-
 
29084
  def write(self, oprot):
-
 
29085
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29086
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29087
      return
-
 
29088
    oprot.writeStructBegin('getAvailableEmiSchemes_result')
-
 
29089
    if self.success is not None:
-
 
29090
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
29091
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
29092
      for iter713 in self.success:
-
 
29093
        iter713.write(oprot)
-
 
29094
      oprot.writeListEnd()
-
 
29095
      oprot.writeFieldEnd()
-
 
29096
    oprot.writeFieldStop()
-
 
29097
    oprot.writeStructEnd()
-
 
29098
 
-
 
29099
  def validate(self):
-
 
29100
    return
-
 
29101
 
-
 
29102
 
-
 
29103
  def __repr__(self):
-
 
29104
    L = ['%s=%r' % (key, value)
-
 
29105
      for key, value in self.__dict__.iteritems()]
-
 
29106
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29107
 
-
 
29108
  def __eq__(self, other):
-
 
29109
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29110
 
-
 
29111
  def __ne__(self, other):
-
 
29112
    return not (self == other)
-
 
29113
 
-
 
29114
class getMiscCharges_args:
-
 
29115
  """
-
 
29116
  Attributes:
-
 
29117
   - transactionId
-
 
29118
  """
-
 
29119
 
-
 
29120
  thrift_spec = (
-
 
29121
    None, # 0
-
 
29122
    (1, TType.I64, 'transactionId', None, None, ), # 1
-
 
29123
  )
-
 
29124
 
-
 
29125
  def __init__(self, transactionId=None,):
-
 
29126
    self.transactionId = transactionId
-
 
29127
 
-
 
29128
  def read(self, iprot):
-
 
29129
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29130
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29131
      return
-
 
29132
    iprot.readStructBegin()
-
 
29133
    while True:
-
 
29134
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29135
      if ftype == TType.STOP:
-
 
29136
        break
-
 
29137
      if fid == 1:
-
 
29138
        if ftype == TType.I64:
-
 
29139
          self.transactionId = iprot.readI64();
-
 
29140
        else:
-
 
29141
          iprot.skip(ftype)
-
 
29142
      else:
-
 
29143
        iprot.skip(ftype)
-
 
29144
      iprot.readFieldEnd()
-
 
29145
    iprot.readStructEnd()
-
 
29146
 
-
 
29147
  def write(self, oprot):
-
 
29148
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29149
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29150
      return
-
 
29151
    oprot.writeStructBegin('getMiscCharges_args')
-
 
29152
    if self.transactionId is not None:
-
 
29153
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
-
 
29154
      oprot.writeI64(self.transactionId)
-
 
29155
      oprot.writeFieldEnd()
-
 
29156
    oprot.writeFieldStop()
-
 
29157
    oprot.writeStructEnd()
-
 
29158
 
-
 
29159
  def validate(self):
-
 
29160
    return
-
 
29161
 
-
 
29162
 
-
 
29163
  def __repr__(self):
-
 
29164
    L = ['%s=%r' % (key, value)
-
 
29165
      for key, value in self.__dict__.iteritems()]
-
 
29166
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29167
 
-
 
29168
  def __eq__(self, other):
-
 
29169
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29170
 
-
 
29171
  def __ne__(self, other):
-
 
29172
    return not (self == other)
-
 
29173
 
-
 
29174
class getMiscCharges_result:
-
 
29175
  """
-
 
29176
  Attributes:
-
 
29177
   - success
-
 
29178
  """
-
 
29179
 
-
 
29180
  thrift_spec = (
-
 
29181
    (0, TType.MAP, 'success', (TType.I64,None,TType.I64,None), None, ), # 0
-
 
29182
  )
-
 
29183
 
-
 
29184
  def __init__(self, success=None,):
-
 
29185
    self.success = success
-
 
29186
 
-
 
29187
  def read(self, iprot):
-
 
29188
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29189
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29190
      return
-
 
29191
    iprot.readStructBegin()
-
 
29192
    while True:
-
 
29193
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29194
      if ftype == TType.STOP:
-
 
29195
        break
-
 
29196
      if fid == 0:
-
 
29197
        if ftype == TType.MAP:
-
 
29198
          self.success = {}
-
 
29199
          (_ktype715, _vtype716, _size714 ) = iprot.readMapBegin() 
-
 
29200
          for _i718 in xrange(_size714):
-
 
29201
            _key719 = iprot.readI64();
-
 
29202
            _val720 = iprot.readI64();
-
 
29203
            self.success[_key719] = _val720
-
 
29204
          iprot.readMapEnd()
-
 
29205
        else:
-
 
29206
          iprot.skip(ftype)
-
 
29207
      else:
-
 
29208
        iprot.skip(ftype)
-
 
29209
      iprot.readFieldEnd()
-
 
29210
    iprot.readStructEnd()
-
 
29211
 
-
 
29212
  def write(self, oprot):
-
 
29213
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29214
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29215
      return
-
 
29216
    oprot.writeStructBegin('getMiscCharges_result')
-
 
29217
    if self.success is not None:
-
 
29218
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
29219
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.success))
-
 
29220
      for kiter721,viter722 in self.success.items():
-
 
29221
        oprot.writeI64(kiter721)
-
 
29222
        oprot.writeI64(viter722)
-
 
29223
      oprot.writeMapEnd()
-
 
29224
      oprot.writeFieldEnd()
-
 
29225
    oprot.writeFieldStop()
-
 
29226
    oprot.writeStructEnd()
-
 
29227
 
-
 
29228
  def validate(self):
-
 
29229
    return
28902
 
29230
 
28903
 
29231
 
28904
  def __repr__(self):
29232
  def __repr__(self):
28905
    L = ['%s=%r' % (key, value)
29233
    L = ['%s=%r' % (key, value)
28906
      for key, value in self.__dict__.iteritems()]
29234
      for key, value in self.__dict__.iteritems()]