Subversion Repositories SmartDukaan

Rev

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

Rev 6906 Rev 6985
Line 1458... Line 1458...
1458
     - docType
1458
     - docType
1459
     - docSource
1459
     - docSource
1460
    """
1460
    """
1461
    pass
1461
    pass
1462
 
1462
 
-
 
1463
  def changeShippingAddress(self, orderId, line1, line2, city, state, pin):
-
 
1464
    """
-
 
1465
    Parameters:
-
 
1466
     - orderId
-
 
1467
     - line1
-
 
1468
     - line2
-
 
1469
     - city
-
 
1470
     - state
-
 
1471
     - pin
-
 
1472
    """
-
 
1473
    pass
-
 
1474
 
1463
 
1475
 
1464
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1476
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1465
  def __init__(self, iprot, oprot=None):
1477
  def __init__(self, iprot, oprot=None):
1466
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1478
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1467
 
1479
 
Line 6624... Line 6636...
6624
    self._iprot.readMessageEnd()
6636
    self._iprot.readMessageEnd()
6625
    if result.success is not None:
6637
    if result.success is not None:
6626
      return result.success
6638
      return result.success
6627
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDocument failed: unknown result");
6639
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDocument failed: unknown result");
6628
 
6640
 
-
 
6641
  def changeShippingAddress(self, orderId, line1, line2, city, state, pin):
-
 
6642
    """
-
 
6643
    Parameters:
-
 
6644
     - orderId
-
 
6645
     - line1
-
 
6646
     - line2
-
 
6647
     - city
-
 
6648
     - state
-
 
6649
     - pin
-
 
6650
    """
-
 
6651
    self.send_changeShippingAddress(orderId, line1, line2, city, state, pin)
-
 
6652
    return self.recv_changeShippingAddress()
-
 
6653
 
-
 
6654
  def send_changeShippingAddress(self, orderId, line1, line2, city, state, pin):
-
 
6655
    self._oprot.writeMessageBegin('changeShippingAddress', TMessageType.CALL, self._seqid)
-
 
6656
    args = changeShippingAddress_args()
-
 
6657
    args.orderId = orderId
-
 
6658
    args.line1 = line1
-
 
6659
    args.line2 = line2
-
 
6660
    args.city = city
-
 
6661
    args.state = state
-
 
6662
    args.pin = pin
-
 
6663
    args.write(self._oprot)
-
 
6664
    self._oprot.writeMessageEnd()
-
 
6665
    self._oprot.trans.flush()
-
 
6666
 
-
 
6667
  def recv_changeShippingAddress(self, ):
-
 
6668
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6669
    if mtype == TMessageType.EXCEPTION:
-
 
6670
      x = TApplicationException()
-
 
6671
      x.read(self._iprot)
-
 
6672
      self._iprot.readMessageEnd()
-
 
6673
      raise x
-
 
6674
    result = changeShippingAddress_result()
-
 
6675
    result.read(self._iprot)
-
 
6676
    self._iprot.readMessageEnd()
-
 
6677
    if result.success is not None:
-
 
6678
      return result.success
-
 
6679
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeShippingAddress failed: unknown result");
-
 
6680
 
6629
 
6681
 
6630
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6682
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6631
  def __init__(self, handler):
6683
  def __init__(self, handler):
6632
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6684
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6633
    self._processMap["createTransaction"] = Processor.process_createTransaction
6685
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6778... Line 6830...
6778
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
6830
    self._processMap["getAvailableEmiSchemes"] = Processor.process_getAvailableEmiSchemes
6779
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6831
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6780
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6832
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6781
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6833
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6782
    self._processMap["getDocument"] = Processor.process_getDocument
6834
    self._processMap["getDocument"] = Processor.process_getDocument
-
 
6835
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
6783
 
6836
 
6784
  def process(self, iprot, oprot):
6837
  def process(self, iprot, oprot):
6785
    (name, type, seqid) = iprot.readMessageBegin()
6838
    (name, type, seqid) = iprot.readMessageBegin()
6786
    if name not in self._processMap:
6839
    if name not in self._processMap:
6787
      iprot.skip(TType.STRUCT)
6840
      iprot.skip(TType.STRUCT)
Line 8738... Line 8791...
8738
    oprot.writeMessageBegin("getDocument", TMessageType.REPLY, seqid)
8791
    oprot.writeMessageBegin("getDocument", TMessageType.REPLY, seqid)
8739
    result.write(oprot)
8792
    result.write(oprot)
8740
    oprot.writeMessageEnd()
8793
    oprot.writeMessageEnd()
