Subversion Repositories SmartDukaan

Rev

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

Rev 20724 Rev 20744
Line 263... Line 263...
263
     - billingWarehouseId
263
     - billingWarehouseId
264
     - isCompleteTxn
264
     - isCompleteTxn
265
    """
265
    """
266
    pass
266
    pass
267
 
267
 
-
 
268
  def getBluedartAttributesForLogisticsTxnId(self, logisticsTxnId, name):
-
 
269
    """
-
 
270
    Parameters:
-
 
271
     - logisticsTxnId
-
 
272
     - name
-
 
273
    """
-
 
274
    pass
-
 
275
 
268
 
276
 
269
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
277
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
270
  def __init__(self, iprot, oprot=None):
278
  def __init__(self, iprot, oprot=None):
271
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
279
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
272
 
280
 
Line 1169... Line 1177...
1169
      return result.success
1177
      return result.success
1170
    if result.se is not None:
1178
    if result.se is not None:
1171
      raise result.se
1179
      raise result.se
1172
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCostingAndDeliveryEstimateForPincode failed: unknown result");
1180
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCostingAndDeliveryEstimateForPincode failed: unknown result");
1173
 
1181
 
-
 
1182
  def getBluedartAttributesForLogisticsTxnId(self, logisticsTxnId, name):
-
 
1183
    """
-
 
1184
    Parameters:
-
 
1185
     - logisticsTxnId
-
 
1186
     - name
-
 
1187
    """
-
 
1188
    self.send_getBluedartAttributesForLogisticsTxnId(logisticsTxnId, name)
-
 
1189
    return self.recv_getBluedartAttributesForLogisticsTxnId()
-
 
1190
 
-
 
1191
  def send_getBluedartAttributesForLogisticsTxnId(self, logisticsTxnId, name):
-
 
1192
    self._oprot.writeMessageBegin('getBluedartAttributesForLogisticsTxnId', TMessageType.CALL, self._seqid)
-
 
1193
    args = getBluedartAttributesForLogisticsTxnId_args()
-
 
1194
    args.logisticsTxnId = logisticsTxnId
-
 
1195
    args.name = name
-
 
1196
    args.write(self._oprot)
-
 
1197
    self._oprot.writeMessageEnd()
-
 
1198
    self._oprot.trans.flush()
-
 
1199
 
-
 
1200
  def recv_getBluedartAttributesForLogisticsTxnId(self, ):
-
 
1201
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1202
    if mtype == TMessageType.EXCEPTION:
-
 
1203
      x = TApplicationException()
-
 
1204
      x.read(self._iprot)
-
 
1205
      self._iprot.readMessageEnd()
-
 
1206
      raise x
-
 
1207
    result = getBluedartAttributesForLogisticsTxnId_result()
-
 
1208
    result.read(self._iprot)
-
 
1209
    self._iprot.readMessageEnd()
-
 
1210
    if result.success is not None:
-
 
1211
      return result.success
-
 
1212
    if result.se is not None:
-
 
1213
      raise result.se
-
 
1214
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBluedartAttributesForLogisticsTxnId failed: unknown result");
-
 
1215
 
1174
 
1216
 
1175
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1217
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1176
  def __init__(self, handler):
1218
  def __init__(self, handler):
1177
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1219
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1178
    self._processMap["getProvider"] = Processor.process_getProvider
1220
    self._processMap["getProvider"] = Processor.process_getProvider
Line 1199... Line 1241...
1199
    self._processMap["getFirstDeliveryEstimateForWhLocation"] = Processor.process_getFirstDeliveryEstimateForWhLocation
1241
    self._processMap["getFirstDeliveryEstimateForWhLocation"] = Processor.process_getFirstDeliveryEstimateForWhLocation
1200
    self._processMap["getNewEmptyAwb"] = Processor.process_getNewEmptyAwb
1242
    self._processMap["getNewEmptyAwb"] = Processor.process_getNewEmptyAwb
1201
    self._processMap["getProviderLimitDetailsForPincode"] = Processor.process_getProviderLimitDetailsForPincode
1243
    self._processMap["getProviderLimitDetailsForPincode"] = Processor.process_getProviderLimitDetailsForPincode
1202
    self._processMap["getLocationInfoMap"] = Processor.process_getLocationInfoMap
1244
    self._processMap["getLocationInfoMap"] = Processor.process_getLocationInfoMap
1203
    self._processMap["getCostingAndDeliveryEstimateForPincode"] = Processor.process_getCostingAndDeliveryEstimateForPincode
