Subversion Repositories SmartDukaan

Rev

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

Rev 7560 Rev 7607
Line 1765... Line 1765...
1765
     - id
1765
     - id
1766
     - lastUpdatedOn
1766
     - lastUpdatedOn
1767
    """
1767
    """
1768
    pass
1768
    pass
1769
 
1769
 
-
 
1770
  def getOrdersByMobileNumber(self, mobileNumber):
-
 
1771
    """
-
 
1772
    Parameters:
-
 
1773
     - mobileNumber
-
 
1774
    """
-
 
1775
    pass
-
 
1776
 
-
 
1777
  def getOrdersByAmazonOrderItemCode(self, amazonId):
-
 
1778
    """
-
 
1779
    Parameters:
-
 
1780
     - amazonId
-
 
1781
    """
-
 
1782
    pass
-
 
1783
 
1770
 
1784
 
1771
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1785
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1772
  def __init__(self, iprot, oprot=None):
1786
  def __init__(self, iprot, oprot=None):
1773
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1787
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1774
 
1788
 
Line 8195... Line 8209...
8195
    self._iprot.readMessageEnd()
8209
    self._iprot.readMessageEnd()
8196
    if result.success is not None:
8210
    if result.success is not None:
8197
      return result.success
8211
      return result.success
8198
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateSourceDetailTimestamp failed: unknown result");
8212
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateSourceDetailTimestamp failed: unknown result");
8199
 
8213
 
-
 
8214
  def getOrdersByMobileNumber(self, mobileNumber):
-
 
8215
    """
-
 
8216
    Parameters:
-
 
8217
     - mobileNumber
-
 
8218
    """
-
 
8219
    self.send_getOrdersByMobileNumber(mobileNumber)
-
 
8220
    return self.recv_getOrdersByMobileNumber()
-
 
8221
 
-
 
8222
  def send_getOrdersByMobileNumber(self, mobileNumber):
-
 
8223
    self._oprot.writeMessageBegin('getOrdersByMobileNumber', TMessageType.CALL, self._seqid)
-
 
8224
    args = getOrdersByMobileNumber_args()
-
 
8225
    args.mobileNumber = mobileNumber
-
 
8226
    args.write(self._oprot)
-
 
8227
    self._oprot.writeMessageEnd()
-
 
8228
    self._oprot.trans.flush()
-
 
8229
 
-
 
8230
  def recv_getOrdersByMobileNumber(self, ):
-
 
8231
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
8232
    if mtype == TMessageType.EXCEPTION:
-
 
8233
      x = TApplicationException()
-
 
8234
      x.read(self._iprot)
-
 
8235
      self._iprot.readMessageEnd()
-
 
8236
      raise x
-
 
8237
    result = getOrdersByMobileNumber_result()
-
 
8238
    result.read(self._iprot)
-
 
8239
    self._iprot.readMessageEnd()
-
 
8240
    if result.success is not None:
-
 
8241
      return result.success
-
 
8242
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByMobileNumber failed: unknown result");
-
 
8243
 
-
 
8244
  def getOrdersByAmazonOrderItemCode(self, amazonId):
-
 
8245
    """
-
 
8246
    Parameters:
-
 
8247
     - amazonId
-
 
8248
    """
-
 
8249
    self.send_getOrdersByAmazonOrderItemCode(amazonId)
-
 
8250
    return self.recv_getOrdersByAmazonOrderItemCode()
-
 
8251
 
-
 
8252
  def send_getOrdersByAmazonOrderItemCode(self, amazonId):
-
 
8253
    self._oprot.writeMessageBegin('getOrdersByAmazonOrderItemCode', TMessageType.CALL, self._seqid)
-
 
8254
    args = getOrdersByAmazonOrderItemCode_args()
-
 
8255
    args.amazonId = amazonId
-
 
8256
    args.write(self._oprot)
-
 
8257
    self._oprot.writeMessageEnd()
