Subversion Repositories SmartDukaan

Rev

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

Rev 7151 Rev 7169
Line 1547... Line 1547...
1547
    Parameters:
1547
    Parameters:
1548
     - rechargeId
1548
     - rechargeId
1549
    """
1549
    """
1550
    pass
1550
    pass
1551
 
1551
 
-
 
1552
  def getRechargeTransactionsByNumber(self, number):
-
 
1553
    """
-
 
1554
    Parameters:
-
 
1555
     - number
-
 
1556
    """
-
 
1557
    pass
-
 
1558
 
-
 
1559
  def updateHotspotStorePassword(self, storeId, password):
-
 
1560
    """
-
 
1561
    Parameters:
-
 
1562
     - storeId
-
 
1563
     - password
-
 
1564
    """
-
 
1565
    pass
-
 
1566
 
1552
 
1567
 
1553
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1568
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1554
  def __init__(self, iprot, oprot=None):
1569
  def __init__(self, iprot, oprot=None):
1555
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1570
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1556
 
1571
 
Line 7067... Line 7082...
7067
    self._iprot.readMessageEnd()
7082
    self._iprot.readMessageEnd()
7068
    if result.success is not None:
7083
    if result.success is not None:
7069
      return result.success
7084
      return result.success
7070
    raise TApplicationException(TApplicationException.MISSING_RESULT, "retrieveHotspotRechargeInvoice failed: unknown result");
7085
    raise TApplicationException(TApplicationException.MISSING_RESULT, "retrieveHotspotRechargeInvoice failed: unknown result");
7071
 
7086
 
-
 
7087
  def getRechargeTransactionsByNumber(self, number):
-
 
7088
    """
-
 
7089
    Parameters:
-
 
7090
     - number
-
 
7091
    """
-
 
7092
    self.send_getRechargeTransactionsByNumber(number)
-
 
7093
    return self.recv_getRechargeTransactionsByNumber()
-
 
7094
 
-
 
7095
  def send_getRechargeTransactionsByNumber(self, number):
-
 
7096
    self._oprot.writeMessageBegin('getRechargeTransactionsByNumber', TMessageType.CALL, self._seqid)
-
 
7097
    args = getRechargeTransactionsByNumber_args()
-
 
7098
    args.number = number
-
 
7099
    args.write(self._oprot)
-
 
7100
    self._oprot.writeMessageEnd()
-
 
7101
    self._oprot.trans.flush()
-
 
7102
 
-
 
7103
  def recv_getRechargeTransactionsByNumber(self, ):
-
 
7104
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7105
    if mtype == TMessageType.EXCEPTION:
-
 
7106
      x = TApplicationException()
-
 
7107
      x.read(self._iprot)
-
 
7108
      self._iprot.readMessageEnd()
-
 
7109
      raise x
-
 
7110
    result = getRechargeTransactionsByNumber_result()
-
 
7111
    result.read(self._iprot)
-
 
7112
    self._iprot.readMessageEnd()
-
 
7113
    if result.success is not None:
-
 
7114
      return result.success
-
 
7115
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeTransactionsByNumber failed: unknown result");
-
 
7116
 
-
 
7117
  def updateHotspotStorePassword(self, storeId, password):
-
 
7118
    """
-
 
7119
    Parameters:
-
 
7120
     - storeId
-
 
7121
     - password
-
 
7122
    """
-
 
7123
    self.send_updateHotspotStorePassword(storeId, password)
-
 
7124
    return self.recv_updateHotspotStorePassword()
-
 
7125
 
-
 
7126
  def send_updateHotspotStorePassword(self, storeId, password):
-
 
7127
    self._oprot.writeMessageBegin('updateHotspotStorePassword', TMessageType.CALL, self._seqid)
-
 
7128
    args = updateHotspotStorePassword_args()
-
 
7129
    args.storeId = storeId
-
 
7130
    args.password = password
-
 
