Subversion Repositories SmartDukaan

Rev

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

Rev 9945 Rev 10136
Line 663... Line 663...
663
    Parameters:
663
    Parameters:
664
     - providerId
664
     - providerId
665
    """
665
    """
666
    pass
666
    pass
667
 
667
 
668
  def receiveReturn(self, orderId, receiveCondition):
668
  def receiveReturn(self, orderId, receiveCondition, receiveFreebie):
669
    """
669
    """
670
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
670
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
671
    If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
671
    If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
672
    If the order is in any other state, it returns false.
672
    If the order is in any other state, it returns false.
673
    Throws an exception if the order with the given id couldn't be found.
673
    Throws an exception if the order with the given id couldn't be found.
674
 
674
 
675
    Parameters:
675
    Parameters:
676
     - orderId
676
     - orderId
677
     - receiveCondition
677
     - receiveCondition
-
 
678
     - receiveFreebie
678
    """
679
    """
679
    pass
680
    pass
680
 
681
 
681
  def validateDoa(self, orderId, isValid):
682
  def validateDoa(self, orderId, isValid):
682
    """
683
    """
Line 4277... Line 4278...
4277
    self._iprot.readMessageEnd()
4278
    self._iprot.readMessageEnd()
4278
    if result.success is not None:
4279
    if result.success is not None:
4279
      return result.success
4280
      return result.success
4280
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrdersNotPickedUp failed: unknown result");
4281
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrdersNotPickedUp failed: unknown result");
4281
 
4282
 
4282
  def receiveReturn(self, orderId, receiveCondition):
4283
  def receiveReturn(self, orderId, receiveCondition, receiveFreebie):
4283
    """
4284
    """
4284
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
4285
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
4285
    If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
4286
    If the order status is RTO_IN_TRANSIT, marks the order status as RTO_RECEIVED_PRESTINE and returns true.
4286
    If the order is in any other state, it returns false.
4287
    If the order is in any other state, it returns false.
4287
    Throws an exception if the order with the given id couldn't be found.
4288
    Throws an exception if the order with the given id couldn't be found.
4288
 
4289
 
4289
    Parameters:
4290
    Parameters:
4290
     - orderId
4291
     - orderId
4291
     - receiveCondition
4292
     - receiveCondition
-
 
4293
     - receiveFreebie
4292
    """
4294
    """
4293
    self.send_receiveReturn(orderId, receiveCondition)
4295
    self.send_receiveReturn(orderId, receiveCondition, receiveFreebie)
4294
    return self.recv_receiveReturn()
4296
    return self.recv_receiveReturn()
4295
 
4297
 
4296
  def send_receiveReturn(self, orderId, receiveCondition):
4298
  def send_receiveReturn(self, orderId, receiveCondition, receiveFreebie):
4297
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
4299
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
4298
    args = receiveReturn_args()
4300
    args = receiveReturn_args()
4299
    args.orderId = orderId
4301
    args.orderId = orderId
4300
    args.receiveCondition = receiveCondition
4302
    args.receiveCondition = receiveCondition
-
 
4303
    args.receiveFreebie = receiveFreebie
4301
    args.write(self._oprot)
4304
    args.write(self._oprot)
4302
    self._oprot.writeMessageEnd()
4305
    self._oprot.writeMessageEnd()
4303
    self._oprot.trans.flush()
4306
    self._oprot.trans.flush()
4304
 
4307
 
4305
  def recv_receiveReturn(self, ):
4308
  def recv_receiveReturn(self, ):
Line 10567... Line 10570...
10567
    args = receiveReturn_args()
10570
    args = receiveReturn_args()
10568
    args.read(iprot)
10571
    args.read(iprot)
10569
    iprot.readMessageEnd()
10572
    iprot.readMessageEnd()
10570
    result = receiveReturn_result()
10573
    result = receiveReturn_result()
10571
    try:
10574
    try:
10572
      result.success = self._handler.receiveReturn(args.orderId, args.receiveCondition)
10575
      result.success = self._handler.receiveReturn(args.orderId, args.receiveCondition, args.receiveFreebie)
