Subversion Repositories SmartDukaan

Rev

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

Rev 7293 Rev 7308
Line 1596... Line 1596...
1596
    Parameters:
1596
    Parameters:
1597
     - source
1597
     - source
1598
    """
1598
    """
1599
    pass
1599
    pass
1600
 
1600
 
-
 
1601
  def getAllCircles(self, ):
-
 
1602
    pass
-
 
1603
 
-
 
1604
  def deleteFrcs(self, frcIdsToDelete):
-
 
1605
    """
-
 
1606
    Parameters:
-
 
1607
     - frcIdsToDelete
-
 
1608
    """
-
 
1609
    pass
-
 
1610
 
1601
 
1611
 
1602
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1612
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1603
  def __init__(self, iprot, oprot=None):
1613
  def __init__(self, iprot, oprot=None):
1604
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1614
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1605
 
1615
 
Line 7310... Line 7320...
7310
    self._iprot.readMessageEnd()
7320
    self._iprot.readMessageEnd()
7311
    if result.success is not None:
7321
    if result.success is not None:
7312
      return result.success
7322
      return result.success
7313
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSourceDetail failed: unknown result");
7323
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSourceDetail failed: unknown result");
7314
 
7324
 
-
 
7325
  def getAllCircles(self, ):
-
 
7326
    self.send_getAllCircles()
-
 
7327
    return self.recv_getAllCircles()
-
 
7328
 
-
 
7329
  def send_getAllCircles(self, ):
-
 
7330
    self._oprot.writeMessageBegin('getAllCircles', TMessageType.CALL, self._seqid)
-
 
7331
    args = getAllCircles_args()
-
 
7332
    args.write(self._oprot)
-
 
7333
    self._oprot.writeMessageEnd()
-
 
7334
    self._oprot.trans.flush()
-
 
7335
 
-
 
7336
  def recv_getAllCircles(self, ):
-
 
7337
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7338
    if mtype == TMessageType.EXCEPTION:
-
 
7339
      x = TApplicationException()
-
 
7340
      x.read(self._iprot)
-
 
7341
      self._iprot.readMessageEnd()
-
 
7342
      raise x
-
 
7343
    result = getAllCircles_result()
-
 
7344
    result.read(self._iprot)
-
 
7345
    self._iprot.readMessageEnd()
-
 
7346
    if result.success is not None:
-
 
7347
      return result.success
-
 
7348
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllCircles failed: unknown result");
-
 
7349
 
-
 
7350
  def deleteFrcs(self, frcIdsToDelete):
-
 
7351
    """
-
 
7352
    Parameters:
-
 
7353
     - frcIdsToDelete
-
 
7354
    """
-
 
7355
    self.send_deleteFrcs(frcIdsToDelete)
-
 
7356
    return self.recv_deleteFrcs()
-
 
7357
 
-
 
7358
  def send_deleteFrcs(self, frcIdsToDelete):
-
 
7359
    self._oprot.writeMessageBegin('deleteFrcs', TMessageType.CALL, self._seqid)
-
 
7360
    args = deleteFrcs_args()
-
 
7361
    args.frcIdsToDelete = frcIdsToDelete
-
 
7362
    args.write(self._oprot)
-
 
7363
    self._oprot.writeMessageEnd()
-
 
7364
    self._oprot.trans.flush()
-
 
7365
 
-
 
7366
  def recv_deleteFrcs(self, ):
-
 
7367
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7368
    if mtype == TMessageType.EXCEPTION:
-
 
7369
      x = TApplicationException()
-
 
7370
      x.read(self._iprot)
-
 
7371
      self._iprot.readMessageEnd()
-
 
7372
      raise x
-
 
7373
    result = deleteFrcs_result()
-
 
7374
    result.read(self._iprot)
-
 
7375
    self._iprot.readMessageEnd()
-
 
7376
    if result.success is not None:
-
 
7377
      return result.success
-
 
7378
    raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteFrcs failed: unknown result");
-
 
7379
 
7315
 
7380
 
7316
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7381
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7317
  def __init__(self, handler):
7382
  def __init__(self, handler):
7318
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7383
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7319
    self._processMap["createTransaction"] = Processor.process_createTransaction
7384
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 7481... Line 7546...
7481
    self._processMap["getRechargeTransactionsByNumber"] = Processor.process_getRechargeTransactionsByNumber