7131
    args.write(self._oprot)
-
 
7132
    self._oprot.writeMessageEnd()
-
 
7133
    self._oprot.trans.flush()
-
 
7134
 
-
 
7135
  def recv_updateHotspotStorePassword(self, ):
-
 
7136
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7137
    if mtype == TMessageType.EXCEPTION:
-
 
7138
      x = TApplicationException()
-
 
7139
      x.read(self._iprot)
-
 
7140
      self._iprot.readMessageEnd()
-
 
7141
      raise x
-
 
7142
    result = updateHotspotStorePassword_result()
-
 
7143
    result.read(self._iprot)
-
 
7144
    self._iprot.readMessageEnd()
-
 
7145
    if result.success is not None:
-
 
7146
      return result.success
-
 
7147
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateHotspotStorePassword failed: unknown result");
-
 
7148
 
7072
 
7149
 
7073
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7150
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7074
  def __init__(self, handler):
7151
  def __init__(self, handler):
7075
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7152
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7076
    self._processMap["createTransaction"] = Processor.process_createTransaction
7153
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 7232... Line 7309...
7232
    self._processMap["getRechargeTransaction"] = Processor.process_getRechargeTransaction
7309
    self._processMap["getRechargeTransaction"] = Processor.process_getRechargeTransaction
7233
    self._processMap["getFRCs"] = Processor.process_getFRCs
7310
    self._processMap["getFRCs"] = Processor.process_getFRCs
7234
    self._processMap["getHotspotStore"] = Processor.process_getHotspotStore
7311
    self._processMap["getHotspotStore"] = Processor.process_getHotspotStore
7235
    self._processMap["getTelecomCircle"] = Processor.process_getTelecomCircle
7312
    self._processMap["getTelecomCircle"] = Processor.process_getTelecomCircle
7236
    self._processMap["retrieveHotspotRechargeInvoice"] = Processor.process_retrieveHotspotRechargeInvoice
7313
    self._processMap["retrieveHotspotRechargeInvoice"] = Processor.process_retrieveHotspotRechargeInvoice
-
 
7314
    self._processMap["getRechargeTransactionsByNumber"] = Processor.process_getRechargeTransactionsByNumber
-
 
7315
    self._processMap["updateHotspotStorePassword"] = Processor.process_updateHotspotStorePassword
7237
 
7316
 
7238
  def process(self, iprot, oprot):
7317
  def process(self, iprot, oprot):
7239
    (name, type, seqid) = iprot.readMessageBegin()
7318
    (name, type, seqid) = iprot.readMessageBegin()
7240
    if name not in self._processMap:
7319
    if name not in self._processMap:
7241
      iprot.skip(TType.STRUCT)
7320
      iprot.skip(TType.STRUCT)
Line 9313... Line 9392...
9313
    oprot.writeMessageBegin("retrieveHotspotRechargeInvoice", TMessageType.REPLY, seqid)
9392
    oprot.writeMessageBegin("retrieveHotspotRechargeInvoice", TMessageType.REPLY, seqid)
9314
    result.write(oprot)
9393
    result.write(oprot)
9315
    oprot.writeMessageEnd()
9394
    oprot.writeMessageEnd()
9316
    oprot.trans.flush()
9395
    oprot.trans.flush()
9317
 
9396
 
-
 
9397
  def process_getRechargeTransactionsByNumber(self, seqid, iprot, oprot):
-
 
9398
    args = getRechargeTransactionsByNumber_args()
-
 
9399
    args.read(iprot)
-
 
9400
    iprot.readMessageEnd()
-
 
9401
    result = getRechargeTransactionsByNumber_result()
-
 
9402
    result.success = self._handler.getRechargeTransactionsByNumber(args.number)
-
 
9403
    oprot.writeMessageBegin("getRechargeTransactionsByNumber", TMessageType.REPLY, seqid)
-
 
9404
    result.write(oprot)
-
 
