Subversion Repositories SmartDukaan

Rev

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

Rev 18150 Rev 18602
Line 1360... Line 1360...
1360
    Parameters:
1360
    Parameters:
1361
     - item_id
1361
     - item_id
1362
    """
1362
    """
1363
    pass
1363
    pass
1364
 
1364
 
-
 
1365
  def updateBulkPricesOnProduction(self, item_id, bulkItemPricingList):
-
 
1366
    """
-
 
1367
    Parameters:
-
 
1368
     - item_id
-
 
1369
     - bulkItemPricingList
-
 
1370
    """
-
 
1371
    pass
-
 
1372
 
1365
 
1373
 
1366
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1374
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1367
  def __init__(self, iprot, oprot=None):
1375
  def __init__(self, iprot, oprot=None):
1368
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1376
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1369
 
1377
 
Line 7264... Line 7272...
7264
    self._iprot.readMessageEnd()
7272
    self._iprot.readMessageEnd()
7265
    if result.success is not None:
7273
    if result.success is not None:
7266
      return result.success
7274
      return result.success
7267
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBulkPricingByItemId failed: unknown result");
7275
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBulkPricingByItemId failed: unknown result");
7268
 
7276
 
-
 
7277
  def updateBulkPricesOnProduction(self, item_id, bulkItemPricingList):
-
 
7278
    """
-
 
7279
    Parameters:
-
 
7280
     - item_id
-
 
7281
     - bulkItemPricingList
-
 
7282
    """
-
 
7283
    self.send_updateBulkPricesOnProduction(item_id, bulkItemPricingList)
-
 
7284
    return self.recv_updateBulkPricesOnProduction()
-
 
7285
 
-
 
7286
  def send_updateBulkPricesOnProduction(self, item_id, bulkItemPricingList):
-
 
7287
    self._oprot.writeMessageBegin('updateBulkPricesOnProduction', TMessageType.CALL, self._seqid)
-
 
7288
    args = updateBulkPricesOnProduction_args()
-
 
7289
    args.item_id = item_id
-
 
7290
    args.bulkItemPricingList = bulkItemPricingList
-
 
7291
    args.write(self._oprot)
-
 
7292
    self._oprot.writeMessageEnd()
-
 
7293
    self._oprot.trans.flush()
-
 
7294
 
-
 
7295
  def recv_updateBulkPricesOnProduction(self, ):
-
 
7296
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7297
    if mtype == TMessageType.EXCEPTION:
-
 
7298
      x = TApplicationException()
-
 
7299
      x.read(self._iprot)
-
 
7300
      self._iprot.readMessageEnd()
-
 
7301
      raise x
-
 
7302
    result = updateBulkPricesOnProduction_result()
-
 
7303
    result.read(self._iprot)
-
 
7304
    self._iprot.readMessageEnd()
-
 
7305
    if result.success is not None:
-
 
7306
      return result.success
-
 
7307
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateBulkPricesOnProduction failed: unknown result");
-
 
7308
 
7269
 
7309
 
7270
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7310
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7271
  def __init__(self, handler):
7311
  def __init__(self, handler):
7272
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7312
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7273
    self._processMap["addItem"] = Processor.process_addItem
7313
    self._processMap["addItem"] = Processor.process_addItem
Line 7462... Line 7502...
7462
    self._processMap["getBulkPricingForItems"] = Processor.process_getBulkPricingForItems
7502
    self._processMap["getBulkPricingForItems"] = Processor.process_getBulkPricingForItems
7463
    self._processMap["addBulkPricingForItem"] = Processor.process_addBulkPricingForItem
7503
    self._processMap["addBulkPricingForItem"] = Processor.process_addBulkPricingForItem
7464
    self._processMap["deleteBulkPricingForItemById"] = Processor.process_deleteBulkPricingForItemById
7504
    self._processMap["deleteBulkPricingForItemById"] = Processor.process_deleteBulkPricingForItemById
7465
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7505
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7466
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7506
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
-
 
7507
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
7467
 
7508
 
7468
  def process(self, iprot, oprot):
7509
  def process(self, iprot, oprot):
7469
    (name, type, seqid) = iprot.readMessageBegin()
