Subversion Repositories SmartDukaan

Rev

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

Rev 7770 Rev 7897
Line 541... Line 541...
541
    Parameters:
541
    Parameters:
542
     - startDateTime
542
     - startDateTime
543
    """
543
    """
544
    pass
544
    pass
545
 
545
 
546
  def getProductNotificationRequestCount(self, startDateTime):
546
  def getProductNotificationRequestCount(self, startDateTime, categoryId):
547
    """
547
    """
548
    Returns a list of count of requests for product notification against each item
548
    Returns a list of count of requests for product notification against each item
549
 
549
 
550
    Parameters:
550
    Parameters:
551
     - startDateTime
551
     - startDateTime
-
 
552
     - categoryId
552
    """
553
    """
553
    pass
554
    pass
554
 
555
 
555
  def addAuthorizationLog(self, itemId, username, reason):
556
  def addAuthorizationLog(self, itemId, username, reason):
556
    """
557
    """
Line 762... Line 763...
762
     - sku
763
     - sku
763
     - timestamp
764
     - timestamp
764
    """
765
    """
765
    pass
766
    pass
766
 
767
 
-
 
768
  def getAllParentCategories(self, ):
-
 
769
    pass
-
 
770
 
767
 
771
 
768
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
772
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
769
  def __init__(self, iprot, oprot=None):
773
  def __init__(self, iprot, oprot=None):
770
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
774
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
771
 
775
 
Line 2942... Line 2946...
2942
    self._iprot.readMessageEnd()
2946
    self._iprot.readMessageEnd()
2943
    if result.success is not None:
2947
    if result.success is not None:
2944
      return result.success
2948
      return result.success
2945
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProductNotifications failed: unknown result");
2949
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProductNotifications failed: unknown result");
2946
 
2950
 
2947
  def getProductNotificationRequestCount(self, startDateTime):
2951
  def getProductNotificationRequestCount(self, startDateTime, categoryId):
2948
    """
2952
    """
2949
    Returns a list of count of requests for product notification against each item
2953
    Returns a list of count of requests for product notification against each item
2950
 
2954
 
2951
    Parameters:
2955
    Parameters:
2952
     - startDateTime
2956
     - startDateTime
-
 
2957
     - categoryId
2953
    """
2958
    """
2954
    self.send_getProductNotificationRequestCount(startDateTime)
2959
    self.send_getProductNotificationRequestCount(startDateTime, categoryId)
2955
    return self.recv_getProductNotificationRequestCount()
2960
    return self.recv_getProductNotificationRequestCount()
2956
 
2961
 
2957
  def send_getProductNotificationRequestCount(self, startDateTime):
2962
  def send_getProductNotificationRequestCount(self, startDateTime, categoryId):
2958
    self._oprot.writeMessageBegin('getProductNotificationRequestCount', TMessageType.CALL, self._seqid)
2963
    self._oprot.writeMessageBegin('getProductNotificationRequestCount', TMessageType.CALL, self._seqid)
2959
    args = getProductNotificationRequestCount_args()
2964
    args = getProductNotificationRequestCount_args()
2960
    args.startDateTime = startDateTime
2965
    args.startDateTime = startDateTime
-
 
2966
    args.categoryId = categoryId
2961
    args.write(self._oprot)
2967
    args.write(self._oprot)
2962
    self._oprot.writeMessageEnd()
2968
    self._oprot.writeMessageEnd()
2963
    self._oprot.trans.flush()
2969
    self._oprot.trans.flush()
2964
 
2970
 
2965
  def recv_getProductNotificationRequestCount(self, ):
2971
  def recv_getProductNotificationRequestCount(self, ):
Line 3891... Line 3897...
3891
    self._iprot.readMessageEnd()
3897
    self._iprot.readMessageEnd()
3892
    if result.success is not None:
3898
    if result.success is not None:
3893
      return result.success
3899
      return result.success
3894
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateTimestampForAmazonFeeds failed: unknown result");
3900
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateTimestampForAmazonFeeds failed: unknown result");
3895
 
3901
 
-
 
3902
  def getAllParentCategories(self, ):
-
 
3903
    self.send_getAllParentCategories()
-
 
3904
    return self.recv_getAllParentCategories()
-
 
3905
 
-
 
3906
  def send_getAllParentCategories(self, ):
-
 
3907
    self._oprot.writeMessageBegin('getAllParentCategories', TMessageType.CALL, self._seqid)
-
 
3908
    args = getAllParentCategories_args()