9405
    oprot.writeMessageEnd()
-
 
9406
    oprot.trans.flush()
-
 
9407
 
-
 
9408
  def process_updateHotspotStorePassword(self, seqid, iprot, oprot):
-
 
9409
    args = updateHotspotStorePassword_args()
-
 
9410
    args.read(iprot)
-
 
9411
    iprot.readMessageEnd()
-
 
9412
    result = updateHotspotStorePassword_result()
-
 
9413
    result.success = self._handler.updateHotspotStorePassword(args.storeId, args.password)
-
 
9414
    oprot.writeMessageBegin("updateHotspotStorePassword", TMessageType.REPLY, seqid)
-
 
9415
    result.write(oprot)
-
 
9416
    oprot.writeMessageEnd()
-
 
9417
    oprot.trans.flush()
-
 
9418
 
9318
 
9419
 
9319
# HELPER FUNCTIONS AND STRUCTURES
9420
# HELPER FUNCTIONS AND STRUCTURES
9320
 
9421
 
9321
class createTransaction_args:
9422
class createTransaction_args:
9322
  """
9423
  """
Line 31898... Line 31999...
31898
      oprot.writeFieldEnd()
31999
      oprot.writeFieldEnd()
31899
    oprot.writeFieldStop()
32000
    oprot.writeFieldStop()
31900
    oprot.writeStructEnd()
32001
    oprot.writeStructEnd()
31901
 
32002
 
31902
  def validate(self):
32003
  def validate(self):
-
 
32004
    return
-
 
32005
 
-
 
32006
 
-
 
32007
  def __repr__(self):
-
 
32008
    L = ['%s=%r' % (key, value)
-
 
32009
      for key, value in self.__dict__.iteritems()]
-
 
32010
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
32011
 
-
 
32012
  def __eq__(self, other):
-
 
32013
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
32014
 
-
 
32015
  def __ne__(self, other):
-
 
32016
    return not (self == other)
-
 
32017
 
-
 
32018
class getRechargeTransactionsByNumber_args:
-
 
32019
  """
-
 
32020
  Attributes:
-
 
32021
   - number
-
 
32022
  """
-
 
32023
 
-
 
32024
  thrift_spec = (
-
 
32025
    None, # 0
-
 
32026
    (1, TType.STRING, 'number', None, None, ), # 1
-
 
32027
  )
-
 
32028
 
-
 
32029
  def __init__(self, number=None,):
-
 
32030
    self.number = number
-
 
32031
 
-
 
32032
  def read(self, iprot):
-
 
32033
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
32034
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
32035
      return
-
 
32036
    iprot.readStructBegin()
-
 
32037
    while True:
-
 
32038
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
32039
      if ftype == TType.STOP:
-
 
32040
        break
-
 
32041
      if fid == 1:
-
 
32042
        if ftype == TType.STRING:
-
 
32043
          self.number = iprot.readString();
-
 
32044
        else:
-
 
32045
          iprot.skip(ftype)
-
 
32046
      else:
-
 
32047
        iprot.skip(ftype)
-
 
32048
      iprot.readFieldEnd()
-
 
32049
    iprot.readStructEnd()
-
 
32050
 
-
 
32051
  def write(self, oprot):
-
 
32052
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
32053
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
32054
      return
-
 
32055
    oprot.writeStructBegin('getRechargeTransactionsByNumber_args')
-
 
32056
    if self.number is not None:
-
 
32057
      oprot.writeFieldBegin('number', TType.STRING, 1)
-
 
32058
      oprot.writeString(self.number)
-
 
32059
      oprot.writeFieldEnd()
-
 
32060
    oprot.writeFieldStop()
-
 
32061
    oprot.writeStructEnd()
-
 
32062
 
-
 
32063
  def validate(self):
-
 
32064
    return
-
 
32065
 
-
 
32066
 
-
 
32067
  def __repr__(self):
-
 
