Subversion Repositories SmartDukaan

Rev

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

Rev 6985 Rev 6988
Line 1470... Line 1470...
1470
     - state
1470
     - state
1471
     - pin
1471
     - pin
1472
    """
1472
    """
1473
    pass
1473
    pass
1474
 
1474
 
-
 
1475
  def retrieveInvoice(self, orderId):
-
 
1476
    """
-
 
1477
    Parameters:
-
 
1478
     - orderId
-
 
1479
    """
-
 
1480
    pass
-
 
1481
 
1475
 
1482
 
1476
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1483
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1477
  def __init__(self, iprot, oprot=None):
1484
  def __init__(self, iprot, oprot=None):
1478
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1485
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1479
 
1486
 
Line 6676... Line 6683...
6676
    self._iprot.readMessageEnd()
6683
    self._iprot.readMessageEnd()
6677
    if result.success is not None:
6684
    if result.success is not None:
6678
      return result.success
6685
      return result.success
6679
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeShippingAddress failed: unknown result");
6686
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeShippingAddress failed: unknown result");
6680
 
6687
 
-
 
6688
  def retrieveInvoice(self, orderId):
-
 
6689
    """
-
 
6690
    Parameters:
-
 
6691
     - orderId
-
 
6692
    """
-
 
6693
    self.send_retrieveInvoice(orderId)
-
 
6694
    return self.recv_retrieveInvoice()
-
 
6695
 
-
 
6696
  def send_retrieveInvoice(self, orderId):
-
 
6697
    self._oprot.writeMessageBegin('retrieveInvoice', TMessageType.CALL, self._seqid)
-
 
6698
    args = retrieveInvoice_args()
-
 
6699
    args.orderId = orderId
-
 
6700
    args.write(self._oprot)
-
 
6701
    self._oprot.writeMessageEnd()
-
 
6702
    self._oprot.trans.flush()
-
 
6703
 
-
 
6704
  def recv_retrieveInvoice(self, ):
-
 
6705
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6706
    if mtype == TMessageType.EXCEPTION:
-
 
6707
      x = TApplicationException()
-
 
6708
      x.read(self._iprot)
-
 
6709
      self._iprot.readMessageEnd()
-
 
6710
      raise x
-
 
6711
    result = retrieveInvoice_result()
-
 
6712
    result.read(self._iprot)
-
 
6713
    self._iprot.readMessageEnd()
-
 
6714
    if result.success is not None:
-
 
6715
      return result.success
-
 
6716
    raise TApplicationException(TApplicationException.MISSING_RESULT, "retrieveInvoice failed: unknown result");
-
 
6717
 
6681
 
6718
 
6682
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6719
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6683
  def __init__(self, handler):
6720
  def __init__(self, handler):
6684
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6721
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6685
    self._processMap["createTransaction"] = Processor.process_createTransaction
6722
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6831... Line 6868...
6831
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6868
    self._processMap["getMiscCharges"] = Processor.process_getMiscCharges
6832
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6869
    self._processMap["refundRechargeOrder"] = Processor.process_refundRechargeOrder
6833
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6870
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6834
    self._processMap["getDocument"] = Processor.process_getDocument
6871
    self._processMap["getDocument"] = Processor.process_getDocument
6835
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
6872
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
-
 
6873
    self._processMap["retrieveInvoice"] = Processor.process_retrieveInvoice
6836
 
6874
 
6837
  def process(self, iprot, oprot):
6875
  def process(self, iprot, oprot):
6838
    (name, type, seqid) = iprot.readMessageBegin()
6876
    (name, type, seqid) = iprot.readMessageBegin()
6839
    if name not in self._processMap:
6877
    if name not in self._processMap:
6840
      iprot.skip(TType.STRUCT)
6878
      iprot.skip(TType.STRUCT)
Line 8802... Line 8840...
8802
    oprot.writeMessageBegin("changeShippingAddress", TMessageType.REPLY, seqid)
8840
    oprot.writeMessageBegin("changeShippingAddress", TMessageType.REPLY, seqid)
8803
    result.write(oprot)
8841
    result.write(oprot)
8804
    oprot.writeMessageEnd()
8842
    oprot.writeMessageEnd()
8805
    oprot.trans.flush()
8843
    oprot.trans.flush()
8806
 
8844
 
-
 
8845
  def process_retrieveInvoice(self, seqid, iprot, oprot):
-
 
8846
    args = retrieveInvoice_args()
-
 
8847
    args.read(iprot)
-
 
8848
    iprot.readMessageEnd()
-
 
8849
    result = retrieveInvoice_result()
-
 
8850
    result.success = self._handler.retrieveInvoice(args.orderId)
-
 
8851
    oprot.writeMessageBegin("retrieveInvoice", TMessageType.REPLY, seqid)
-
 
8852
    result.write(oprot)
-
 
8853
    oprot.writeMessageEnd()
-
 
8854
    oprot.trans.flush()
-
 
8855
 
8807
 
8856
 
