Subversion Repositories SmartDukaan

Rev

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

Rev 1120 Rev 1627
Line 111... Line 111...
111
     - gatewayTxnDate
111
     - gatewayTxnDate
112
     - attributes
112
     - attributes
113
    """
113
    """
114
    pass
114
    pass
115
 
115
 
-
 
116
  def getMaxPaymentAmount(self, ):
-
 
117
    """
-
 
118
    Returns the maximum amount of a single payment.
-
 
119
    """
-
 
120
    pass
-
 
121
 
-
 
122
  def getMinPaymentAmount(self, ):
-
 
123
    """
-
 
124
    Returns the minimum amount of a single payment.
-
 
125
    """
-
 
126
    pass
-
 
127
 
116
 
128
 
117
class Client(Iface):
129
class Client(Iface):
118
  def __init__(self, iprot, oprot=None):
130
  def __init__(self, iprot, oprot=None):
119
    self._iprot = self._oprot = iprot
131
    self._iprot = self._oprot = iprot
120
    if oprot != None:
132
    if oprot != None:
Line 432... Line 444...
432
      return result.success
444
      return result.success
433
    if result.pe != None:
445
    if result.pe != None:
434
      raise result.pe
446
      raise result.pe
435
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
447
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
436
 
448
 
-
 
449
  def getMaxPaymentAmount(self, ):
-
 
450
    """
-
 
451
    Returns the maximum amount of a single payment.
-
 
452
    """
-
 
453
    self.send_getMaxPaymentAmount()
-
 
454
    return self.recv_getMaxPaymentAmount()
-
 
455
 
-
 
456
  def send_getMaxPaymentAmount(self, ):
-
 
457
    self._oprot.writeMessageBegin('getMaxPaymentAmount', TMessageType.CALL, self._seqid)
-
 
458
    args = getMaxPaymentAmount_args()
-
 
459
    args.write(self._oprot)
-
 
460
    self._oprot.writeMessageEnd()
-
 
461
    self._oprot.trans.flush()
-
 
462
 
-
 
463
  def recv_getMaxPaymentAmount(self, ):
-
 
464
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
465
    if mtype == TMessageType.EXCEPTION:
-
 
466
      x = TApplicationException()
-
 
467
      x.read(self._iprot)
-
 
468
      self._iprot.readMessageEnd()
-
 
469
      raise x
-
 
470
    result = getMaxPaymentAmount_result()
-
 
471
    result.read(self._iprot)
-
 
472
    self._iprot.readMessageEnd()
-
 
473
    if result.success != None:
-
 
474
      return result.success
-
 
475
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMaxPaymentAmount failed: unknown result");
-
 
476
 
-
 
477
  def getMinPaymentAmount(self, ):
-
 
478
    """
-
 
479
    Returns the minimum amount of a single payment.
-
 
480
    """
-
 
481
    self.send_getMinPaymentAmount()
-
 
482
    return self.recv_getMinPaymentAmount()
-
 
483
 
-
 
484
  def send_getMinPaymentAmount(self, ):
-
 
485
    self._oprot.writeMessageBegin('getMinPaymentAmount', TMessageType.CALL, self._seqid)
-
 
486
    args = getMinPaymentAmount_args()
-
 
487
    args.write(self._oprot)
-
 
488
    self._oprot.writeMessageEnd()
-
 
489
    self._oprot.trans.flush()
-
 
490
 
-
 
491
  def recv_getMinPaymentAmount(self, ):
-
 
492
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
493
    if mtype == TMessageType.EXCEPTION:
-
 
494
      x = TApplicationException()
-
 
495
      x.read(self._iprot)
-
 
496
      self._iprot.readMessageEnd()
-
 
497
      raise x
-
 
498
    result = getMinPaymentAmount_result()
-
 
499
    result.read(self._iprot)
-
 
500
    self._iprot.readMessageEnd()
-
 
501
    if result.success != None:
-
 
502
      return result.success
-
 
503
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMinPaymentAmount failed: unknown result");
-
 
504
 
437
 
505
 
438
class Processor(Iface, TProcessor):
506
class Processor(Iface, TProcessor):
439
  def __init__(self, handler):
507
  def __init__(self, handler):
440
    self._handler = handler
508
    self._handler = handler
441
    self._processMap = {}
509
    self._processMap = {}
Line 445... Line 513...
445
    self._processMap["getPayments"] = Processor.process_getPayments
513
    self._processMap["getPayments"] = Processor.process_getPayments
446
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
514
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
447
    self._processMap["getPayment"] = Processor.process_getPayment
515
    self._processMap["getPayment"] = Processor.process_getPayment
448
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
516
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
449
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
517
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
-
 
518
    self._processMap["getMaxPaymentAmount"] = Processor.process_getMaxPaymentAmount
-
 
519
    self._processMap["getMinPaymentAmount"] = Processor.process_getMinPaymentAmount