-
 
3909
    args.write(self._oprot)
-
 
3910
    self._oprot.writeMessageEnd()
-
 
3911
    self._oprot.trans.flush()
-
 
3912
 
-
 
3913
  def recv_getAllParentCategories(self, ):
-
 
3914
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3915
    if mtype == TMessageType.EXCEPTION:
-
 
3916
      x = TApplicationException()
-
 
3917
      x.read(self._iprot)
-
 
3918
      self._iprot.readMessageEnd()
-
 
3919
      raise x
-
 
3920
    result = getAllParentCategories_result()
-
 
3921
    result.read(self._iprot)
-
 
3922
    self._iprot.readMessageEnd()
-
 
3923
    if result.success is not None:
-
 
3924
      return result.success
-
 
3925
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllParentCategories failed: unknown result");
-
 
3926
 
3896
 
3927
 
3897
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3928
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3898
  def __init__(self, handler):
3929
  def __init__(self, handler):
3899
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3930
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3900
    self._processMap["addItem"] = Processor.process_addItem
3931
    self._processMap["addItem"] = Processor.process_addItem
Line 3994... Line 4025...
3994
    self._processMap["getAsinItems"] = Processor.process_getAsinItems
4025
    self._processMap["getAsinItems"] = Processor.process_getAsinItems
3995
    self._processMap["getAllFbaListedItems"] = Processor.process_getAllFbaListedItems
4026
    self._processMap["getAllFbaListedItems"] = Processor.process_getAllFbaListedItems
3996
    self._processMap["getAllNonFbaListedItems"] = Processor.process_getAllNonFbaListedItems
4027
    self._processMap["getAllNonFbaListedItems"] = Processor.process_getAllNonFbaListedItems
3997
    self._processMap["updateItemInventory"] = Processor.process_updateItemInventory
4028
    self._processMap["updateItemInventory"] = Processor.process_updateItemInventory
3998
    self._processMap["updateTimestampForAmazonFeeds"] = Processor.process_updateTimestampForAmazonFeeds
4029
    self._processMap["updateTimestampForAmazonFeeds"] = Processor.process_updateTimestampForAmazonFeeds
-
 
4030
    self._processMap["getAllParentCategories"] = Processor.process_getAllParentCategories
3999
 
4031
 
4000
  def process(self, iprot, oprot):
4032
  def process(self, iprot, oprot):
4001
    (name, type, seqid) = iprot.readMessageBegin()
4033
    (name, type, seqid) = iprot.readMessageBegin()
4002
    if name not in self._processMap:
4034
    if name not in self._processMap:
4003
      iprot.skip(TType.STRUCT)
4035
      iprot.skip(TType.STRUCT)
Line 4865... Line 4897...
4865
  def process_getProductNotificationRequestCount(self, seqid, iprot, oprot):
4897
  def process_getProductNotificationRequestCount(self, seqid, iprot, oprot):
4866
    args = getProductNotificationRequestCount_args()
4898
    args = getProductNotificationRequestCount_args()
4867
    args.read(iprot)
4899
    args.read(iprot)
4868
    iprot.readMessageEnd()
4900
    iprot.readMessageEnd()
4869
    result = getProductNotificationRequestCount_result()
4901
    result = getProductNotificationRequestCount_result()
4870
    result.success = self._handler.getProductNotificationRequestCount(args.startDateTime)
4902
    result.success = self._handler.getProductNotificationRequestCount(args.startDateTime, args.categoryId)
4871
    oprot.writeMessageBegin("getProductNotificationRequestCount", TMessageType.REPLY, seqid)
4903
    oprot.writeMessageBegin("getProductNotificationRequestCount", TMessageType.REPLY, seqid)
4872
    result.write(oprot)
4904
    result.write(oprot)
4873
    oprot.writeMessageEnd()
4905
    oprot.writeMessageEnd()
4874
    oprot.trans.flush()
4906
    oprot.trans.flush()
4875
 
4907
 
Line 5213... Line 5245...
5213
    oprot.writeMessageBegin("updateTimestampForAmazonFeeds", TMessageType.REPLY, seqid)
5245
    oprot.writeMessageBegin("updateTimestampForAmazonFeeds", TMessageType.REPLY, seqid)
5214
    result.write(oprot)
5246
    result.write(oprot)
5215
    oprot.writeMessageEnd()
5247
    oprot.writeMessageEnd()
5216
    oprot.trans.flush()
5248
    oprot.trans.flush()
5217
 
