Subversion Repositories SmartDukaan

Rev

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

Rev 14182 Rev 14362
Line 1319... Line 1319...
1319
    Parameters:
1319
    Parameters:
1320
     - catalogItemId
1320
     - catalogItemId
1321
    """
1321
    """
1322
    pass
1322
    pass
1323
 
1323
 
-
 
1324
  def getLatestPricing(self, skuBundleId, source_id):
-
 
1325
    """
-
 
1326
    Parameters:
-
 
1327
     - skuBundleId
-
 
1328
     - source_id
-
 
1329
    """
-
 
1330
    pass
-
 
1331
 
1324
 
1332
 
1325
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1333
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1326
  def __init__(self, iprot, oprot=None):
1334
  def __init__(self, iprot, oprot=None):
1327
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1335
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1328
 
1336
 
Line 7023... Line 7031...
7023
    self._iprot.readMessageEnd()
7031
    self._iprot.readMessageEnd()
7024
    if result.success is not None:
7032
    if result.success is not None:
7025
      return result.success
7033
      return result.success
7026
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPricingForDtr failed: unknown result");
7034
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPricingForDtr failed: unknown result");
7027
 
7035
 
-
 
7036
  def getLatestPricing(self, skuBundleId, source_id):
-
 
7037
    """
-
 
7038
    Parameters:
-
 
7039
     - skuBundleId
-
 
7040
     - source_id
-
 
7041
    """
-
 
7042
    self.send_getLatestPricing(skuBundleId, source_id)
-
 
7043
    return self.recv_getLatestPricing()
-
 
7044
 
-
 
7045
  def send_getLatestPricing(self, skuBundleId, source_id):
-
 
7046
    self._oprot.writeMessageBegin('getLatestPricing', TMessageType.CALL, self._seqid)
-
 
7047
    args = getLatestPricing_args()
-
 
7048
    args.skuBundleId = skuBundleId
-
 
7049
    args.source_id = source_id
-
 
7050
    args.write(self._oprot)
-
 
7051
    self._oprot.writeMessageEnd()
-
 
7052
    self._oprot.trans.flush()
-
 
7053
 
-
 
7054
  def recv_getLatestPricing(self, ):
-
 
7055
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7056
    if mtype == TMessageType.EXCEPTION:
-
 
7057
      x = TApplicationException()
-
 
7058
      x.read(self._iprot)
-
 
7059
      self._iprot.readMessageEnd()
-
 
7060
      raise x
-
 
7061
    result = getLatestPricing_result()
-
 
7062
    result.read(self._iprot)
-
 
7063
    self._iprot.readMessageEnd()
-
 
7064
    if result.success is not None:
-
 
7065
      return result.success
-
 
7066
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLatestPricing failed: unknown result");
-
 
7067
 
7028
 
7068
 
7029
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7069
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7030
  def __init__(self, handler):
7070
  def __init__(self, handler):
7031
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7071
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7032
    self._processMap["addItem"] = Processor.process_addItem
7072
    self._processMap["addItem"] = Processor.process_addItem
Line 7214... Line 7254...
7214
    self._processMap["checkServices"] = Processor.process_checkServices
7254
    self._processMap["checkServices"] = Processor.process_checkServices
7215
    self._processMap["addHsItem"] = Processor.process_addHsItem
7255
    self._processMap["addHsItem"] = Processor.process_addHsItem
7216
    self._processMap["getHsItem"] = Processor.process_getHsItem
7256
    self._processMap["getHsItem"] = Processor.process_getHsItem
7217
    self._processMap["updateHsItem"] = Processor.process_updateHsItem
7257
    self._processMap["updateHsItem"] = Processor.process_updateHsItem
7218
    self._processMap["getPricingForDtr"] = Processor.process_getPricingForDtr
7258
    self._processMap["getPricingForDtr"] = Processor.process_getPricingForDtr
-
 
7259
    self._processMap["getLatestPricing"] = Processor.process_getLatestPricing
7219
 
7260
 
7220
  def process(self, iprot, oprot):
