Subversion Repositories SmartDukaan

Rev

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

Rev 4247 Rev 4258
Line 704... Line 704...
704
    Parameters:
704
    Parameters:
705
     - orderId
705
     - orderId
706
    """
706
    """
707
    pass
707
    pass
708
 
708
 
709
  def markOrderAsPaymentFlagRemoved(self, orderId):
709
  def markTransactionAsPaymentFlagRemoved(self, transactionId):
710
    """
710
    """
711
    If we and/or payment has decided to accept the order, this method needs to be called.
711
    If we and/or payment gateway has decided to accept the payment, this method needs to be called.
712
    Changed order status and payment status
712
    Changed transaction and all orders status to payment accepted.
713
 
713
 
714
    Parameters:
714
    Parameters:
715
     - orderId
715
     - transactionId
716
    """
716
    """
717
    pass
717
    pass
718
 
718
 
719
 
719
 
720
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
720
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
Line 2999... Line 2999...
2999
    self._iprot.readMessageEnd()
2999
    self._iprot.readMessageEnd()
3000
    if result.ex is not None:
3000
    if result.ex is not None:
3001
      raise result.ex
3001
      raise result.ex
3002
    return
3002
    return
3003
 
3003
 
3004
  def markOrderAsPaymentFlagRemoved(self, orderId):
3004
  def markTransactionAsPaymentFlagRemoved(self, transactionId):
3005
    """
3005
    """
3006
    If we and/or payment has decided to accept the order, this method needs to be called.
3006
    If we and/or payment gateway has decided to accept the payment, this method needs to be called.
3007
    Changed order status and payment status
3007
    Changed transaction and all orders status to payment accepted.
3008
 
3008
 
3009
    Parameters:
3009
    Parameters:
3010
     - orderId
3010
     - transactionId
3011
    """
3011
    """
3012
    self.send_markOrderAsPaymentFlagRemoved(orderId)
3012
    self.send_markTransactionAsPaymentFlagRemoved(transactionId)
3013
    self.recv_markOrderAsPaymentFlagRemoved()
3013
    self.recv_markTransactionAsPaymentFlagRemoved()
3014
 
3014
 
3015
  def send_markOrderAsPaymentFlagRemoved(self, orderId):
3015
  def send_markTransactionAsPaymentFlagRemoved(self, transactionId):
3016
    self._oprot.writeMessageBegin('markOrderAsPaymentFlagRemoved', TMessageType.CALL, self._seqid)
3016
    self._oprot.writeMessageBegin('markTransactionAsPaymentFlagRemoved', TMessageType.CALL, self._seqid)
3017
    args = markOrderAsPaymentFlagRemoved_args()
3017
    args = markTransactionAsPaymentFlagRemoved_args()
3018
    args.orderId = orderId
3018
    args.transactionId = transactionId
3019
    args.write(self._oprot)
3019
    args.write(self._oprot)
3020
    self._oprot.writeMessageEnd()
3020
    self._oprot.writeMessageEnd()
3021
    self._oprot.trans.flush()
3021
    self._oprot.trans.flush()
3022
 
3022
 
3023
  def recv_markOrderAsPaymentFlagRemoved(self, ):
3023
  def recv_markTransactionAsPaymentFlagRemoved(self, ):
3024
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
3024
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
3025
    if mtype == TMessageType.EXCEPTION:
3025
    if mtype == TMessageType.EXCEPTION:
3026
      x = TApplicationException()
3026
      x = TApplicationException()
3027
      x.read(self._iprot)
3027
      x.read(self._iprot)
3028
      self._iprot.readMessageEnd()
3028
      self._iprot.readMessageEnd()
3029
      raise x
3029
      raise x
3030
    result = markOrderAsPaymentFlagRemoved_result()
3030
    result = markTransactionAsPaymentFlagRemoved_result()
3031
    result.read(self._iprot)
3031
    result.read(self._iprot)
3032
    self._iprot.readMessageEnd()
3032
    self._iprot.readMessageEnd()
3033
    if result.ex is not None:
3033
    if result.ex is not None:
3034
      raise result.ex
3034
      raise result.ex
3035
    return
3035
    return
