Subversion Repositories SmartDukaan

Rev

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

Rev 6921 Rev 6962
Line 645... Line 645...
645
    pass
645
    pass
646
 
646
 
647
  def getAllInsurers(self, ):
647
  def getAllInsurers(self, ):
648
    pass
648
    pass
649
 
649
 
-
 
650
  def updateInsuranceDeclaredAmount(self, insurerId, amount):
-
 
651
    """
-
 
652
    Parameters:
-
 
653
     - insurerId
-
 
654
     - amount
-
 
655
    """
-
 
656
    pass
-
 
657
 
650
 
658
 
651
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
659
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
652
  def __init__(self, iprot, oprot=None):
660
  def __init__(self, iprot, oprot=None):
653
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
661
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
654
 
662
 
Line 3266... Line 3274...
3266
    self._iprot.readMessageEnd()
3274
    self._iprot.readMessageEnd()
3267
    if result.success is not None:
3275
    if result.success is not None:
3268
      return result.success
3276
      return result.success
3269
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInsurers failed: unknown result");
3277
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInsurers failed: unknown result");
3270
 
3278
 
-
 
3279
  def updateInsuranceDeclaredAmount(self, insurerId, amount):
-
 
3280
    """
-
 
3281
    Parameters:
-
 
3282
     - insurerId
-
 
3283
     - amount
-
 
3284
    """
-
 
3285
    self.send_updateInsuranceDeclaredAmount(insurerId, amount)
-
 
3286
    self.recv_updateInsuranceDeclaredAmount()
-
 
3287
 
-
 
3288
  def send_updateInsuranceDeclaredAmount(self, insurerId, amount):
-
 
3289
    self._oprot.writeMessageBegin('updateInsuranceDeclaredAmount', TMessageType.CALL, self._seqid)
-
 
3290
    args = updateInsuranceDeclaredAmount_args()
-
 
3291
    args.insurerId = insurerId
-
 
3292
    args.amount = amount
-
 
3293
    args.write(self._oprot)
-
 
3294
    self._oprot.writeMessageEnd()
-
 
3295
    self._oprot.trans.flush()
-
 
3296
 
-
 
3297
  def recv_updateInsuranceDeclaredAmount(self, ):
-
 
3298
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3299
    if mtype == TMessageType.EXCEPTION:
-
 
3300
      x = TApplicationException()
-
 
3301
      x.read(self._iprot)
-
 
3302
      self._iprot.readMessageEnd()
-
 
3303
      raise x
-
 
3304
    result = updateInsuranceDeclaredAmount_result()
-
 
3305
    result.read(self._iprot)
-
 
3306
    self._iprot.readMessageEnd()
-
 
3307
    return
-
 
3308
 
3271
 
3309
 
3272
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3310
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3273
  def __init__(self, handler):
3311
  def __init__(self, handler):
3274
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3312
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3275
    self._processMap["addItem"] = Processor.process_addItem
3313
    self._processMap["addItem"] = Processor.process_addItem
Line 3352... Line 3390...
3352
    self._processMap["getAllIgnoredInventoryUpdateItemsList"] = Processor.process_getAllIgnoredInventoryUpdateItemsList
3390
    self._processMap["getAllIgnoredInventoryUpdateItemsList"] = Processor.process_getAllIgnoredInventoryUpdateItemsList
3353
    self._processMap["getAllAliveItems"] = Processor.process_getAllAliveItems
3391
    self._processMap["getAllAliveItems"] = Processor.process_getAllAliveItems
3354
    self._processMap["getInsuranceAmount"] = Processor.process_getInsuranceAmount
3392
    self._processMap["getInsuranceAmount"] = Processor.process_getInsuranceAmount
3355
    self._processMap["getInsurer"] = Processor.process_getInsurer
3393
    self._processMap["getInsurer"] = Processor.process_getInsurer
3356
    self._processMap["getAllInsurers"] = Processor.process_getAllInsurers
3394
    self._processMap["getAllInsurers"] = Processor.process_getAllInsurers
-
 
3395
    self._processMap["updateInsuranceDeclaredAmount"] = Processor.process_updateInsuranceDeclaredAmount
3357
 
3396
 
3358
  def process(self, iprot, oprot):
3397
  def process(self, iprot, oprot):
3359
    (name, type, seqid) = iprot.readMessageBegin()
3398
    (name, type, seqid) = iprot.readMessageBegin()
3360
    if name not in self._processMap:
3399
    if name not in self._processMap:
3361
      iprot.skip(TType.STRUCT)
3400
      iprot.skip(TType.STRUCT)
Line 4381... Line 4420...
4381
    oprot.writeMessageBegin("getAllInsurers", TMessageType.REPLY, seqid)
4420
    oprot.writeMessageBegin("getAllInsurers", TMessageType.REPLY, seqid)
4382
    result.write(oprot)
4421
    result.write(oprot)
4383
    oprot.writeMessageEnd()
4422
    oprot.writeMessageEnd()
4384
    oprot.trans.flush()
4423
    oprot.trans.flush()
4385
 
4424
 
-
 
4425
  def process_updateInsuranceDeclaredAmount(self, seqid, iprot, oprot):
-
 
4426
    args = updateInsuranceDeclaredAmount_args()
-
 
4427
    args.read(iprot)
-
 
4428
    iprot.readMessageEnd()
-
 
4429
    result = updateInsuranceDeclaredAmount_result()
-
 
4430
    self._handler.updateInsuranceDeclaredAmount(args.insurerId, args.amount)
-
 
4431
    oprot.writeMessageBegin("updateInsuranceDeclaredAmount", TMessageType.REPLY, seqid)