7261
  def process(self, iprot, oprot):
7221
    (name, type, seqid) = iprot.readMessageBegin()
7262
    (name, type, seqid) = iprot.readMessageBegin()
7222
    if name not in self._processMap:
7263
    if name not in self._processMap:
7223
      iprot.skip(TType.STRUCT)
7264
      iprot.skip(TType.STRUCT)
Line 9431... Line 9472...
9431
    oprot.writeMessageBegin("getPricingForDtr", TMessageType.REPLY, seqid)
9472
    oprot.writeMessageBegin("getPricingForDtr", TMessageType.REPLY, seqid)
9432
    result.write(oprot)
9473
    result.write(oprot)
9433
    oprot.writeMessageEnd()
9474
    oprot.writeMessageEnd()
9434
    oprot.trans.flush()
9475
    oprot.trans.flush()
9435
 
9476
 
-
 
9477
  def process_getLatestPricing(self, seqid, iprot, oprot):
-
 
9478
    args = getLatestPricing_args()
-
 
9479
    args.read(iprot)
-
 
9480
    iprot.readMessageEnd()
-
 
9481
    result = getLatestPricing_result()
-
 
9482
    result.success = self._handler.getLatestPricing(args.skuBundleId, args.source_id)
-
 
9483
    oprot.writeMessageBegin("getLatestPricing", TMessageType.REPLY, seqid)
-
 
9484
    result.write(oprot)
-
 
9485
    oprot.writeMessageEnd()
-
 
9486
    oprot.trans.flush()
-
 
9487
 
9436
 
9488
 
9437
# HELPER FUNCTIONS AND STRUCTURES
9489
# HELPER FUNCTIONS AND STRUCTURES
9438
 
9490
 
9439
class addItem_args:
9491
class addItem_args:
9440
  """
9492
  """
Line 33231... Line 33283...
33231
      oprot.writeFieldEnd()
33283
      oprot.writeFieldEnd()
33232
    oprot.writeFieldStop()
33284
    oprot.writeFieldStop()
33233
    oprot.writeStructEnd()
33285
    oprot.writeStructEnd()
33234
 
33286
 
33235
  def validate(self):
33287
  def validate(self):
-
 
33288
    return
-
 
33289
 
-
 
33290
 
-
 
33291
  def __repr__(self):
-
 
33292
    L = ['%s=%r' % (key, value)
-
 
33293
      for key, value in self.__dict__.iteritems()]
-
 
33294
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33295
 
-
 
33296
  def __eq__(self, other):
-
 
33297
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33298
 
-
 
33299
  def __ne__(self, other):
-
 
33300
    return not (self == other)
-
 
33301
 
-
 
33302
class getLatestPricing_args:
-
 
33303
  """
-
 
33304
  Attributes:
-
 
33305
   - skuBundleId
-
 
33306
   - source_id
-
 
33307
  """
-
 
33308
 
-
 
33309
  thrift_spec = (
-
 
33310
    None, # 0
-
 
33311
    (1, TType.I64, 'skuBundleId', None, None, ), # 1
-
 
33312
    (2, TType.I64, 'source_id', None, None, ), # 2
-
 
33313
  )
-
 
33314
 
-
 
33315
  def __init__(self, skuBundleId=None, source_id=None,):
-
 
33316
    self.skuBundleId = skuBundleId
-
 
33317
    self.source_id = source_id
-
 
33318
 
-
 
33319
  def read(self, iprot):
-
 
33320
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33321
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33322
      return
-
 
33323
    iprot.readStructBegin()
-
 
33324
    while True:
-
 
33325
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33326
      if ftype == TType.STOP:
-
 
33327
        break
-
 
33328
      if fid == 1:
-
 
33329
        if ftype == TType.I64:
-
 
33330
          self.skuBundleId = iprot.readI64();
-
 
33331
        else:
-
 
33332
          iprot.skip(ftype)
-
 
33333
      elif fid == 2:
-
 
33334
        if ftype == TType.I64:
-
 
33335
          self.source_id = iprot.readI64();
