Subversion Repositories SmartDukaan

Rev

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

Rev 5411 Rev 5447
Line 1152... Line 1152...
1152
    pass
1152
    pass
1153
 
1153
 
1154
  def getRefundedOrdersMarkedPaid(self, ):
1154
  def getRefundedOrdersMarkedPaid(self, ):
1155
    pass
1155
    pass
1156
 
1156
 
-
 
1157
  def getAllVerificationAgents(self, minOrderId, maxOrderId):
-
 
1158
    """
-
 
1159
    gets all COD Verification Agents for all orderIds from a minId to maxId
-
 
1160
 
-
 
1161
 
-
 
1162
    Parameters:
-
 
1163
     - minOrderId
-
 
1164
     - maxOrderId
-
 
1165
    """
-
 
1166
    pass
-
 
1167
 
1157
 
1168
 
1158
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1169
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1159
  def __init__(self, iprot, oprot=None):
1170
  def __init__(self, iprot, oprot=None):
1160
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1171
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1161
 
1172
 
Line 5120... Line 5131...
5120
      return result.success
5131
      return result.success
5121
    if result.ex is not None:
5132
    if result.ex is not None:
5122
      raise result.ex
5133
      raise result.ex
5123
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRefundedOrdersMarkedPaid failed: unknown result");
5134
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRefundedOrdersMarkedPaid failed: unknown result");
5124
 
5135
 
-
 
5136
  def getAllVerificationAgents(self, minOrderId, maxOrderId):
-
 
5137
    """
-
 
5138
    gets all COD Verification Agents for all orderIds from a minId to maxId
-
 
5139
 
-
 
5140
 
-
 
5141
    Parameters:
-
 
5142
     - minOrderId
-
 
5143
     - maxOrderId
-
 
5144
    """
-
 
5145
    self.send_getAllVerificationAgents(minOrderId, maxOrderId)
-
 
5146
    return self.recv_getAllVerificationAgents()
-
 
5147
 
-
 
5148
  def send_getAllVerificationAgents(self, minOrderId, maxOrderId):
-
 
5149
    self._oprot.writeMessageBegin('getAllVerificationAgents', TMessageType.CALL, self._seqid)
-
 
5150
    args = getAllVerificationAgents_args()
-
 
5151
    args.minOrderId = minOrderId
-
 
5152
    args.maxOrderId = maxOrderId
-
 
5153
    args.write(self._oprot)
-
 
5154
    self._oprot.writeMessageEnd()
-
 
5155
    self._oprot.trans.flush()
-
 
5156
 
-
 
5157
  def recv_getAllVerificationAgents(self, ):
-
 
5158
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
5159
    if mtype == TMessageType.EXCEPTION:
-
 
5160
      x = TApplicationException()
-
 
5161
      x.read(self._iprot)
-
 
5162
      self._iprot.readMessageEnd()
-
 
5163
      raise x
-
 
5164
    result = getAllVerificationAgents_result()
-
 
5165
    result.read(self._iprot)
-
 
5166
    self._iprot.readMessageEnd()
-
 
5167
    if result.success is not None:
-
 
5168
      return result.success
-
 
5169
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllVerificationAgents failed: unknown result");
-
 
5170
 
5125
 
5171
 
5126
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5172
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5127
  def __init__(self, handler):
5173
  def __init__(self, handler):
5128
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5174
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5129
    self._processMap["createTransaction"] = Processor.process_createTransaction
5175
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 5237... Line 5283...
5237
    self._processMap["getOrderIdsForStatus"] = Processor.process_getOrderIdsForStatus
5283
    self._processMap["getOrderIdsForStatus"] = Processor.process_getOrderIdsForStatus
5238
    self._processMap["updateCODAgent"] = Processor.process_updateCODAgent
5284
    self._processMap["updateCODAgent"] = Processor.process_updateCODAgent
5239
    self._processMap["updateOrderAsPaidToVendor"] = Processor.process_updateOrderAsPaidToVendor
5285
    self._processMap["updateOrderAsPaidToVendor"] = Processor.process_updateOrderAsPaidToVendor
5240
    self._processMap["updateOrderOnlyAsPaidToVendor"] = Processor.process_updateOrderOnlyAsPaidToVendor
5286
    self._processMap["updateOrderOnlyAsPaidToVendor"] = Processor.process_updateOrderOnlyAsPaidToVendor