1245
    self._processMap["getCostingAndDeliveryEstimateForPincode"] = Processor.process_getCostingAndDeliveryEstimateForPincode
-
 
1246
    self._processMap["getBluedartAttributesForLogisticsTxnId"] = Processor.process_getBluedartAttributesForLogisticsTxnId
1204
 
1247
 
1205
  def process(self, iprot, oprot):
1248
  def process(self, iprot, oprot):
1206
    (name, type, seqid) = iprot.readMessageBegin()
1249
    (name, type, seqid) = iprot.readMessageBegin()
1207
    if name not in self._processMap:
1250
    if name not in self._processMap:
1208
      iprot.skip(TType.STRUCT)
1251
      iprot.skip(TType.STRUCT)
Line 1540... Line 1583...
1540
    oprot.writeMessageBegin("getCostingAndDeliveryEstimateForPincode", TMessageType.REPLY, seqid)
1583
    oprot.writeMessageBegin("getCostingAndDeliveryEstimateForPincode", TMessageType.REPLY, seqid)
1541
    result.write(oprot)
1584
    result.write(oprot)
1542
    oprot.writeMessageEnd()
1585
    oprot.writeMessageEnd()
1543
    oprot.trans.flush()
1586
    oprot.trans.flush()
1544
 
1587
 
-
 
1588
  def process_getBluedartAttributesForLogisticsTxnId(self, seqid, iprot, oprot):
-
 
1589
    args = getBluedartAttributesForLogisticsTxnId_args()
-
 
1590
    args.read(iprot)
-
 
1591
    iprot.readMessageEnd()
-
 
1592
    result = getBluedartAttributesForLogisticsTxnId_result()
-
 
1593
    try:
-
 
1594
      result.success = self._handler.getBluedartAttributesForLogisticsTxnId(args.logisticsTxnId, args.name)
-
 
1595
    except LogisticsServiceException, se:
-
 
1596
      result.se = se
-
 
1597
    oprot.writeMessageBegin("getBluedartAttributesForLogisticsTxnId", TMessageType.REPLY, seqid)
-
 
1598
    result.write(oprot)
-
 
1599
    oprot.writeMessageEnd()
-
 
1600
    oprot.trans.flush()
-
 
1601
 
1545
 
1602
 
1546
# HELPER FUNCTIONS AND STRUCTURES
1603
# HELPER FUNCTIONS AND STRUCTURES
1547
 
1604
 
1548
class getProvider_args:
1605
class getProvider_args:
1549
  """
1606
  """
Line 5263... Line 5320...
5263
    if self.success is not None:
5320
    if self.success is not None:
5264
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
5321
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
5265
      self.success.write(oprot)
5322
      self.success.write(oprot)
5266
      oprot.writeFieldEnd()
5323
      oprot.writeFieldEnd()
5267
    if self.se is not None:
5324
    if self.se is not None:
-
 
5325
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
5326
      self.se.write(oprot)
-
 
5327
      oprot.writeFieldEnd()
-
 
5328
    oprot.writeFieldStop()
-
 
5329
    oprot.writeStructEnd()
-
 
5330
 
-
 
5331
  def validate(self):
-
 
5332
    return
-
 
5333
 
-
 
5334
 
-
 
5335
  def __repr__(self):
-
 
5336
    L = ['%s=%r' % (key, value)
-
 
5337
      for key, value in self.__dict__.iteritems()]
-
 
5338
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5339
 
-
 
5340
  def __eq__(self, other):
-
 
5341
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5342
 
-
 
5343
  def __ne__(self, other):
-
 
5344
    return not (self == other)
-
 
5345
 
-
 
5346
class getBluedartAttributesForLogisticsTxnId_args:
-
 
5347
  """
-
 
5348
  Attributes:
-
 
5349
   - logisticsTxnId
-
 
5350
   - name
-
 
5351
  """
-
 
5352
 
-
 
5353
  thrift_spec = (
-
 
5354
    None, # 0
-
 
5355
    (1, TType.STRING, 'logisticsTxnId', None, None, ), # 1
-
 
5356
    (2, TType.STRING, 'name', None, None, ), # 2
-
 
5357
  )
-
 
5358
 
-
 
5359
  def __init__(self, logisticsTxnId=None, name=None,):
-
 
5360
    self.logisticsTxnId = logisticsTxnId
-
 
5361
    self.name = name
-
 
5362
 
-
 
5363
  def read(self, iprot):
-
 
5364
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5365
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5366
      return
-
 
5367
    iprot.readStructBegin()
-
 
5368
    while True:
-
 
5369
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5370
      if ftype == TType.STOP:
-
 
5371
        break
-
 