7546
    self._processMap["getRechargeTransactionsByNumber"] = Processor.process_getRechargeTransactionsByNumber
7482
    self._processMap["updateHotspotStorePassword"] = Processor.process_updateHotspotStorePassword
7547
    self._processMap["updateHotspotStorePassword"] = Processor.process_updateHotspotStorePassword
7483
    self._processMap["topupCompanyWallet"] = Processor.process_topupCompanyWallet
7548
    self._processMap["topupCompanyWallet"] = Processor.process_topupCompanyWallet
7484
    self._processMap["getWalletBalanceForCompany"] = Processor.process_getWalletBalanceForCompany
7549
    self._processMap["getWalletBalanceForCompany"] = Processor.process_getWalletBalanceForCompany
7485
    self._processMap["getSourceDetail"] = Processor.process_getSourceDetail
7550
    self._processMap["getSourceDetail"] = Processor.process_getSourceDetail
-
 
7551
    self._processMap["getAllCircles"] = Processor.process_getAllCircles
-
 
7552
    self._processMap["deleteFrcs"] = Processor.process_deleteFrcs
7486
 
7553
 
7487
  def process(self, iprot, oprot):
7554
  def process(self, iprot, oprot):
7488
    (name, type, seqid) = iprot.readMessageBegin()
7555
    (name, type, seqid) = iprot.readMessageBegin()
7489
    if name not in self._processMap:
7556
    if name not in self._processMap:
7490
      iprot.skip(TType.STRUCT)
7557
      iprot.skip(TType.STRUCT)
Line 9628... Line 9695...
9628
    oprot.writeMessageBegin("getSourceDetail", TMessageType.REPLY, seqid)
9695
    oprot.writeMessageBegin("getSourceDetail", TMessageType.REPLY, seqid)
9629
    result.write(oprot)
9696
    result.write(oprot)
9630
    oprot.writeMessageEnd()
9697
    oprot.writeMessageEnd()
9631
    oprot.trans.flush()
9698
    oprot.trans.flush()
9632
 
9699
 
-
 
9700
  def process_getAllCircles(self, seqid, iprot, oprot):
-
 
9701
    args = getAllCircles_args()
-
 
9702
    args.read(iprot)
-
 
9703
    iprot.readMessageEnd()
-
 
9704
    result = getAllCircles_result()
-
 
9705
    result.success = self._handler.getAllCircles()
-
 
9706
    oprot.writeMessageBegin("getAllCircles", TMessageType.REPLY, seqid)
-
 
9707
    result.write(oprot)
-
 
9708
    oprot.writeMessageEnd()
-
 
9709
    oprot.trans.flush()
-
 
9710
 
-
 
9711
  def process_deleteFrcs(self, seqid, iprot, oprot):
-
 
9712
    args = deleteFrcs_args()
-
 
9713
    args.read(iprot)
-
 
9714
    iprot.readMessageEnd()
-
 
9715
    result = deleteFrcs_result()
-
 
9716
    result.success = self._handler.deleteFrcs(args.frcIdsToDelete)
-
 
9717
    oprot.writeMessageBegin("deleteFrcs", TMessageType.REPLY, seqid)
-
 
9718
    result.write(oprot)
-
 
9719
    oprot.writeMessageEnd()
-
 
9720
    oprot.trans.flush()
-
 
9721
 
9633
 
9722
 
9634
# HELPER FUNCTIONS AND STRUCTURES
9723
# HELPER FUNCTIONS AND STRUCTURES
9635
 
9724
 
9636
class createTransaction_args:
9725
class createTransaction_args:
9637
  """
9726
  """
Line 33022... Line 33111...
33022
      oprot.writeFieldEnd()
33111
      oprot.writeFieldEnd()
33023
    oprot.writeFieldStop()
33112
    oprot.writeFieldStop()
33024
    oprot.writeStructEnd()
33113
    oprot.writeStructEnd()
33025
 
33114
 
33026
  def validate(self):
33115
  def validate(self):
-
 
33116
    return
-
 
33117
 
-
 
33118
 
-
 
33119
  def __repr__(self):
-
 
33120
    L = ['%s=%r' % (key, value)
-
 
33121
      for key, value in self.__dict__.iteritems()]
-
 
33122
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33123
 
-
 
33124
  def __eq__(self, other):
-
 
33125
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33126
 
-
 
33127
  def __ne__(self, other):
-
 
33128
    return not (self == other)
-
 
33129
 
-
 