10573
    except TransactionServiceException, ex:
10576
    except TransactionServiceException, ex:
10574
      result.ex = ex
10577
      result.ex = ex
10575
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
10578
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
10576
    result.write(oprot)
10579
    result.write(oprot)
10577
    oprot.writeMessageEnd()
10580
    oprot.writeMessageEnd()
Line 21813... Line 21816...
21813
class receiveReturn_args:
21816
class receiveReturn_args:
21814
  """
21817
  """
21815
  Attributes:
21818
  Attributes:
21816
   - orderId
21819
   - orderId
21817
   - receiveCondition
21820
   - receiveCondition
-
 
21821
   - receiveFreebie
21818
  """
21822
  """
21819
 
21823
 
21820
  thrift_spec = (
21824
  thrift_spec = (
21821
    None, # 0
21825
    None, # 0
21822
    (1, TType.I64, 'orderId', None, None, ), # 1
21826
    (1, TType.I64, 'orderId', None, None, ), # 1
21823
    (2, TType.I64, 'receiveCondition', None, None, ), # 2
21827
    (2, TType.I64, 'receiveCondition', None, None, ), # 2
-
 
21828
    (3, TType.BOOL, 'receiveFreebie', None, None, ), # 3
21824
  )
21829
  )
21825
 
21830
 
21826
  def __init__(self, orderId=None, receiveCondition=None,):
21831
  def __init__(self, orderId=None, receiveCondition=None, receiveFreebie=None,):
21827
    self.orderId = orderId
21832
    self.orderId = orderId
21828
    self.receiveCondition = receiveCondition
21833
    self.receiveCondition = receiveCondition
-
 
21834
    self.receiveFreebie = receiveFreebie
21829
 
21835
 
21830
  def read(self, iprot):
21836
  def read(self, iprot):
21831
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
21837
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
21832
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
21838
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
21833
      return
21839
      return
Line 21844... Line 21850...
21844
      elif fid == 2:
21850
      elif fid == 2:
21845
        if ftype == TType.I64:
21851
        if ftype == TType.I64:
21846
          self.receiveCondition = iprot.readI64();
21852
          self.receiveCondition = iprot.readI64();
21847
        else:
21853
        else:
21848
          iprot.skip(ftype)
21854
          iprot.skip(ftype)
-
 
21855
      elif fid == 3:
-
 
21856
        if ftype == TType.BOOL:
-
 
21857
          self.receiveFreebie = iprot.readBool();
-
 
21858
        else:
-
 
21859
          iprot.skip(ftype)
21849
      else:
21860
      else:
21850
        iprot.skip(ftype)
21861
        iprot.skip(ftype)
21851
      iprot.readFieldEnd()
21862
      iprot.readFieldEnd()
21852
    iprot.readStructEnd()
21863
    iprot.readStructEnd()
21853
 
21864
 
Line 21862... Line 21873...
21862
      oprot.writeFieldEnd()
21873
      oprot.writeFieldEnd()
21863
    if self.receiveCondition is not None:
21874
    if self.receiveCondition is not None:
21864
      oprot.writeFieldBegin('receiveCondition', TType.I64, 2)
21875
      oprot.writeFieldBegin('receiveCondition', TType.I64, 2)
21865
      oprot.writeI64(self.receiveCondition)
21876
      oprot.writeI64(self.receiveCondition)
21866
      oprot.writeFieldEnd()
21877
      oprot.writeFieldEnd()
-
 
21878
    if self.receiveFreebie is not None:
-
 
21879
      oprot.writeFieldBegin('receiveFreebie', TType.BOOL, 3)
-
 
21880
      oprot.writeBool(self.receiveFreebie)
-
 
21881
      oprot.writeFieldEnd()
21867
    oprot.writeFieldStop()
21882
    oprot.writeFieldStop()
21868
    oprot.writeStructEnd()
21883
    oprot.writeStructEnd()
21869
 
21884
 
21870
  def validate(self):
21885
  def validate(self):
21871
    return
21886
    return