-
 
33336
        else:
-
 
33337
          iprot.skip(ftype)
-
 
33338
      else:
-
 
33339
        iprot.skip(ftype)
-
 
33340
      iprot.readFieldEnd()
-
 
33341
    iprot.readStructEnd()
-
 
33342
 
-
 
33343
  def write(self, oprot):
-
 
33344
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33345
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33346
      return
-
 
33347
    oprot.writeStructBegin('getLatestPricing_args')
-
 
33348
    if self.skuBundleId is not None:
-
 
33349
      oprot.writeFieldBegin('skuBundleId', TType.I64, 1)
-
 
33350
      oprot.writeI64(self.skuBundleId)
-
 
33351
      oprot.writeFieldEnd()
-
 
33352
    if self.source_id is not None:
-
 
33353
      oprot.writeFieldBegin('source_id', TType.I64, 2)
-
 
33354
      oprot.writeI64(self.source_id)
-
 
33355
      oprot.writeFieldEnd()
-
 
33356
    oprot.writeFieldStop()
-
 
33357
    oprot.writeStructEnd()
-
 
33358
 
-
 
33359
  def validate(self):
-
 
33360
    return
-
 
33361
 
-
 
33362
 
-
 
33363
  def __repr__(self):
-
 
33364
    L = ['%s=%r' % (key, value)
-
 
33365
      for key, value in self.__dict__.iteritems()]
-
 
33366
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33367
 
-
 
33368
  def __eq__(self, other):
-
 
33369
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33370
 
-
 
33371
  def __ne__(self, other):
-
 
33372
    return not (self == other)
-
 
33373
 
-
 
33374
class getLatestPricing_result:
-
 
33375
  """
-
 
33376
  Attributes:
-
 
33377
   - success
-
 
33378
  """
-
 
33379
 
-
 
33380
  thrift_spec = (
-
 
33381
    (0, TType.LIST, 'success', (TType.STRUCT,(LivePricing, LivePricing.thrift_spec)), None, ), # 0
-
 
33382
  )
-
 
33383
 
-
 
33384
  def __init__(self, success=None,):
-
 
33385
    self.success = success
-
 
33386
 
-
 
33387
  def read(self, iprot):
-
 
33388
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33389
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33390
      return
-
 
33391
    iprot.readStructBegin()
-
 
33392
    while True:
-
 
33393
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33394
      if ftype == TType.STOP:
-
 
33395
        break
-
 
33396
      if fid == 0:
-
 
33397
        if ftype == TType.LIST:
-
 
33398
          self.success = []
-
 
33399
          (_etype855, _size852) = iprot.readListBegin()
-
 
33400
          for _i856 in xrange(_size852):
-
 
33401
            _elem857 = LivePricing()
-
 
33402
            _elem857.read(iprot)
-
 
33403
            self.success.append(_elem857)
-
 
33404
          iprot.readListEnd()
-
 
33405
        else:
-
 
33406
          iprot.skip(ftype)
-
 
33407
      else:
-
 
33408
        iprot.skip(ftype)
-
 
33409
      iprot.readFieldEnd()
-
 
33410
    iprot.readStructEnd()
-
 
33411
 
-
 
33412
  def write(self, oprot):
-
 
33413
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33414
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33415
      return
-
 
33416
    oprot.writeStructBegin('getLatestPricing_result')
-
 
33417
    if self.success is not None:
-
 
33418
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
33419
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
33420
      for iter858 in self.success:
-
 
33421
        iter858.write(oprot)
-
 
33422
      oprot.writeListEnd()
-
 
33423
      oprot.writeFieldEnd()
-
 
33424
    oprot.writeFieldStop()
-
 
33425
    oprot.writeStructEnd()
-
 
33426
 
-
 
33427
  def validate(self):
33236
    return
33428
    return
33237
 
33429
 
33238
 
33430
 
33239
  def __repr__(self):
33431
  def __repr__(self):
33240
    L = ['%s=%r' % (key, value)
33432
    L = ['%s=%r' % (key, value)