Subversion Repositories SmartDukaan

Rev

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

Rev 7567 Rev 7738
Line 199... Line 199...
199
     - cod
199
     - cod
200
     - awbs
200
     - awbs
201
    """
201
    """
202
    pass
202
    pass
203
 
203
 
-
 
204
  def getServiceableLocationAsPerProviderIdAndPincode(self, providerId, pincode):
-
 
205
    """
-
 
206
    Returns true when record exist in the Serviceablelocationdetails DB Table otherwise return false.
-
 
207
 
-
 
208
    Parameters:
-
 
209
     - providerId
-
 
210
     - pincode
-
 
211
    """
-
 
212
    pass
-
 
213
 
-
 
214
  def runCompleteUpdateForPincode(self, ):
-
 
215
    pass
-
 
216
 
204
 
217
 
205
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
218
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
206
  def __init__(self, iprot, oprot=None):
219
  def __init__(self, iprot, oprot=None):
207
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
220
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
208
 
221
 
Line 863... Line 876...
863
    self._iprot.readMessageEnd()
876
    self._iprot.readMessageEnd()
864
    if result.success is not None:
877
    if result.success is not None:
865
      return result.success
878
      return result.success
866
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addNewAwbs failed: unknown result");
879
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addNewAwbs failed: unknown result");
867
 
880
 
-
 
881
  def getServiceableLocationAsPerProviderIdAndPincode(self, providerId, pincode):
-
 
882
    """
-
 
883
    Returns true when record exist in the Serviceablelocationdetails DB Table otherwise return false.
-
 
884
 
-
 
885
    Parameters:
-
 
886
     - providerId
-
 
887
     - pincode
-
 
888
    """
-
 
889
    self.send_getServiceableLocationAsPerProviderIdAndPincode(providerId, pincode)
-
 
890
    return self.recv_getServiceableLocationAsPerProviderIdAndPincode()
-
 
891
 
-
 
892
  def send_getServiceableLocationAsPerProviderIdAndPincode(self, providerId, pincode):
-
 
893
    self._oprot.writeMessageBegin('getServiceableLocationAsPerProviderIdAndPincode', TMessageType.CALL, self._seqid)
-
 
894
    args = getServiceableLocationAsPerProviderIdAndPincode_args()
-
 
895
    args.providerId = providerId
-
 
896
    args.pincode = pincode
-
 
897
    args.write(self._oprot)
-
 
898
    self._oprot.writeMessageEnd()
-
 
899
    self._oprot.trans.flush()
-
 
900
 
-
 
901
  def recv_getServiceableLocationAsPerProviderIdAndPincode(self, ):
-
 
902
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
903
    if mtype == TMessageType.EXCEPTION:
-
 
904
      x = TApplicationException()
-
 
905
      x.read(self._iprot)
-
 
906
      self._iprot.readMessageEnd()
-
 
907
      raise x
-
 
908
    result = getServiceableLocationAsPerProviderIdAndPincode_result()
-
 
909
    result.read(self._iprot)
-
 
910
    self._iprot.readMessageEnd()
-
 
911
    if result.success is not None:
-
 
912
      return result.success
-
 
913
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getServiceableLocationAsPerProviderIdAndPincode failed: unknown result");
-
 
914
 
-
 
915
  def runCompleteUpdateForPincode(self, ):
-
 
916
    self.send_runCompleteUpdateForPincode()
-
 
917
    self.recv_runCompleteUpdateForPincode()
-
 
918
 
-
 
919
  def send_runCompleteUpdateForPincode(self, ):
-
 
920
    self._oprot.writeMessageBegin('runCompleteUpdateForPincode', TMessageType.CALL, self._seqid)
-
 
921
    args = runCompleteUpdateForPincode_args()
-
 
922
    args.write(self._oprot)
-
 
923
    self._oprot.writeMessageEnd()
-
 
924
    self._oprot.trans.flush()
-
 
925
 
-
 
926
  def recv_runCompleteUpdateForPincode(self, ):
-
 
927
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
928
    if mtype == TMessageType.EXCEPTION:
-
 
929
      x = TApplicationException()
-
 
930
      x.read(self._iprot)
-
 
931
      self._iprot.readMessageEnd()
