Subversion Repositories SmartDukaan

Rev

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

Rev 7427 Rev 7442
Line 1720... Line 1720...
1720
     - startDate
1720
     - startDate
1721
     - endDate
1721
     - endDate
1722
    """
1722
    """
1723
    pass
1723
    pass
1724
 
1724
 
-
 
1725
  def getAmazonOrdersToAcknowledge(self, ):
-
 
1726
    pass
-
 
1727
 
-
 
1728
  def changeAmazonOrderStatus(self, amazonOrderCode, status):
-
 
1729
    """
-
 
1730
    Parameters:
-
 
1731
     - amazonOrderCode
-
 
1732
     - status
-
 
1733
    """
-
 
1734
    pass
-
 
1735
 
1725
 
1736
 
1726
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1737
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1727
  def __init__(self, iprot, oprot=None):
1738
  def __init__(self, iprot, oprot=None):
1728
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1739
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1729
 
1740
 
Line 7961... Line 7972...
7961
    self._iprot.readMessageEnd()
7972
    self._iprot.readMessageEnd()
7962
    if result.success is not None:
7973
    if result.success is not None:
7963
      return result.success
7974
      return result.success
7964
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollectionsForStore failed: unknown result");
7975
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollectionsForStore failed: unknown result");
7965
 
7976
 
-
 
7977
  def getAmazonOrdersToAcknowledge(self, ):
-
 
7978
    self.send_getAmazonOrdersToAcknowledge()
-
 
7979
    return self.recv_getAmazonOrdersToAcknowledge()
-
 
7980
 
-
 
7981
  def send_getAmazonOrdersToAcknowledge(self, ):
-
 
7982
    self._oprot.writeMessageBegin('getAmazonOrdersToAcknowledge', TMessageType.CALL, self._seqid)
-
 
7983
    args = getAmazonOrdersToAcknowledge_args()
-
 
7984
    args.write(self._oprot)
-
 
7985
    self._oprot.writeMessageEnd()
-
 
7986
    self._oprot.trans.flush()
-
 
7987
 
-
 
7988
  def recv_getAmazonOrdersToAcknowledge(self, ):
-
 
7989
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7990
    if mtype == TMessageType.EXCEPTION:
-
 
7991
      x = TApplicationException()
-
 
7992
      x.read(self._iprot)
-
 
7993
      self._iprot.readMessageEnd()
-
 
7994
      raise x
-
 
7995
    result = getAmazonOrdersToAcknowledge_result()
-
 
7996
    result.read(self._iprot)
-
 
7997
    self._iprot.readMessageEnd()
-
 
7998
    if result.success is not None:
-
 
7999
      return result.success
-
 
8000
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAmazonOrdersToAcknowledge failed: unknown result");
-
 
8001
 
-
 
8002
  def changeAmazonOrderStatus(self, amazonOrderCode, status):
-
 
8003
    """
-
 
8004
    Parameters:
-
 
8005
     - amazonOrderCode
-
 
8006
     - status
-
 
8007
    """
-
 
8008
    self.send_changeAmazonOrderStatus(amazonOrderCode, status)
-
 
8009
    self.recv_changeAmazonOrderStatus()
-
 
8010
 
-
 
8011
  def send_changeAmazonOrderStatus(self, amazonOrderCode, status):
-
 
8012
    self._oprot.writeMessageBegin('changeAmazonOrderStatus', TMessageType.CALL, self._seqid)
-
 
8013
    args = changeAmazonOrderStatus_args()
-
 
8014
    args.amazonOrderCode = amazonOrderCode
-
 
8015
    args.status = status
-
 
8016
    args.write(self._oprot)
-
 
8017
    self._oprot.writeMessageEnd()
-
 
8018
    self._oprot.trans.flush()
-
 
8019
 
-
 
8020
  def recv_changeAmazonOrderStatus(self, ):
-
 
8021
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
8022
    if mtype == TMessageType.EXCEPTION:
-
 
8023
      x = TApplicationException()
-
 
8024
      x.read(self._iprot)
-
 
8025
      self._iprot.readMessageEnd()
-
 
8026
      raise x
-
 
8027
    result = changeAmazonOrderStatus_result()
-
 
8028
    result.read(self._iprot)
-
 
8029
    self._iprot.readMessageEnd()
-
 
8030
    return
-
 
8031
 
7966
 
8032
 
7967
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
8033
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7968
  def __init__(self, handler):
8034
  def __init__(self, handler):