-
 
8258
    self._oprot.trans.flush()
-
 
8259
 
-
 
8260
  def recv_getOrdersByAmazonOrderItemCode(self, ):
-
 
8261
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
8262
    if mtype == TMessageType.EXCEPTION:
-
 
8263
      x = TApplicationException()
-
 
8264
      x.read(self._iprot)
-
 
8265
      self._iprot.readMessageEnd()
-
 
8266
      raise x
-
 
8267
    result = getOrdersByAmazonOrderItemCode_result()
-
 
8268
    result.read(self._iprot)
-
 
8269
    self._iprot.readMessageEnd()
-
 
8270
    if result.success is not None:
-
 
8271
      return result.success
-
 
8272
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByAmazonOrderItemCode failed: unknown result");
-
 
8273
 
8200
 
8274
 
8201
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
8275
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
8202
  def __init__(self, handler):
8276
  def __init__(self, handler):
8203
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
8277
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
8204
    self._processMap["createTransaction"] = Processor.process_createTransaction
8278
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 8389... Line 8463...
8389
    self._processMap["getCollectionsForStore"] = Processor.process_getCollectionsForStore
8463
    self._processMap["getCollectionsForStore"] = Processor.process_getCollectionsForStore
8390
    self._processMap["getAmazonOrdersToAcknowledge"] = Processor.process_getAmazonOrdersToAcknowledge
8464
    self._processMap["getAmazonOrdersToAcknowledge"] = Processor.process_getAmazonOrdersToAcknowledge
8391
    self._processMap["changeAmazonOrderStatus"] = Processor.process_changeAmazonOrderStatus
8465
    self._processMap["changeAmazonOrderStatus"] = Processor.process_changeAmazonOrderStatus
8392
    self._processMap["updateTimestampForAmazonOrder"] = Processor.process_updateTimestampForAmazonOrder
8466
    self._processMap["updateTimestampForAmazonOrder"] = Processor.process_updateTimestampForAmazonOrder
8393
    self._processMap["updateSourceDetailTimestamp"] = Processor.process_updateSourceDetailTimestamp
8467
    self._processMap["updateSourceDetailTimestamp"] = Processor.process_updateSourceDetailTimestamp
-
 
8468
    self._processMap["getOrdersByMobileNumber"] = Processor.process_getOrdersByMobileNumber
-
 
8469
    self._processMap["getOrdersByAmazonOrderItemCode"] = Processor.process_getOrdersByAmazonOrderItemCode
8394
 
8470
 
8395
  def process(self, iprot, oprot):
8471
  def process(self, iprot, oprot):
8396
    (name, type, seqid) = iprot.readMessageBegin()
8472
    (name, type, seqid) = iprot.readMessageBegin()
8397
    if name not in self._processMap:
8473
    if name not in self._processMap:
8398
      iprot.skip(TType.STRUCT)
8474
      iprot.skip(TType.STRUCT)
Line 10792... Line 10868...
10792
    oprot.writeMessageBegin("updateSourceDetailTimestamp", TMessageType.REPLY, seqid)
10868
    oprot.writeMessageBegin("updateSourceDetailTimestamp", TMessageType.REPLY, seqid)
10793
    result.write(oprot)
10869
    result.write(oprot)
10794
    oprot.writeMessageEnd()
10870
    oprot.writeMessageEnd()
10795
    oprot.trans.flush()
10871
    oprot.trans.flush()
10796
 
10872
 
-
 
10873
  def process_getOrdersByMobileNumber(self, seqid, iprot, oprot):
-
 
10874
    args = getOrdersByMobileNumber_args()
-
 
10875
    args.read(iprot)
-
 
10876
    iprot.readMessageEnd()
-
 
10877
    result = getOrdersByMobileNumber_result()
-
 
10878
    result.success = self._handler.getOrdersByMobileNumber(args.mobileNumber)
-
 