-
 
932
      raise x
-
 
933
    result = runCompleteUpdateForPincode_result()
-
 
934
    result.read(self._iprot)
-
 
935
    self._iprot.readMessageEnd()
-
 
936
    return
-
 
937
 
868
 
938
 
869
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
939
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
870
  def __init__(self, handler):
940
  def __init__(self, handler):
871
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
941
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
872
    self._processMap["getProvider"] = Processor.process_getProvider
942
    self._processMap["getProvider"] = Processor.process_getProvider
Line 886... Line 956...
886
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
956
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
887
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
957
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
888
    self._processMap["addPincode"] = Processor.process_addPincode
958
    self._processMap["addPincode"] = Processor.process_addPincode
889
    self._processMap["updatePincode"] = Processor.process_updatePincode
959
    self._processMap["updatePincode"] = Processor.process_updatePincode
890
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
960
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
-
 
961
    self._processMap["getServiceableLocationAsPerProviderIdAndPincode"] = Processor.process_getServiceableLocationAsPerProviderIdAndPincode
-
 
962
    self._processMap["runCompleteUpdateForPincode"] = Processor.process_runCompleteUpdateForPincode
891
 
963
 
892
  def process(self, iprot, oprot):
964
  def process(self, iprot, oprot):
893
    (name, type, seqid) = iprot.readMessageBegin()
965
    (name, type, seqid) = iprot.readMessageBegin()
894
    if name not in self._processMap:
966
    if name not in self._processMap:
895
      iprot.skip(TType.STRUCT)
967
      iprot.skip(TType.STRUCT)
Line 1141... Line 1213...
1141
    oprot.writeMessageBegin("addNewAwbs", TMessageType.REPLY, seqid)
1213
    oprot.writeMessageBegin("addNewAwbs", TMessageType.REPLY, seqid)
1142
    result.write(oprot)
1214
    result.write(oprot)
1143
    oprot.writeMessageEnd()
1215
    oprot.writeMessageEnd()
1144
    oprot.trans.flush()
1216
    oprot.trans.flush()
1145
 
1217
 
-
 
1218
  def process_getServiceableLocationAsPerProviderIdAndPincode(self, seqid, iprot, oprot):
-
 
1219
    args = getServiceableLocationAsPerProviderIdAndPincode_args()
-
 
1220
    args.read(iprot)
-
 
1221
    iprot.readMessageEnd()
-
 
1222
    result = getServiceableLocationAsPerProviderIdAndPincode_result()
-
 
1223
    result.success = self._handler.getServiceableLocationAsPerProviderIdAndPincode(args.providerId, args.pincode)
-
 
1224
    oprot.writeMessageBegin("getServiceableLocationAsPerProviderIdAndPincode", TMessageType.REPLY, seqid)
-
 
1225
    result.write(oprot)
-
 
1226
    oprot.writeMessageEnd()
-
 
1227
    oprot.trans.flush()
-
 
1228
 
-
 
1229
  def process_runCompleteUpdateForPincode(self, seqid, iprot, oprot):
-
 
1230
    args = runCompleteUpdateForPincode_args()
-
 
1231
    args.read(iprot)
-
 
1232
    iprot.readMessageEnd()
-
 
1233
    result = runCompleteUpdateForPincode_result()
-
 
1234
    self._handler.runCompleteUpdateForPincode()
-
 
1235
    oprot.writeMessageBegin("runCompleteUpdateForPincode", TMessageType.REPLY, seqid)
-
 
1236
    result.write(oprot)
-
 
1237
    oprot.writeMessageEnd()
-
 
1238
    oprot.trans.flush()
-
 
1239
 
1146
 
1240
 
1147
# HELPER FUNCTIONS AND STRUCTURES
1241
# HELPER FUNCTIONS AND STRUCTURES
1148
 
1242
 
1149
class getProvider_args:
1243
class getProvider_args:
1150
  """
1244
  """
Line 3806... Line 3900...
3806
    oprot.writeFieldStop()
3900
    oprot.writeFieldStop()
3807
    oprot.writeStructEnd()
3901
    oprot.writeStructEnd()
3808
 
3902
 
3809
  def validate(self):
3903
  def validate(self):
3810
    return