7969
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
8035
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7970
    self._processMap["createTransaction"] = Processor.process_createTransaction
8036
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 8149... Line 8215...
8149
    self._processMap["saveStoreOrderDetail"] = Processor.process_saveStoreOrderDetail
8215
    self._processMap["saveStoreOrderDetail"] = Processor.process_saveStoreOrderDetail
8150
    self._processMap["getStoreOrderDetail"] = Processor.process_getStoreOrderDetail
8216
    self._processMap["getStoreOrderDetail"] = Processor.process_getStoreOrderDetail
8151
    self._processMap["getAllEdcBanks"] = Processor.process_getAllEdcBanks
8217
    self._processMap["getAllEdcBanks"] = Processor.process_getAllEdcBanks
8152
    self._processMap["saveRefundAmountsForStoreOrder"] = Processor.process_saveRefundAmountsForStoreOrder
8218
    self._processMap["saveRefundAmountsForStoreOrder"] = Processor.process_saveRefundAmountsForStoreOrder
8153
    self._processMap["getCollectionsForStore"] = Processor.process_getCollectionsForStore
8219
    self._processMap["getCollectionsForStore"] = Processor.process_getCollectionsForStore
-
 
8220
    self._processMap["getAmazonOrdersToAcknowledge"] = Processor.process_getAmazonOrdersToAcknowledge
-
 
8221
    self._processMap["changeAmazonOrderStatus"] = Processor.process_changeAmazonOrderStatus
8154
 
8222
 
8155
  def process(self, iprot, oprot):
8223
  def process(self, iprot, oprot):
8156
    (name, type, seqid) = iprot.readMessageBegin()
8224
    (name, type, seqid) = iprot.readMessageBegin()
8157
    if name not in self._processMap:
8225
    if name not in self._processMap:
8158
      iprot.skip(TType.STRUCT)
8226
      iprot.skip(TType.STRUCT)
Line 10483... Line 10551...
10483
    oprot.writeMessageBegin("getCollectionsForStore", TMessageType.REPLY, seqid)
10551
    oprot.writeMessageBegin("getCollectionsForStore", TMessageType.REPLY, seqid)
10484
    result.write(oprot)
10552
    result.write(oprot)
10485
    oprot.writeMessageEnd()
10553
    oprot.writeMessageEnd()
10486
    oprot.trans.flush()
10554
    oprot.trans.flush()
10487
 
10555
 
-
 
10556
  def process_getAmazonOrdersToAcknowledge(self, seqid, iprot, oprot):
-
 
10557
    args = getAmazonOrdersToAcknowledge_args()
-
 
10558
    args.read(iprot)
-
 
10559
    iprot.readMessageEnd()
-
 
10560
    result = getAmazonOrdersToAcknowledge_result()
-
 
10561
    result.success = self._handler.getAmazonOrdersToAcknowledge()
-
 
10562
    oprot.writeMessageBegin("getAmazonOrdersToAcknowledge", TMessageType.REPLY, seqid)
-
 
10563
    result.write(oprot)
-
 
10564
    oprot.writeMessageEnd()
-
 
10565
    oprot.trans.flush()
-
 
10566
 
-
 
10567
  def process_changeAmazonOrderStatus(self, seqid, iprot, oprot):
-
 
10568
    args = changeAmazonOrderStatus_args()
-
 
10569
    args.read(iprot)
-
 
10570
    iprot.readMessageEnd()
-
 
10571
    result = changeAmazonOrderStatus_result()
-
 
10572
    self._handler.changeAmazonOrderStatus(args.amazonOrderCode, args.status)
-
 
10573
    oprot.writeMessageBegin("changeAmazonOrderStatus", TMessageType.REPLY, seqid)
-
 
10574
    result.write(oprot)
-
 
10575
    oprot.writeMessageEnd()
-
 
10576
    oprot.trans.flush()
-
 
10577
 
10488
 
10578
 
10489
# HELPER FUNCTIONS AND STRUCTURES
10579
# HELPER FUNCTIONS AND STRUCTURES
10490
 
10580
 
10491
class createTransaction_args:
10581
class createTransaction_args:
10492
  """
10582
  """
Line 36107... Line 36197...
36107
    oprot.writeFieldStop()
36197
    oprot.writeFieldStop()
36108
    oprot.writeStructEnd()
36198
    oprot.writeStructEnd()
36109
 
36199
 
36110
  def validate(self):
36200
  def validate(self):
36111
    return
36201
    return
-
 
36202
 
-
 
36203
 
-
 
