Subversion Repositories SmartDukaan

Rev

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

Rev 18719 Rev 18764
Line 1368... Line 1368...
1368
     - item_id
1368
     - item_id
1369
     - bulkItemPricingList
1369
     - bulkItemPricingList
1370
    """
1370
    """
1371
    pass
1371
    pass
1372
 
1372
 
-
 
1373
  def getCartByValue(self, cartIds):
-
 
1374
    """
-
 
1375
    Parameters:
-
 
1376
     - cartIds
-
 
1377
    """
-
 
1378
    pass
-
 
1379
 
1373
 
1380
 
1374
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1381
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1375
  def __init__(self, iprot, oprot=None):
1382
  def __init__(self, iprot, oprot=None):
1376
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1383
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1377
 
1384
 
Line 7304... Line 7311...
7304
    self._iprot.readMessageEnd()
7311
    self._iprot.readMessageEnd()
7305
    if result.success is not None:
7312
    if result.success is not None:
7306
      return result.success
7313
      return result.success
7307
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateBulkPricesOnProduction failed: unknown result");
7314
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateBulkPricesOnProduction failed: unknown result");
7308
 
7315
 
-
 
7316
  def getCartByValue(self, cartIds):
-
 
7317
    """
-
 
7318
    Parameters:
-
 
7319
     - cartIds
-
 
7320
    """
-
 
7321
    self.send_getCartByValue(cartIds)
-
 
7322
    return self.recv_getCartByValue()
-
 
7323
 
-
 
7324
  def send_getCartByValue(self, cartIds):
-
 
7325
    self._oprot.writeMessageBegin('getCartByValue', TMessageType.CALL, self._seqid)
-
 
7326
    args = getCartByValue_args()
-
 
7327
    args.cartIds = cartIds
-
 
7328
    args.write(self._oprot)
-
 
7329
    self._oprot.writeMessageEnd()
-
 
7330
    self._oprot.trans.flush()
-
 
7331
 
-
 
7332
  def recv_getCartByValue(self, ):
-
 
7333
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7334
    if mtype == TMessageType.EXCEPTION:
-
 
7335
      x = TApplicationException()
-
 
7336
      x.read(self._iprot)
-
 
7337
      self._iprot.readMessageEnd()
-
 
7338
      raise x
-
 
7339
    result = getCartByValue_result()
-
 
7340
    result.read(self._iprot)
-
 
7341
    self._iprot.readMessageEnd()
-
 
7342
    if result.success is not None:
-
 
7343
      return result.success
-
 
7344
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
-
 
7345
 
7309
 
7346
 
7310
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7347
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7311
  def __init__(self, handler):
7348
  def __init__(self, handler):
7312
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7349
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7313
    self._processMap["addItem"] = Processor.process_addItem
7350
    self._processMap["addItem"] = Processor.process_addItem
Line 7503... Line 7540...
7503
    self._processMap["addBulkPricingForItem"] = Processor.process_addBulkPricingForItem
7540
    self._processMap["addBulkPricingForItem"] = Processor.process_addBulkPricingForItem
7504
    self._processMap["deleteBulkPricingForItemById"] = Processor.process_deleteBulkPricingForItemById
7541
    self._processMap["deleteBulkPricingForItemById"] = Processor.process_deleteBulkPricingForItemById
7505
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7542
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7506
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7543
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7507
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
7544
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
-
 
7545
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
7508
 
7546
 
7509
  def process(self, iprot, oprot):
7547
  def process(self, iprot, oprot):
7510
    (name, type, seqid) = iprot.readMessageBegin()
7548
    (name, type, seqid) = iprot.readMessageBegin()
7511
    if name not in self._processMap:
7549
    if name not in self._processMap:
7512
      iprot.skip(TType.STRUCT)
7550
      iprot.skip(TType.STRUCT)
Line 9808... Line 9846...
9808
    oprot.writeMessageBegin("updateBulkPricesOnProduction", TMessageType.REPLY, seqid)
9846
    oprot.writeMessageBegin("updateBulkPricesOnProduction", TMessageType.REPLY, seqid)
9809
    result.write(oprot)
9847
    result.write(oprot)
9810
    oprot.writeMessageEnd()
9848
    oprot.writeMessageEnd()
9811
    oprot.trans.flush()
9849
    oprot.trans.flush()
9812
 
9850
 
-
 
9851
  def process_getCartByValue(self, seqid, iprot, oprot):
-
 
9852
    args = getCartByValue_args()
-
 
9853
    args.read(iprot)
-
 
9854
    iprot.readMessageEnd()
-
 
9855
    result = getCartByValue_result()
-
 
9856
    result.success = self._handler.getCartByValue(args.cartIds)
-
 
9857
    oprot.writeMessageBegin("getCartByValue", TMessageType.REPLY, seqid)
-
 
9858
    result.write(oprot)
-
 
9859
    oprot.writeMessageEnd()
-
 
9860
    oprot.trans.flush()
-
 
9861
 
9813
 
9862
 
9814
# HELPER FUNCTIONS AND STRUCTURES
9863
# HELPER FUNCTIONS AND STRUCTURES
9815
 
9864
 
9816
class addItem_args:
9865
class addItem_args:
9817
  """
9866
  """
Line 34601... Line 34650...
34601
      oprot.writeFieldEnd()
34650
      oprot.writeFieldEnd()
34602
    oprot.writeFieldStop()
34651
    oprot.writeFieldStop()
34603
    oprot.writeStructEnd()
34652
    oprot.writeStructEnd()
34604
 
34653
 
