Subversion Repositories SmartDukaan

Rev

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

Rev 7746 Rev 9299
Line 585... Line 585...
585
     - startDate
585
     - startDate
586
     - endDate
586
     - endDate
587
    """
587
    """
588
    pass
588
    pass
589
 
589
 
590
  def insureItem(self, itemId, cartId, toInsure):
590
  def insureItem(self, itemId, cartId, toInsure, insurerType):
591
    """
591
    """
592
    Mark a cart lineitem as insured. Returns true/false.
592
    Mark a cart lineitem as insured. Returns true/false.
593
 
593
 
594
    Parameters:
594
    Parameters:
595
     - itemId
595
     - itemId
596
     - cartId
596
     - cartId
597
     - toInsure
597
     - toInsure
-
 
598
     - insurerType
598
    """
599
    """
599
    pass
600
    pass
600
 
601
 
601
  def cancelInsurance(self, cartId):
602
  def cancelInsurance(self, cartId):
602
    """
603
    """
Line 2885... Line 2886...
2885
    self._iprot.readMessageEnd()
2886
    self._iprot.readMessageEnd()
2886
    if result.success is not None:
2887
    if result.success is not None:
2887
      return result.success
2888
      return result.success
2888
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserEmails failed: unknown result");
2889
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserEmails failed: unknown result");
2889
 
2890
 
2890
  def insureItem(self, itemId, cartId, toInsure):
2891
  def insureItem(self, itemId, cartId, toInsure, insurerType):
2891
    """
2892
    """
2892
    Mark a cart lineitem as insured. Returns true/false.
2893
    Mark a cart lineitem as insured. Returns true/false.
2893
 
2894
 
2894
    Parameters:
2895
    Parameters:
2895
     - itemId
2896
     - itemId
2896
     - cartId
2897
     - cartId
2897
     - toInsure
2898
     - toInsure
-
 
2899
     - insurerType
2898
    """
2900
    """
2899
    self.send_insureItem(itemId, cartId, toInsure)
2901
    self.send_insureItem(itemId, cartId, toInsure, insurerType)
2900
    return self.recv_insureItem()
2902
    return self.recv_insureItem()
2901
 
2903
 
2902
  def send_insureItem(self, itemId, cartId, toInsure):
2904
  def send_insureItem(self, itemId, cartId, toInsure, insurerType):
2903
    self._oprot.writeMessageBegin('insureItem', TMessageType.CALL, self._seqid)
2905
    self._oprot.writeMessageBegin('insureItem', TMessageType.CALL, self._seqid)
2904
    args = insureItem_args()
2906
    args = insureItem_args()
2905
    args.itemId = itemId
2907
    args.itemId = itemId
2906
    args.cartId = cartId
2908
    args.cartId = cartId
2907
    args.toInsure = toInsure
2909
    args.toInsure = toInsure
-
 
2910
    args.insurerType = insurerType
2908
    args.write(self._oprot)
2911
    args.write(self._oprot)
2909
    self._oprot.writeMessageEnd()
2912
    self._oprot.writeMessageEnd()
2910
    self._oprot.trans.flush()
2913
    self._oprot.trans.flush()
2911
 
2914
 
2912
  def recv_insureItem(self, ):
2915
  def recv_insureItem(self, ):
Line 4061... Line 4064...
4061
  def process_insureItem(self, seqid, iprot, oprot):
4064
  def process_insureItem(self, seqid, iprot, oprot):
4062
    args = insureItem_args()
4065
    args = insureItem_args()
4063
    args.read(iprot)
4066
    args.read(iprot)
4064
    iprot.readMessageEnd()
4067
    iprot.readMessageEnd()
4065
    result = insureItem_result()
4068
    result = insureItem_result()
4066
    result.success = self._handler.insureItem(args.itemId, args.cartId, args.toInsure)
4069
    result.success = self._handler.insureItem(args.itemId, args.cartId, args.toInsure, args.insurerType)
4067
    oprot.writeMessageBegin("insureItem", TMessageType.REPLY, seqid)