3904
    return
-
 
3905
 
-
 
3906
 
-
 
3907
  def __repr__(self):
-
 
3908
    L = ['%s=%r' % (key, value)
-
 
3909
      for key, value in self.__dict__.iteritems()]
-
 
3910
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3911
 
-
 
3912
  def __eq__(self, other):
-
 
3913
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3914
 
-
 
3915
  def __ne__(self, other):
-
 
3916
    return not (self == other)
-
 
3917
 
-
 
3918
class getServiceableLocationAsPerProviderIdAndPincode_args:
-
 
3919
  """
-
 
3920
  Attributes:
-
 
3921
   - providerId
-
 
3922
   - pincode
-
 
3923
  """
-
 
3924
 
-
 
3925
  thrift_spec = (
-
 
3926
    None, # 0
-
 
3927
    (1, TType.I64, 'providerId', None, None, ), # 1
-
 
3928
    (2, TType.STRING, 'pincode', None, None, ), # 2
-
 
3929
  )
-
 
3930
 
-
 
3931
  def __init__(self, providerId=None, pincode=None,):
-
 
3932
    self.providerId = providerId
-
 
3933
    self.pincode = pincode
-
 
3934
 
-
 
3935
  def read(self, iprot):
-
 
3936
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3937
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3938
      return
-
 
3939
    iprot.readStructBegin()
-
 
3940
    while True:
-
 
3941
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3942
      if ftype == TType.STOP:
-
 
3943
        break
-
 
3944
      if fid == 1:
-
 
3945
        if ftype == TType.I64:
-
 
3946
          self.providerId = iprot.readI64();
-
 
3947
        else:
-
 
3948
          iprot.skip(ftype)
-
 
3949
      elif fid == 2:
-
 
3950
        if ftype == TType.STRING:
-
 
3951
          self.pincode = iprot.readString();
-
 
3952
        else:
-
 
3953
          iprot.skip(ftype)
-
 
3954
      else:
-
 
3955
        iprot.skip(ftype)
-
 
3956
      iprot.readFieldEnd()
-
 
3957
    iprot.readStructEnd()
-
 
3958
 
-
 
3959
  def write(self, oprot):
-
 
3960
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3961
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3962
      return
-
 
3963
    oprot.writeStructBegin('getServiceableLocationAsPerProviderIdAndPincode_args')
-
 
3964
    if self.providerId is not None:
-
 
3965
      oprot.writeFieldBegin('providerId', TType.I64, 1)
-
 
3966
      oprot.writeI64(self.providerId)
-
 
3967
      oprot.writeFieldEnd()
-
 
3968
    if self.pincode is not None:
-
 
3969
      oprot.writeFieldBegin('pincode', TType.STRING, 2)
-
 
3970
      oprot.writeString(self.pincode)
-
 
3971
      oprot.writeFieldEnd()
-
 
3972
    oprot.writeFieldStop()
-
 
3973
    oprot.writeStructEnd()
-
 
3974
 
-
 
3975
  def validate(self):
-
 
3976
    return
-
 
3977
 
-
 
3978
 
-
 
3979
  def __repr__(self):
-
 
3980
    L = ['%s=%r' % (key, value)
-
 
3981
      for key, value in self.__dict__.iteritems()]
-
 
3982
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3983
 
-
 
3984
  def __eq__(self, other):
-
 
3985
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3986
 
-
 
3987
  def __ne__(self, other):
-
 
3988
    return not (self == other)
-
 
3989
 
-
 
3990
class getServiceableLocationAsPerProviderIdAndPincode_result:
-
 
3991
  """
-
 
3992
  Attributes:
-
 
3993
   - success
-
 
3994
  """
-
 
3995
 
-
 
3996
  thrift_spec = (
-
 
3997
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
3998
  )
-
 
3999
 
-
 
4000
  def __init__(self, success=None,):
-
 
4001
    self.success = success
-
 
4002
 
-
 
4003
  def read(self, iprot):
-
 
4004
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4005
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4006
      return
-
 
4007
    iprot.readStructBegin()
-
 
4008
    while True:
-
 
4009
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4010
      if ftype == TType.STOP:
-
 
4011
        break
-
 
4012
      if fid == 0:
-
 
4013
        if ftype == TType.BOOL:
-
 
4014
          self.success = iprot.readBool();
-
 
4015
        else:
-
 
4016
          iprot.skip(ftype)
-
 
4017
      else:
-
 
4018
        iprot.skip(ftype)
-
 
4019
      iprot.readFieldEnd()
-
 
4020
    iprot.readStructEnd()
-
 
4021
 
-
 
4022
  def write(self, oprot):
-
 
4023
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4024
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4025
      return
-
 
4026
    oprot.writeStructBegin('getServiceableLocationAsPerProviderIdAndPincode_result')
-
 
4027
    if self.success is not None:
-
 
4028
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
4029
      oprot.writeBool(self.success)
-
 
4030
      oprot.writeFieldEnd()
-
 
4031
    oprot.writeFieldStop()
-
 
4032
    oprot.writeStructEnd()
-
 
4033
 
-
 
4034
  def validate(self):
-
 
4035
    return
-
 
4036
 
-
 
4037
 
-
 
4038
  def __repr__(self):
-
 
4039
    L = ['%s=%r' % (key, value)
-
 
4040
      for key, value in self.__dict__.iteritems()]
-
 
4041
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4042
 
-
 
4043
  def __eq__(self, other):
-
 
4044
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4045
 
-
 
4046
  def __ne__(self, other):
-
 
4047
    return not (self == other)
-
 
4048
 
-
 
4049
class runCompleteUpdateForPincode_args:
-
 
4050
 
-
 
4051
  thrift_spec = (
-
 
4052
  )
-
 
4053
 
-
 
4054
  def read(self, iprot):
-
 
4055
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4056
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4057
      return
-
 
4058
    iprot.readStructBegin()
-
 
4059
    while True:
-
 
4060
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4061
      if ftype == TType.STOP:
-
 
4062
        break
-
 
4063
      else:
-
 
4064
        iprot.skip(ftype)
-
 
4065
      iprot.readFieldEnd()
-
 
4066
    iprot.readStructEnd()
-
 
4067
 
-
 
4068
  def write(self, oprot):
-
 
4069
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4070
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4071
      return
-
 
4072
    oprot.writeStructBegin('runCompleteUpdateForPincode_args')
-
 
4073
    oprot.writeFieldStop()
-
 
4074
    oprot.writeStructEnd()
-
 
4075
 
-
 
4076
  def validate(self):
-
 
4077
    return
-
 
4078
 
-
 
4079
 
-
 
4080
  def __repr__(self):
-
 
4081
    L = ['%s=%r' % (key, value)
-
 
4082
      for key, value in self.__dict__.iteritems()]
-
 
4083
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4084
 
-
 
4085
  def __eq__(self, other):
-
 
4086
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4087
 
-
 
4088
  def __ne__(self, other):
-
 
4089
    return not (self == other)
-
 
4090
 
-
 
4091
class runCompleteUpdateForPincode_result:
-
 
4092
 
-
 
4093
  thrift_spec = (
-
 
4094
  )
-
 
4095
 
-
 
4096
  def read(self, iprot):
-
 
4097
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4098
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4099
      return
-
 
4100
    iprot.readStructBegin()
-
 
4101
    while True:
-
 
4102
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4103
      if ftype == TType.STOP:
-
 
4104
        break
-
 
4105
      else:
-
 
4106
        iprot.skip(ftype)
-
 
4107
      iprot.readFieldEnd()
-
 
4108
    iprot.readStructEnd()
-
 
4109
 
-
 
4110
  def write(self, oprot):
-
 
4111
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4112
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4113
      return
-
 
4114
    oprot.writeStructBegin('runCompleteUpdateForPincode_result')
-
 
4115
    oprot.writeFieldStop()
-
 
4116
    oprot.writeStructEnd()
-
 
4117
 
-
 
4118
  def validate(self):
-
 
4119
    return
3811
 
4120
 
3812
 
4121
 
3813
  def __repr__(self):
4122
  def __repr__(self):
3814
    L = ['%s=%r' % (key, value)
4123
    L = ['%s=%r' % (key, value)
3815
      for key, value in self.__dict__.iteritems()]
4124
      for key, value in self.__dict__.iteritems()]