Subversion Repositories SmartDukaan

Rev

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

Rev 9159 Rev 9338
Line 1964... Line 1964...
1964
     - date
1964
     - date
1965
     - awb
1965
     - awb
1966
    """
1966
    """
1967
    pass
1967
    pass
1968
 
1968
 
-
 
1969
  def getOrderForAirwayBillNo(self, airwaybillNo):
-
 
1970
    """
-
 
1971
    Parameters:
-
 
1972
     - airwaybillNo
-
 
1973
    """
-
 
1974
    pass
-
 
1975
 
1969
 
1976
 
1970
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1977
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1971
  def __init__(self, iprot, oprot=None):
1978
  def __init__(self, iprot, oprot=None):
1972
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1979
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1973
 
1980
 
Line 9216... Line 9223...
9216
    result = updateFlipkartOrderDatesAndAWB_result()
9223
    result = updateFlipkartOrderDatesAndAWB_result()
9217
    result.read(self._iprot)
9224
    result.read(self._iprot)
9218
    self._iprot.readMessageEnd()
9225
    self._iprot.readMessageEnd()
9219
    return
9226
    return
9220
 
9227
 
-
 
9228
  def getOrderForAirwayBillNo(self, airwaybillNo):
-
 
9229
    """
-
 
9230
    Parameters:
-
 
9231
     - airwaybillNo
-
 
9232
    """
-
 
9233
    self.send_getOrderForAirwayBillNo(airwaybillNo)
-
 
9234
    return self.recv_getOrderForAirwayBillNo()
-
 
9235
 
-
 
9236
  def send_getOrderForAirwayBillNo(self, airwaybillNo):
-
 
9237
    self._oprot.writeMessageBegin('getOrderForAirwayBillNo', TMessageType.CALL, self._seqid)
-
 
9238
    args = getOrderForAirwayBillNo_args()
-
 
9239
    args.airwaybillNo = airwaybillNo
-
 
9240
    args.write(self._oprot)
-
 
9241
    self._oprot.writeMessageEnd()
-
 
9242
    self._oprot.trans.flush()
-
 
9243
 
-
 
9244
  def recv_getOrderForAirwayBillNo(self, ):
-
 
9245
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
9246
    if mtype == TMessageType.EXCEPTION:
-
 
9247
      x = TApplicationException()
-
 
9248
      x.read(self._iprot)
-
 
9249
      self._iprot.readMessageEnd()
-
 
9250
      raise x
-
 
9251
    result = getOrderForAirwayBillNo_result()
-
 
9252
    result.read(self._iprot)
-
 
9253
    self._iprot.readMessageEnd()
-
 
9254
    if result.success is not None:
-
 
9255
      return result.success
-
 
9256
    if result.ex is not None:
-
 
9257
      raise result.ex
-
 
9258
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForAirwayBillNo failed: unknown result");
-
 
9259
 
9221
 
9260
 
9222
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
9261
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
9223
  def __init__(self, handler):
9262
  def __init__(self, handler):
9224
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
9263
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
9225
    self._processMap["createTransaction"] = Processor.process_createTransaction
9264
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 9437... Line 9476...
9437
    self._processMap["flipkartOrderExists"] = Processor.process_flipkartOrderExists
9476
    self._processMap["flipkartOrderExists"] = Processor.process_flipkartOrderExists
9438
    self._processMap["createFlipkartOrder"] = Processor.process_createFlipkartOrder
9477
    self._processMap["createFlipkartOrder"] = Processor.process_createFlipkartOrder
9439
    self._processMap["getFlipkartOrder"] = Processor.process_getFlipkartOrder
9478
    self._processMap["getFlipkartOrder"] = Processor.process_getFlipkartOrder
9440
    self._processMap["getFlipkartOrderByOrderItemId"] = Processor.process_getFlipkartOrderByOrderItemId
9479
    self._processMap["getFlipkartOrderByOrderItemId"] = Processor.process_getFlipkartOrderByOrderItemId
9441
    self._processMap["updateFlipkartOrderDatesAndAWB"] = Processor.process_updateFlipkartOrderDatesAndAWB
