Subversion Repositories SmartDukaan

Rev

Rev 22364 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22364 Rev 22452
Line 827... Line 827...
827
     - cartId
827
     - cartId
828
     - wallet_amount
828
     - wallet_amount
829
    """
829
    """
830
    pass
830
    pass
831
 
831
 
-
 
832
  def addItemPricingToCart(self, cartId, itemPriceQuantityList):
-
 
833
    """
-
 
834
    Parameters:
-
 
835
     - cartId
-
 
836
     - itemPriceQuantityList
-
 
837
    """
-
 
838
    pass
-
 
839
 
832
 
840
 
833
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
841
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
834
  """
842
  """
835
  service
843
  service
836
  """
844
  """
Line 4014... Line 4022...
4014
    self._iprot.readMessageEnd()
4022
    self._iprot.readMessageEnd()
4015
    if result.success is not None:
4023
    if result.success is not None:
4016
      return result.success
4024
      return result.success
4017
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setWalletAmountInCart failed: unknown result");
4025
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setWalletAmountInCart failed: unknown result");
4018
 
4026
 
-
 
4027
  def addItemPricingToCart(self, cartId, itemPriceQuantityList):
-
 
4028
    """
-
 
4029
    Parameters:
-
 
4030
     - cartId
-
 
4031
     - itemPriceQuantityList
-
 
4032
    """
-
 
4033
    self.send_addItemPricingToCart(cartId, itemPriceQuantityList)
-
 
4034
    return self.recv_addItemPricingToCart()
-
 
4035
 
-
 
4036
  def send_addItemPricingToCart(self, cartId, itemPriceQuantityList):
-
 
4037
    self._oprot.writeMessageBegin('addItemPricingToCart', TMessageType.CALL, self._seqid)
-
 
4038
    args = addItemPricingToCart_args()
-
 
4039
    args.cartId = cartId
-
 
4040
    args.itemPriceQuantityList = itemPriceQuantityList
-
 
4041
    args.write(self._oprot)
-
 
4042
    self._oprot.writeMessageEnd()
-
 
4043
    self._oprot.trans.flush()
-
 
4044
 
-
 
4045
  def recv_addItemPricingToCart(self, ):
-
 
4046
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
4047
    if mtype == TMessageType.EXCEPTION:
-
 
4048
      x = TApplicationException()
-
 
4049
      x.read(self._iprot)
-
 
4050
      self._iprot.readMessageEnd()
-
 
4051
      raise x
-
 
4052
    result = addItemPricingToCart_result()
-
 
4053
    result.read(self._iprot)
-
 
4054
    self._iprot.readMessageEnd()
-
 
4055
    if result.success is not None:
-
 
4056
      return result.success
-
 
4057
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addItemPricingToCart failed: unknown result");
-
 
4058
 
4019
 
4059
 
4020
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
4060
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
4021
  def __init__(self, handler):
4061
  def __init__(self, handler):
4022
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
4062
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
4023
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
4063
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 4114... Line 4154...
4114
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
4154
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
4115
    self._processMap["taxInvoiceAvailable"] = Processor.process_taxInvoiceAvailable
4155
    self._processMap["taxInvoiceAvailable"] = Processor.process_taxInvoiceAvailable
4116
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
4156
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
4117
    self._processMap["getCounterName"] = Processor.process_getCounterName
4157
    self._processMap["getCounterName"] = Processor.process_getCounterName
4118
    self._processMap["setWalletAmountInCart"] = Processor.process_setWalletAmountInCart
4158
    self._processMap["setWalletAmountInCart"] = Processor.process_setWalletAmountInCart
-
 
4159
    self._processMap["addItemPricingToCart"] = Processor.process_addItemPricingToCart
4119
 
4160
 
4120
  def process(self, iprot, oprot):
4161
  def process(self, iprot, oprot):
4121
    (name, type, seqid) = iprot.readMessageBegin()
4162
    (name, type, seqid) = iprot.readMessageBegin()
4122
    if name not in self._processMap:
4163
    if name not in self._processMap:
4123
      iprot.skip(TType.STRUCT)