32068
    L = ['%s=%r' % (key, value)
-
 
32069
      for key, value in self.__dict__.iteritems()]
-
 
32070
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
32071
 
-
 
32072
  def __eq__(self, other):
-
 
32073
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
32074
 
-
 
32075
  def __ne__(self, other):
-
 
32076
    return not (self == other)
-
 
32077
 
-
 
32078
class getRechargeTransactionsByNumber_result:
-
 
32079
  """
-
 
32080
  Attributes:
-
 
32081
   - success
-
 
32082
  """
-
 
32083
 
-
 
32084
  thrift_spec = (
-
 
32085
    (0, TType.LIST, 'success', (TType.STRUCT,(RechargeTransaction, RechargeTransaction.thrift_spec)), None, ), # 0
-
 
32086
  )
-
 
32087
 
-
 
32088
  def __init__(self, success=None,):
-
 
32089
    self.success = success
-
 
32090
 
-
 
32091
  def read(self, iprot):
-
 
32092
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
32093
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
32094
      return
-
 
32095
    iprot.readStructBegin()
-
 
32096
    while True:
-
 
32097
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
32098
      if ftype == TType.STOP:
-
 
32099
        break
-
 
32100
      if fid == 0:
-
 
32101
        if ftype == TType.LIST:
-
 
32102
          self.success = []
-
 
32103
          (_etype761, _size758) = iprot.readListBegin()
-
 
32104
          for _i762 in xrange(_size758):
-
 
32105
            _elem763 = RechargeTransaction()
-
 
32106
            _elem763.read(iprot)
-
 
32107
            self.success.append(_elem763)
-
 
32108
          iprot.readListEnd()
-
 
32109
        else:
-
 
32110
          iprot.skip(ftype)
-
 
32111
      else:
-
 
32112
        iprot.skip(ftype)
-
 
32113
      iprot.readFieldEnd()
-
 
32114
    iprot.readStructEnd()
-
 
32115
 
-
 
32116
  def write(self, oprot):
-
 
32117
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
32118
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
32119
      return
-
 
32120
    oprot.writeStructBegin('getRechargeTransactionsByNumber_result')
-
 
32121
    if self.success is not None:
-
 
32122
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
32123
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
32124
      for iter764 in self.success:
-
 
32125
        iter764.write(oprot)
-
 
32126
      oprot.writeListEnd()
-
 
32127
      oprot.writeFieldEnd()
-
 
32128
    oprot.writeFieldStop()
-
 
32129
    oprot.writeStructEnd()
-
 
32130
 
-
 
32131
  def validate(self):
-
 
32132
    return
-
 
32133
 
-
 
32134
 
-
 
32135
  def __repr__(self):
-
 
32136
    L = ['%s=%r' % (key, value)
-
 
32137
      for key, value in self.__dict__.iteritems()]
-
 
32138
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
32139
 
-
 
32140
  def __eq__(self, other):
-
 
32141
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
32142
 
-
 
32143
  def __ne__(self, other):
-
 
32144
    return not (self == other)
-
 
32145
 
-
 
32146
class updateHotspotStorePassword_args:
-
 
32147
  """
-
 
32148
  Attributes:
-
 
32149
   - storeId
-
 
32150
   - password
-
 
32151
  """
-
 
32152
 
-
 
32153
  thrift_spec = (
-
 
32154
    None, # 0
-
 
32155
    (1, TType.I64, 'storeId', None, None, ), # 1
-
 
32156
    (2, TType.STRING, 'password', None, None, ), # 2
-
 
32157
  )
-
 
32158
 
-
 
32159
  def __init__(self, storeId=None, password=None,):
-
 
32160
    self.storeId = storeId
-
 
32161
    self.password = password
-
 
32162
 
-
 
32163
  def read(self, iprot):
-
 
32164
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
32165
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
32166
      return
-
 
32167
    iprot.readStructBegin()
-
 
32168
    while True:
-
 