34605
  def validate(self):
34654
  def validate(self):
-
 
34655
    return
-
 
34656
 
-
 
34657
 
-
 
34658
  def __repr__(self):
-
 
34659
    L = ['%s=%r' % (key, value)
-
 
34660
      for key, value in self.__dict__.iteritems()]
-
 
34661
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34662
 
-
 
34663
  def __eq__(self, other):
-
 
34664
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34665
 
-
 
34666
  def __ne__(self, other):
-
 
34667
    return not (self == other)
-
 
34668
 
-
 
34669
class getCartByValue_args:
-
 
34670
  """
-
 
34671
  Attributes:
-
 
34672
   - cartIds
-
 
34673
  """
-
 
34674
 
-
 
34675
  thrift_spec = (
-
 
34676
    None, # 0
-
 
34677
    (1, TType.LIST, 'cartIds', (TType.I64,None), None, ), # 1
-
 
34678
  )
-
 
34679
 
-
 
34680
  def __init__(self, cartIds=None,):
-
 
34681
    self.cartIds = cartIds
-
 
34682
 
-
 
34683
  def read(self, iprot):
-
 
34684
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34685
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34686
      return
-
 
34687
    iprot.readStructBegin()
-
 
34688
    while True:
-
 
34689
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34690
      if ftype == TType.STOP:
-
 
34691
        break
-
 
34692
      if fid == 1:
-
 
34693
        if ftype == TType.LIST:
-
 
34694
          self.cartIds = []
-
 
34695
          (_etype915, _size912) = iprot.readListBegin()
-
 
34696
          for _i916 in xrange(_size912):
-
 
34697
            _elem917 = iprot.readI64();
-
 
34698
            self.cartIds.append(_elem917)
-
 
34699
          iprot.readListEnd()
-
 
34700
        else:
-
 
34701
          iprot.skip(ftype)
-
 
34702
      else:
-
 
34703
        iprot.skip(ftype)
-
 
34704
      iprot.readFieldEnd()
-
 
34705
    iprot.readStructEnd()
-
 
34706
 
-
 
34707
  def write(self, oprot):
-
 
34708
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34709
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34710
      return
-
 
34711
    oprot.writeStructBegin('getCartByValue_args')
-
 
34712
    if self.cartIds is not None:
-
 
34713
      oprot.writeFieldBegin('cartIds', TType.LIST, 1)
-
 
34714
      oprot.writeListBegin(TType.I64, len(self.cartIds))
-
 
34715
      for iter918 in self.cartIds:
-
 
34716
        oprot.writeI64(iter918)
-
 
34717
      oprot.writeListEnd()
-
 
34718
      oprot.writeFieldEnd()
-
 
34719
    oprot.writeFieldStop()
-
 
34720
    oprot.writeStructEnd()
-
 
34721
 
-
 
34722
  def validate(self):
-
 
34723
    return
-
 
34724
 
-
 
34725
 
-
 
34726
  def __repr__(self):
-
 
34727
    L = ['%s=%r' % (key, value)
-
 
34728
      for key, value in self.__dict__.iteritems()]
-
 
34729
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34730
 
-
 
34731
  def __eq__(self, other):
-
 
34732
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34733
 
-
 
34734
  def __ne__(self, other):
-
 
34735
    return not (self == other)
-
 
34736
 
-
 
34737
class getCartByValue_result:
-
 
34738
  """
-
 
34739
  Attributes:
-
 
34740
   - success
-
 
34741
  """
-
 
34742
 
-
 
34743
  thrift_spec = (
-
 
34744
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
-
 
34745
  )
-
 
34746
 
-
 
34747
  def __init__(self, success=None,):
-
 
34748
    self.success = success
-
 
34749
 
-
 
34750
  def read(self, iprot):
-
 
34751
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34752
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34753
      return
-
 
34754
    iprot.readStructBegin()
-
 
34755
    while True:
-
 
34756
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34757
      if ftype == TType.STOP:
-
 
34758
        break
-
 
34759
      if fid == 0:
-
 
34760
        if ftype == TType.LIST:
-
 
34761
          self.success = []
-
 
34762
          (_etype922, _size919) = iprot.readListBegin()
-
 
34763
          for _i923 in xrange(_size919):
-
 
34764
            _elem924 = iprot.readI64();
-
 
34765
            self.success.append(_elem924)
-
 
34766
          iprot.readListEnd()
-
 
34767
        else:
-
 
34768
          iprot.skip(ftype)
-
 
34769
      else:
-
 
34770
        iprot.skip(ftype)
-
 
34771
      iprot.readFieldEnd()
-
 
34772
    iprot.readStructEnd()
-
 
34773
 
-
 
34774
  def write(self, oprot):
-
 
34775
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34776
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34777
      return
-
 
34778
    oprot.writeStructBegin('getCartByValue_result')
-
 
34779
    if self.success is not None:
-
 
34780
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
34781
      oprot.writeListBegin(TType.I64, len(self.success))
-
 
34782
      for iter925 in self.success:
-
 
34783
        oprot.writeI64(iter925)
-
 
34784
      oprot.writeListEnd()
-
 
34785
      oprot.writeFieldEnd()
-
 
34786
    oprot.writeFieldStop()
-
 
34787
    oprot.writeStructEnd()
-
 
34788
 
-
 
34789
  def validate(self):
34606
    return
34790
    return
34607
 
34791
 
34608
 
34792
 
34609
  def __repr__(self):
34793
  def __repr__(self):
34610
    L = ['%s=%r' % (key, value)
34794
    L = ['%s=%r' % (key, value)