8741
    oprot.trans.flush()
8794
    oprot.trans.flush()
8742
 
8795
 
-
 
8796
  def process_changeShippingAddress(self, seqid, iprot, oprot):
-
 
8797
    args = changeShippingAddress_args()
-
 
8798
    args.read(iprot)
-
 
8799
    iprot.readMessageEnd()
-
 
8800
    result = changeShippingAddress_result()
-
 
8801
    result.success = self._handler.changeShippingAddress(args.orderId, args.line1, args.line2, args.city, args.state, args.pin)
-
 
8802
    oprot.writeMessageBegin("changeShippingAddress", TMessageType.REPLY, seqid)
-
 
8803
    result.write(oprot)
-
 
8804
    oprot.writeMessageEnd()
-
 
8805
    oprot.trans.flush()
-
 
8806
 
8743
 
8807
 
8744
# HELPER FUNCTIONS AND STRUCTURES
8808
# HELPER FUNCTIONS AND STRUCTURES
8745
 
8809
 
8746
class createTransaction_args:
8810
class createTransaction_args:
8747
  """
8811
  """
Line 29830... Line 29894...
29830
      oprot.writeFieldEnd()
29894
      oprot.writeFieldEnd()
29831
    oprot.writeFieldStop()
29895
    oprot.writeFieldStop()
29832
    oprot.writeStructEnd()
29896
    oprot.writeStructEnd()
29833
 
29897
 
29834
  def validate(self):
29898
  def validate(self):
-
 
29899
    return
-
 
29900
 
-
 
29901
 
-
 
29902
  def __repr__(self):
-
 
29903
    L = ['%s=%r' % (key, value)
-
 
29904
      for key, value in self.__dict__.iteritems()]
-
 
29905
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29906
 
-
 
29907
  def __eq__(self, other):
-
 
29908
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29909
 
-
 
29910
  def __ne__(self, other):
-
 
29911
    return not (self == other)
-
 
29912
 
-
 
29913
class changeShippingAddress_args:
-
 
29914
  """
-
 
29915
  Attributes:
-
 
29916
   - orderId
-
 
29917
   - line1
-
 
29918
   - line2
-
 
29919
   - city
-
 
29920
   - state
-
 
29921
   - pin
-
 
29922
  """
-
 
29923
 
-
 
29924
  thrift_spec = (
-
 
29925
    None, # 0
-
 
29926
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
29927
    (2, TType.STRING, 'line1', None, None, ), # 2
-
 
29928
    (3, TType.STRING, 'line2', None, None, ), # 3
-
 
29929
    (4, TType.STRING, 'city', None, None, ), # 4
-
 
29930
    (5, TType.STRING, 'state', None, None, ), # 5
-
 
29931
    (6, TType.STRING, 'pin', None, None, ), # 6
-
 
29932
  )
-
 
29933
 
-
 
29934
  def __init__(self, orderId=None, line1=None, line2=None, city=None, state=None, pin=None,):
-
 
29935
    self.orderId = orderId
-
 
29936
    self.line1 = line1
-
 
29937
    self.line2 = line2
-
 
29938
    self.city = city
-
 
29939
    self.state = state
-
 
29940
    self.pin = pin
-
 
29941
 
-
 
29942
  def read(self, iprot):
-
 
29943
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29944
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29945
      return
-
 
29946
    iprot.readStructBegin()
-
 
29947
    while True:
-
 
29948
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29949
      if ftype == TType.STOP:
-
 
29950
        break
-
 
29951
      if fid == 1:
-
 
29952
        if ftype == TType.I64:
-
 
29953
          self.orderId = iprot.readI64();
-
 
29954
        else:
-
 
29955
          iprot.skip(ftype)
-
 
29956
      elif fid == 2:
-
 
29957
        if ftype == TType.STRING:
-
 
29958
          self.line1 = iprot.readString();
-
 
29959
        else:
-
 
29960
          iprot.skip(ftype)
-
 
29961
      elif fid == 3:
-
 
29962
        if ftype == TType.STRING:
-
 
29963
          self.line2 = iprot.readString();
-
 
29964
        else:
-
 
29965
          iprot.skip(ftype)
-
 
29966
      elif fid == 4:
-
 
29967
        if ftype == TType.STRING:
-
 
29968
          self.city = iprot.readString();
-
 
29969
        else:
-
 
29970
          iprot.skip(ftype)
-
 
29971
      elif fid == 5:
-
 
29972
        if ftype == TType.STRING:
-
 
29973
          self.state = iprot.readString();