32169
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
32170
      if ftype == TType.STOP:
-
 
32171
        break
-
 
32172
      if fid == 1:
-
 
32173
        if ftype == TType.I64:
-
 
32174
          self.storeId = iprot.readI64();
-
 
32175
        else:
-
 
32176
          iprot.skip(ftype)
-
 
32177
      elif fid == 2:
-
 
32178
        if ftype == TType.STRING:
-
 
32179
          self.password = iprot.readString();
-
 
32180
        else:
-
 
32181
          iprot.skip(ftype)
-
 
32182
      else:
-
 
32183
        iprot.skip(ftype)
-
 
32184
      iprot.readFieldEnd()
-
 
32185
    iprot.readStructEnd()
-
 
32186
 
-
 
32187
  def write(self, oprot):
-
 
32188
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
32189
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
32190
      return
-
 
32191
    oprot.writeStructBegin('updateHotspotStorePassword_args')
-
 
32192
    if self.storeId is not None:
-
 
32193
      oprot.writeFieldBegin('storeId', TType.I64, 1)
-
 
32194
      oprot.writeI64(self.storeId)
-
 
32195
      oprot.writeFieldEnd()
-
 
32196
    if self.password is not None:
-
 
32197
      oprot.writeFieldBegin('password', TType.STRING, 2)
-
 
32198
      oprot.writeString(self.password)
-
 
32199
      oprot.writeFieldEnd()
-
 
32200
    oprot.writeFieldStop()
-
 
32201
    oprot.writeStructEnd()
-
 
32202
 
-
 
32203
  def validate(self):
-
 
32204
    return
-
 
32205
 
-
 
32206
 
-
 
32207
  def __repr__(self):
-
 
32208
    L = ['%s=%r' % (key, value)
-
 
32209
      for key, value in self.__dict__.iteritems()]
-
 
32210
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
32211
 
-
 
32212
  def __eq__(self, other):
-
 
32213
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
32214
 
-
 
32215
  def __ne__(self, other):
-
 
32216
    return not (self == other)
-
 
32217
 
-
 
32218
class updateHotspotStorePassword_result:
-
 
32219
  """
-
 
32220
  Attributes:
-
 
32221
   - success
-
 
32222
  """
-
 
32223
 
-
 
32224
  thrift_spec = (
-
 
32225
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
32226
  )
-
 
32227
 
-
 
32228
  def __init__(self, success=None,):
-
 
32229
    self.success = success
-
 
32230
 
-
 
32231
  def read(self, iprot):
-
 
32232
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
32233
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
32234
      return
-
 
32235
    iprot.readStructBegin()
-
 
32236
    while True:
-
 
32237
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
32238
      if ftype == TType.STOP:
-
 
32239
        break
-
 
32240
      if fid == 0:
-
 
32241
        if ftype == TType.BOOL:
-
 
32242
          self.success = iprot.readBool();
-
 
32243
        else:
-
 
32244
          iprot.skip(ftype)
-
 
32245
      else:
-
 
32246
        iprot.skip(ftype)
-
 
32247
      iprot.readFieldEnd()
-
 
32248
    iprot.readStructEnd()
-
 
32249
 
-
 
32250
  def write(self, oprot):
-
 
32251
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
32252
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
32253
      return
-
 
32254
    oprot.writeStructBegin('updateHotspotStorePassword_result')
-
 
32255
    if self.success is not None:
-
 
32256
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
32257
      oprot.writeBool(self.success)
-
 
32258
      oprot.writeFieldEnd()
-
 
32259
    oprot.writeFieldStop()
-
 
32260
    oprot.writeStructEnd()
-
 
32261
 
-
 
32262
  def validate(self):
31903
    return
32263
    return
31904
 
32264
 
31905
 
32265
 
31906
  def __repr__(self):
32266
  def __repr__(self):
31907
    L = ['%s=%r' % (key, value)
32267
    L = ['%s=%r' % (key, value)