4070
    oprot.writeMessageBegin("insureItem", TMessageType.REPLY, seqid)
4068
    result.write(oprot)
4071
    result.write(oprot)
4069
    oprot.writeMessageEnd()
4072
    oprot.writeMessageEnd()
4070
    oprot.trans.flush()
4073
    oprot.trans.flush()
4071
 
4074
 
Line 13468... Line 13471...
13468
  """
13471
  """
13469
  Attributes:
13472
  Attributes:
13470
   - itemId
13473
   - itemId
13471
   - cartId
13474
   - cartId
13472
   - toInsure
13475
   - toInsure
-
 
13476
   - insurerType
13473
  """
13477
  """
13474
 
13478
 
13475
  thrift_spec = (
13479
  thrift_spec = (
13476
    None, # 0
13480
    None, # 0
13477
    (1, TType.I64, 'itemId', None, None, ), # 1
13481
    (1, TType.I64, 'itemId', None, None, ), # 1
13478
    (2, TType.I64, 'cartId', None, None, ), # 2
13482
    (2, TType.I64, 'cartId', None, None, ), # 2
13479
    (3, TType.BOOL, 'toInsure', None, None, ), # 3
13483
    (3, TType.BOOL, 'toInsure', None, None, ), # 3
-
 
13484
    (4, TType.I32, 'insurerType', None, None, ), # 4
13480
  )
13485
  )
13481
 
13486
 
13482
  def __init__(self, itemId=None, cartId=None, toInsure=None,):
13487
  def __init__(self, itemId=None, cartId=None, toInsure=None, insurerType=None,):
13483
    self.itemId = itemId
13488
    self.itemId = itemId
13484
    self.cartId = cartId
13489
    self.cartId = cartId
13485
    self.toInsure = toInsure
13490
    self.toInsure = toInsure
-
 
13491
    self.insurerType = insurerType
13486
 
13492
 
13487
  def read(self, iprot):
13493
  def read(self, iprot):
13488
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13494
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13489
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13495
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13490
      return
13496
      return
Line 13506... Line 13512...
13506
      elif fid == 3:
13512
      elif fid == 3:
13507
        if ftype == TType.BOOL:
13513
        if ftype == TType.BOOL:
13508
          self.toInsure = iprot.readBool();
13514
          self.toInsure = iprot.readBool();
13509
        else:
13515
        else:
13510
          iprot.skip(ftype)
13516
          iprot.skip(ftype)
-
 
13517
      elif fid == 4:
-
 
13518
        if ftype == TType.I32:
-
 
13519
          self.insurerType = iprot.readI32();
-
 
13520
        else:
-
 
13521
          iprot.skip(ftype)
13511
      else:
13522
      else:
13512
        iprot.skip(ftype)
13523
        iprot.skip(ftype)
13513
      iprot.readFieldEnd()
13524
      iprot.readFieldEnd()
13514
    iprot.readStructEnd()
13525
    iprot.readStructEnd()
13515
 
13526
 
Line 13528... Line 13539...
13528
      oprot.writeFieldEnd()
13539
      oprot.writeFieldEnd()
13529
    if self.toInsure is not None:
13540
    if self.toInsure is not None:
13530
      oprot.writeFieldBegin('toInsure', TType.BOOL, 3)
13541
      oprot.writeFieldBegin('toInsure', TType.BOOL, 3)
13531
      oprot.writeBool(self.toInsure)
13542
      oprot.writeBool(self.toInsure)
13532
      oprot.writeFieldEnd()
13543
      oprot.writeFieldEnd()
-
 
13544
    if self.insurerType is not None:
-
 
13545
      oprot.writeFieldBegin('insurerType', TType.I32, 4)
-
 
13546
      oprot.writeI32(self.insurerType)
-
 
13547
      oprot.writeFieldEnd()
13533
    oprot.writeFieldStop()
13548
    oprot.writeFieldStop()
13534
    oprot.writeStructEnd()
13549
    oprot.writeStructEnd()
13535
 
13550
 
13536
  def validate(self):
13551
  def validate(self):
13537
    return
13552
    return