Subversion Repositories SmartDukaan

Rev

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

Rev 19889 Rev 20873
Line 804... Line 804...
804
    Parameters:
804
    Parameters:
805
     - userIds
805
     - userIds
806
    """
806
    """
807
    pass
807
    pass
808
 
808
 
-
 
809
  def setWalletAmountInCart(self, cartId, wallet_amount):
-
 
810
    """
-
 
811
    Parameters:
-
 
812
     - cartId
-
 
813
     - wallet_amount
-
 
814
    """
-
 
815
    pass
-
 
816
 
809
 
817
 
810
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
818
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
811
  """
819
  """
812
  service
820
  service
813
  """
821
  """
Line 3893... Line 3901...
3893
    self._iprot.readMessageEnd()
3901
    self._iprot.readMessageEnd()
3894
    if result.success is not None:
3902
    if result.success is not None:
3895
      return result.success
3903
      return result.success
3896
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounterName failed: unknown result");
3904
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounterName failed: unknown result");
3897
 
3905
 
-
 
3906
  def setWalletAmountInCart(self, cartId, wallet_amount):
-
 
3907
    """
-
 
3908
    Parameters:
-
 
3909
     - cartId
-
 
3910
     - wallet_amount
-
 
3911
    """
-
 
3912
    self.send_setWalletAmountInCart(cartId, wallet_amount)
-
 
3913
    return self.recv_setWalletAmountInCart()
-
 
3914
 
-
 
3915
  def send_setWalletAmountInCart(self, cartId, wallet_amount):
-
 
3916
    self._oprot.writeMessageBegin('setWalletAmountInCart', TMessageType.CALL, self._seqid)
-
 
3917
    args = setWalletAmountInCart_args()
-
 
3918
    args.cartId = cartId
-
 
3919
    args.wallet_amount = wallet_amount
-
 
3920
    args.write(self._oprot)
-
 
3921
    self._oprot.writeMessageEnd()
-
 
3922
    self._oprot.trans.flush()
-
 
3923
 
-
 
3924
  def recv_setWalletAmountInCart(self, ):
-
 
3925
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3926
    if mtype == TMessageType.EXCEPTION:
-
 
3927
      x = TApplicationException()
-
 
3928
      x.read(self._iprot)
-
 
3929
      self._iprot.readMessageEnd()
-
 
3930
      raise x
-
 
3931
    result = setWalletAmountInCart_result()
-
 
3932
    result.read(self._iprot)
-
 
3933
    self._iprot.readMessageEnd()
-
 
3934
    if result.success is not None:
-
 
3935
      return result.success
-
 
3936
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setWalletAmountInCart failed: unknown result");
-
 
3937
 
3898
 
3938
 
3899
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3939
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3900
  def __init__(self, handler):
3940
  def __init__(self, handler):
3901
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3941
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3902
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3942
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3990... Line 4030...
3990
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
4030
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3991
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
4031
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
3992
    self._processMap["taxInvoiceAvailable"] = Processor.process_taxInvoiceAvailable
4032
    self._processMap["taxInvoiceAvailable"] = Processor.process_taxInvoiceAvailable
3993
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
4033
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
3994
    self._processMap["getCounterName"] = Processor.process_getCounterName
4034
    self._processMap["getCounterName"] = Processor.process_getCounterName
-
 
4035
    self._processMap["setWalletAmountInCart"] = Processor.process_setWalletAmountInCart
3995
 
4036
 
3996
  def process(self, iprot, oprot):
4037
  def process(self, iprot, oprot):
3997
    (name, type, seqid) = iprot.readMessageBegin()
4038
    (name, type, seqid) = iprot.readMessageBegin()
3998
    if name not in self._processMap:
4039
    if name not in self._processMap:
3999
      iprot.skip(TType.STRUCT)
4040
      iprot.skip(TType.STRUCT)
Line 5205... Line 5246...
5205
    oprot.writeMessageBegin("getCounterName", TMessageType.REPLY, seqid)
5246
    oprot.writeMessageBegin("getCounterName", TMessageType.REPLY, seqid)
5206
    result.write(oprot)
5247
    result.write(oprot)
5207
    oprot.writeMessageEnd()
5248
    oprot.writeMessageEnd()
5208
    oprot.trans.flush()
5249
    oprot.trans.flush()
5209
 
5250
 
-
 
5251
  def process_setWalletAmountInCart(self, seqid, iprot, oprot):
-
 
5252
    args = setWalletAmountInCart_args()
-
 
5253
    args.read(iprot)
-
 
5254
    iprot.readMessageEnd()
-
 
5255
    result = setWalletAmountInCart_result()
-
 
5256
    result.success = self._handler.setWalletAmountInCart(args.cartId, args.wallet_amount)
-
 
5257
    oprot.writeMessageBegin("setWalletAmountInCart", TMessageType.REPLY, seqid)
-
 
5258
    result.write(oprot)
-
 
5259
    oprot.writeMessageEnd()
-
 
5260
    oprot.trans.flush()
-
 
5261
 
5210
 
5262
 
5211
# HELPER FUNCTIONS AND STRUCTURES
5263
# HELPER FUNCTIONS AND STRUCTURES
5212
 
5264
 
5213
class createAnonymousUser_args:
5265
class createAnonymousUser_args:
5214
  """
5266
  """
Line 17993... Line 18045...
17993
      oprot.writeFieldEnd()
18045
      oprot.writeFieldEnd()
17994
    oprot.writeFieldStop()
18046
    oprot.writeFieldStop()