-
 
29974
        else:
-
 
29975
          iprot.skip(ftype)
-
 
29976
      elif fid == 6:
-
 
29977
        if ftype == TType.STRING:
-
 
29978
          self.pin = iprot.readString();
-
 
29979
        else:
-
 
29980
          iprot.skip(ftype)
-
 
29981
      else:
-
 
29982
        iprot.skip(ftype)
-
 
29983
      iprot.readFieldEnd()
-
 
29984
    iprot.readStructEnd()
-
 
29985
 
-
 
29986
  def write(self, oprot):
-
 
29987
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29988
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29989
      return
-
 
29990
    oprot.writeStructBegin('changeShippingAddress_args')
-
 
29991
    if self.orderId is not None:
-
 
29992
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
29993
      oprot.writeI64(self.orderId)
-
 
29994
      oprot.writeFieldEnd()
-
 
29995
    if self.line1 is not None:
-
 
29996
      oprot.writeFieldBegin('line1', TType.STRING, 2)
-
 
29997
      oprot.writeString(self.line1)
-
 
29998
      oprot.writeFieldEnd()
-
 
29999
    if self.line2 is not None:
-
 
30000
      oprot.writeFieldBegin('line2', TType.STRING, 3)
-
 
30001
      oprot.writeString(self.line2)
-
 
30002
      oprot.writeFieldEnd()
-
 
30003
    if self.city is not None:
-
 
30004
      oprot.writeFieldBegin('city', TType.STRING, 4)
-
 
30005
      oprot.writeString(self.city)
-
 
30006
      oprot.writeFieldEnd()
-
 
30007
    if self.state is not None:
-
 
30008
      oprot.writeFieldBegin('state', TType.STRING, 5)
-
 
30009
      oprot.writeString(self.state)
-
 
30010
      oprot.writeFieldEnd()
-
 
30011
    if self.pin is not None:
-
 
30012
      oprot.writeFieldBegin('pin', TType.STRING, 6)
-
 
30013
      oprot.writeString(self.pin)
-
 
30014
      oprot.writeFieldEnd()
-
 
30015
    oprot.writeFieldStop()
-
 
30016
    oprot.writeStructEnd()
-
 
30017
 
-
 
30018
  def validate(self):
-
 
30019
    return
-
 
30020
 
-
 
30021
 
-
 
30022
  def __repr__(self):
-
 
30023
    L = ['%s=%r' % (key, value)
-
 
30024
      for key, value in self.__dict__.iteritems()]
-
 
30025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30026
 
-
 
30027
  def __eq__(self, other):
-
 
30028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30029
 
-
 
30030
  def __ne__(self, other):
-
 
30031
    return not (self == other)
-
 
30032
 
-
 
30033
class changeShippingAddress_result:
-
 
30034
  """
-
 
30035
  Attributes:
-
 
30036
   - success
-
 
30037
  """
-
 
30038
 
-
 
30039
  thrift_spec = (
-
 
30040
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
30041
  )
-
 
30042
 
-
 
30043
  def __init__(self, success=None,):
-
 
30044
    self.success = success
-
 
30045
 
-
 
30046
  def read(self, iprot):
-
 
30047
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30048
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30049
      return
-
 
30050
    iprot.readStructBegin()
-
 
30051
    while True:
-
 
30052
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30053
      if ftype == TType.STOP:
-
 
30054
        break
-
 
30055
      if fid == 0:
-
 
30056
        if ftype == TType.BOOL:
-
 
30057
          self.success = iprot.readBool();
-
 
30058
        else:
-
 
30059
          iprot.skip(ftype)
-
 
30060
      else:
-
 
30061
        iprot.skip(ftype)
-
 
30062
      iprot.readFieldEnd()
-
 
30063
    iprot.readStructEnd()
-
 
30064
 
-
 
30065
  def write(self, oprot):
-
 
30066
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30067
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30068
      return
-
 
30069
    oprot.writeStructBegin('changeShippingAddress_result')
-
 
30070
    if self.success is not None:
-
 
30071
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
30072
      oprot.writeBool(self.success)
-
 
30073
      oprot.writeFieldEnd()
-
 
30074
    oprot.writeFieldStop()
-
 
30075
    oprot.writeStructEnd()
-
 
30076
 
-
 
30077
  def validate(self):
29835
    return
30078
    return
29836
 
30079
 
29837
 
30080
 
29838
  def __repr__(self):
30081
  def __repr__(self):
29839
    L = ['%s=%r' % (key, value)
30082
    L = ['%s=%r' % (key, value)