33130
class getAllCircles_args:
-
 
33131
 
-
 
33132
  thrift_spec = (
-
 
33133
  )
-
 
33134
 
-
 
33135
  def read(self, iprot):
-
 
33136
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33137
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33138
      return
-
 
33139
    iprot.readStructBegin()
-
 
33140
    while True:
-
 
33141
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33142
      if ftype == TType.STOP:
-
 
33143
        break
-
 
33144
      else:
-
 
33145
        iprot.skip(ftype)
-
 
33146
      iprot.readFieldEnd()
-
 
33147
    iprot.readStructEnd()
-
 
33148
 
-
 
33149
  def write(self, oprot):
-
 
33150
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33151
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33152
      return
-
 
33153
    oprot.writeStructBegin('getAllCircles_args')
-
 
33154
    oprot.writeFieldStop()
-
 
33155
    oprot.writeStructEnd()
-
 
33156
 
-
 
33157
  def validate(self):
-
 
33158
    return
-
 
33159
 
-
 
33160
 
-
 
33161
  def __repr__(self):
-
 
33162
    L = ['%s=%r' % (key, value)
-
 
33163
      for key, value in self.__dict__.iteritems()]
-
 
33164
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33165
 
-
 
33166
  def __eq__(self, other):
-
 
33167
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33168
 
-
 
33169
  def __ne__(self, other):
-
 
33170
    return not (self == other)
-
 
33171
 
-
 
33172
class getAllCircles_result:
-
 
33173
  """
-
 
33174
  Attributes:
-
 
33175
   - success
-
 
33176
  """
-
 
33177
 
-
 
33178
  thrift_spec = (
-
 
33179
    (0, TType.LIST, 'success', (TType.STRUCT,(TelecomCircle, TelecomCircle.thrift_spec)), None, ), # 0
-
 
33180
  )
-
 
33181
 
-
 
33182
  def __init__(self, success=None,):
-
 
33183
    self.success = success
-
 
33184
 
-
 
33185
  def read(self, iprot):
-
 
33186
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33187
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33188
      return
-
 
33189
    iprot.readStructBegin()
-
 
33190
    while True:
-
 
33191
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33192
      if ftype == TType.STOP:
-
 
33193
        break
-
 
33194
      if fid == 0:
-
 
33195
        if ftype == TType.LIST:
-
 
33196
          self.success = []
-
 
33197
          (_etype768, _size765) = iprot.readListBegin()
-
 
33198
          for _i769 in xrange(_size765):
-
 
33199
            _elem770 = TelecomCircle()
-
 
33200
            _elem770.read(iprot)
-
 
33201
            self.success.append(_elem770)
-
 
33202
          iprot.readListEnd()
-
 
33203
        else:
-
 
33204
          iprot.skip(ftype)
-
 
33205
      else:
-
 
33206
        iprot.skip(ftype)
-
 
33207
      iprot.readFieldEnd()
-
 
33208
    iprot.readStructEnd()
-
 
33209
 
-
 
33210
  def write(self, oprot):
-
 
33211
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33212
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33213
      return
-
 
33214
    oprot.writeStructBegin('getAllCircles_result')
-
 
33215
    if self.success is not None:
-
 
33216
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
33217
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
33218
      for iter771 in self.success:
-
 
33219
        iter771.write(oprot)
-
 
33220
      oprot.writeListEnd()
-
 
33221
      oprot.writeFieldEnd()
-
 
33222
    oprot.writeFieldStop()
-
 
33223
    oprot.writeStructEnd()
-
 
33224
 
-
 
33225
  def validate(self):
-
 
33226
    return
-
 
33227
 
-
 
33228
 
-
 
33229
  def __repr__(self):
-
 
33230
    L = ['%s=%r' % (key, value)
-
 
33231
      for key, value in self.__dict__.iteritems()]
-
 
33232
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33233
 
-
 
33234
  def __eq__(self, other):
-
 
33235
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33236
 
-
 
33237
  def __ne__(self, other):
-
 
33238
    return not (self == other)
-
 
33239
 
-
 
33240
class deleteFrcs_args:
-
 
33241
  """
-
 
33242
  Attributes:
-
 
33243
   - frcIdsToDelete
-
 
33244
  """
-
 
33245
 
-
 
33246
  thrift_spec = (
-
 
33247
    None, # 0
-
 
33248
    (1, TType.LIST, 'frcIdsToDelete', (TType.I64,None), None, ), # 1
-
 
33249
  )
