Subversion Repositories SmartDukaan

Rev

Rev 19427 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19427 Rev 20744
Line 1413... Line 1413...
1413
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1413
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1414
 
1414
 
1415
  def __ne__(self, other):
1415
  def __ne__(self, other):
1416
    return not (self == other)
1416
    return not (self == other)
1417
 
1417
 
-
 
1418
class BluedartAttributes:
-
 
1419
  """
-
 
1420
  Attributes:
-
 
1421
   - logisticsTransactionId
-
 
1422
   - name
-
 
1423
   - value
-
 
1424
  """
-
 
1425
 
-
 
1426
  thrift_spec = (
-
 
1427
    None, # 0
-
 
1428
    (1, TType.STRING, 'logisticsTransactionId', None, None, ), # 1
-
 
1429
    (2, TType.STRING, 'name', None, None, ), # 2
-
 
1430
    (3, TType.STRING, 'value', None, None, ), # 3
-
 
1431
  )
-
 
1432
 
-
 
1433
  def __init__(self, logisticsTransactionId=None, name=None, value=None,):
-
 
1434
    self.logisticsTransactionId = logisticsTransactionId
-
 
1435
    self.name = name
-
 
1436
    self.value = value
-
 
1437
 
-
 
1438
  def read(self, iprot):
-
 
1439
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1440
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1441
      return
-
 
1442
    iprot.readStructBegin()
-
 
1443
    while True:
-
 
1444
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1445
      if ftype == TType.STOP:
-
 
1446
        break
-
 
1447
      if fid == 1:
-
 
1448
        if ftype == TType.STRING:
-
 
1449
          self.logisticsTransactionId = iprot.readString();
-
 
1450
        else:
-
 
1451
          iprot.skip(ftype)
-
 
1452
      elif fid == 2:
-
 
1453
        if ftype == TType.STRING:
-
 
1454
          self.name = iprot.readString();
-
 
1455
        else:
-
 
1456
          iprot.skip(ftype)
-
 
1457
      elif fid == 3:
-
 
1458
        if ftype == TType.STRING:
-
 
1459
          self.value = iprot.readString();
-
 
1460
        else:
-
 
1461
          iprot.skip(ftype)
-
 
1462
      else:
-
 
1463
        iprot.skip(ftype)
-
 
1464
      iprot.readFieldEnd()
-
 
1465
    iprot.readStructEnd()
-
 
1466
 
-
 
1467
  def write(self, oprot):
-
 
1468
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1469
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1470
      return
-
 
1471
    oprot.writeStructBegin('BluedartAttributes')
-
 
1472
    if self.logisticsTransactionId is not None:
-
 
1473
      oprot.writeFieldBegin('logisticsTransactionId', TType.STRING, 1)
-
 
1474
      oprot.writeString(self.logisticsTransactionId)
-
 
1475
      oprot.writeFieldEnd()
-
 
1476
    if self.name is not None:
-
 
1477
      oprot.writeFieldBegin('name', TType.STRING, 2)
-
 
1478
      oprot.writeString(self.name)
-
 
1479
      oprot.writeFieldEnd()
-
 
1480
    if self.value is not None:
-
 
1481
      oprot.writeFieldBegin('value', TType.STRING, 3)
-
 
1482
      oprot.writeString(self.value)
-
 
1483
      oprot.writeFieldEnd()
-
 
1484
    oprot.writeFieldStop()
-
 
1485
    oprot.writeStructEnd()
-
 
1486
 
-
 
1487
  def validate(self):
-
 
1488
    return
-
 
1489
 
-
 
1490
 
-
 
1491
  def __repr__(self):
-
 
1492
    L = ['%s=%r' % (key, value)
-
 
1493
      for key, value in self.__dict__.iteritems()]
-
 
1494
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1495
 
-
 
1496
  def __eq__(self, other):
-
 
1497
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1498
 
-
 
1499
  def __ne__(self, other):
-
 
1500
    return not (self == other)
-
 
1501
 
1418
class LogisticsServiceException(Exception):
1502
class LogisticsServiceException(Exception):
1419
  """
1503
  """
1420
  Attributes:
1504
  Attributes:
1421
   - id
1505
   - id
1422
   - message
1506
   - message