Subversion Repositories SmartDukaan

Rev

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

Rev 9840 Rev 12895
Line 215... Line 215...
215
     - startDate
215
     - startDate
216
     - days
216
     - days
217
    """
217
    """
218
    pass
218
    pass
219
 
219
 
-
 
220
  def getFirstDeliveryEstimateForWhLocation(self, pincode, whLocation):
-
 
221
    """
-
 
222
    Parameters:
-
 
223
     - pincode
-
 
224
     - whLocation
-
 
225
    """
-
 
226
    pass
-
 
227
 
220
 
228
 
221
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
229
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
222
  def __init__(self, iprot, oprot=None):
230
  def __init__(self, iprot, oprot=None):
223
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
231
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
224
 
232
 
Line 941... Line 949...
941
    self._iprot.readMessageEnd()
949
    self._iprot.readMessageEnd()
942
    if result.success is not None:
950
    if result.success is not None:
943
      return result.success
951
      return result.success
944
    raise TApplicationException(TApplicationException.MISSING_RESULT, "adjustDeliveryDays failed: unknown result");
952
    raise TApplicationException(TApplicationException.MISSING_RESULT, "adjustDeliveryDays failed: unknown result");
945
 
953
 
-
 
954
  def getFirstDeliveryEstimateForWhLocation(self, pincode, whLocation):
-
 
955
    """
-
 
956
    Parameters:
-
 
957
     - pincode
-
 
958
     - whLocation
-
 
959
    """
-
 
960
    self.send_getFirstDeliveryEstimateForWhLocation(pincode, whLocation)
-
 
961
    return self.recv_getFirstDeliveryEstimateForWhLocation()
-
 
962
 
-
 
963
  def send_getFirstDeliveryEstimateForWhLocation(self, pincode, whLocation):
-
 
964
    self._oprot.writeMessageBegin('getFirstDeliveryEstimateForWhLocation', TMessageType.CALL, self._seqid)
-
 
965
    args = getFirstDeliveryEstimateForWhLocation_args()
-
 
966
    args.pincode = pincode
-
 
967
    args.whLocation = whLocation
-
 
968
    args.write(self._oprot)
-
 
969
    self._oprot.writeMessageEnd()
-
 
970
    self._oprot.trans.flush()
-
 
971
 
-
 
972
  def recv_getFirstDeliveryEstimateForWhLocation(self, ):
-
 
973
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
974
    if mtype == TMessageType.EXCEPTION:
-
 
975
      x = TApplicationException()
-
 
976
      x.read(self._iprot)
-
 
977
      self._iprot.readMessageEnd()
-
 
978
      raise x
-
 
979
    result = getFirstDeliveryEstimateForWhLocation_result()
-
 
980
    result.read(self._iprot)
-
 
981
    self._iprot.readMessageEnd()
-
 
982
    if result.success is not None:
-
 
983
      return result.success
-
 
984
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFirstDeliveryEstimateForWhLocation failed: unknown result");
-
 
985
 
946
 
986
 
947
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
987
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
948
  def __init__(self, handler):
988
  def __init__(self, handler):
949
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
989
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
950
    self._processMap["getProvider"] = Processor.process_getProvider
990
    self._processMap["getProvider"] = Processor.process_getProvider
Line 966... Line 1006...
966
    self._processMap["addPincode"] = Processor.process_addPincode
1006
    self._processMap["addPincode"] = Processor.process_addPincode
967
    self._processMap["updatePincode"] = Processor.process_updatePincode
1007
    self._processMap["updatePincode"] = Processor.process_updatePincode
968
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
1008
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
969
    self._processMap["runLogisticsLocationInfoUpdate"] = Processor.process_runLogisticsLocationInfoUpdate
1009
    self._processMap["runLogisticsLocationInfoUpdate"] = Processor.process_runLogisticsLocationInfoUpdate
970
    self._processMap["adjustDeliveryDays"] = Processor.process_adjustDeliveryDays
1010
    self._processMap["adjustDeliveryDays"] = Processor.process_adjustDeliveryDays
-
 
