Subversion Repositories SmartDukaan

Rev

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

Rev 19474 Rev 20724
Line 64... Line 64...
64
     - type
64
     - type
65
     - pickUp
65
     - pickUp
66
    """
66
    """
67
    pass
67
    pass
68
 
68
 
69
  def getEmptyAWB(self, providerId, type):
69
  def getEmptyAWB(self, providerId, logisticsTransactionId):
70
    """
70
    """
71
    Returns an unused AWB number for the given provider.
71
    Returns an unused AWB number for the given provider.
72
 
72
 
73
    Parameters:
73
    Parameters:
74
     - providerId
74
     - providerId
75
     - type
75
     - logisticsTransactionId
76
    """
76
    """
77
    pass
77
    pass
78
 
78
 
79
  def getShipmentInfo(self, awbNumber, providerId):
79
  def getShipmentInfo(self, awbNumber, providerId):
80
    """
80
    """
Line 448... Line 448...
448
      return result.success
448
      return result.success
449
    if result.se is not None:
449
    if result.se is not None:
450
      raise result.se
450
      raise result.se
451
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
451
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
452
 
452
 
453
  def getEmptyAWB(self, providerId, type):
453
  def getEmptyAWB(self, providerId, logisticsTransactionId):
454
    """
454
    """
455
    Returns an unused AWB number for the given provider.
455
    Returns an unused AWB number for the given provider.
456
 
456
 
457
    Parameters:
457
    Parameters:
458
     - providerId
458
     - providerId
459
     - type
459
     - logisticsTransactionId
460
    """
460
    """
461
    self.send_getEmptyAWB(providerId, type)
461
    self.send_getEmptyAWB(providerId, logisticsTransactionId)
462
    return self.recv_getEmptyAWB()
462
    return self.recv_getEmptyAWB()
463
 
463
 
464
  def send_getEmptyAWB(self, providerId, type):
464
  def send_getEmptyAWB(self, providerId, logisticsTransactionId):
465
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
465
    self._oprot.writeMessageBegin('getEmptyAWB', TMessageType.CALL, self._seqid)
466
    args = getEmptyAWB_args()
466
    args = getEmptyAWB_args()
467
    args.providerId = providerId
467
    args.providerId = providerId
468
    args.type = type
468
    args.logisticsTransactionId = logisticsTransactionId
469
    args.write(self._oprot)
469
    args.write(self._oprot)
470
    self._oprot.writeMessageEnd()
470
    self._oprot.writeMessageEnd()
471
    self._oprot.trans.flush()
471
    self._oprot.trans.flush()
472
 
472
 
473
  def recv_getEmptyAWB(self, ):
473
  def recv_getEmptyAWB(self, ):
Line 1291... Line 1291...
1291
    args = getEmptyAWB_args()
1291
    args = getEmptyAWB_args()
1292
    args.read(iprot)
1292
    args.read(iprot)
1293
    iprot.readMessageEnd()
1293
    iprot.readMessageEnd()
1294
    result = getEmptyAWB_result()
1294
    result = getEmptyAWB_result()
1295
    try:
1295
    try:
1296
      result.success = self._handler.getEmptyAWB(args.providerId, args.type)
1296
      result.success = self._handler.getEmptyAWB(args.providerId, args.logisticsTransactionId)
1297
    except LogisticsServiceException, se:
1297
    except LogisticsServiceException, se:
1298
      result.se = se
1298
      result.se = se
1299
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
1299
    oprot.writeMessageBegin("getEmptyAWB", TMessageType.REPLY, seqid)
1300
    result.write(oprot)
1300
    result.write(oprot)
1301
    oprot.writeMessageEnd()
1301
    oprot.writeMessageEnd()
Line 2286... Line 2286...
2286
 
2286
 
2287
class getEmptyAWB_args:
2287
class getEmptyAWB_args:
2288
  """
2288
  """
2289
  Attributes:
2289
  Attributes:
2290
   - providerId
2290
   - providerId
2291
   - type
2291
   - logisticsTransactionId
2292
  """
2292
  """
2293
 
2293
 
2294
  thrift_spec = None
2294
  thrift_spec = (
-
 
2295
    None, # 0
-
 
2296
    (1, TType.I64, 'providerId', None, None, ), # 1
-
 
2297
    (2, TType.STRING, 'logisticsTransactionId', None, None, ), # 2
-
 
2298
  )
-
 
2299
 
2295
  def __init__(self, providerId=None, type=None,):
2300
  def __init__(self, providerId=None, logisticsTransactionId=None,):
2296
    self.providerId = providerId
2301
    self.providerId = providerId
2297
    self.type = type
2302
    self.logisticsTransactionId = logisticsTransactionId
2298
 
2303
 
2299
  def read(self, iprot):
2304
  def read(self, iprot):
2300
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2305
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2301
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2306
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2302
      return
2307
      return
Line 2308... Line 2313...
2308
      if fid == 1:
2313
      if fid == 1:
2309
        if ftype == TType.I64:
2314
        if ftype == TType.I64:
2310
          self.providerId = iprot.readI64();
2315
          self.providerId = iprot.readI64();
2311
        else:
2316
        else:
2312
          iprot.skip(ftype)
2317
          iprot.skip(ftype)
2313
      elif fid == -1:
2318
      elif fid == 2:
2314
        if ftype == TType.I32:
2319
        if ftype == TType.STRING:
2315
          self.type = iprot.readI32();
2320
          self.logisticsTransactionId = iprot.readString();
2316
        else:
2321
        else:
2317
          iprot.skip(ftype)
2322
          iprot.skip(ftype)
2318
      else:
2323
      else:
2319
        iprot.skip(ftype)
2324
        iprot.skip(ftype)
2320
      iprot.readFieldEnd()
2325
      iprot.readFieldEnd()
Line 2323... Line 2328...
2323
  def write(self, oprot):
2328
  def write(self, oprot):
2324
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2329
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2325
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2330
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2326
      return
2331
      return
2327
    oprot.writeStructBegin('getEmptyAWB_args')
2332
    oprot.writeStructBegin('getEmptyAWB_args')
2328
    if self.type is not None:
-
 
2329
      oprot.writeFieldBegin('type', TType.I32, -1)
-
 
2330
      oprot.writeI32(self.type)
-
 
2331
      oprot.writeFieldEnd()
-
 
2332
    if self.providerId is not None:
2333
    if self.providerId is not None:
2333
      oprot.writeFieldBegin('providerId', TType.I64, 1)
2334
      oprot.writeFieldBegin('providerId', TType.I64, 1)
2334
      oprot.writeI64(self.providerId)
2335
      oprot.writeI64(self.providerId)
2335
      oprot.writeFieldEnd()
2336
      oprot.writeFieldEnd()
-
 
2337
    if self.logisticsTransactionId is not None:
-
 
2338
      oprot.writeFieldBegin('logisticsTransactionId', TType.STRING, 2)
-
 
2339
      oprot.writeString(self.logisticsTransactionId)
-
 
2340
      oprot.writeFieldEnd()
2336
    oprot.writeFieldStop()
2341
    oprot.writeFieldStop()
2337
    oprot.writeStructEnd()
2342
    oprot.writeStructEnd()
2338
 
2343
 
2339
  def validate(self):
2344
  def validate(self):
2340
    return
2345
    return