Subversion Repositories SmartDukaan

Rev

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

Rev 18735 Rev 18764
Line 776... Line 776...
776
    Parameters:
776
    Parameters:
777
     - userId
777
     - userId
778
    """
778
    """
779
    pass
779
    pass
780
 
780
 
-
 
781
  def getCartByValue(self, cartIds):
-
 
782
    """
-
 
783
    Parameters:
-
 
784
     - cartIds
-
 
785
    """
-
 
786
    pass
-
 
787
 
781
 
788
 
782
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
789
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
783
  """
790
  """
784
  service
791
  service
785
  """
792
  """
Line 3745... Line 3752...
3745
    self._iprot.readMessageEnd()
3752
    self._iprot.readMessageEnd()
3746
    if result.success is not None:
3753
    if result.success is not None:
3747
      return result.success
3754
      return result.success
3748
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isTaxInvoiceEnabledUser failed: unknown result");
3755
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isTaxInvoiceEnabledUser failed: unknown result");
3749
 
3756
 
-
 
3757
  def getCartByValue(self, cartIds):
-
 
3758
    """
-
 
3759
    Parameters:
-
 
3760
     - cartIds
-
 
3761
    """
-
 
3762
    self.send_getCartByValue(cartIds)
-
 
3763
    return self.recv_getCartByValue()
-
 
3764
 
-
 
3765
  def send_getCartByValue(self, cartIds):
-
 
3766
    self._oprot.writeMessageBegin('getCartByValue', TMessageType.CALL, self._seqid)
-
 
3767
    args = getCartByValue_args()
-
 
3768
    args.cartIds = cartIds
-
 
3769
    args.write(self._oprot)
-
 
3770
    self._oprot.writeMessageEnd()
-
 
3771
    self._oprot.trans.flush()
-
 
3772
 
-
 
3773
  def recv_getCartByValue(self, ):
-
 
3774
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3775
    if mtype == TMessageType.EXCEPTION:
-
 
3776
      x = TApplicationException()
-
 
3777
      x.read(self._iprot)
-
 
3778
      self._iprot.readMessageEnd()
-
 
3779
      raise x
-
 
3780
    result = getCartByValue_result()
-
 
3781
    result.read(self._iprot)
-
 
3782
    self._iprot.readMessageEnd()
-
 
3783
    if result.success is not None:
-
 
3784
      return result.success
-
 
3785
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
-
 
3786
 
3750
 
3787
 
3751
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3788
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3752
  def __init__(self, handler):
3789
  def __init__(self, handler):
3753
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3790
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3754
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3791
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3838... Line 3875...
3838
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3875
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3839
    self._processMap["isAddressEditableForCounter"] = Processor.process_isAddressEditableForCounter
3876
    self._processMap["isAddressEditableForCounter"] = Processor.process_isAddressEditableForCounter
3840
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3877
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3841
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3878
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3842
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
3879
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
-
 
3880
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
3843
 
3881
 
3844
  def process(self, iprot, oprot):
3882
  def process(self, iprot, oprot):
3845
    (name, type, seqid) = iprot.readMessageBegin()
3883
    (name, type, seqid) = iprot.readMessageBegin()
3846
    if name not in self._processMap:
3884
    if name not in self._processMap:
3847
      iprot.skip(TType.STRUCT)
3885
      iprot.skip(TType.STRUCT)
Line 5009... Line 5047...
5009
    oprot.writeMessageBegin("isTaxInvoiceEnabledUser", TMessageType.REPLY, seqid)
5047
    oprot.writeMessageBegin("isTaxInvoiceEnabledUser", TMessageType.REPLY, seqid)
5010
    result.write(oprot)
5048
    result.write(oprot)
5011
    oprot.writeMessageEnd()
5049
    oprot.writeMessageEnd()
5012
    oprot.trans.flush()
5050
    oprot.trans.flush()
5013
 
5051
 
-
 
5052
  def process_getCartByValue(self, seqid, iprot, oprot):
-
 
5053
    args = getCartByValue_args()
-
 
5054
    args.read(iprot)
-
 
5055
    iprot.readMessageEnd()
-
 
5056
    result = getCartByValue_result()
-
 
5057
    result.success = self._handler.getCartByValue(args.cartIds)
-
 
5058
    oprot.writeMessageBegin("getCartByValue", TMessageType.REPLY, seqid)
-
 
5059
    result.write(oprot)
-
 
5060
    oprot.writeMessageEnd()
-
 
5061
    oprot.trans.flush()
-
 
5062
 
5014
 
5063
 
5015
# HELPER FUNCTIONS AND STRUCTURES
5064
# HELPER FUNCTIONS AND STRUCTURES
5016
 
5065
 
5017
class createAnonymousUser_args:
5066
class createAnonymousUser_args:
5018
  """
5067
  """
Line 17275... Line 17324...
17275
      oprot.writeFieldEnd()
17324
      oprot.writeFieldEnd()
17276
    oprot.writeFieldStop()
17325
    oprot.writeFieldStop()
17277
    oprot.writeStructEnd()
17326
    oprot.writeStructEnd()
17278
 
17327
 
17279
  def validate(self):
17328
  def validate(self):
-
 
17329
    return
-
 
17330
 
-
 
17331
 
-
 
17332
  def __repr__(self):
-
 
17333
    L = ['%s=%r' % (key, value)
-
 
17334
      for key, value in self.__dict__.iteritems()]
-
 
17335
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17336
 
-
 
17337
  def __eq__(self, other):
-
 
17338
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17339
 
-
 
17340
  def __ne__(self, other):
-
 
17341
    return not (self == other)
-
 
17342
 
-
 
17343
class getCartByValue_args:
-
 
17344
  """
-
 
17345
  Attributes:
-
 
17346
   - cartIds
-
 
17347
  """