-
 
4432
    result.write(oprot)
-
 
4433
    oprot.writeMessageEnd()
-
 
4434
    oprot.trans.flush()
-
 
4435
 
4386
 
4436
 
4387
# HELPER FUNCTIONS AND STRUCTURES
4437
# HELPER FUNCTIONS AND STRUCTURES
4388
 
4438
 
4389
class addItem_args:
4439
class addItem_args:
4390
  """
4440
  """
Line 15224... Line 15274...
15224
    oprot.writeFieldStop()
15274
    oprot.writeFieldStop()
15225
    oprot.writeStructEnd()
15275
    oprot.writeStructEnd()
15226
 
15276
 
15227
  def validate(self):
15277
  def validate(self):
15228
    return
15278
    return
-
 
15279
 
-
 
15280
 
-
 
15281
  def __repr__(self):
-
 
15282
    L = ['%s=%r' % (key, value)
-
 
15283
      for key, value in self.__dict__.iteritems()]
-
 
15284
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
15285
 
-
 
15286
  def __eq__(self, other):
-
 
15287
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
15288
 
-
 
15289
  def __ne__(self, other):
-
 
15290
    return not (self == other)
-
 
15291
 
-
 
15292
class updateInsuranceDeclaredAmount_args:
-
 
15293
  """
-
 
15294
  Attributes:
-
 
15295
   - insurerId
-
 
15296
   - amount
-
 
15297
  """
-
 
15298
 
-
 
15299
  thrift_spec = (
-
 
15300
    None, # 0
-
 
15301
    (1, TType.I64, 'insurerId', None, None, ), # 1
-
 
15302
    (2, TType.DOUBLE, 'amount', None, None, ), # 2
-
 
15303
  )
-
 
15304
 
-
 
15305
  def __init__(self, insurerId=None, amount=None,):
-
 
15306
    self.insurerId = insurerId
-
 
15307
    self.amount = amount
-
 
15308
 
-
 
15309
  def read(self, iprot):
-
 
15310
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
15311
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
15312
      return
-
 
15313
    iprot.readStructBegin()
-
 
15314
    while True:
-
 
15315
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
15316
      if ftype == TType.STOP:
-
 
15317
        break
-
 
15318
      if fid == 1:
-
 
15319
        if ftype == TType.I64:
-
 
15320
          self.insurerId = iprot.readI64();
-
 
15321
        else:
-
 
15322
          iprot.skip(ftype)
-
 
15323
      elif fid == 2:
-
 
15324
        if ftype == TType.DOUBLE:
-
 
15325
          self.amount = iprot.readDouble();
-
 
15326
        else:
-
 
15327
          iprot.skip(ftype)
-
 
15328
      else:
-
 
15329
        iprot.skip(ftype)
-
 
15330
      iprot.readFieldEnd()
-
 
15331
    iprot.readStructEnd()
-
 
15332
 
-
 
15333
  def write(self, oprot):
-
 
15334
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
15335
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
15336
      return
-
 
15337
    oprot.writeStructBegin('updateInsuranceDeclaredAmount_args')
-
 
15338
    if self.insurerId is not None:
-
 
15339
      oprot.writeFieldBegin('insurerId', TType.I64, 1)
-
 
15340
      oprot.writeI64(self.insurerId)
-
 
15341
      oprot.writeFieldEnd()
-
 
15342
    if self.amount is not None:
-
 
15343
      oprot.writeFieldBegin('amount', TType.DOUBLE, 2)
-
 
15344
      oprot.writeDouble(self.amount)
-
 
15345
      oprot.writeFieldEnd()
-
 
15346
    oprot.writeFieldStop()
-
 
15347
    oprot.writeStructEnd()
-
 
15348
 
-
 
15349
  def validate(self):
-
 
15350
    return
-
 
15351
 
-
 
15352
 
-
 
15353
  def __repr__(self):
-
 
15354
    L = ['%s=%r' % (key, value)
-
 
15355
      for key, value in self.__dict__.iteritems()]
-
 
15356
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
15357
 
-
 
15358
  def __eq__(self, other):
-
 
15359
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
15360
 
-
 
15361
  def __ne__(self, other):
-
 
15362
    return not (self == other)
-
 
15363
 
-
 
15364
class updateInsuranceDeclaredAmount_result:
-
 
15365
 
-
 
15366
  thrift_spec = (
-
 
15367
  )
-
 
15368
 
-
 
15369
  def read(self, iprot):
-
 
15370
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
15371
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
15372
      return
-
 
15373
    iprot.readStructBegin()
-
 
15374
    while True:
-
 
15375
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
15376
      if ftype == TType.STOP:
-
 
15377
        break
-
 
15378
      else:
-
 
15379
        iprot.skip(ftype)
-
 
15380
      iprot.readFieldEnd()
-
 
15381
    iprot.readStructEnd()
-
 
15382
 
-
 
15383
  def write(self, oprot):
-
 
15384
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
15385
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
15386
      return
-
 
15387
    oprot.writeStructBegin('updateInsuranceDeclaredAmount_result')
-
 
15388
    oprot.writeFieldStop()
-
 
15389
    oprot.writeStructEnd()
-
 
15390
 
-
 
15391
  def validate(self):
-
 
15392
    return
15229
 
15393
 
15230
 
15394
 
15231
  def __repr__(self):
15395
  def __repr__(self):
15232
    L = ['%s=%r' % (key, value)
15396
    L = ['%s=%r' % (key, value)
15233
      for key, value in self.__dict__.iteritems()]
15397
      for key, value in self.__dict__.iteritems()]