8808
# HELPER FUNCTIONS AND STRUCTURES
8857
# HELPER FUNCTIONS AND STRUCTURES
8809
 
8858
 
8810
class createTransaction_args:
8859
class createTransaction_args:
8811
  """
8860
  """
Line 30073... Line 30122...
30073
      oprot.writeFieldEnd()
30122
      oprot.writeFieldEnd()
30074
    oprot.writeFieldStop()
30123
    oprot.writeFieldStop()
30075
    oprot.writeStructEnd()
30124
    oprot.writeStructEnd()
30076
 
30125
 
30077
  def validate(self):
30126
  def validate(self):
-
 
30127
    return
-
 
30128
 
-
 
30129
 
-
 
30130
  def __repr__(self):
-
 
30131
    L = ['%s=%r' % (key, value)
-
 
30132
      for key, value in self.__dict__.iteritems()]
-
 
30133
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30134
 
-
 
30135
  def __eq__(self, other):
-
 
30136
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30137
 
-
 
30138
  def __ne__(self, other):
-
 
30139
    return not (self == other)
-
 
30140
 
-
 
30141
class retrieveInvoice_args:
-
 
30142
  """
-
 
30143
  Attributes:
-
 
30144
   - orderId
-
 
30145
  """
-
 
30146
 
-
 
30147
  thrift_spec = (
-
 
30148
    None, # 0
-
 
30149
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
30150
  )
-
 
30151
 
-
 
30152
  def __init__(self, orderId=None,):
-
 
30153
    self.orderId = orderId
-
 
30154
 
-
 
30155
  def read(self, iprot):
-
 
30156
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30157
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30158
      return
-
 
30159
    iprot.readStructBegin()
-
 
30160
    while True:
-
 
30161
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30162
      if ftype == TType.STOP:
-
 
30163
        break
-
 
30164
      if fid == 1:
-
 
30165
        if ftype == TType.I64:
-
 
30166
          self.orderId = iprot.readI64();
-
 
30167
        else:
-
 
30168
          iprot.skip(ftype)
-
 
30169
      else:
-
 
30170
        iprot.skip(ftype)
-
 
30171
      iprot.readFieldEnd()
-
 
30172
    iprot.readStructEnd()
-
 
30173
 
-
 
30174
  def write(self, oprot):
-
 
30175
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30176
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30177
      return
-
 
30178
    oprot.writeStructBegin('retrieveInvoice_args')
-
 
30179
    if self.orderId is not None:
-
 
30180
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
30181
      oprot.writeI64(self.orderId)
-
 
30182
      oprot.writeFieldEnd()
-
 
30183
    oprot.writeFieldStop()
-
 
30184
    oprot.writeStructEnd()
-
 
30185
 
-
 
30186
  def validate(self):
-
 
30187
    return
-
 
30188
 
-
 
30189
 
-
 
30190
  def __repr__(self):
-
 
30191
    L = ['%s=%r' % (key, value)
-
 
30192
      for key, value in self.__dict__.iteritems()]
-
 
30193
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30194
 
-
 
30195
  def __eq__(self, other):
-
 
30196
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30197
 
-
 
30198
  def __ne__(self, other):
-
 
30199
    return not (self == other)
-
 
30200
 
-
 
30201
class retrieveInvoice_result:
-
 
30202
  """
-
 
30203
  Attributes:
-
 
30204
   - success
-
 
30205
  """
-
 
30206
 
-
 
30207
  thrift_spec = (
-
 
30208
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
30209
  )
-
 
30210
 
-
 
30211
  def __init__(self, success=None,):
-
 
30212
    self.success = success
-
 
30213
 
-
 
30214
  def read(self, iprot):
-
 
30215
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30216
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30217
      return
-
 
30218
    iprot.readStructBegin()
-
 
30219
    while True:
-
 
30220
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30221
      if ftype == TType.STOP:
-
 
30222
        break
-
 
30223
      if fid == 0:
-
 
30224
        if ftype == TType.STRING:
-
 
30225
          self.success = iprot.readString();
-
 
30226
        else:
-
 
30227
          iprot.skip(ftype)
-
 
30228
      else:
-
 
30229
        iprot.skip(ftype)
-
 
30230
      iprot.readFieldEnd()
-
 
30231
    iprot.readStructEnd()
-
 
30232
 
-
 
30233
  def write(self, oprot):
-
 
30234
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30235
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30236
      return
-
 
30237
    oprot.writeStructBegin('retrieveInvoice_result')
-
 
30238
    if self.success is not None:
-
 
30239
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
30240
      oprot.writeString(self.success)
-
 
30241
      oprot.writeFieldEnd()
-
 
30242
    oprot.writeFieldStop()
-
 
30243
    oprot.writeStructEnd()
-
 
30244
 
-
 
30245
  def validate(self):
30078
    return
30246
    return
30079
 
30247
 
30080
 
30248
 
30081
  def __repr__(self):
30249
  def __repr__(self):
30082
    L = ['%s=%r' % (key, value)
30250
    L = ['%s=%r' % (key, value)