17995
    oprot.writeStructEnd()
18047
    oprot.writeStructEnd()
17996
 
18048
 
17997
  def validate(self):
18049
  def validate(self):
-
 
18050
    return
-
 
18051
 
-
 
18052
 
-
 
18053
  def __repr__(self):
-
 
18054
    L = ['%s=%r' % (key, value)
-
 
18055
      for key, value in self.__dict__.iteritems()]
-
 
18056
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18057
 
-
 
18058
  def __eq__(self, other):
-
 
18059
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18060
 
-
 
18061
  def __ne__(self, other):
-
 
18062
    return not (self == other)
-
 
18063
 
-
 
18064
class setWalletAmountInCart_args:
-
 
18065
  """
-
 
18066
  Attributes:
-
 
18067
   - cartId
-
 
18068
   - wallet_amount
-
 
18069
  """
-
 
18070
 
-
 
18071
  thrift_spec = (
-
 
18072
    None, # 0
-
 
18073
    (1, TType.I64, 'cartId', None, None, ), # 1
-
 
18074
    (2, TType.DOUBLE, 'wallet_amount', None, None, ), # 2
-
 
18075
  )
-
 
18076
 
-
 
18077
  def __init__(self, cartId=None, wallet_amount=None,):
-
 
18078
    self.cartId = cartId
-
 
18079
    self.wallet_amount = wallet_amount
-
 
18080
 
-
 
18081
  def read(self, iprot):
-
 
18082
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18083
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18084
      return
-
 
18085
    iprot.readStructBegin()
-
 
18086
    while True:
-
 
18087
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18088
      if ftype == TType.STOP:
-
 
18089
        break
-
 
18090
      if fid == 1:
-
 
18091
        if ftype == TType.I64:
-
 
18092
          self.cartId = iprot.readI64();
-
 
18093
        else:
-
 
18094
          iprot.skip(ftype)
-
 
18095
      elif fid == 2:
-
 
18096
        if ftype == TType.DOUBLE:
-
 
18097
          self.wallet_amount = iprot.readDouble();
-
 
18098
        else:
-
 
18099
          iprot.skip(ftype)
-
 
18100
      else:
-
 
18101
        iprot.skip(ftype)
-
 
18102
      iprot.readFieldEnd()
-
 
18103
    iprot.readStructEnd()
-
 
18104
 
-
 
18105
  def write(self, oprot):
-
 
18106
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18107
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18108
      return
-
 
18109
    oprot.writeStructBegin('setWalletAmountInCart_args')
-
 
18110
    if self.cartId is not None:
-
 
18111
      oprot.writeFieldBegin('cartId', TType.I64, 1)
-
 
18112
      oprot.writeI64(self.cartId)
-
 
18113
      oprot.writeFieldEnd()
-
 
18114
    if self.wallet_amount is not None:
-
 
18115
      oprot.writeFieldBegin('wallet_amount', TType.DOUBLE, 2)
-
 
18116
      oprot.writeDouble(self.wallet_amount)
-
 
18117
      oprot.writeFieldEnd()
-
 
18118
    oprot.writeFieldStop()
-
 
18119
    oprot.writeStructEnd()
-
 
18120
 
-
 
18121
  def validate(self):
-
 
18122
    return
-
 
18123
 
-
 
18124
 
-
 
18125
  def __repr__(self):
-
 
18126
    L = ['%s=%r' % (key, value)
-
 
18127
      for key, value in self.__dict__.iteritems()]
-
 
18128
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18129
 
-
 
18130
  def __eq__(self, other):
-
 
18131
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18132
 
-
 
18133
  def __ne__(self, other):
-
 
18134
    return not (self == other)
-
 
18135
 
-
 
18136
class setWalletAmountInCart_result:
-
 
18137
  """
-
 
18138
  Attributes:
-
 
18139
   - success
-
 
18140
  """
-
 
18141
 
-
 
18142
  thrift_spec = (
-
 
18143
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
18144
  )
-
 
18145
 
-
 
18146
  def __init__(self, success=None,):
-
 
18147
    self.success = success
-
 
18148
 
-
 
18149
  def read(self, iprot):
-
 
18150
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18151
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18152
      return
-
 
18153
    iprot.readStructBegin()
-
 
18154
    while True:
-
 
18155
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18156
      if ftype == TType.STOP:
-
 
18157
        break
-
 
18158
      if fid == 0:
-
 
18159
        if ftype == TType.BOOL:
-
 
18160
          self.success = iprot.readBool();
-
 
18161
        else:
-
 
18162
          iprot.skip(ftype)
-
 
18163
      else:
-
 
18164
        iprot.skip(ftype)
-
 
18165
      iprot.readFieldEnd()
-
 
18166
    iprot.readStructEnd()
-
 
18167
 
-
 
18168
  def write(self, oprot):
-
 
18169
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18170
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18171
      return
-
 
18172
    oprot.writeStructBegin('setWalletAmountInCart_result')
-
 
18173
    if self.success is not None:
-
 
18174
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
18175
      oprot.writeBool(self.success)
-
 
18176
      oprot.writeFieldEnd()
-
 
18177
    oprot.writeFieldStop()
-
 
18178
    oprot.writeStructEnd()
-
 
18179
 
-
 
18180
  def validate(self):
17998
    return
18181
    return
17999
 
18182
 
18000
 
18183
 
18001
  def __repr__(self):
18184
  def __repr__(self):
18002
    L = ['%s=%r' % (key, value)
18185
    L = ['%s=%r' % (key, value)