Subversion Repositories SmartDukaan

Rev

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

Rev 5719 Rev 5767
Line 43... Line 43...
43
     - destination_pin
43
     - destination_pin
44
     - type
44
     - type
45
    """
45
    """
46
    pass
46
    pass
47
 
47
 
48
  def getLogisticsInfo(self, destination_pincode, item_id, type):
48
  def getLogisticsInfo(self, destination_pincode, item_id, type, pickUp):
49
    """
49
    """
50
    Same as above excpet that an airway bill number is also allocated and returned.
50
    Same as above excpet that an airway bill number is also allocated and returned.
51
 
51
 
52
    Parameters:
52
    Parameters:
53
     - destination_pincode
53
     - destination_pincode
54
     - item_id
54
     - item_id
55
     - type
55
     - type
-
 
56
     - pickUp
56
    """
57
    """
57
    pass
58
    pass
58
 
59
 
59
  def getEmptyAWB(self, providerId, type):
60
  def getEmptyAWB(self, providerId, type):
60
    """
61
    """
Line 256... Line 257...
256
      return result.success
257
      return result.success
257
    if result.se is not None:
258
    if result.se is not None:
258
      raise result.se
259
      raise result.se
259
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
260
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
260
 
261
 
261
  def getLogisticsInfo(self, destination_pincode, item_id, type):
262
  def getLogisticsInfo(self, destination_pincode, item_id, type, pickUp):
262
    """
263
    """
263
    Same as above excpet that an airway bill number is also allocated and returned.
264
    Same as above excpet that an airway bill number is also allocated and returned.
264
 
265
 
265
    Parameters:
266
    Parameters:
266
     - destination_pincode
267
     - destination_pincode
267
     - item_id
268
     - item_id
268
     - type
269
     - type
-
 
270
     - pickUp
269
    """
271
    """
270
    self.send_getLogisticsInfo(destination_pincode, item_id, type)
272
    self.send_getLogisticsInfo(destination_pincode, item_id, type, pickUp)
271
    return self.recv_getLogisticsInfo()
273
    return self.recv_getLogisticsInfo()
272
 
274
 
273
  def send_getLogisticsInfo(self, destination_pincode, item_id, type):
275
  def send_getLogisticsInfo(self, destination_pincode, item_id, type, pickUp):
274
    self._oprot.writeMessageBegin('getLogisticsInfo', TMessageType.CALL, self._seqid)
276
    self._oprot.writeMessageBegin('getLogisticsInfo', TMessageType.CALL, self._seqid)
275
    args = getLogisticsInfo_args()
277
    args = getLogisticsInfo_args()
276
    args.destination_pincode = destination_pincode
278
    args.destination_pincode = destination_pincode
277
    args.item_id = item_id
279
    args.item_id = item_id
278
    args.type = type
280
    args.type = type
-
 
281
    args.pickUp = pickUp
279
    args.write(self._oprot)
282
    args.write(self._oprot)
280
    self._oprot.writeMessageEnd()
283
    self._oprot.writeMessageEnd()
281
    self._oprot.trans.flush()
284
    self._oprot.trans.flush()
282
 
285
 
283
  def recv_getLogisticsInfo(self, ):
286
  def recv_getLogisticsInfo(self, ):
Line 713... Line 716...
713
    args = getLogisticsInfo_args()
716
    args = getLogisticsInfo_args()
714
    args.read(iprot)
717
    args.read(iprot)
715
    iprot.readMessageEnd()
718
    iprot.readMessageEnd()
716
    result = getLogisticsInfo_result()
719
    result = getLogisticsInfo_result()
717
    try:
720
    try:
718
      result.success = self._handler.getLogisticsInfo(args.destination_pincode, args.item_id, args.type)
721
      result.success = self._handler.getLogisticsInfo(args.destination_pincode, args.item_id, args.type, args.pickUp)
719
    except LogisticsServiceException, se:
722
    except LogisticsServiceException, se:
720
      result.se = se
723
      result.se = se