36204
  def __repr__(self):
-
 
36205
    L = ['%s=%r' % (key, value)
-
 
36206
      for key, value in self.__dict__.iteritems()]
-
 
36207
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36208
 
-
 
36209
  def __eq__(self, other):
-
 
36210
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36211
 
-
 
36212
  def __ne__(self, other):
-
 
36213
    return not (self == other)
-
 
36214
 
-
 
36215
class getAmazonOrdersToAcknowledge_args:
-
 
36216
 
-
 
36217
  thrift_spec = (
-
 
36218
  )
-
 
36219
 
-
 
36220
  def read(self, iprot):
-
 
36221
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36222
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36223
      return
-
 
36224
    iprot.readStructBegin()
-
 
36225
    while True:
-
 
36226
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36227
      if ftype == TType.STOP:
-
 
36228
        break
-
 
36229
      else:
-
 
36230
        iprot.skip(ftype)
-
 
36231
      iprot.readFieldEnd()
-
 
36232
    iprot.readStructEnd()
-
 
36233
 
-
 
36234
  def write(self, oprot):
-
 
36235
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36236
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36237
      return
-
 
36238
    oprot.writeStructBegin('getAmazonOrdersToAcknowledge_args')
-
 
36239
    oprot.writeFieldStop()
-
 
36240
    oprot.writeStructEnd()
-
 
36241
 
-
 
36242
  def validate(self):
-
 
36243
    return
-
 
36244
 
-
 
36245
 
-
 
36246
  def __repr__(self):
-
 
36247
    L = ['%s=%r' % (key, value)
-
 
36248
      for key, value in self.__dict__.iteritems()]
-
 
36249
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36250
 
-
 
36251
  def __eq__(self, other):
-
 
36252
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36253
 
-
 
36254
  def __ne__(self, other):
-
 
36255
    return not (self == other)
-
 
36256
 
-
 
36257
class getAmazonOrdersToAcknowledge_result:
-
 
36258
  """
-
 
36259
  Attributes:
-
 
36260
   - success
-
 
36261
  """
-
 
36262
 
-
 
36263
  thrift_spec = (
-
 
36264
    (0, TType.LIST, 'success', (TType.STRUCT,(AmazonOrdersToAcknowledge, AmazonOrdersToAcknowledge.thrift_spec)), None, ), # 0
-
 
36265
  )
-
 
36266
 
-
 
36267
  def __init__(self, success=None,):
-
 
36268
    self.success = success
-
 
36269
 
-
 
36270
  def read(self, iprot):
-
 
36271
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36272
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36273
      return
-
 
36274
    iprot.readStructBegin()
-
 
36275
    while True:
-
 
36276
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36277
      if ftype == TType.STOP:
-
 
36278
        break
-
 
36279
      if fid == 0:
-
 
36280
        if ftype == TType.LIST:
-
 
36281
          self.success = []
-
 
36282
          (_etype824, _size821) = iprot.readListBegin()
-
 
36283
          for _i825 in xrange(_size821):
-
 
36284
            _elem826 = AmazonOrdersToAcknowledge()
-
 
36285
            _elem826.read(iprot)
-
 
36286
            self.success.append(_elem826)
-
 
36287
          iprot.readListEnd()
-
 
36288
        else:
-
 
36289
          iprot.skip(ftype)
-
 
36290
      else:
-
 
36291
        iprot.skip(ftype)
-
 
36292
      iprot.readFieldEnd()
-
 
36293
    iprot.readStructEnd()
-
 
36294
 
-
 
36295
  def write(self, oprot):
-
 
36296
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36297
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36298
      return
-
 
36299
    oprot.writeStructBegin('getAmazonOrdersToAcknowledge_result')
-
 
36300
    if self.success is not None:
-
 
36301
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
36302
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
36303
      for iter827 in self.success:
-
 
36304
        iter827.write(oprot)
-
 
36305
      oprot.writeListEnd()
-
 
36306
      oprot.writeFieldEnd()
-
 
36307
    oprot.writeFieldStop()
-
 
36308
    oprot.writeStructEnd()
-
 
36309
 
-
 
36310
  def validate(self):
-
 
36311
    return
-
 
36312
 
-
 
36313
 
-
 
36314
  def __repr__(self):
-
 
36315
    L = ['%s=%r' % (key, value)
-
 
36316
      for key, value in self.__dict__.iteritems()]
-
 
36317
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36318
 
-
 
36319
  def __eq__(self, other):
-
 
36320
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36321
 
-
 