Line 3099... Line 3099...
3099
    self._processMap["markTransactionAsProcessed"] = Processor.process_markTransactionAsProcessed
3099
    self._processMap["markTransactionAsProcessed"] = Processor.process_markTransactionAsProcessed
3100
    self._processMap["getItemWiseRiskyOrdersCount"] = Processor.process_getItemWiseRiskyOrdersCount
3100
    self._processMap["getItemWiseRiskyOrdersCount"] = Processor.process_getItemWiseRiskyOrdersCount
3101
    self._processMap["markOrderCancellationRequestReceived"] = Processor.process_markOrderCancellationRequestReceived
3101
    self._processMap["markOrderCancellationRequestReceived"] = Processor.process_markOrderCancellationRequestReceived
3102
    self._processMap["markOrderCancellationRequestConfirmed"] = Processor.process_markOrderCancellationRequestConfirmed
3102
    self._processMap["markOrderCancellationRequestConfirmed"] = Processor.process_markOrderCancellationRequestConfirmed
3103
    self._processMap["markOrderCancellationRequestDenied"] = Processor.process_markOrderCancellationRequestDenied
3103
    self._processMap["markOrderCancellationRequestDenied"] = Processor.process_markOrderCancellationRequestDenied
3104
    self._processMap["markOrderAsPaymentFlagRemoved"] = Processor.process_markOrderAsPaymentFlagRemoved
3104
    self._processMap["markTransactionAsPaymentFlagRemoved"] = Processor.process_markTransactionAsPaymentFlagRemoved
3105
 
3105
 
3106
  def process(self, iprot, oprot):
3106
  def process(self, iprot, oprot):
3107
    (name, type, seqid) = iprot.readMessageBegin()
3107
    (name, type, seqid) = iprot.readMessageBegin()
3108
    if name not in self._processMap:
3108
    if name not in self._processMap:
3109
      iprot.skip(TType.STRUCT)
3109
      iprot.skip(TType.STRUCT)
Line 3962... Line 3962...
3962
    oprot.writeMessageBegin("markOrderCancellationRequestDenied", TMessageType.REPLY, seqid)
3962
    oprot.writeMessageBegin("markOrderCancellationRequestDenied", TMessageType.REPLY, seqid)
3963
    result.write(oprot)
3963
    result.write(oprot)
3964
    oprot.writeMessageEnd()
3964
    oprot.writeMessageEnd()
3965
    oprot.trans.flush()
3965
    oprot.trans.flush()
3966
 
3966
 
3967
  def process_markOrderAsPaymentFlagRemoved(self, seqid, iprot, oprot):
3967
  def process_markTransactionAsPaymentFlagRemoved(self, seqid, iprot, oprot):
3968
    args = markOrderAsPaymentFlagRemoved_args()
3968
    args = markTransactionAsPaymentFlagRemoved_args()
3969
    args.read(iprot)
3969
    args.read(iprot)
3970
    iprot.readMessageEnd()
3970
    iprot.readMessageEnd()
3971
    result = markOrderAsPaymentFlagRemoved_result()
3971
    result = markTransactionAsPaymentFlagRemoved_result()
3972
    try:
3972
    try:
3973
      self._handler.markOrderAsPaymentFlagRemoved(args.orderId)
3973
      self._handler.markTransactionAsPaymentFlagRemoved(args.transactionId)
3974
    except TransactionServiceException, ex:
3974
    except TransactionServiceException, ex:
3975
      result.ex = ex
3975
      result.ex = ex
3976
    oprot.writeMessageBegin("markOrderAsPaymentFlagRemoved", TMessageType.REPLY, seqid)
3976
    oprot.writeMessageBegin("markTransactionAsPaymentFlagRemoved", TMessageType.REPLY, seqid)
3977
    result.write(oprot)
3977
    result.write(oprot)
3978
    oprot.writeMessageEnd()
3978
    oprot.writeMessageEnd()
3979
    oprot.trans.flush()
3979
    oprot.trans.flush()
3980
 
3980
 
3981
 
3981
 
Line 12989... Line 12989...
12989
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
12989
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
12990
 
12990
 
12991
  def __ne__(self, other):
12991
  def __ne__(self, other):
12992
    return not (self == other)