5241
    self._processMap["getRefundedOrdersMarkedPaid"] = Processor.process_getRefundedOrdersMarkedPaid
5287
    self._processMap["getRefundedOrdersMarkedPaid"] = Processor.process_getRefundedOrdersMarkedPaid
-
 
5288
    self._processMap["getAllVerificationAgents"] = Processor.process_getAllVerificationAgents
5242
 
5289
 
5243
  def process(self, iprot, oprot):
5290
  def process(self, iprot, oprot):
5244
    (name, type, seqid) = iprot.readMessageBegin()
5291
    (name, type, seqid) = iprot.readMessageBegin()
5245
    if name not in self._processMap:
5292
    if name not in self._processMap:
5246
      iprot.skip(TType.STRUCT)
5293
      iprot.skip(TType.STRUCT)
Line 6763... Line 6810...
6763
    oprot.writeMessageBegin("getRefundedOrdersMarkedPaid", TMessageType.REPLY, seqid)
6810
    oprot.writeMessageBegin("getRefundedOrdersMarkedPaid", TMessageType.REPLY, seqid)
6764
    result.write(oprot)
6811
    result.write(oprot)
6765
    oprot.writeMessageEnd()
6812
    oprot.writeMessageEnd()
6766
    oprot.trans.flush()
6813
    oprot.trans.flush()
6767
 
6814
 
-
 
6815
  def process_getAllVerificationAgents(self, seqid, iprot, oprot):
-
 
6816
    args = getAllVerificationAgents_args()
-
 
6817
    args.read(iprot)
-
 
6818
    iprot.readMessageEnd()
-
 
6819
    result = getAllVerificationAgents_result()
-
 
6820
    result.success = self._handler.getAllVerificationAgents(args.minOrderId, args.maxOrderId)
-
 
6821
    oprot.writeMessageBegin("getAllVerificationAgents", TMessageType.REPLY, seqid)
-
 
6822
    result.write(oprot)
-
 
6823
    oprot.writeMessageEnd()
-
 
6824
    oprot.trans.flush()
-
 
6825
 
6768
 
6826
 
6769
# HELPER FUNCTIONS AND STRUCTURES
6827
# HELPER FUNCTIONS AND STRUCTURES
6770
 
6828
 
6771
class createTransaction_args:
6829
class createTransaction_args:
6772
  """
6830
  """
Line 22859... Line 22917...
22859
      oprot.writeFieldEnd()
22917
      oprot.writeFieldEnd()
22860
    oprot.writeFieldStop()
22918
    oprot.writeFieldStop()
22861
    oprot.writeStructEnd()
22919
    oprot.writeStructEnd()
22862
 
22920
 
22863
  def validate(self):
22921
  def validate(self):
-
 
22922
    return
-
 
22923
 
-
 
22924
 
-
 
22925
  def __repr__(self):
-
 
22926
    L = ['%s=%r' % (key, value)
-
 
22927
      for key, value in self.__dict__.iteritems()]
-
 
22928
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
22929
 
-
 
22930
  def __eq__(self, other):
-
 
22931
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
22932
 
-
 
22933
  def __ne__(self, other):
-
 
22934
    return not (self == other)
-
 
22935
 
-
 
22936
class getAllVerificationAgents_args:
-
 
22937
  """
-
 
22938
  Attributes:
-
 
22939
   - minOrderId
-
 
22940
   - maxOrderId
-
 
22941
  """
-
 
22942
 
-
 
22943
  thrift_spec = (
-
 
22944
    None, # 0
-
 
22945
    (1, TType.I64, 'minOrderId', None, None, ), # 1
-
 
22946
    (2, TType.I64, 'maxOrderId', None, None, ), # 2
-
 
22947
  )
-
 
22948
 
-
 
22949
  def __init__(self, minOrderId=None, maxOrderId=None,):
-
 
22950
    self.minOrderId = minOrderId
-
 
22951
    self.maxOrderId = maxOrderId
-
 
22952
 
-
 
22953
  def read(self, iprot):
-
 
22954
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
22955
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
22956
      return
-
 
22957
    iprot.readStructBegin()
-
 
22958
    while True:
-
 
22959
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
22960
      if ftype == TType.STOP:
-
 
22961
        break
-
 
22962
      if fid == 1:
-
 
22963
        if ftype == TType.I64:
-
 
22964
          self.minOrderId = iprot.readI64();