10879
    oprot.writeMessageBegin("getOrdersByMobileNumber", TMessageType.REPLY, seqid)
-
 
10880
    result.write(oprot)
-
 
10881
    oprot.writeMessageEnd()
-
 
10882
    oprot.trans.flush()
-
 
10883
 
-
 
10884
  def process_getOrdersByAmazonOrderItemCode(self, seqid, iprot, oprot):
-
 
10885
    args = getOrdersByAmazonOrderItemCode_args()
-
 
10886
    args.read(iprot)
-
 
10887
    iprot.readMessageEnd()
-
 
10888
    result = getOrdersByAmazonOrderItemCode_result()
-
 
10889
    result.success = self._handler.getOrdersByAmazonOrderItemCode(args.amazonId)
-
 
10890
    oprot.writeMessageBegin("getOrdersByAmazonOrderItemCode", TMessageType.REPLY, seqid)
-
 
10891
    result.write(oprot)
-
 
10892
    oprot.writeMessageEnd()
-
 
10893
    oprot.trans.flush()
-
 
10894
 
10797
 
10895
 
10798
# HELPER FUNCTIONS AND STRUCTURES
10896
# HELPER FUNCTIONS AND STRUCTURES
10799
 
10897
 
10800
class createTransaction_args:
10898
class createTransaction_args:
10801
  """
10899
  """
Line 37210... Line 37308...
37210
      oprot.writeFieldEnd()
37308
      oprot.writeFieldEnd()
37211
    oprot.writeFieldStop()
37309
    oprot.writeFieldStop()
37212
    oprot.writeStructEnd()
37310
    oprot.writeStructEnd()
37213
 
37311
 
37214
  def validate(self):
37312
  def validate(self):
-
 
37313
    return
-
 
37314
 
-
 
37315
 
-
 
37316
  def __repr__(self):
-
 
37317
    L = ['%s=%r' % (key, value)
-
 
37318
      for key, value in self.__dict__.iteritems()]
-
 
37319
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37320
 
-
 
37321
  def __eq__(self, other):
-
 
37322
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37323
 
-
 
37324
  def __ne__(self, other):
-
 
37325
    return not (self == other)
-
 
37326
 
-
 
37327
class getOrdersByMobileNumber_args:
-
 
37328
  """
-
 
37329
  Attributes:
-
 
37330
   - mobileNumber
-
 
37331
  """
-
 
37332
 
-
 
37333
  thrift_spec = (
-
 
37334
    None, # 0
-
 
37335
    (1, TType.STRING, 'mobileNumber', None, None, ), # 1
-
 
37336
  )
-
 
37337
 
-
 
37338
  def __init__(self, mobileNumber=None,):
-
 
37339
    self.mobileNumber = mobileNumber
-
 
37340
 
-
 
37341
  def read(self, iprot):
-
 
37342
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37343
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
37344
      return
-
 
37345
    iprot.readStructBegin()
-
 
37346
    while True:
-
 
37347
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
37348
      if ftype == TType.STOP:
-
 
37349
        break
-
 
37350
      if fid == 1:
-
 
37351
        if ftype == TType.STRING:
-
 
37352
          self.mobileNumber = iprot.readString();
-
 
37353
        else:
-
 
37354
          iprot.skip(ftype)
-
 
37355
      else:
-
 
37356
        iprot.skip(ftype)
-
 
37357
      iprot.readFieldEnd()
-
 
37358
    iprot.readStructEnd()
-
 
37359
 
-
 
37360
  def write(self, oprot):
-
 
37361
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
37362
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
37363
      return
-
 
37364
    oprot.writeStructBegin('getOrdersByMobileNumber_args')
-
 
37365
    if self.mobileNumber is not None:
-
 
37366
      oprot.writeFieldBegin('mobileNumber', TType.STRING, 1)
-
 
37367
      oprot.writeString(self.mobileNumber)
-
 
37368
      oprot.writeFieldEnd()
-
 
