Subversion Repositories SmartDukaan

Rev

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

Rev 4454 Rev 4479
Line 486... Line 486...
486
     - providerId
486
     - providerId
487
     - pickupDetails
487
     - pickupDetails
488
    """
488
    """
489
    pass
489
    pass
490
 
490
 
491
  def receiveReturn(self, orderId):
491
  def receiveReturn(self, orderId, receiveCondition):
492
    """
492
    """
493
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
493
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
494
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
494
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
495
    If the order is in any other state, it returns false.
495
    If the order is in any other state, it returns false.
496
    Throws an exception if the order with the given id couldn't be found.
496
    Throws an exception if the order with the given id couldn't be found.
497
 
497
 
498
    Parameters:
498
    Parameters:
499
     - orderId
499
     - orderId
-
 
500
     - receiveCondition
500
    """
501
    """
501
    pass
502
    pass
502
 
503
 
503
  def validateDoa(self, orderId, isValid):
504
  def validateDoa(self, orderId, isValid):
504
    """
505
    """
Line 2478... Line 2479...
2478
    self._iprot.readMessageEnd()
2479
    self._iprot.readMessageEnd()
2479
    if result.success is not None:
2480
    if result.success is not None:
2480
      return result.success
2481
      return result.success
2481
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
2482
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
2482
 
2483
 
2483
  def receiveReturn(self, orderId):
2484
  def receiveReturn(self, orderId, receiveCondition):
2484
    """
2485
    """
2485
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
2486
    If the order status is DOA_PICKUP_CONFIRMED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED_PRESTINE and returns true.
2486
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2487
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2487
    If the order is in any other state, it returns false.
2488
    If the order is in any other state, it returns false.
2488
    Throws an exception if the order with the given id couldn't be found.
2489
    Throws an exception if the order with the given id couldn't be found.
2489
 
2490
 
2490
    Parameters:
2491
    Parameters:
2491
     - orderId
2492
     - orderId
-
 
2493
     - receiveCondition
2492
    """
2494
    """
2493
    self.send_receiveReturn(orderId)
2495
    self.send_receiveReturn(orderId, receiveCondition)
2494
    return self.recv_receiveReturn()
2496
    return self.recv_receiveReturn()
2495
 
2497
 
2496
  def send_receiveReturn(self, orderId):
2498
  def send_receiveReturn(self, orderId, receiveCondition):
2497
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
2499
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
2498
    args = receiveReturn_args()
2500
    args = receiveReturn_args()
2499
    args.orderId = orderId
2501
    args.orderId = orderId
-
 
2502
    args.receiveCondition = receiveCondition
2500
    args.write(self._oprot)
2503
    args.write(self._oprot)
2501
    self._oprot.writeMessageEnd()
2504
    self._oprot.writeMessageEnd()
2502
    self._oprot.trans.flush()
2505
    self._oprot.trans.flush()
2503
 
2506
 
2504
  def recv_receiveReturn(self, ):
2507
  def recv_receiveReturn(self, ):
Line 4263... Line 4266...
4263
    args = receiveReturn_args()
4266
    args = receiveReturn_args()
4264
    args.read(iprot)
4267
    args.read(iprot)
4265
    iprot.readMessageEnd()
4268
    iprot.readMessageEnd()
4266
    result = receiveReturn_result()
4269
    result = receiveReturn_result()
4267
    try:
4270
    try:
4268
      result.success = self._handler.receiveReturn(args.orderId)
4271
      result.success = self._handler.receiveReturn(args.orderId, args.receiveCondition)
4269
    except TransactionServiceException, ex:
4272
    except TransactionServiceException, ex:
4270
      result.ex = ex
4273
      result.ex = ex
4271
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
4274
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
4272
    result.write(oprot)
4275
    result.write(oprot)
4273
    oprot.writeMessageEnd()
4276
    oprot.writeMessageEnd()
Line 11351... Line 11354...
11351
 
11354
 
11352
class receiveReturn_args:
11355
class receiveReturn_args:
11353
  """
11356
  """
11354
  Attributes:
11357
  Attributes:
11355
   - orderId
11358
   - orderId
-
 
11359
   - receiveCondition
11356
  """
11360
  """
11357
 
11361
 
11358
  thrift_spec = (
11362
  thrift_spec = (
11359
    None, # 0
11363
    None, # 0
11360
    (1, TType.I64, 'orderId', None, None, ), # 1
11364
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
11365
    (2, TType.I64, 'receiveCondition', None, None, ), # 2
11361
  )
11366
  )
11362
 
11367
 
11363
  def __init__(self, orderId=None,):
11368
  def __init__(self, orderId=None, receiveCondition=None,):
11364
    self.orderId = orderId
11369
    self.orderId = orderId
-
 
11370
    self.receiveCondition = receiveCondition
11365
 
11371
 
11366
  def read(self, iprot):
11372
  def read(self, iprot):
11367
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11373
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11368
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11374
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11369
      return
11375
      return
Line 11375... Line 11381...
11375
      if fid == 1:
11381
      if fid == 1:
11376
        if ftype == TType.I64:
11382
        if ftype == TType.I64:
11377
          self.orderId = iprot.readI64();
11383
          self.orderId = iprot.readI64();
11378
        else:
11384
        else:
11379
          iprot.skip(ftype)
11385
          iprot.skip(ftype)
-
 
11386
      elif fid == 2:
-
 
11387
        if ftype == TType.I64:
-
 
11388
          self.receiveCondition = iprot.readI64();
-
 
11389
        else:
-
 
11390
          iprot.skip(ftype)
11380
      else:
11391
      else:
11381
        iprot.skip(ftype)
11392
        iprot.skip(ftype)
11382
      iprot.readFieldEnd()
11393
      iprot.readFieldEnd()
11383
    iprot.readStructEnd()
11394
    iprot.readStructEnd()
11384
 
11395
 
Line 11389... Line 11400...
11389
    oprot.writeStructBegin('receiveReturn_args')
11400
    oprot.writeStructBegin('receiveReturn_args')
11390
    if self.orderId is not None:
11401
    if self.orderId is not None:
11391
      oprot.writeFieldBegin('orderId', TType.I64, 1)
11402
      oprot.writeFieldBegin('orderId', TType.I64, 1)
11392
      oprot.writeI64(self.orderId)
11403
      oprot.writeI64(self.orderId)
11393
      oprot.writeFieldEnd()
11404
      oprot.writeFieldEnd()
-
 
11405
    if self.receiveCondition is not None:
-
 
11406
      oprot.writeFieldBegin('receiveCondition', TType.I64, 2)
-
 
11407
      oprot.writeI64(self.receiveCondition)
-
 
11408
      oprot.writeFieldEnd()
11394
    oprot.writeFieldStop()
11409
    oprot.writeFieldStop()
11395
    oprot.writeStructEnd()
11410
    oprot.writeStructEnd()
11396
 
11411
 
11397
  def validate(self):
11412
  def validate(self):
11398
    return
11413
    return