1011
    self._processMap["getFirstDeliveryEstimateForWhLocation"] = Processor.process_getFirstDeliveryEstimateForWhLocation
971
 
1012
 
972
  def process(self, iprot, oprot):
1013
  def process(self, iprot, oprot):
973
    (name, type, seqid) = iprot.readMessageBegin()
1014
    (name, type, seqid) = iprot.readMessageBegin()
974
    if name not in self._processMap:
1015
    if name not in self._processMap:
975
      iprot.skip(TType.STRUCT)
1016
      iprot.skip(TType.STRUCT)
Line 1243... Line 1284...
1243
    oprot.writeMessageBegin("adjustDeliveryDays", TMessageType.REPLY, seqid)
1284
    oprot.writeMessageBegin("adjustDeliveryDays", TMessageType.REPLY, seqid)
1244
    result.write(oprot)
1285
    result.write(oprot)
1245
    oprot.writeMessageEnd()
1286
    oprot.writeMessageEnd()
1246
    oprot.trans.flush()
1287
    oprot.trans.flush()
1247
 
1288
 
-
 
1289
  def process_getFirstDeliveryEstimateForWhLocation(self, seqid, iprot, oprot):
-
 
1290
    args = getFirstDeliveryEstimateForWhLocation_args()
-
 
1291
    args.read(iprot)
-
 
1292
    iprot.readMessageEnd()
-
 
1293
    result = getFirstDeliveryEstimateForWhLocation_result()
-
 
1294
    result.success = self._handler.getFirstDeliveryEstimateForWhLocation(args.pincode, args.whLocation)
-
 
1295
    oprot.writeMessageBegin("getFirstDeliveryEstimateForWhLocation", TMessageType.REPLY, seqid)
-
 
1296
    result.write(oprot)
-
 
1297
    oprot.writeMessageEnd()
-
 
1298
    oprot.trans.flush()
-
 
1299
 
1248
 
1300
 
1249
# HELPER FUNCTIONS AND STRUCTURES
1301
# HELPER FUNCTIONS AND STRUCTURES
1250
 
1302
 
1251
class getProvider_args:
1303
class getProvider_args:
1252
  """
1304
  """
Line 4159... Line 4211...
4159
    if self.success is not None:
4211
    if self.success is not None:
4160
      oprot.writeFieldBegin('success', TType.I64, 0)
4212
      oprot.writeFieldBegin('success', TType.I64, 0)
4161
      oprot.writeI64(self.success)
4213
      oprot.writeI64(self.success)
4162
      oprot.writeFieldEnd()
4214
      oprot.writeFieldEnd()
4163
    oprot.writeFieldStop()
4215
    oprot.writeFieldStop()
-
 
4216
    oprot.writeStructEnd()
-
 
4217
 
-
 
4218
  def validate(self):
-
 
4219
    return
-
 
4220
 
-
 
4221
 
-
 
4222
  def __repr__(self):
-
 
4223
    L = ['%s=%r' % (key, value)
-
 
4224
      for key, value in self.__dict__.iteritems()]
-
 
4225
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4226
 
-
 
4227
  def __eq__(self, other):
-
 
4228
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4229
 
-
 
4230
  def __ne__(self, other):
-
 
4231
    return not (self == other)
-
 
4232
 
-
 
4233
class getFirstDeliveryEstimateForWhLocation_args:
-
 
4234
  """
-
 
4235
  Attributes:
-
 
4236
   - pincode
-
 
4237
   - whLocation
-
 
4238
  """
-
 
4239
 
-
 
4240
  thrift_spec = (
-
 
4241
    None, # 0
-
 
4242
    (1, TType.STRING, 'pincode', None, None, ), # 1
-
 
4243
    (2, TType.I64, 'whLocation', None, None, ), # 2
-
 
4244
  )
-
 
4245
 
-
 
4246
  def __init__(self, pincode=None, whLocation=None,):
-
 
4247
    self.pincode = pincode
-
 
4248
    self.whLocation = whLocation
-
 
4249
 
-
 
4250
  def read(self, iprot):