721
    oprot.writeMessageBegin("getLogisticsInfo", TMessageType.REPLY, seqid)
724
    oprot.writeMessageBegin("getLogisticsInfo", TMessageType.REPLY, seqid)
722
    result.write(oprot)
725
    result.write(oprot)
723
    oprot.writeMessageEnd()
726
    oprot.writeMessageEnd()
Line 1265... Line 1268...
1265
  """
1268
  """
1266
  Attributes:
1269
  Attributes:
1267
   - destination_pincode
1270
   - destination_pincode
1268
   - item_id
1271
   - item_id
1269
   - type
1272
   - type
-
 
1273
   - pickUp
1270
  """
1274
  """
1271
 
1275
 
1272
  thrift_spec = (
1276
  thrift_spec = (
1273
    None, # 0
1277
    None, # 0
1274
    (1, TType.STRING, 'destination_pincode', None, None, ), # 1
1278
    (1, TType.STRING, 'destination_pincode', None, None, ), # 1
1275
    (2, TType.I64, 'item_id', None, None, ), # 2
1279
    (2, TType.I64, 'item_id', None, None, ), # 2
1276
    (3, TType.I32, 'type', None, None, ), # 3
1280
    (3, TType.I32, 'type', None, None, ), # 3
-
 
1281
    (4, TType.I32, 'pickUp', None, None, ), # 4
1277
  )
1282
  )
1278
 
1283
 
1279
  def __init__(self, destination_pincode=None, item_id=None, type=None,):
1284
  def __init__(self, destination_pincode=None, item_id=None, type=None, pickUp=None,):
1280
    self.destination_pincode = destination_pincode
1285
    self.destination_pincode = destination_pincode
1281
    self.item_id = item_id
1286
    self.item_id = item_id
1282
    self.type = type
1287
    self.type = type
-
 
1288
    self.pickUp = pickUp
1283
 
1289
 
1284
  def read(self, iprot):
1290
  def read(self, iprot):
1285
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1291
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1286
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1292
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1287
      return
1293
      return
Line 1303... Line 1309...
1303
      elif fid == 3:
1309
      elif fid == 3:
1304
        if ftype == TType.I32:
1310
        if ftype == TType.I32:
1305
          self.type = iprot.readI32();
1311
          self.type = iprot.readI32();
1306
        else:
1312
        else:
1307
          iprot.skip(ftype)
1313
          iprot.skip(ftype)
-
 
1314
      elif fid == 4:
-
 
1315
        if ftype == TType.I32:
-
 
1316
          self.pickUp = iprot.readI32();
-
 
1317
        else:
-
 
1318
          iprot.skip(ftype)
1308
      else:
1319
      else:
1309
        iprot.skip(ftype)
1320
        iprot.skip(ftype)
1310
      iprot.readFieldEnd()
1321
      iprot.readFieldEnd()
1311
    iprot.readStructEnd()
1322
    iprot.readStructEnd()
1312
 
1323
 
Line 1325... Line 1336...
1325
      oprot.writeFieldEnd()
1336
      oprot.writeFieldEnd()
1326
    if self.type is not None:
1337
    if self.type is not None:
1327
      oprot.writeFieldBegin('type', TType.I32, 3)
1338
      oprot.writeFieldBegin('type', TType.I32, 3)
1328
      oprot.writeI32(self.type)
1339
      oprot.writeI32(self.type)
1329
      oprot.writeFieldEnd()
1340
      oprot.writeFieldEnd()
-
 
1341
    if self.pickUp is not None:
-
 
1342
      oprot.writeFieldBegin('pickUp', TType.I32, 4)
-
 
1343
      oprot.writeI32(self.pickUp)
-
 
1344
      oprot.writeFieldEnd()
1330
    oprot.writeFieldStop()
1345
    oprot.writeFieldStop()
1331
    oprot.writeStructEnd()
1346
    oprot.writeStructEnd()
1332
 
1347
 
1333
  def validate(self):
1348
  def validate(self):
1334
    return
1349
    return