450
 
520
 
451
  def process(self, iprot, oprot):
521
  def process(self, iprot, oprot):
452
    (name, type, seqid) = iprot.readMessageBegin()
522
    (name, type, seqid) = iprot.readMessageBegin()
453
    if name not in self._processMap:
523
    if name not in self._processMap:
454
      iprot.skip(TType.STRUCT)
524
      iprot.skip(TType.STRUCT)
Line 570... Line 640...
570
    oprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)
640
    oprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)
571
    result.write(oprot)
641
    result.write(oprot)
572
    oprot.writeMessageEnd()
642
    oprot.writeMessageEnd()
573
    oprot.trans.flush()
643
    oprot.trans.flush()
574
 
644
 
-
 
645
  def process_getMaxPaymentAmount(self, seqid, iprot, oprot):
-
 
646
    args = getMaxPaymentAmount_args()
-
 
647
    args.read(iprot)
-
 
648
    iprot.readMessageEnd()
-
 
649
    result = getMaxPaymentAmount_result()
-
 
650
    result.success = self._handler.getMaxPaymentAmount()
-
 
651
    oprot.writeMessageBegin("getMaxPaymentAmount", TMessageType.REPLY, seqid)
-
 
652
    result.write(oprot)
-
 
653
    oprot.writeMessageEnd()
-
 
654
    oprot.trans.flush()
-
 
655
 
-
 
656
  def process_getMinPaymentAmount(self, seqid, iprot, oprot):
-
 
657
    args = getMinPaymentAmount_args()
-
 
658
    args.read(iprot)
-
 
659
    iprot.readMessageEnd()
-
 
660
    result = getMinPaymentAmount_result()
-
 
661
    result.success = self._handler.getMinPaymentAmount()
-
 
662
    oprot.writeMessageBegin("getMinPaymentAmount", TMessageType.REPLY, seqid)
-
 
663
    result.write(oprot)
-
 
664
    oprot.writeMessageEnd()
-
 
665
    oprot.trans.flush()
-
 
666
 
575
 
667
 
576
# HELPER FUNCTIONS AND STRUCTURES
668
# HELPER FUNCTIONS AND STRUCTURES
577
 
669
 
578
class closeSession_args:
670
class closeSession_args:
579
 
671
 
Line 1797... Line 1889...
1797
      oprot.writeFieldEnd()
1889
      oprot.writeFieldEnd()
1798
    oprot.writeFieldStop()
1890
    oprot.writeFieldStop()
1799
    oprot.writeStructEnd()
1891
    oprot.writeStructEnd()
1800
 
1892
 
1801
  def __repr__(self):
1893
  def __repr__(self):
-
 
1894
    L = ['%s=%r' % (key, value)
-
 
1895
      for key, value in self.__dict__.iteritems()]
-
 
1896
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1897
 
-
 
1898
  def __eq__(self, other):
-
 
1899
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1900
 
-
 
1901
  def __ne__(self, other):
-
 
1902
    return not (self == other)
-
 
1903
 
-
 
1904
class getMaxPaymentAmount_args:
-
 
1905
 
-
 
1906
  thrift_spec = (
-
 
1907
  )
-
 
1908
 
-
 
1909
  def read(self, iprot):
-
 
1910
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1911
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1912
      return
-
 
1913
    iprot.readStructBegin()
-
 
1914
    while True:
-
 
1915
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1916
      if ftype == TType.STOP:
-
 
1917
        break
-
 
1918
      else:
-
 
1919
        iprot.skip(ftype)
-
 
1920
      iprot.readFieldEnd()
-
 
1921
    iprot.readStructEnd()
-
 
1922
 
-
 
1923
  def write(self, oprot):
-
 
1924
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1925
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1926
      return
-
 
1927
    oprot.writeStructBegin('getMaxPaymentAmount_args')
-
 
1928
    oprot.writeFieldStop()
-
 
1929
    oprot.writeStructEnd()
-
 
1930
 
-
 
1931
  def __repr__(self):
-
 
1932
    L = ['%s=%r' % (key, value)
-
 
1933
      for key, value in self.__dict__.iteritems()]
-
 
1934
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1935
 
-
 
1936
  def __eq__(self, other):
-
 
1937
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1938
 
-
 
1939
  def __ne__(self, other):
-
 
1940
    return not (self == other)
-
 
1941
 
-
 
1942
class getMaxPaymentAmount_result:
-
 
1943
  """
-
 
1944
  Attributes:
-
 
1945
   - success
-
 
1946
  """
-
 
1947
 
-
 
1948
  thrift_spec = (
-
 
1949
    (0, TType.DOUBLE, 'success', None, None, ), # 0
-
 
1950
  )
-
 
1951
 
-
 
1952
  def __init__(self, success=None,):
-
 
1953
    self.success = success
-
 
1954
 
-
 
1955
  def read(self, iprot):
-
 