7510
    (name, type, seqid) = iprot.readMessageBegin()
7470
    if name not in self._processMap:
7511
    if name not in self._processMap:
7471
      iprot.skip(TType.STRUCT)
7512
      iprot.skip(TType.STRUCT)
Line 9756... Line 9797...
9756
    oprot.writeMessageBegin("getBulkPricingByItemId", TMessageType.REPLY, seqid)
9797
    oprot.writeMessageBegin("getBulkPricingByItemId", TMessageType.REPLY, seqid)
9757
    result.write(oprot)
9798
    result.write(oprot)
9758
    oprot.writeMessageEnd()
9799
    oprot.writeMessageEnd()
9759
    oprot.trans.flush()
9800
    oprot.trans.flush()
9760
 
9801
 
-
 
9802
  def process_updateBulkPricesOnProduction(self, seqid, iprot, oprot):
-
 
9803
    args = updateBulkPricesOnProduction_args()
-
 
9804
    args.read(iprot)
-
 
9805
    iprot.readMessageEnd()
-
 
9806
    result = updateBulkPricesOnProduction_result()
-
 
9807
    result.success = self._handler.updateBulkPricesOnProduction(args.item_id, args.bulkItemPricingList)
-
 
9808
    oprot.writeMessageBegin("updateBulkPricesOnProduction", TMessageType.REPLY, seqid)
-
 
9809
    result.write(oprot)
-
 
9810
    oprot.writeMessageEnd()
-
 
9811
    oprot.trans.flush()
-
 
9812
 
9761
 
9813
 
9762
# HELPER FUNCTIONS AND STRUCTURES
9814
# HELPER FUNCTIONS AND STRUCTURES
9763
 
9815
 
9764
class addItem_args:
9816
class addItem_args:
9765
  """
9817
  """
Line 34409... Line 34461...
34409
      oprot.writeFieldEnd()
34461
      oprot.writeFieldEnd()
34410
    oprot.writeFieldStop()
34462
    oprot.writeFieldStop()
34411
    oprot.writeStructEnd()
34463
    oprot.writeStructEnd()
34412
 
34464
 
34413
  def validate(self):
34465
  def validate(self):
-
 
34466
    return
-
 
34467
 
-
 
34468
 
-
 
34469
  def __repr__(self):
-
 
34470
    L = ['%s=%r' % (key, value)
-
 
34471
      for key, value in self.__dict__.iteritems()]
-
 
34472
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34473
 
-
 
34474
  def __eq__(self, other):
-
 
34475
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34476
 
-
 
34477
  def __ne__(self, other):
-
 
34478
    return not (self == other)
-
 
34479
 
-
 
34480
class updateBulkPricesOnProduction_args:
-
 
34481
  """
-
 
34482
  Attributes:
-
 
34483
   - item_id
-
 
34484
   - bulkItemPricingList
-
 
34485
  """
-
 
34486
 
-
 
34487
  thrift_spec = (
-
 
34488
    None, # 0
-
 
34489
    (1, TType.I64, 'item_id', None, None, ), # 1
-
 
34490
    (2, TType.LIST, 'bulkItemPricingList', (TType.STRUCT,(BulkItemPricing, BulkItemPricing.thrift_spec)), None, ), # 2
-
 
34491
  )
-
 
34492
 
-
 
34493
  def __init__(self, item_id=None, bulkItemPricingList=None,):
-
 
34494
    self.item_id = item_id
-
 
34495
    self.bulkItemPricingList = bulkItemPricingList
-
 
34496
 
-
 
34497
  def read(self, iprot):
-
 
34498
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34499
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34500
      return
-
 
34501
    iprot.readStructBegin()
-
 
34502
    while True:
-
 
34503
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34504
      if ftype == TType.STOP:
-
 
34505
        break
-
 
34506
      if fid == 1:
-
 
34507
        if ftype == TType.I64:
-
 
34508
          self.item_id = iprot.readI64();
-
 
34509
        else:
-
 
34510
          iprot.skip(ftype)
-
 
34511
      elif fid == 2:
-
 
34512
        if ftype == TType.LIST:
-
 
34513
          self.bulkItemPricingList = []
-
 
34514
          (_etype899, _size896) = iprot.readListBegin()
-
 
34515
          for _i900 in xrange(_size896):
-
 
34516
            _elem901 = BulkItemPricing()
-
 
34517
            _elem901.read(iprot)
-
 
34518
            self.bulkItemPricingList.append(_elem901)
-
 
34519
          iprot.readListEnd()
-
 
34520
        else:
-
 
34521
          iprot.skip(ftype)
-
 
34522
      else:
-
 
34523
        iprot.skip(ftype)
-
 
34524
      iprot.readFieldEnd()
-
 
34525
    iprot.readStructEnd()
-
 
34526
 
-
 
34527
  def write(self, oprot):
-
 
34528
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34529
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34530
      return
-
 
34531
    oprot.writeStructBegin('updateBulkPricesOnProduction_args')
-
 
34532
    if self.item_id is not None:
-
 
34533
      oprot.writeFieldBegin('item_id', TType.I64, 1)
-
 
34534
      oprot.writeI64(self.item_id)
-
 
34535
      oprot.writeFieldEnd()
-
 
34536
    if self.bulkItemPricingList is not None:
-
 
34537
      oprot.writeFieldBegin('bulkItemPricingList', TType.LIST, 2)
-
 
34538
      oprot.writeListBegin(TType.STRUCT, len(self.bulkItemPricingList))
-
 
34539
      for iter902 in self.bulkItemPricingList:
-
 
34540
        iter902.write(oprot)
-
 
34541
      oprot.writeListEnd()
-
 
34542
      oprot.writeFieldEnd()
-
 
34543
    oprot.writeFieldStop()
-
 
34544
    oprot.writeStructEnd()
-
 
34545
 
-
 
34546
  def validate(self):
-
 
34547
    return
-
 
34548
 
-
 
34549
 
-
 
34550
  def __repr__(self):
-
 
34551
    L = ['%s=%r' % (key, value)
-
 
34552
      for key, value in self.__dict__.iteritems()]
-
 
34553
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34554
 
-
 
34555
  def __eq__(self, other):
-
 
34556
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34557
 
-
 
34558
  def __ne__(self, other):
-
 
34559
    return not (self == other)
-
 
34560
 
-
 
34561
class updateBulkPricesOnProduction_result:
-
 
34562
  """
-
 
34563
  Attributes:
-
 
34564
   - success
-
 
34565
  """
-
 
34566
 
-
 
34567
  thrift_spec = (
-
 
34568
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
34569
  )
-
 
34570
 
-
 
34571
  def __init__(self, success=None,):
-
 
34572
    self.success = success
-
 
34573
 
-
 
34574
  def read(self, iprot):
-
 
34575
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34576
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34577
      return
-
 
34578
    iprot.readStructBegin()
-
 
34579
    while True:
-
 
34580
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34581
      if ftype == TType.STOP:
-
 
34582
        break
-
 
34583
      if fid == 0:
-
 
34584
        if ftype == TType.BOOL:
-
 
34585
          self.success = iprot.readBool();
-
 
34586
        else:
-
 
34587
          iprot.skip(ftype)
-
 
34588
      else:
-
 
34589
        iprot.skip(ftype)
-
 
34590
      iprot.readFieldEnd()
-
 
34591
    iprot.readStructEnd()
-
 
34592
 
-
 
34593
  def write(self, oprot):
-
 
34594
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34595
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34596
      return
-
 
34597
    oprot.writeStructBegin('updateBulkPricesOnProduction_result')
-
 
34598
    if self.success is not None:
-
 
34599
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
34600
      oprot.writeBool(self.success)
-
 
34601
      oprot.writeFieldEnd()
-
 
34602
    oprot.writeFieldStop()
-
 
34603
    oprot.writeStructEnd()
-
 
34604
 
-
 
34605
  def validate(self):
34414
    return
34606
    return
34415
 
34607
 
34416
 
34608
 
34417
  def __repr__(self):
34609
  def __repr__(self):
34418
    L = ['%s=%r' % (key, value)
34610
    L = ['%s=%r' % (key, value)