-
 
4251
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4252
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4253
      return
-
 
4254
    iprot.readStructBegin()
-
 
4255
    while True:
-
 
4256
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4257
      if ftype == TType.STOP:
-
 
4258
        break
-
 
4259
      if fid == 1:
-
 
4260
        if ftype == TType.STRING:
-
 
4261
          self.pincode = iprot.readString();
-
 
4262
        else:
-
 
4263
          iprot.skip(ftype)
-
 
4264
      elif fid == 2:
-
 
4265
        if ftype == TType.I64:
-
 
4266
          self.whLocation = iprot.readI64();
-
 
4267
        else:
-
 
4268
          iprot.skip(ftype)
-
 
4269
      else:
-
 
4270
        iprot.skip(ftype)
-
 
4271
      iprot.readFieldEnd()
-
 
4272
    iprot.readStructEnd()
-
 
4273
 
-
 
4274
  def write(self, oprot):
-
 
4275
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4276
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4277
      return
-
 
4278
    oprot.writeStructBegin('getFirstDeliveryEstimateForWhLocation_args')
-
 
4279
    if self.pincode is not None:
-
 
4280
      oprot.writeFieldBegin('pincode', TType.STRING, 1)
-
 
4281
      oprot.writeString(self.pincode)
-
 
4282
      oprot.writeFieldEnd()
-
 
4283
    if self.whLocation is not None:
-
 
4284
      oprot.writeFieldBegin('whLocation', TType.I64, 2)
-
 
4285
      oprot.writeI64(self.whLocation)
-
 
4286
      oprot.writeFieldEnd()
-
 
4287
    oprot.writeFieldStop()
-
 
4288
    oprot.writeStructEnd()
-
 
4289
 
-
 
4290
  def validate(self):
-
 
4291
    return
-
 
4292
 
-
 
4293
 
-
 
4294
  def __repr__(self):
-
 
4295
    L = ['%s=%r' % (key, value)
-
 
4296
      for key, value in self.__dict__.iteritems()]
-
 
4297
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4298
 
-
 
4299
  def __eq__(self, other):
-
 
4300
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4301
 
-
 
4302
  def __ne__(self, other):
-
 
4303
    return not (self == other)
-
 
4304
 
-
 
4305
class getFirstDeliveryEstimateForWhLocation_result:
-
 
4306
  """
-
 
4307
  Attributes:
-
 
4308
   - success
-
 
4309
  """
-
 
4310
 
-
 
4311
  thrift_spec = (
-
 
4312
    (0, TType.I64, 'success', None, None, ), # 0
-
 
4313
  )
-
 
4314
 
-
 
4315
  def __init__(self, success=None,):
-
 
4316
    self.success = success
-
 
4317
 
-
 
4318
  def read(self, iprot):
-
 
4319
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4320
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4321
      return
-
 
4322
    iprot.readStructBegin()
-
 
4323
    while True:
-
 
4324
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4325
      if ftype == TType.STOP:
-
 
4326
        break
-
 
4327
      if fid == 0:
-
 
4328
        if ftype == TType.I64:
-
 
4329
          self.success = iprot.readI64();
-
 
4330
        else:
-
 
4331
          iprot.skip(ftype)
-
 
4332
      else:
-
 
4333
        iprot.skip(ftype)
-
 
4334
      iprot.readFieldEnd()
-
 
4335
    iprot.readStructEnd()
-
 
4336
 
-
 
4337
  def write(self, oprot):
-
 
4338
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4339
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4340
      return
-
 
4341
    oprot.writeStructBegin('getFirstDeliveryEstimateForWhLocation_result')
-
 
4342
    if self.success is not None:
-
 
4343
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
4344
      oprot.writeI64(self.success)
-
 
4345
      oprot.writeFieldEnd()
-
 
4346
    oprot.writeFieldStop()
4164
    oprot.writeStructEnd()
4347
    oprot.writeStructEnd()
4165
 
4348
 
4166
  def validate(self):
4349
  def validate(self):
4167
    return
4350
    return
4168
 
4351