-
 
22965
        else:
-
 
22966
          iprot.skip(ftype)
-
 
22967
      elif fid == 2:
-
 
22968
        if ftype == TType.I64:
-
 
22969
          self.maxOrderId = iprot.readI64();
-
 
22970
        else:
-
 
22971
          iprot.skip(ftype)
-
 
22972
      else:
-
 
22973
        iprot.skip(ftype)
-
 
22974
      iprot.readFieldEnd()
-
 
22975
    iprot.readStructEnd()
-
 
22976
 
-
 
22977
  def write(self, oprot):
-
 
22978
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
22979
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
22980
      return
-
 
22981
    oprot.writeStructBegin('getAllVerificationAgents_args')
-
 
22982
    if self.minOrderId is not None:
-
 
22983
      oprot.writeFieldBegin('minOrderId', TType.I64, 1)
-
 
22984
      oprot.writeI64(self.minOrderId)
-
 
22985
      oprot.writeFieldEnd()
-
 
22986
    if self.maxOrderId is not None:
-
 
22987
      oprot.writeFieldBegin('maxOrderId', TType.I64, 2)
-
 
22988
      oprot.writeI64(self.maxOrderId)
-
 
22989
      oprot.writeFieldEnd()
-
 
22990
    oprot.writeFieldStop()
-
 
22991
    oprot.writeStructEnd()
-
 
22992
 
-
 
22993
  def validate(self):
-
 
22994
    return
-
 
22995
 
-
 
22996
 
-
 
22997
  def __repr__(self):
-
 
22998
    L = ['%s=%r' % (key, value)
-
 
22999
      for key, value in self.__dict__.iteritems()]
-
 
23000
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
23001
 
-
 
23002
  def __eq__(self, other):
-
 
23003
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
23004
 
-
 
23005
  def __ne__(self, other):
-
 
23006
    return not (self == other)
-
 
23007
 
-
 
23008
class getAllVerificationAgents_result:
-
 
23009
  """
-
 
23010
  Attributes:
-
 
23011
   - success
-
 
23012
  """
-
 
23013
 
-
 
23014
  thrift_spec = (
-
 
23015
    (0, TType.LIST, 'success', (TType.STRUCT,(CODVerificationAgent, CODVerificationAgent.thrift_spec)), None, ), # 0
-
 
23016
  )
-
 
23017
 
-
 
23018
  def __init__(self, success=None,):
-
 
23019
    self.success = success
-
 
23020
 
-
 
23021
  def read(self, iprot):
-
 
23022
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
23023
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
23024
      return
-
 
23025
    iprot.readStructBegin()
-
 
23026
    while True:
-
 
23027
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
23028
      if ftype == TType.STOP:
-
 
23029
        break
-
 
23030
      if fid == 0:
-
 
23031
        if ftype == TType.LIST:
-
 
23032
          self.success = []
-
 
23033
          (_etype553, _size550) = iprot.readListBegin()
-
 
23034
          for _i554 in xrange(_size550):
-
 
23035
            _elem555 = CODVerificationAgent()
-
 
23036
            _elem555.read(iprot)
-
 
23037
            self.success.append(_elem555)
-
 
23038
          iprot.readListEnd()
-
 
23039
        else:
-
 
23040
          iprot.skip(ftype)
-
 
23041
      else:
-
 
23042
        iprot.skip(ftype)
-
 
23043
      iprot.readFieldEnd()
-
 
23044
    iprot.readStructEnd()
-
 
23045
 
-
 
23046
  def write(self, oprot):
-
 
23047
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
23048
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
23049
      return
-
 
23050
    oprot.writeStructBegin('getAllVerificationAgents_result')
-
 
23051
    if self.success is not None:
-
 
23052
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
23053
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
23054
      for iter556 in self.success:
-
 
23055
        iter556.write(oprot)
-
 
23056
      oprot.writeListEnd()
-
 
23057
      oprot.writeFieldEnd()
-
 
23058
    oprot.writeFieldStop()
-
 
23059
    oprot.writeStructEnd()
-
 
23060
 
-
 
23061
  def validate(self):
22864
    return
23062
    return
22865
 
23063
 
22866
 
23064
 
22867
  def __repr__(self):
23065
  def __repr__(self):
22868
    L = ['%s=%r' % (key, value)
23066
    L = ['%s=%r' % (key, value)