12992
    return not (self == other)
12993
 
12993
 
12994
class markOrderAsPaymentFlagRemoved_args:
12994
class markTransactionAsPaymentFlagRemoved_args:
12995
  """
12995
  """
12996
  Attributes:
12996
  Attributes:
12997
   - orderId
12997
   - transactionId
12998
  """
12998
  """
12999
 
12999
 
13000
  thrift_spec = (
13000
  thrift_spec = (
13001
    None, # 0
13001
    None, # 0
13002
    (1, TType.I64, 'orderId', None, None, ), # 1
13002
    (1, TType.I64, 'transactionId', None, None, ), # 1
13003
  )
13003
  )
13004
 
13004
 
13005
  def __init__(self, orderId=None,):
13005
  def __init__(self, transactionId=None,):
13006
    self.orderId = orderId
13006
    self.transactionId = transactionId
13007
 
13007
 
13008
  def read(self, iprot):
13008
  def read(self, iprot):
13009
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13009
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13010
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13010
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13011
      return
13011
      return
Line 13014... Line 13014...
13014
      (fname, ftype, fid) = iprot.readFieldBegin()
13014
      (fname, ftype, fid) = iprot.readFieldBegin()
13015
      if ftype == TType.STOP:
13015
      if ftype == TType.STOP:
13016
        break
13016
        break
13017
      if fid == 1:
13017
      if fid == 1:
13018
        if ftype == TType.I64:
13018
        if ftype == TType.I64:
13019
          self.orderId = iprot.readI64();
13019
          self.transactionId = iprot.readI64();
13020
        else:
13020
        else:
13021
          iprot.skip(ftype)
13021
          iprot.skip(ftype)
13022
      else:
13022
      else:
13023
        iprot.skip(ftype)
13023
        iprot.skip(ftype)
13024
      iprot.readFieldEnd()
13024
      iprot.readFieldEnd()
Line 13026... Line 13026...
13026
 
13026
 
13027
  def write(self, oprot):
13027
  def write(self, oprot):
13028
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
13028
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
13029
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
13029
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
13030
      return
13030
      return
13031
    oprot.writeStructBegin('markOrderAsPaymentFlagRemoved_args')
13031
    oprot.writeStructBegin('markTransactionAsPaymentFlagRemoved_args')
13032
    if self.orderId is not None:
13032
    if self.transactionId is not None:
13033
      oprot.writeFieldBegin('orderId', TType.I64, 1)
13033
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
13034
      oprot.writeI64(self.orderId)
13034
      oprot.writeI64(self.transactionId)
13035
      oprot.writeFieldEnd()
13035
      oprot.writeFieldEnd()
13036
    oprot.writeFieldStop()
13036
    oprot.writeFieldStop()
13037
    oprot.writeStructEnd()
13037
    oprot.writeStructEnd()
13038
 
13038
 
13039
  def validate(self):
13039
  def validate(self):
Line 13049... Line 13049...
13049
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
13049
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
13050
 
13050
 
13051
  def __ne__(self, other):
13051
  def __ne__(self, other):
13052
    return not (self == other)
13052
    return not (self == other)
13053
 
13053
 
13054
class markOrderAsPaymentFlagRemoved_result:
13054
class markTransactionAsPaymentFlagRemoved_result:
13055
  """
13055
  """
13056
  Attributes:
13056
  Attributes:
13057
   - ex
13057
   - ex
13058
  """
13058
  """
13059
 
13059
 
Line 13087... Line 13087...
13087
 
13087
 
13088
  def write(self, oprot):
13088
  def write(self, oprot):
13089
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
13089
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
13090
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
13090
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
13091
      return
13091
      return
13092
    oprot.writeStructBegin('markOrderAsPaymentFlagRemoved_result')
13092
    oprot.writeStructBegin('markTransactionAsPaymentFlagRemoved_result')
13093
    if self.ex is not None:
13093
    if self.ex is not None:
13094
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
13094
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
13095
      self.ex.write(oprot)
13095
      self.ex.write(oprot)
13096
      oprot.writeFieldEnd()
13096
      oprot.writeFieldEnd()
13097
    oprot.writeFieldStop()
13097
    oprot.writeFieldStop()