-
 
33250
 
-
 
33251
  def __init__(self, frcIdsToDelete=None,):
-
 
33252
    self.frcIdsToDelete = frcIdsToDelete
-
 
33253
 
-
 
33254
  def read(self, iprot):
-
 
33255
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33256
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33257
      return
-
 
33258
    iprot.readStructBegin()
-
 
33259
    while True:
-
 
33260
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33261
      if ftype == TType.STOP:
-
 
33262
        break
-
 
33263
      if fid == 1:
-
 
33264
        if ftype == TType.LIST:
-
 
33265
          self.frcIdsToDelete = []
-
 
33266
          (_etype775, _size772) = iprot.readListBegin()
-
 
33267
          for _i776 in xrange(_size772):
-
 
33268
            _elem777 = iprot.readI64();
-
 
33269
            self.frcIdsToDelete.append(_elem777)
-
 
33270
          iprot.readListEnd()
-
 
33271
        else:
-
 
33272
          iprot.skip(ftype)
-
 
33273
      else:
-
 
33274
        iprot.skip(ftype)
-
 
33275
      iprot.readFieldEnd()
-
 
33276
    iprot.readStructEnd()
-
 
33277
 
-
 
33278
  def write(self, oprot):
-
 
33279
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33280
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33281
      return
-
 
33282
    oprot.writeStructBegin('deleteFrcs_args')
-
 
33283
    if self.frcIdsToDelete is not None:
-
 
33284
      oprot.writeFieldBegin('frcIdsToDelete', TType.LIST, 1)
-
 
33285
      oprot.writeListBegin(TType.I64, len(self.frcIdsToDelete))
-
 
33286
      for iter778 in self.frcIdsToDelete:
-
 
33287
        oprot.writeI64(iter778)
-
 
33288
      oprot.writeListEnd()
-
 
33289
      oprot.writeFieldEnd()
-
 
33290
    oprot.writeFieldStop()
-
 
33291
    oprot.writeStructEnd()
-
 
33292
 
-
 
33293
  def validate(self):
-
 
33294
    return
-
 
33295
 
-
 
33296
 
-
 
33297
  def __repr__(self):
-
 
33298
    L = ['%s=%r' % (key, value)
-
 
33299
      for key, value in self.__dict__.iteritems()]
-
 
33300
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33301
 
-
 
33302
  def __eq__(self, other):
-
 
33303
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33304
 
-
 
33305
  def __ne__(self, other):
-
 
33306
    return not (self == other)
-
 
33307
 
-
 
33308
class deleteFrcs_result:
-
 
33309
  """
-
 
33310
  Attributes:
-
 
33311
   - success
-
 
33312
  """
-
 
33313
 
-
 
33314
  thrift_spec = (
-
 
33315
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
33316
  )
-
 
33317
 
-
 
33318
  def __init__(self, success=None,):
-
 
33319
    self.success = success
-
 
33320
 
-
 
33321
  def read(self, iprot):
-
 
33322
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33323
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33324
      return
-
 
33325
    iprot.readStructBegin()
-
 
33326
    while True:
-
 
33327
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33328
      if ftype == TType.STOP:
-
 
33329
        break
-
 
33330
      if fid == 0:
-
 
33331
        if ftype == TType.BOOL:
-
 
33332
          self.success = iprot.readBool();
-
 
33333
        else:
-
 
33334
          iprot.skip(ftype)
-
 
33335
      else:
-
 
33336
        iprot.skip(ftype)
-
 
33337
      iprot.readFieldEnd()
-
 
33338
    iprot.readStructEnd()
-
 
33339
 
-
 
33340
  def write(self, oprot):
-
 
33341
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33342
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33343
      return
-
 
33344
    oprot.writeStructBegin('deleteFrcs_result')
-
 
33345
    if self.success is not None:
-
 
33346
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
33347
      oprot.writeBool(self.success)
-
 
33348
      oprot.writeFieldEnd()
-
 
33349
    oprot.writeFieldStop()
-
 
33350
    oprot.writeStructEnd()
-
 
33351
 
-
 
33352
  def validate(self):
33027
    return
33353
    return
33028
 
33354
 
33029
 
33355
 
33030
  def __repr__(self):
33356
  def __repr__(self):
33031
    L = ['%s=%r' % (key, value)
33357
    L = ['%s=%r' % (key, value)