5249
 
-
 
5250
  def process_getAllParentCategories(self, seqid, iprot, oprot):
-
 
5251
    args = getAllParentCategories_args()
-
 
5252
    args.read(iprot)
-
 
5253
    iprot.readMessageEnd()
-
 
5254
    result = getAllParentCategories_result()
-
 
5255
    result.success = self._handler.getAllParentCategories()
-
 
5256
    oprot.writeMessageBegin("getAllParentCategories", TMessageType.REPLY, seqid)
-
 
5257
    result.write(oprot)
-
 
5258
    oprot.writeMessageEnd()
-
 
5259
    oprot.trans.flush()
-
 
5260
 
5218
 
5261
 
5219
# HELPER FUNCTIONS AND STRUCTURES
5262
# HELPER FUNCTIONS AND STRUCTURES
5220
 
5263
 
5221
class addItem_args:
5264
class addItem_args:
5222
  """
5265
  """
Line 14242... Line 14285...
14242
 
14285
 
14243
class getProductNotificationRequestCount_args:
14286
class getProductNotificationRequestCount_args:
14244
  """
14287
  """
14245
  Attributes:
14288
  Attributes:
14246
   - startDateTime
14289
   - startDateTime
-
 
14290
   - categoryId
14247
  """
14291
  """
14248
 
14292
 
14249
  thrift_spec = (
14293
  thrift_spec = (
14250
    None, # 0
14294
    None, # 0
14251
    (1, TType.I64, 'startDateTime', None, None, ), # 1
14295
    (1, TType.I64, 'startDateTime', None, None, ), # 1
-
 
14296
    (2, TType.I64, 'categoryId', None, None, ), # 2
14252
  )
14297
  )
14253
 
14298
 
14254
  def __init__(self, startDateTime=None,):
14299
  def __init__(self, startDateTime=None, categoryId=None,):
14255
    self.startDateTime = startDateTime
14300
    self.startDateTime = startDateTime
-
 
14301
    self.categoryId = categoryId
14256
 
14302
 
14257
  def read(self, iprot):
14303
  def read(self, iprot):
14258
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
14304
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
14259
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
14305
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
14260
      return
14306
      return
Line 14266... Line 14312...
14266
      if fid == 1:
14312
      if fid == 1:
14267
        if ftype == TType.I64:
14313
        if ftype == TType.I64:
14268
          self.startDateTime = iprot.readI64();
14314
          self.startDateTime = iprot.readI64();
14269
        else:
14315
        else:
14270
          iprot.skip(ftype)
14316
          iprot.skip(ftype)
-
 
14317
      elif fid == 2:
-
 
14318
        if ftype == TType.I64:
-
 
14319
          self.categoryId = iprot.readI64();
-
 
14320
        else:
-
 
14321
          iprot.skip(ftype)
14271
      else:
14322
      else:
14272
        iprot.skip(ftype)
14323
        iprot.skip(ftype)
14273
      iprot.readFieldEnd()
14324
      iprot.readFieldEnd()
14274
    iprot.readStructEnd()
14325
    iprot.readStructEnd()
14275
 
14326
 
Line 14280... Line 14331...
14280
    oprot.writeStructBegin('getProductNotificationRequestCount_args')
14331
    oprot.writeStructBegin('getProductNotificationRequestCount_args')
14281
    if self.startDateTime is not None:
14332
    if self.startDateTime is not None:
14282
      oprot.writeFieldBegin('startDateTime', TType.I64, 1)
14333
      oprot.writeFieldBegin('startDateTime', TType.I64, 1)
14283
      oprot.writeI64(self.startDateTime)
14334
      oprot.writeI64(self.startDateTime)
14284
      oprot.writeFieldEnd()
14335
      oprot.writeFieldEnd()
-
 
14336
    if self.categoryId is not None:
-
 
14337
      oprot.writeFieldBegin('categoryId', TType.I64, 2)
-
 
14338
      oprot.writeI64(self.categoryId)
-
 
14339
      oprot.writeFieldEnd()
14285
    oprot.writeFieldStop()
14340
    oprot.writeFieldStop()
14286
    oprot.writeStructEnd()
14341
    oprot.writeStructEnd()
14287
 
14342
 
14288
  def validate(self):
14343
  def validate(self):
14289
    return
14344
    return
Line 18173... Line 18228...
18173
      oprot.writeFieldEnd()
18228
      oprot.writeFieldEnd()
18174
    oprot.writeFieldStop()
