Subversion Repositories SmartDukaan

Rev

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

Rev 18764 Rev 19247
Line 1375... Line 1375...
1375
    Parameters:
1375
    Parameters:
1376
     - cartIds
1376
     - cartIds
1377
    """
1377
    """
1378
    pass
1378
    pass
1379
 
1379
 
-
 
1380
  def updateItemPricing(self, itemPricingList):
-
 
1381
    """
-
 
1382
    Parameters:
-
 
1383
     - itemPricingList
-
 
1384
    """
-
 
1385
    pass
-
 
1386
 
1380
 
1387
 
1381
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1388
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1382
  def __init__(self, iprot, oprot=None):
1389
  def __init__(self, iprot, oprot=None):
1383
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1390
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1384
 
1391
 
Line 7341... Line 7348...
7341
    self._iprot.readMessageEnd()
7348
    self._iprot.readMessageEnd()
7342
    if result.success is not None:
7349
    if result.success is not None:
7343
      return result.success
7350
      return result.success
7344
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
7351
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
7345
 
7352
 
-
 
7353
  def updateItemPricing(self, itemPricingList):
-
 
7354
    """
-
 
7355
    Parameters:
-
 
7356
     - itemPricingList
-
 
7357
    """
-
 
7358
    self.send_updateItemPricing(itemPricingList)
-
 
7359
    return self.recv_updateItemPricing()
-
 
7360
 
-
 
7361
  def send_updateItemPricing(self, itemPricingList):
-
 
7362
    self._oprot.writeMessageBegin('updateItemPricing', TMessageType.CALL, self._seqid)
-
 
7363
    args = updateItemPricing_args()
-
 
7364
    args.itemPricingList = itemPricingList
-
 
7365
    args.write(self._oprot)
-
 
7366
    self._oprot.writeMessageEnd()
-
 
7367
    self._oprot.trans.flush()
-
 
7368
 
-
 
7369
  def recv_updateItemPricing(self, ):
-
 
7370
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7371
    if mtype == TMessageType.EXCEPTION:
-
 
7372
      x = TApplicationException()
-
 
7373
      x.read(self._iprot)
-
 
7374
      self._iprot.readMessageEnd()
-
 
7375
      raise x
-
 
7376
    result = updateItemPricing_result()
-
 
7377
    result.read(self._iprot)
-
 
7378
    self._iprot.readMessageEnd()
-
 
7379
    if result.success is not None:
-
 
7380
      return result.success
-
 
7381
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemPricing failed: unknown result");
-
 
7382
 
7346
 
7383
 
7347
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7384
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7348
  def __init__(self, handler):
7385
  def __init__(self, handler):
7349
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7386
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7350
    self._processMap["addItem"] = Processor.process_addItem
7387
    self._processMap["addItem"] = Processor.process_addItem
Line 7541... Line 7578...
7541
    self._processMap["deleteBulkPricingForItemById"] = Processor.process_deleteBulkPricingForItemById
7578
    self._processMap["deleteBulkPricingForItemById"] = Processor.process_deleteBulkPricingForItemById
7542
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7579
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7543
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7580
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7544
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
7581
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
7545
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
7582
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
-
 
7583
    self._processMap["updateItemPricing"] = Processor.process_updateItemPricing
7546
 
7584
 
7547
  def process(self, iprot, oprot):
7585
  def process(self, iprot, oprot):
7548
    (name, type, seqid) = iprot.readMessageBegin()
7586
    (name, type, seqid) = iprot.readMessageBegin()
7549
    if name not in self._processMap:
7587
    if name not in self._processMap:
7550
      iprot.skip(TType.STRUCT)
7588
      iprot.skip(TType.STRUCT)
Line 9857... Line 9895...
9857
    oprot.writeMessageBegin("getCartByValue", TMessageType.REPLY, seqid)
9895
    oprot.writeMessageBegin("getCartByValue", TMessageType.REPLY, seqid)
9858
    result.write(oprot)
9896
    result.write(oprot)
9859
    oprot.writeMessageEnd()
9897
    oprot.writeMessageEnd()
9860
    oprot.trans.flush()
9898
    oprot.trans.flush()
9861
 
9899
 
-
 
9900
  def process_updateItemPricing(self, seqid, iprot, oprot):
-
 
9901
    args = updateItemPricing_args()
-
 
9902
    args.read(iprot)
-
 
9903
    iprot.readMessageEnd()
-
 
9904
    result = updateItemPricing_result()
-
 
9905
    result.success = self._handler.updateItemPricing(args.itemPricingList)
-
 
9906
    oprot.writeMessageBegin("updateItemPricing", TMessageType.REPLY, seqid)
-
 
9907
    result.write(oprot)
-
 
9908
    oprot.writeMessageEnd()
-
 
9909
    oprot.trans.flush()
-
 
9910
 
9862
 
9911
 
9863
# HELPER FUNCTIONS AND STRUCTURES
9912
# HELPER FUNCTIONS AND STRUCTURES
9864
 
9913
 
9865
class addItem_args:
9914
class addItem_args:
9866
  """
9915
  """
Line 34785... Line 34834...
34785
      oprot.writeFieldEnd()
34834
      oprot.writeFieldEnd()
34786
    oprot.writeFieldStop()
34835
    oprot.writeFieldStop()
34787
    oprot.writeStructEnd()