37369
    oprot.writeFieldStop()
-
 
37370
    oprot.writeStructEnd()
-
 
37371
 
-
 
37372
  def validate(self):
-
 
37373
    return
-
 
37374
 
-
 
37375
 
-
 
37376
  def __repr__(self):
-
 
37377
    L = ['%s=%r' % (key, value)
-
 
37378
      for key, value in self.__dict__.iteritems()]
-
 
37379
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37380
 
-
 
37381
  def __eq__(self, other):
-
 
37382
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37383
 
-
 
37384
  def __ne__(self, other):
-
 
37385
    return not (self == other)
-
 
37386
 
-
 
37387
class getOrdersByMobileNumber_result:
-
 
37388
  """
-
 
37389
  Attributes:
-
 
37390
   - success
-
 
37391
  """
-
 
37392
 
-
 
37393
  thrift_spec = (
-
 
37394
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
-
 
37395
  )
-
 
37396
 
-
 
37397
  def __init__(self, success=None,):
-
 
37398
    self.success = success
-
 
37399
 
-
 
37400
  def read(self, iprot):
-
 
37401
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37402
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
37403
      return
-
 
37404
    iprot.readStructBegin()
-
 
37405
    while True:
-
 
37406
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
37407
      if ftype == TType.STOP:
-
 
37408
        break
-
 
37409
      if fid == 0:
-
 
37410
        if ftype == TType.LIST:
-
 
37411
          self.success = []
-
 
37412
          (_etype838, _size835) = iprot.readListBegin()
-
 
37413
          for _i839 in xrange(_size835):
-
 
37414
            _elem840 = Order()
-
 
37415
            _elem840.read(iprot)
-
 
37416
            self.success.append(_elem840)
-
 
37417
          iprot.readListEnd()
-
 
37418
        else:
-
 
37419
          iprot.skip(ftype)
-
 
37420
      else:
-
 
37421
        iprot.skip(ftype)
-
 
37422
      iprot.readFieldEnd()
-
 
37423
    iprot.readStructEnd()
-
 
37424
 
-
 
37425
  def write(self, oprot):
-
 
37426
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
37427
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
37428
      return
-
 
37429
    oprot.writeStructBegin('getOrdersByMobileNumber_result')
-
 
37430
    if self.success is not None:
-
 
37431
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
37432
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
37433
      for iter841 in self.success:
-
 
37434
        iter841.write(oprot)
-
 
37435
      oprot.writeListEnd()
-
 
37436
      oprot.writeFieldEnd()
-
 
37437
    oprot.writeFieldStop()
-
 
37438
    oprot.writeStructEnd()
-
 
37439
 
-
 
37440
  def validate(self):
-
 
37441
    return
-
 
37442
 
-
 
37443
 
-
 
37444
  def __repr__(self):
-
 
37445
    L = ['%s=%r' % (key, value)
-
 
37446
      for key, value in self.__dict__.iteritems()]
-
 
37447
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37448
 
-
 
37449
  def __eq__(self, other):
-
 
37450
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37451
 
-
 
37452
  def __ne__(self, other):
-
 
37453
    return not (self == other)
-
 
37454
 
-
 
37455
class getOrdersByAmazonOrderItemCode_args:
-
 
37456
  """
-
 
37457
  Attributes:
-
 
37458
   - amazonId
-
 
37459
  """
-
 
37460
 
-
 
37461
  thrift_spec = (
-
 
37462
    None, # 0
-
 
37463
    (1, TType.STRING, 'amazonId', None, None, ), # 1
-
 
37464
  )
-
 
37465
 
-
 
37466
  def __init__(self, amazonId=None,):
-
 
37467
    self.amazonId = amazonId
-
 
37468
 
-
 
37469
  def read(self, iprot):
-
 
37470
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37471
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
37472
      return
-
 
37473
    iprot.readStructBegin()
-
 
37474
    while True:
-
 
37475
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
37476
      if ftype == TType.STOP:
-
 
37477
        break
-
 
37478
      if fid == 1:
-
 
37479
        if ftype == TType.STRING:
-
 
37480
          self.amazonId = iprot.readString();
-
 
37481
        else:
-
 
37482
          iprot.skip(ftype)
-
 
37483
      else:
-
 
37484
        iprot.skip(ftype)
-
 
37485
      iprot.readFieldEnd()
-
 
37486
    iprot.readStructEnd()
-
 
37487
 
-
 
37488
  def write(self, oprot):
-
 
37489
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
37490
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
37491
      return
-
 
37492
    oprot.writeStructBegin('getOrdersByAmazonOrderItemCode_args')
-
 
37493
    if self.amazonId is not None:
-
 
37494
      oprot.writeFieldBegin('amazonId', TType.STRING, 1)
-
 
37495
      oprot.writeString(self.amazonId)
-
 
37496
      oprot.writeFieldEnd()
-
 
37497
    oprot.writeFieldStop()
-
 
37498
    oprot.writeStructEnd()
-
 
37499
 
-
 
37500
  def validate(self):
-
 
37501
    return
-
 
37502
 
-
 
37503
 
-
 
37504
  def __repr__(self):
-
 
37505
    L = ['%s=%r' % (key, value)
-
 
37506
      for key, value in self.__dict__.iteritems()]
-
 
37507
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
37508
 
-
 
37509
  def __eq__(self, other):
-
 
37510
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
37511
 
-
 
37512
  def __ne__(self, other):
-
 
37513
    return not (self == other)
-
 
37514
 
-
 
37515
class getOrdersByAmazonOrderItemCode_result:
-
 
37516
  """
-
 
37517
  Attributes:
-
 
37518
   - success
-
 
37519
  """
-
 
37520
 
-
 
37521
  thrift_spec = (
-
 
37522
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
-
 
37523
  )
-
 
37524
 
-
 
37525
  def __init__(self, success=None,):
-
 
37526
    self.success = success
-
 
37527
 
-
 
37528
  def read(self, iprot):
-
 
37529
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
37530
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
37531
      return
-
 
37532
    iprot.readStructBegin()
-
 
37533
    while True:
-
 
37534
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
37535
      if ftype == TType.STOP:
-
 
37536
        break
-
 
37537
      if fid == 0:
-
 
37538
        if ftype == TType.LIST:
-
 
37539
          self.success = []
-
 
37540
          (_etype845, _size842) = iprot.readListBegin()
-
 
37541
          for _i846 in xrange(_size842):
-
 
37542
            _elem847 = Order()
-
 
37543
            _elem847.read(iprot)
-
 
37544
            self.success.append(_elem847)
-
 
37545
          iprot.readListEnd()
-
 
37546
        else:
-
 
37547
          iprot.skip(ftype)
-
 
37548
      else:
-
 
37549
        iprot.skip(ftype)
-
 
37550
      iprot.readFieldEnd()
-
 
37551
    iprot.readStructEnd()
-
 
37552
 
-
 
37553
  def write(self, oprot):
-
 
37554
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
37555
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
37556
      return
-
 
37557
    oprot.writeStructBegin('getOrdersByAmazonOrderItemCode_result')
-
 
37558
    if self.success is not None:
-
 
37559
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
37560
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
37561
      for iter848 in self.success:
-
 
37562
        iter848.write(oprot)
-
 
37563
      oprot.writeListEnd()
-
 
37564
      oprot.writeFieldEnd()
-
 
37565
    oprot.writeFieldStop()
-
 
37566
    oprot.writeStructEnd()
-
 
37567
 
-
 
37568
  def validate(self):
37215
    return
37569
    return
37216
 
37570
 
37217
 
37571
 
37218
  def __repr__(self):
37572
  def __repr__(self):
37219
    L = ['%s=%r' % (key, value)
37573
    L = ['%s=%r' % (key, value)