9480
    self._processMap["updateFlipkartOrderDatesAndAWB"] = Processor.process_updateFlipkartOrderDatesAndAWB
-
 
9481
    self._processMap["getOrderForAirwayBillNo"] = Processor.process_getOrderForAirwayBillNo
9442
 
9482
 
9443
  def process(self, iprot, oprot):
9483
  def process(self, iprot, oprot):
9444
    (name, type, seqid) = iprot.readMessageBegin()
9484
    (name, type, seqid) = iprot.readMessageBegin()
9445
    if name not in self._processMap:
9485
    if name not in self._processMap:
9446
      iprot.skip(TType.STRUCT)
9486
      iprot.skip(TType.STRUCT)
Line 12140... Line 12180...
12140
    oprot.writeMessageBegin("updateFlipkartOrderDatesAndAWB", TMessageType.REPLY, seqid)
12180
    oprot.writeMessageBegin("updateFlipkartOrderDatesAndAWB", TMessageType.REPLY, seqid)
12141
    result.write(oprot)
12181
    result.write(oprot)
12142
    oprot.writeMessageEnd()
12182
    oprot.writeMessageEnd()
12143
    oprot.trans.flush()
12183
    oprot.trans.flush()
12144
 
12184
 
-
 
12185
  def process_getOrderForAirwayBillNo(self, seqid, iprot, oprot):
-
 
12186
    args = getOrderForAirwayBillNo_args()
-
 
12187
    args.read(iprot)
-
 
12188
    iprot.readMessageEnd()
-
 
12189
    result = getOrderForAirwayBillNo_result()
-
 
12190
    try:
-
 
12191
      result.success = self._handler.getOrderForAirwayBillNo(args.airwaybillNo)
-
 
12192
    except TransactionServiceException, ex:
-
 
12193
      result.ex = ex
-
 
12194
    oprot.writeMessageBegin("getOrderForAirwayBillNo", TMessageType.REPLY, seqid)
-
 
12195
    result.write(oprot)
-
 
12196
    oprot.writeMessageEnd()
-
 
12197
    oprot.trans.flush()
-
 
12198
 
12145
 
12199
 
12146
# HELPER FUNCTIONS AND STRUCTURES
12200
# HELPER FUNCTIONS AND STRUCTURES
12147
 
12201
 
12148
class createTransaction_args:
12202
class createTransaction_args:
12149
  """
12203
  """
Line 41935... Line 41989...
41935
    oprot.writeFieldStop()
41989
    oprot.writeFieldStop()
41936
    oprot.writeStructEnd()
41990
    oprot.writeStructEnd()
41937
 
41991
 
41938
  def validate(self):
41992
  def validate(self):
41939
    return
41993
    return
-
 
41994
 
-
 
41995
 
-
 
41996
  def __repr__(self):
-
 
41997
    L = ['%s=%r' % (key, value)
-
 
41998
      for key, value in self.__dict__.iteritems()]
-
 
41999
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
42000
 
-
 
42001
  def __eq__(self, other):
-
 
42002
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
42003
 
-
 
42004
  def __ne__(self, other):
-
 
42005
    return not (self == other)
-
 
42006
 
-
 
42007
class getOrderForAirwayBillNo_args:
-
 
42008
  """
-
 
42009
  Attributes:
-
 
42010
   - airwaybillNo
-
 
42011
  """
-
 
42012
 
-
 
42013
  thrift_spec = (
-
 
42014
    None, # 0
-
 
42015
    (1, TType.STRING, 'airwaybillNo', None, None, ), # 1
-
 
42016
  )
-
 
42017
 
-
 
42018
  def __init__(self, airwaybillNo=None,):
-
 
42019
    self.airwaybillNo = airwaybillNo
-
 
42020
 
-
 
42021
  def read(self, iprot):
-
 
42022
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
42023
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
42024
      return
-
 
42025
    iprot.readStructBegin()
-
 
42026
    while True:
-
 
42027
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
42028
      if ftype == TType.STOP:
-
 
42029
        break
-
 
42030
      if fid == 1:
-
 