36322
  def __ne__(self, other):
-
 
36323
    return not (self == other)
-
 
36324
 
-
 
36325
class changeAmazonOrderStatus_args:
-
 
36326
  """
-
 
36327
  Attributes:
-
 
36328
   - amazonOrderCode
-
 
36329
   - status
-
 
36330
  """
-
 
36331
 
-
 
36332
  thrift_spec = (
-
 
36333
    None, # 0
-
 
36334
    (1, TType.STRING, 'amazonOrderCode', None, None, ), # 1
-
 
36335
    (2, TType.STRING, 'status', None, None, ), # 2
-
 
36336
  )
-
 
36337
 
-
 
36338
  def __init__(self, amazonOrderCode=None, status=None,):
-
 
36339
    self.amazonOrderCode = amazonOrderCode
-
 
36340
    self.status = status
-
 
36341
 
-
 
36342
  def read(self, iprot):
-
 
36343
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36344
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36345
      return
-
 
36346
    iprot.readStructBegin()
-
 
36347
    while True:
-
 
36348
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36349
      if ftype == TType.STOP:
-
 
36350
        break
-
 
36351
      if fid == 1:
-
 
36352
        if ftype == TType.STRING:
-
 
36353
          self.amazonOrderCode = iprot.readString();
-
 
36354
        else:
-
 
36355
          iprot.skip(ftype)
-
 
36356
      elif fid == 2:
-
 
36357
        if ftype == TType.STRING:
-
 
36358
          self.status = iprot.readString();
-
 
36359
        else:
-
 
36360
          iprot.skip(ftype)
-
 
36361
      else:
-
 
36362
        iprot.skip(ftype)
-
 
36363
      iprot.readFieldEnd()
-
 
36364
    iprot.readStructEnd()
-
 
36365
 
-
 
36366
  def write(self, oprot):
-
 
36367
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36368
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36369
      return
-
 
36370
    oprot.writeStructBegin('changeAmazonOrderStatus_args')
-
 
36371
    if self.amazonOrderCode is not None:
-
 
36372
      oprot.writeFieldBegin('amazonOrderCode', TType.STRING, 1)
-
 
36373
      oprot.writeString(self.amazonOrderCode)
-
 
36374
      oprot.writeFieldEnd()
-
 
36375
    if self.status is not None:
-
 
36376
      oprot.writeFieldBegin('status', TType.STRING, 2)
-
 
36377
      oprot.writeString(self.status)
-
 
36378
      oprot.writeFieldEnd()
-
 
36379
    oprot.writeFieldStop()
-
 
36380
    oprot.writeStructEnd()
-
 
36381
 
-
 
36382
  def validate(self):
-
 
36383
    return
-
 
36384
 
-
 
36385
 
-
 
36386
  def __repr__(self):
-
 
36387
    L = ['%s=%r' % (key, value)
-
 
36388
      for key, value in self.__dict__.iteritems()]
-
 
36389
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
36390
 
-
 
36391
  def __eq__(self, other):
-
 
36392
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
36393
 
-
 
36394
  def __ne__(self, other):
-
 
36395
    return not (self == other)
-
 
36396
 
-
 
36397
class changeAmazonOrderStatus_result:
-
 
36398
 
-
 
36399
  thrift_spec = (
-
 
36400
  )
-
 
36401
 
-
 
36402
  def read(self, iprot):
-
 
36403
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
36404
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
36405
      return
-
 
36406
    iprot.readStructBegin()
-
 
36407
    while True:
-
 
36408
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
36409
      if ftype == TType.STOP:
-
 
36410
        break
-
 
36411
      else:
-
 
36412
        iprot.skip(ftype)
-
 
36413
      iprot.readFieldEnd()
-
 
36414
    iprot.readStructEnd()
-
 
36415
 
-
 
36416
  def write(self, oprot):
-
 
36417
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
36418
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
36419
      return
-
 
36420
    oprot.writeStructBegin('changeAmazonOrderStatus_result')
-
 
36421
    oprot.writeFieldStop()
-
 
36422
    oprot.writeStructEnd()
-
 
36423
 
-
 
36424
  def validate(self):
-
 
36425
    return
36112
 
36426
 
36113
 
36427
 
36114
  def __repr__(self):
36428
  def __repr__(self):
36115
    L = ['%s=%r' % (key, value)
36429
    L = ['%s=%r' % (key, value)
36116
      for key, value in self.__dict__.iteritems()]
36430
      for key, value in self.__dict__.iteritems()]