1956
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1957
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1958
      return
-
 
1959
    iprot.readStructBegin()
-
 
1960
    while True:
-
 
1961
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1962
      if ftype == TType.STOP:
-
 
1963
        break
-
 
1964
      if fid == 0:
-
 
1965
        if ftype == TType.DOUBLE:
-
 
1966
          self.success = iprot.readDouble();
-
 
1967
        else:
-
 
1968
          iprot.skip(ftype)
-
 
1969
      else:
-
 
1970
        iprot.skip(ftype)
-
 
1971
      iprot.readFieldEnd()
-
 
1972
    iprot.readStructEnd()
-
 
1973
 
-
 
1974
  def write(self, oprot):
-
 
1975
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1976
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1977
      return
-
 
1978
    oprot.writeStructBegin('getMaxPaymentAmount_result')
-
 
1979
    if self.success != None:
-
 
1980
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
-
 
1981
      oprot.writeDouble(self.success)
-
 
1982
      oprot.writeFieldEnd()
-
 
1983
    oprot.writeFieldStop()
-
 
1984
    oprot.writeStructEnd()
-
 
1985
 
-
 
1986
  def __repr__(self):
-
 
1987
    L = ['%s=%r' % (key, value)
-
 
1988
      for key, value in self.__dict__.iteritems()]
-
 
1989
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1990
 
-
 
1991
  def __eq__(self, other):
-
 
1992
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1993
 
-
 
1994
  def __ne__(self, other):
-
 
1995
    return not (self == other)
-
 
1996
 
-
 
1997
class getMinPaymentAmount_args:
-
 
1998
 
-
 
1999
  thrift_spec = (
-
 
2000
  )
-
 
2001
 
-
 
2002
  def read(self, iprot):
-
 
2003
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2004
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2005
      return
-
 
2006
    iprot.readStructBegin()
-
 
2007
    while True:
-
 
2008
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2009
      if ftype == TType.STOP:
-
 
2010
        break
-
 
2011
      else:
-
 
2012
        iprot.skip(ftype)
-
 
2013
      iprot.readFieldEnd()
-
 
2014
    iprot.readStructEnd()
-
 
2015
 
-
 
2016
  def write(self, oprot):
-
 
2017
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2018
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2019
      return
-
 
2020
    oprot.writeStructBegin('getMinPaymentAmount_args')
-
 
2021
    oprot.writeFieldStop()
-
 
2022
    oprot.writeStructEnd()
-
 
2023
 
-
 
2024
  def __repr__(self):
-
 
2025
    L = ['%s=%r' % (key, value)
-
 
2026
      for key, value in self.__dict__.iteritems()]
-
 
2027
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2028
 
-
 
2029
  def __eq__(self, other):
-
 
2030
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2031
 
-
 
2032
  def __ne__(self, other):
-
 
2033
    return not (self == other)
-
 
2034
 
-
 
2035
class getMinPaymentAmount_result:
-
 
2036
  """
-
 
2037
  Attributes:
-
 
2038
   - success
-
 
2039
  """
-
 
2040
 
-
 
2041
  thrift_spec = (
-
 
2042
    (0, TType.DOUBLE, 'success', None, None, ), # 0
-
 
2043
  )
-
 
2044
 
-
 
2045
  def __init__(self, success=None,):
-
 
2046
    self.success = success
-
 
2047
 
-
 
2048
  def read(self, iprot):
-
 
2049
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2050
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2051
      return
-
 
2052
    iprot.readStructBegin()
-
 
2053
    while True:
-
 
2054
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2055
      if ftype == TType.STOP:
-
 
2056
        break
-
 
2057
      if fid == 0:
-
 
2058
        if ftype == TType.DOUBLE:
-
 
2059
          self.success = iprot.readDouble();
-
 
2060
        else:
-
 
2061
          iprot.skip(ftype)
-
 
2062
      else:
-
 
2063
        iprot.skip(ftype)
-
 
2064
      iprot.readFieldEnd()
-
 
2065
    iprot.readStructEnd()
-
 
2066
 
-
 
2067
  def write(self, oprot):
-
 
2068
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2069
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2070
      return
-
 
2071
    oprot.writeStructBegin('getMinPaymentAmount_result')
-
 
2072
    if self.success != None:
-
 
2073
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
-
 
2074
      oprot.writeDouble(self.success)
-
 
2075
      oprot.writeFieldEnd()
-
 
2076
    oprot.writeFieldStop()
-
 
2077
    oprot.writeStructEnd()
-
 
2078
 
-
 
2079
  def __repr__(self):
1802
    L = ['%s=%r' % (key, value)
2080
    L = ['%s=%r' % (key, value)
1803
      for key, value in self.__dict__.iteritems()]
2081
      for key, value in self.__dict__.iteritems()]
1804
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2082
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1805
 
2083
 
1806
  def __eq__(self, other):
2084
  def __eq__(self, other):