-
 
17348
 
-
 
17349
  thrift_spec = (
-
 
17350
    None, # 0
-
 
17351
    (1, TType.LIST, 'cartIds', (TType.I64,None), None, ), # 1
-
 
17352
  )
-
 
17353
 
-
 
17354
  def __init__(self, cartIds=None,):
-
 
17355
    self.cartIds = cartIds
-
 
17356
 
-
 
17357
  def read(self, iprot):
-
 
17358
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17359
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17360
      return
-
 
17361
    iprot.readStructBegin()
-
 
17362
    while True:
-
 
17363
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17364
      if ftype == TType.STOP:
-
 
17365
        break
-
 
17366
      if fid == 1:
-
 
17367
        if ftype == TType.LIST:
-
 
17368
          self.cartIds = []
-
 
17369
          (_etype258, _size255) = iprot.readListBegin()
-
 
17370
          for _i259 in xrange(_size255):
-
 
17371
            _elem260 = iprot.readI64();
-
 
17372
            self.cartIds.append(_elem260)
-
 
17373
          iprot.readListEnd()
-
 
17374
        else:
-
 
17375
          iprot.skip(ftype)
-
 
17376
      else:
-
 
17377
        iprot.skip(ftype)
-
 
17378
      iprot.readFieldEnd()
-
 
17379
    iprot.readStructEnd()
-
 
17380
 
-
 
17381
  def write(self, oprot):
-
 
17382
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17383
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17384
      return
-
 
17385
    oprot.writeStructBegin('getCartByValue_args')
-
 
17386
    if self.cartIds is not None:
-
 
17387
      oprot.writeFieldBegin('cartIds', TType.LIST, 1)
-
 
17388
      oprot.writeListBegin(TType.I64, len(self.cartIds))
-
 
17389
      for iter261 in self.cartIds:
-
 
17390
        oprot.writeI64(iter261)
-
 
17391
      oprot.writeListEnd()
-
 
17392
      oprot.writeFieldEnd()
-
 
17393
    oprot.writeFieldStop()
-
 
17394
    oprot.writeStructEnd()
-
 
17395
 
-
 
17396
  def validate(self):
-
 
17397
    return
-
 
17398
 
-
 
17399
 
-
 
17400
  def __repr__(self):
-
 
17401
    L = ['%s=%r' % (key, value)
-
 
17402
      for key, value in self.__dict__.iteritems()]
-
 
17403
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17404
 
-
 
17405
  def __eq__(self, other):
-
 
17406
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17407
 
-
 
17408
  def __ne__(self, other):
-
 
17409
    return not (self == other)
-
 
17410
 
-
 
17411
class getCartByValue_result:
-
 
17412
  """
-
 
17413
  Attributes:
-
 
17414
   - success
-
 
17415
  """
-
 
17416
 
-
 
17417
  thrift_spec = (
-
 
17418
    (0, TType.MAP, 'success', (TType.I64,None,TType.LIST,(TType.STRUCT,(Line, Line.thrift_spec))), None, ), # 0
-
 
17419
  )
-
 
17420
 
-
 
17421
  def __init__(self, success=None,):
-
 
17422
    self.success = success
-
 
17423
 
-
 
17424
  def read(self, iprot):
-
 
17425
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17426
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17427
      return
-
 
17428
    iprot.readStructBegin()
-
 
17429
    while True:
-
 
17430
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17431
      if ftype == TType.STOP:
-
 
17432
        break
-
 
17433
      if fid == 0:
-
 
17434
        if ftype == TType.MAP:
-
 
17435
          self.success = {}
-
 
17436
          (_ktype263, _vtype264, _size262 ) = iprot.readMapBegin() 
-
 
17437
          for _i266 in xrange(_size262):
-
 
17438
            _key267 = iprot.readI64();
-
 
17439
            _val268 = []
-
 
17440
            (_etype272, _size269) = iprot.readListBegin()
-
 
17441
            for _i273 in xrange(_size269):
-
 
17442
              _elem274 = Line()
-
 
17443
              _elem274.read(iprot)
-
 
17444
              _val268.append(_elem274)
-
 
17445
            iprot.readListEnd()
-
 
17446
            self.success[_key267] = _val268
-
 
17447
          iprot.readMapEnd()
-
 
17448
        else:
-
 
17449
          iprot.skip(ftype)
-
 
17450
      else:
-
 
17451
        iprot.skip(ftype)
-
 
17452
      iprot.readFieldEnd()
-
 
17453
    iprot.readStructEnd()
-
 
17454
 
-
 
17455
  def write(self, oprot):
-
 
17456
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17457
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17458
      return
-
 
17459
    oprot.writeStructBegin('getCartByValue_result')
-
 
17460
    if self.success is not None:
-
 
17461
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
17462
      oprot.writeMapBegin(TType.I64, TType.LIST, len(self.success))
-
 
17463
      for kiter275,viter276 in self.success.items():
-
 
17464
        oprot.writeI64(kiter275)
-
 
17465
        oprot.writeListBegin(TType.STRUCT, len(viter276))
-
 
17466
        for iter277 in viter276:
-
 
17467
          iter277.write(oprot)
-
 
17468
        oprot.writeListEnd()
-
 
17469
      oprot.writeMapEnd()
-
 
17470
      oprot.writeFieldEnd()
-
 
17471
    oprot.writeFieldStop()
-
 
17472
    oprot.writeStructEnd()
-
 
17473
 
-
 
17474
  def validate(self):
17280
    return
17475
    return
17281
 
17476
 
17282
 
17477
 
17283
  def __repr__(self):
17478
  def __repr__(self):
17284
    L = ['%s=%r' % (key, value)
17479
    L = ['%s=%r' % (key, value)