42031
        if ftype == TType.STRING:
-
 
42032
          self.airwaybillNo = iprot.readString();
-
 
42033
        else:
-
 
42034
          iprot.skip(ftype)
-
 
42035
      else:
-
 
42036
        iprot.skip(ftype)
-
 
42037
      iprot.readFieldEnd()
-
 
42038
    iprot.readStructEnd()
-
 
42039
 
-
 
42040
  def write(self, oprot):
-
 
42041
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
42042
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
42043
      return
-
 
42044
    oprot.writeStructBegin('getOrderForAirwayBillNo_args')
-
 
42045
    if self.airwaybillNo is not None:
-
 
42046
      oprot.writeFieldBegin('airwaybillNo', TType.STRING, 1)
-
 
42047
      oprot.writeString(self.airwaybillNo)
-
 
42048
      oprot.writeFieldEnd()
-
 
42049
    oprot.writeFieldStop()
-
 
42050
    oprot.writeStructEnd()
-
 
42051
 
-
 
42052
  def validate(self):
-
 
42053
    return
-
 
42054
 
-
 
42055
 
-
 
42056
  def __repr__(self):
-
 
42057
    L = ['%s=%r' % (key, value)
-
 
42058
      for key, value in self.__dict__.iteritems()]
-
 
42059
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
42060
 
-
 
42061
  def __eq__(self, other):
-
 
42062
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
42063
 
-
 
42064
  def __ne__(self, other):
-
 
42065
    return not (self == other)
-
 
42066
 
-
 
42067
class getOrderForAirwayBillNo_result:
-
 
42068
  """
-
 
42069
  Attributes:
-
 
42070
   - success
-
 
42071
   - ex
-
 
42072
  """
-
 
42073
 
-
 
42074
  thrift_spec = (
-
 
42075
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
-
 
42076
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
42077
  )
-
 
42078
 
-
 
42079
  def __init__(self, success=None, ex=None,):
-
 
42080
    self.success = success
-
 
42081
    self.ex = ex
-
 
42082
 
-
 
42083
  def read(self, iprot):
-
 
42084
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
42085
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
42086
      return
-
 
42087
    iprot.readStructBegin()
-
 
42088
    while True:
-
 
42089
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
42090
      if ftype == TType.STOP:
-
 
42091
        break
-
 
42092
      if fid == 0:
-
 
42093
        if ftype == TType.STRUCT:
-
 
42094
          self.success = Order()
-
 
42095
          self.success.read(iprot)
-
 
42096
        else:
-
 
42097
          iprot.skip(ftype)
-
 
42098
      elif fid == 1:
-
 
42099
        if ftype == TType.STRUCT:
-
 
42100
          self.ex = TransactionServiceException()
-
 
42101
          self.ex.read(iprot)
-
 
42102
        else:
-
 
42103
          iprot.skip(ftype)
-
 
42104
      else:
-
 
42105
        iprot.skip(ftype)
-
 
42106
      iprot.readFieldEnd()
-
 
42107
    iprot.readStructEnd()
-
 
42108
 
-
 
42109
  def write(self, oprot):
-
 
42110
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
42111
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
42112
      return
-
 
42113
    oprot.writeStructBegin('getOrderForAirwayBillNo_result')
-
 
42114
    if self.success is not None:
-
 
42115
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
42116
      self.success.write(oprot)
-
 
42117
      oprot.writeFieldEnd()
-
 
42118
    if self.ex is not None:
-
 
42119
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
42120
      self.ex.write(oprot)
-
 
42121
      oprot.writeFieldEnd()
-
 
42122
    oprot.writeFieldStop()
-
 
42123
    oprot.writeStructEnd()
-
 
42124
 
-
 
42125
  def validate(self):
-
 
42126
    return
41940
 
42127
 
41941
 
42128
 
41942
  def __repr__(self):
42129
  def __repr__(self):
41943
    L = ['%s=%r' % (key, value)
42130
    L = ['%s=%r' % (key, value)
41944
      for key, value in self.__dict__.iteritems()]
42131
      for key, value in self.__dict__.iteritems()]