34836
    oprot.writeStructEnd()
34788
 
34837
 
34789
  def validate(self):
34838
  def validate(self):
-
 
34839
    return
-
 
34840
 
-
 
34841
 
-
 
34842
  def __repr__(self):
-
 
34843
    L = ['%s=%r' % (key, value)
-
 
34844
      for key, value in self.__dict__.iteritems()]
-
 
34845
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34846
 
-
 
34847
  def __eq__(self, other):
-
 
34848
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34849
 
-
 
34850
  def __ne__(self, other):
-
 
34851
    return not (self == other)
-
 
34852
 
-
 
34853
class updateItemPricing_args:
-
 
34854
  """
-
 
34855
  Attributes:
-
 
34856
   - itemPricingList
-
 
34857
  """
-
 
34858
 
-
 
34859
  thrift_spec = (
-
 
34860
    None, # 0
-
 
34861
    (1, TType.LIST, 'itemPricingList', (TType.STRUCT,(ItemPricing, ItemPricing.thrift_spec)), None, ), # 1
-
 
34862
  )
-
 
34863
 
-
 
34864
  def __init__(self, itemPricingList=None,):
-
 
34865
    self.itemPricingList = itemPricingList
-
 
34866
 
-
 
34867
  def read(self, iprot):
-
 
34868
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34869
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34870
      return
-
 
34871
    iprot.readStructBegin()
-
 
34872
    while True:
-
 
34873
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34874
      if ftype == TType.STOP:
-
 
34875
        break
-
 
34876
      if fid == 1:
-
 
34877
        if ftype == TType.LIST:
-
 
34878
          self.itemPricingList = []
-
 
34879
          (_etype929, _size926) = iprot.readListBegin()
-
 
34880
          for _i930 in xrange(_size926):
-
 
34881
            _elem931 = ItemPricing()
-
 
34882
            _elem931.read(iprot)
-
 
34883
            self.itemPricingList.append(_elem931)
-
 
34884
          iprot.readListEnd()
-
 
34885
        else:
-
 
34886
          iprot.skip(ftype)
-
 
34887
      else:
-
 
34888
        iprot.skip(ftype)
-
 
34889
      iprot.readFieldEnd()
-
 
34890
    iprot.readStructEnd()
-
 
34891
 
-
 
34892
  def write(self, oprot):
-
 
34893
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34894
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34895
      return
-
 
34896
    oprot.writeStructBegin('updateItemPricing_args')
-
 
34897
    if self.itemPricingList is not None:
-
 
34898
      oprot.writeFieldBegin('itemPricingList', TType.LIST, 1)
-
 
34899
      oprot.writeListBegin(TType.STRUCT, len(self.itemPricingList))
-
 
34900
      for iter932 in self.itemPricingList:
-
 
34901
        iter932.write(oprot)
-
 
34902
      oprot.writeListEnd()
-
 
34903
      oprot.writeFieldEnd()
-
 
34904
    oprot.writeFieldStop()
-
 
34905
    oprot.writeStructEnd()
-
 
34906
 
-
 
34907
  def validate(self):
-
 
34908
    return
-
 
34909
 
-
 
34910
 
-
 
34911
  def __repr__(self):
-
 
34912
    L = ['%s=%r' % (key, value)
-
 
34913
      for key, value in self.__dict__.iteritems()]
-
 
34914
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34915
 
-
 
34916
  def __eq__(self, other):
-
 
34917
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34918
 
-
 
34919
  def __ne__(self, other):
-
 
34920
    return not (self == other)
-
 
34921
 
-
 
34922
class updateItemPricing_result:
-
 
34923
  """
-
 
34924
  Attributes:
-
 
34925
   - success
-
 
34926
  """
-
 
34927
 
-
 
34928
  thrift_spec = (
-
 
34929
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
34930
  )
-
 
34931
 
-
 
34932
  def __init__(self, success=None,):
-
 
34933
    self.success = success
-
 
34934
 
-
 
34935
  def read(self, iprot):
-
 
34936
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34937
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34938
      return
-
 
34939
    iprot.readStructBegin()
-
 
34940
    while True:
-
 
34941
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34942
      if ftype == TType.STOP:
-
 
34943
        break
-
 
34944
      if fid == 0:
-
 
34945
        if ftype == TType.BOOL:
-
 
34946
          self.success = iprot.readBool();
-
 
34947
        else:
-
 
34948
          iprot.skip(ftype)
-
 
34949
      else:
-
 
34950
        iprot.skip(ftype)
-
 
34951
      iprot.readFieldEnd()
-
 
34952
    iprot.readStructEnd()
-
 
34953
 
-
 
34954
  def write(self, oprot):
-
 
34955
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34956
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34957
      return
-
 
34958
    oprot.writeStructBegin('updateItemPricing_result')
-
 
34959
    if self.success is not None:
-
 
34960
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
34961
      oprot.writeBool(self.success)
-
 
34962
      oprot.writeFieldEnd()
-
 
34963
    oprot.writeFieldStop()
-
 
34964
    oprot.writeStructEnd()
-
 
34965
 
-
 
34966
  def validate(self):
34790
    return
34967
    return
34791
 
34968
 
34792
 
34969
 
34793
  def __repr__(self):
34970
  def __repr__(self):
34794
    L = ['%s=%r' % (key, value)
34971
    L = ['%s=%r' % (key, value)