4164
      iprot.skip(TType.STRUCT)
Line 5368... Line 5409...
5368
    oprot.writeMessageBegin("setWalletAmountInCart", TMessageType.REPLY, seqid)
5409
    oprot.writeMessageBegin("setWalletAmountInCart", TMessageType.REPLY, seqid)
5369
    result.write(oprot)
5410
    result.write(oprot)
5370
    oprot.writeMessageEnd()
5411
    oprot.writeMessageEnd()
5371
    oprot.trans.flush()
5412
    oprot.trans.flush()
5372
 
5413
 
-
 
5414
  def process_addItemPricingToCart(self, seqid, iprot, oprot):
-
 
5415
    args = addItemPricingToCart_args()
-
 
5416
    args.read(iprot)
-
 
5417
    iprot.readMessageEnd()
-
 
5418
    result = addItemPricingToCart_result()
-
 
5419
    result.success = self._handler.addItemPricingToCart(args.cartId, args.itemPriceQuantityList)
-
 
5420
    oprot.writeMessageBegin("addItemPricingToCart", TMessageType.REPLY, seqid)
-
 
5421
    result.write(oprot)
-
 
5422
    oprot.writeMessageEnd()
-
 
5423
    oprot.trans.flush()
-
 
5424
 
5373
 
5425
 
5374
# HELPER FUNCTIONS AND STRUCTURES
5426
# HELPER FUNCTIONS AND STRUCTURES
5375
 
5427
 
5376
class createAnonymousUser_args:
5428
class createAnonymousUser_args:
5377
  """
5429
  """
Line 18562... Line 18614...
18562
    if self.success is not None:
18614
    if self.success is not None:
18563
      oprot.writeFieldBegin('success', TType.BOOL, 0)
18615
      oprot.writeFieldBegin('success', TType.BOOL, 0)
18564
      oprot.writeBool(self.success)
18616
      oprot.writeBool(self.success)
18565
      oprot.writeFieldEnd()
18617
      oprot.writeFieldEnd()
18566
    oprot.writeFieldStop()
18618
    oprot.writeFieldStop()
-
 
18619
    oprot.writeStructEnd()
-
 
18620
 
-
 
18621
  def validate(self):
-
 
18622
    return
-
 
18623
 
-
 
18624
 
-
 
18625
  def __repr__(self):
-
 
18626
    L = ['%s=%r' % (key, value)
-
 
18627
      for key, value in self.__dict__.iteritems()]
-
 
18628
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18629
 
-
 
18630
  def __eq__(self, other):
-
 
18631
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18632
 
-
 
18633
  def __ne__(self, other):
-
 
18634
    return not (self == other)
-
 
18635
 
-
 
18636
class addItemPricingToCart_args:
-
 
18637
  """
-
 
18638
  Attributes:
-
 
18639
   - cartId
-
 
18640
   - itemPriceQuantityList
-
 
18641
  """
-
 
18642
 
-
 
18643
  thrift_spec = (
-
 
18644
    None, # 0
-
 
18645
    (1, TType.I64, 'cartId', None, None, ), # 1
-
 
18646
    (2, TType.LIST, 'itemPriceQuantityList', (TType.STRUCT,(ItemPriceQuantity, ItemPriceQuantity.thrift_spec)), None, ), # 2
-
 
18647
  )
-
 
18648
 
-
 
18649
  def __init__(self, cartId=None, itemPriceQuantityList=None,):
-
 
18650
    self.cartId = cartId
-
 
18651
    self.itemPriceQuantityList = itemPriceQuantityList
-
 
18652
 
-
 
18653
  def read(self, iprot):
-
 
18654
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18655
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18656
      return
-
 
18657
    iprot.readStructBegin()
-
 
18658
    while True:
-
 
18659
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18660
      if ftype == TType.STOP:
-
 
18661
        break
-
 
18662
      if fid == 1:
-
 
18663
        if ftype == TType.I64:
-
 
18664
          self.cartId = iprot.readI64();
-
 
18665
        else:
-
 
18666
          iprot.skip(ftype)
-
 
