Subversion Repositories SmartDukaan

Rev

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

Rev 5067 Rev 5099
Line 1119... Line 1119...
1119
     - startDatetime
1119
     - startDatetime
1120
     - endDatetime
1120
     - endDatetime
1121
    """
1121
    """
1122
    pass
1122
    pass
1123
 
1123
 
-
 
1124
  def updateOrderAsPaidToVendor(self, orderId):
-
 
1125
    """
-
 
1126
    Parameters:
-
 
1127
     - orderId
-
 
1128
    """
-
 
1129
    pass
-
 
1130
 
1124
 
1131
 
1125
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1132
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1126
  def __init__(self, iprot, oprot=None):
1133
  def __init__(self, iprot, oprot=None):
1127
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1134
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1128
 
1135
 
Line 4933... Line 4940...
4933
      return result.success
4940
      return result.success
4934
    if result.ex is not None:
4941
    if result.ex is not None:
4935
      raise result.ex
4942
      raise result.ex
4936
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderIdsForStatus failed: unknown result");
4943
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderIdsForStatus failed: unknown result");
4937
 
4944
 
-
 
4945
  def updateOrderAsPaidToVendor(self, orderId):
-
 
4946
    """
-
 
4947
    Parameters:
-
 
4948
     - orderId
-
 
4949
    """
-
 
4950
    self.send_updateOrderAsPaidToVendor(orderId)
-
 
4951
    self.recv_updateOrderAsPaidToVendor()
-
 
4952
 
-
 
4953
  def send_updateOrderAsPaidToVendor(self, orderId):
-
 
4954
    self._oprot.writeMessageBegin('updateOrderAsPaidToVendor', TMessageType.CALL, self._seqid)
-
 
4955
    args = updateOrderAsPaidToVendor_args()
-
 
4956
    args.orderId = orderId
-
 
4957
    args.write(self._oprot)
-
 
4958
    self._oprot.writeMessageEnd()
-
 
4959
    self._oprot.trans.flush()
-
 
4960
 
-
 
4961
  def recv_updateOrderAsPaidToVendor(self, ):
-
 
4962
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
4963
    if mtype == TMessageType.EXCEPTION:
-
 
4964
      x = TApplicationException()
-
 
4965
      x.read(self._iprot)
-
 
4966
      self._iprot.readMessageEnd()
-
 
4967
      raise x
-
 
4968
    result = updateOrderAsPaidToVendor_result()
-
 
4969
    result.read(self._iprot)
-
 
4970
    self._iprot.readMessageEnd()
-
 
4971
    if result.ex is not None:
-
 
4972
      raise result.ex
-
 
4973
    return
-
 
4974
 
4938
 
4975
 
4939
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
4976
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
4940
  def __init__(self, handler):
4977
  def __init__(self, handler):
4941
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
4978
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
4942
    self._processMap["createTransaction"] = Processor.process_createTransaction
4979
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 5045... Line 5082...
5045
    self._processMap["getReshippedOrderIds"] = Processor.process_getReshippedOrderIds
5082
    self._processMap["getReshippedOrderIds"] = Processor.process_getReshippedOrderIds
5046
    self._processMap["updateOrdersAsPORaised"] = Processor.process_updateOrdersAsPORaised
5083
    self._processMap["updateOrdersAsPORaised"] = Processor.process_updateOrdersAsPORaised
5047
    self._processMap["getOrdersWhereVendorNotPaid"] = Processor.process_getOrdersWhereVendorNotPaid
5084
    self._processMap["getOrdersWhereVendorNotPaid"] = Processor.process_getOrdersWhereVendorNotPaid
5048
    self._processMap["getStatusDistributionOfOrders"] = Processor.process_getStatusDistributionOfOrders
5085
    self._processMap["getStatusDistributionOfOrders"] = Processor.process_getStatusDistributionOfOrders
5049
    self._processMap["getOrderIdsForStatus"] = Processor.process_getOrderIdsForStatus
5086
    self._processMap["getOrderIdsForStatus"] = Processor.process_getOrderIdsForStatus
-
 
5087
    self._processMap["updateOrderAsPaidToVendor"] = Processor.process_updateOrderAsPaidToVendor
5050
 
5088
 
5051
  def process(self, iprot, oprot):
5089
  def process(self, iprot, oprot):
5052
    (name, type, seqid) = iprot.readMessageBegin()
5090
    (name, type, seqid) = iprot.readMessageBegin()
5053
    if name not in self._processMap:
5091
    if name not in self._processMap:
5054
      iprot.skip(TType.STRUCT)
5092
      iprot.skip(TType.STRUCT)
Line 6504... Line 6542...
6504
    oprot.writeMessageBegin("getOrderIdsForStatus", TMessageType.REPLY, seqid)
6542
    oprot.writeMessageBegin("getOrderIdsForStatus", TMessageType.REPLY, seqid)
6505
    result.write(oprot)
6543
    result.write(oprot)
6506
    oprot.writeMessageEnd()
6544
    oprot.writeMessageEnd()
6507
    oprot.trans.flush()
6545
    oprot.trans.flush()
6508
 
6546
 
-
 
6547
  def process_updateOrderAsPaidToVendor(self, seqid, iprot, oprot):
-
 
6548
    args = updateOrderAsPaidToVendor_args()
-
 
6549
    args.read(iprot)
-
 
6550
    iprot.readMessageEnd()
-
 
6551
    result = updateOrderAsPaidToVendor_result()
-
 
6552
    try:
-
 
6553
      self._handler.updateOrderAsPaidToVendor(args.orderId)
-
 
6554
    except TransactionServiceException, ex:
-
 
6555
      result.ex = ex
-
 
6556
    oprot.writeMessageBegin("updateOrderAsPaidToVendor", TMessageType.REPLY, seqid)
-
 
6557
    result.write(oprot)
-
 
6558
    oprot.writeMessageEnd()
-
 
6559
    oprot.trans.flush()
-
 
6560
 
6509
 
6561
 
6510
# HELPER FUNCTIONS AND STRUCTURES
6562
# HELPER FUNCTIONS AND STRUCTURES
6511
 
6563
 
6512
class createTransaction_args:
6564
class createTransaction_args:
6513
  """
6565
  """
Line 21921... Line 21973...
21921
    if self.ex is not None:
21973
    if self.ex is not None:
21922
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
21974
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
21923
      self.ex.write(oprot)
21975
      self.ex.write(oprot)
21924
      oprot.writeFieldEnd()
21976
      oprot.writeFieldEnd()
21925
    oprot.writeFieldStop()
21977
    oprot.writeFieldStop()
-
 
21978
    oprot.writeStructEnd()
-
 
21979
 
-
 
21980
  def validate(self):
-
 
21981
    return
-
 
21982
 
-
 
21983
 
-
 
21984
  def __repr__(self):
-
 
21985
    L = ['%s=%r' % (key, value)
-
 
21986
      for key, value in self.__dict__.iteritems()]
-
 
21987
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
21988
 
-
 
21989
  def __eq__(self, other):
-
 
21990
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
21991
 
-
 
21992
  def __ne__(self, other):
-
 
21993
    return not (self == other)
-
 
21994
 
-
 
21995
class updateOrderAsPaidToVendor_args:
-
 
21996
  """
-
 
21997
  Attributes:
-
 
21998
   - orderId
-
 
21999
  """
-
 
22000
 
-
 
22001
  thrift_spec = (
-
 
22002
    None, # 0
-
 
22003
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
22004
  )
-
 
22005
 
-
 
22006
  def __init__(self, orderId=None,):
-
 
22007
    self.orderId = orderId
-
 
22008
 
-
 
22009
  def read(self, iprot):
-
 
22010
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
22011
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
22012
      return
-
 
22013
    iprot.readStructBegin()
-
 
22014
    while True:
-
 
22015
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
22016
      if ftype == TType.STOP:
-
 
22017
        break
-
 
22018
      if fid == 1:
-
 
22019
        if ftype == TType.I64:
-
 
22020
          self.orderId = iprot.readI64();
-
 
22021
        else:
-
 
22022
          iprot.skip(ftype)
-
 
22023
      else:
-
 
22024
        iprot.skip(ftype)
-
 
22025
      iprot.readFieldEnd()
-
 
22026
    iprot.readStructEnd()
-
 
22027
 
-
 
22028
  def write(self, oprot):
-
 
22029
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
22030
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
22031
      return
-
 
22032
    oprot.writeStructBegin('updateOrderAsPaidToVendor_args')
-
 
22033
    if self.orderId is not None:
-
 
22034
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
22035
      oprot.writeI64(self.orderId)
-
 
22036
      oprot.writeFieldEnd()
-
 
22037
    oprot.writeFieldStop()
-
 
22038
    oprot.writeStructEnd()
-
 
22039
 
-
 
22040
  def validate(self):
-
 
22041
    return
-
 
22042
 
-
 
22043
 
-
 
22044
  def __repr__(self):
-
 
22045
    L = ['%s=%r' % (key, value)
-
 
22046
      for key, value in self.__dict__.iteritems()]
-
 
22047
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
22048
 
-
 
22049
  def __eq__(self, other):
-
 
22050
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
22051
 
-
 
22052
  def __ne__(self, other):
-
 
22053
    return not (self == other)
-
 
22054
 
-
 
22055
class updateOrderAsPaidToVendor_result:
-
 
22056
  """
-
 
22057
  Attributes:
-
 
22058
   - ex
-
 
22059
  """
-
 
22060
 
-
 
22061
  thrift_spec = (
-
 
22062
    None, # 0
-
 
22063
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
22064
  )
-
 
22065
 
-
 
22066
  def __init__(self, ex=None,):
-
 
22067
    self.ex = ex
-
 
22068
 
-
 
22069
  def read(self, iprot):
-
 
22070
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
22071
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
22072
      return
-
 
22073
    iprot.readStructBegin()
-
 
22074
    while True:
-
 
22075
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
22076
      if ftype == TType.STOP:
-
 
22077
        break
-
 
22078
      if fid == 1:
-
 
22079
        if ftype == TType.STRUCT:
-
 
22080
          self.ex = TransactionServiceException()
-
 
22081
          self.ex.read(iprot)
-
 
22082
        else:
-
 
22083
          iprot.skip(ftype)
-
 
22084
      else:
-
 
22085
        iprot.skip(ftype)
-
 
22086
      iprot.readFieldEnd()
-
 
22087
    iprot.readStructEnd()
-
 
22088
 
-
 
22089
  def write(self, oprot):
-
 
22090
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
22091
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
22092
      return
-
 
22093
    oprot.writeStructBegin('updateOrderAsPaidToVendor_result')
-
 
22094
    if self.ex is not None:
-
 
22095
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
22096
      self.ex.write(oprot)
-
 
22097
      oprot.writeFieldEnd()
-
 
22098
    oprot.writeFieldStop()
21926
    oprot.writeStructEnd()
22099
    oprot.writeStructEnd()
21927
 
22100
 
21928
  def validate(self):
22101
  def validate(self):
21929
    return
22102
    return
21930
 
22103