5372
      if fid == 1:
-
 
5373
        if ftype == TType.STRING:
-
 
5374
          self.logisticsTxnId = iprot.readString();
-
 
5375
        else:
-
 
5376
          iprot.skip(ftype)
-
 
5377
      elif fid == 2:
-
 
5378
        if ftype == TType.STRING:
-
 
5379
          self.name = iprot.readString();
-
 
5380
        else:
-
 
5381
          iprot.skip(ftype)
-
 
5382
      else:
-
 
5383
        iprot.skip(ftype)
-
 
5384
      iprot.readFieldEnd()
-
 
5385
    iprot.readStructEnd()
-
 
5386
 
-
 
5387
  def write(self, oprot):
-
 
5388
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5389
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5390
      return
-
 
5391
    oprot.writeStructBegin('getBluedartAttributesForLogisticsTxnId_args')
-
 
5392
    if self.logisticsTxnId is not None:
-
 
5393
      oprot.writeFieldBegin('logisticsTxnId', TType.STRING, 1)
-
 
5394
      oprot.writeString(self.logisticsTxnId)
-
 
5395
      oprot.writeFieldEnd()
-
 
5396
    if self.name is not None:
-
 
5397
      oprot.writeFieldBegin('name', TType.STRING, 2)
-
 
5398
      oprot.writeString(self.name)
-
 
5399
      oprot.writeFieldEnd()
-
 
5400
    oprot.writeFieldStop()
-
 
5401
    oprot.writeStructEnd()
-
 
5402
 
-
 
5403
  def validate(self):
-
 
5404
    return
-
 
5405
 
-
 
5406
 
-
 
5407
  def __repr__(self):
-
 
5408
    L = ['%s=%r' % (key, value)
-
 
5409
      for key, value in self.__dict__.iteritems()]
-
 
5410
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5411
 
-
 
5412
  def __eq__(self, other):
-
 
5413
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5414
 
-
 
5415
  def __ne__(self, other):
-
 
5416
    return not (self == other)
-
 
5417
 
-
 
5418
class getBluedartAttributesForLogisticsTxnId_result:
-
 
5419
  """
-
 
5420
  Attributes:
-
 
5421
   - success
-
 
5422
   - se
-
 
5423
  """
-
 
5424
 
-
 
5425
  thrift_spec = (
-
 
5426
    (0, TType.STRUCT, 'success', (BluedartAttributes, BluedartAttributes.thrift_spec), None, ), # 0
-
 
5427
    (1, TType.STRUCT, 'se', (LogisticsServiceException, LogisticsServiceException.thrift_spec), None, ), # 1
-
 
5428
  )
-
 
5429
 
-
 
5430
  def __init__(self, success=None, se=None,):
-
 
5431
    self.success = success
-
 
5432
    self.se = se
-
 
5433
 
-
 
5434
  def read(self, iprot):
-
 
5435
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5436
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5437
      return
-
 
5438
    iprot.readStructBegin()
-
 
5439
    while True:
-
 
5440
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5441
      if ftype == TType.STOP:
-
 
5442
        break
-
 
5443
      if fid == 0:
-
 
5444
        if ftype == TType.STRUCT:
-
 
5445
          self.success = BluedartAttributes()
-
 
5446
          self.success.read(iprot)
-
 
5447
        else:
-
 
5448
          iprot.skip(ftype)
-
 
5449
      elif fid == 1:
-
 
5450
        if ftype == TType.STRUCT:
-
 
5451
          self.se = LogisticsServiceException()
-
 
5452
          self.se.read(iprot)
-
 
5453
        else:
-
 
5454
          iprot.skip(ftype)
-
 
5455
      else:
-
 
5456
        iprot.skip(ftype)
-
 
5457
      iprot.readFieldEnd()
-
 
5458
    iprot.readStructEnd()
-
 
5459
 
-
 
5460
  def write(self, oprot):
-
 
5461
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5462
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5463
      return
-
 
5464
    oprot.writeStructBegin('getBluedartAttributesForLogisticsTxnId_result')
-
 
5465
    if self.success is not None:
-
 
5466
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
5467
      self.success.write(oprot)
-
 
5468
      oprot.writeFieldEnd()
-
 
5469
    if self.se is not None:
5268
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
5470
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
5269
      self.se.write(oprot)
5471
      self.se.write(oprot)
5270
      oprot.writeFieldEnd()
5472
      oprot.writeFieldEnd()
5271
    oprot.writeFieldStop()
5473
    oprot.writeFieldStop()
5272
    oprot.writeStructEnd()
5474
    oprot.writeStructEnd()