18667
      elif fid == 2:
-
 
18668
        if ftype == TType.LIST:
-
 
18669
          self.itemPriceQuantityList = []
-
 
18670
          (_etype297, _size294) = iprot.readListBegin()
-
 
18671
          for _i298 in xrange(_size294):
-
 
18672
            _elem299 = ItemPriceQuantity()
-
 
18673
            _elem299.read(iprot)
-
 
18674
            self.itemPriceQuantityList.append(_elem299)
-
 
18675
          iprot.readListEnd()
-
 
18676
        else:
-
 
18677
          iprot.skip(ftype)
-
 
18678
      else:
-
 
18679
        iprot.skip(ftype)
-
 
18680
      iprot.readFieldEnd()
-
 
18681
    iprot.readStructEnd()
-
 
18682
 
-
 
18683
  def write(self, oprot):
-
 
18684
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18685
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18686
      return
-
 
18687
    oprot.writeStructBegin('addItemPricingToCart_args')
-
 
18688
    if self.cartId is not None:
-
 
18689
      oprot.writeFieldBegin('cartId', TType.I64, 1)
-
 
18690
      oprot.writeI64(self.cartId)
-
 
18691
      oprot.writeFieldEnd()
-
 
18692
    if self.itemPriceQuantityList is not None:
-
 
18693
      oprot.writeFieldBegin('itemPriceQuantityList', TType.LIST, 2)
-
 
18694
      oprot.writeListBegin(TType.STRUCT, len(self.itemPriceQuantityList))
-
 
18695
      for iter300 in self.itemPriceQuantityList:
-
 
18696
        iter300.write(oprot)
-
 
18697
      oprot.writeListEnd()
-
 
18698
      oprot.writeFieldEnd()
-
 
18699
    oprot.writeFieldStop()
-
 
18700
    oprot.writeStructEnd()
-
 
18701
 
-
 
18702
  def validate(self):
-
 
18703
    return
-
 
18704
 
-
 
18705
 
-
 
18706
  def __repr__(self):
-
 
18707
    L = ['%s=%r' % (key, value)
-
 
18708
      for key, value in self.__dict__.iteritems()]
-
 
18709
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18710
 
-
 
18711
  def __eq__(self, other):
-
 
18712
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18713
 
-
 
18714
  def __ne__(self, other):
-
 
18715
    return not (self == other)
-
 
18716
 
-
 
18717
class addItemPricingToCart_result:
-
 
18718
  """
-
 
18719
  Attributes:
-
 
18720
   - success
-
 
18721
  """
-
 
18722
 
-
 
18723
  thrift_spec = (
-
 
18724
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
18725
  )
-
 
18726
 
-
 
18727
  def __init__(self, success=None,):
-
 
18728
    self.success = success
-
 
18729
 
-
 
18730
  def read(self, iprot):
-
 
18731
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18732
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18733
      return
-
 
18734
    iprot.readStructBegin()
-
 
18735
    while True:
-
 
18736
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18737
      if ftype == TType.STOP:
-
 
18738
        break
-
 
18739
      if fid == 0:
-
 
18740
        if ftype == TType.BOOL:
-
 
18741
          self.success = iprot.readBool();
-
 
18742
        else:
-
 
18743
          iprot.skip(ftype)
-
 
18744
      else:
-
 
18745
        iprot.skip(ftype)
-
 
18746
      iprot.readFieldEnd()
-
 
18747
    iprot.readStructEnd()
-
 
18748
 
-
 
18749
  def write(self, oprot):
-
 
18750
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18751
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18752
      return
-
 
18753
    oprot.writeStructBegin('addItemPricingToCart_result')
-
 
18754
    if self.success is not None:
-
 
18755
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
18756
      oprot.writeBool(self.success)
-
 
18757
      oprot.writeFieldEnd()
-
 
18758
    oprot.writeFieldStop()
18567
    oprot.writeStructEnd()
18759
    oprot.writeStructEnd()
18568
 
18760
 
18569
  def validate(self):
18761
  def validate(self):
18570
    return
18762
    return
18571
 
18763