18229
    oprot.writeFieldStop()
18175
    oprot.writeStructEnd()
18230
    oprot.writeStructEnd()
18176
 
18231
 
18177
  def validate(self):
18232
  def validate(self):
-
 
18233
    return
-
 
18234
 
-
 
18235
 
-
 
18236
  def __repr__(self):
-
 
18237
    L = ['%s=%r' % (key, value)
-
 
18238
      for key, value in self.__dict__.iteritems()]
-
 
18239
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18240
 
-
 
18241
  def __eq__(self, other):
-
 
18242
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18243
 
-
 
18244
  def __ne__(self, other):
-
 
18245
    return not (self == other)
-
 
18246
 
-
 
18247
class getAllParentCategories_args:
-
 
18248
 
-
 
18249
  thrift_spec = (
-
 
18250
  )
-
 
18251
 
-
 
18252
  def read(self, iprot):
-
 
18253
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18254
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18255
      return
-
 
18256
    iprot.readStructBegin()
-
 
18257
    while True:
-
 
18258
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18259
      if ftype == TType.STOP:
-
 
18260
        break
-
 
18261
      else:
-
 
18262
        iprot.skip(ftype)
-
 
18263
      iprot.readFieldEnd()
-
 
18264
    iprot.readStructEnd()
-
 
18265
 
-
 
18266
  def write(self, oprot):
-
 
18267
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18268
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18269
      return
-
 
18270
    oprot.writeStructBegin('getAllParentCategories_args')
-
 
18271
    oprot.writeFieldStop()
-
 
18272
    oprot.writeStructEnd()
-
 
18273
 
-
 
18274
  def validate(self):
-
 
18275
    return
-
 
18276
 
-
 
18277
 
-
 
18278
  def __repr__(self):
-
 
18279
    L = ['%s=%r' % (key, value)
-
 
18280
      for key, value in self.__dict__.iteritems()]
-
 
18281
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18282
 
-
 
18283
  def __eq__(self, other):
-
 
18284
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18285
 
-
 
18286
  def __ne__(self, other):
-
 
18287
    return not (self == other)
-
 
18288
 
-
 
18289
class getAllParentCategories_result:
-
 
18290
  """
-
 
18291
  Attributes:
-
 
18292
   - success
-
 
18293
  """
-
 
18294
 
-
 
18295
  thrift_spec = (
-
 
18296
    (0, TType.LIST, 'success', (TType.STRUCT,(Category, Category.thrift_spec)), None, ), # 0
-
 
18297
  )
-
 
18298
 
-
 
18299
  def __init__(self, success=None,):
-
 
18300
    self.success = success
-
 
18301
 
-
 
18302
  def read(self, iprot):
-
 
18303
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18304
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18305
      return
-
 
18306
    iprot.readStructBegin()
-
 
18307
    while True:
-
 
18308
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18309
      if ftype == TType.STOP:
-
 
18310
        break
-
 
18311
      if fid == 0:
-
 
18312
        if ftype == TType.LIST:
-
 
18313
          self.success = []
-
 
18314
          (_etype375, _size372) = iprot.readListBegin()
-
 
18315
          for _i376 in xrange(_size372):
-
 
18316
            _elem377 = Category()
-
 
18317
            _elem377.read(iprot)
-
 
18318
            self.success.append(_elem377)
-
 
18319
          iprot.readListEnd()
-
 
18320
        else:
-
 
18321
          iprot.skip(ftype)
-
 
18322
      else:
-
 
18323
        iprot.skip(ftype)
-
 
18324
      iprot.readFieldEnd()
-
 
18325
    iprot.readStructEnd()
-
 
18326
 
-
 
18327
  def write(self, oprot):
-
 
18328
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18329
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18330
      return
-
 
18331
    oprot.writeStructBegin('getAllParentCategories_result')
-
 
18332
    if self.success is not None:
-
 
18333
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
18334
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
18335
      for iter378 in self.success:
-
 
18336
        iter378.write(oprot)
-
 
18337
      oprot.writeListEnd()
-
 
18338
      oprot.writeFieldEnd()
-
 
18339
    oprot.writeFieldStop()
-
 
18340
    oprot.writeStructEnd()
-
 
18341
 
-
 
18342
  def validate(self):
18178
    return
18343
    return
18179
 
18344
 
18180
 
18345
 
18181
  def __repr__(self):
18346
  def __repr__(self):
18182
    L = ['%s=%r' % (key, value)
18347
    L = ['%s=%r' % (key, value)