Subversion Repositories SmartDukaan

Rev

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

Rev 12280 Rev 12363
Line 655... Line 655...
655
    Parameters:
655
    Parameters:
656
     - allflipkartstock
656
     - allflipkartstock
657
    """
657
    """
658
    pass
658
    pass
659
 
659
 
-
 
660
  def getWanNlcForSource(self, item_id, source):
-
 
661
    """
-
 
662
    Parameters:
-
 
663
     - item_id
-
 
664
     - source
-
 
665
    """
-
 
666
    pass
-
 
667
 
-
 
668
  def getAllAvailableAmazonFbaItemInventory(self, ):
-
 
669
    pass
-
 
670
 
660
 
671
 
661
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
672
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
662
  def __init__(self, iprot, oprot=None):
673
  def __init__(self, iprot, oprot=None):
663
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
674
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
664
 
675
 
Line 3143... Line 3154...
3143
    result = updateFlipkartStockAtEOD_result()
3154
    result = updateFlipkartStockAtEOD_result()
3144
    result.read(self._iprot)
3155
    result.read(self._iprot)
3145
    self._iprot.readMessageEnd()
3156
    self._iprot.readMessageEnd()
3146
    return
3157
    return
3147
 
3158
 
-
 
3159
  def getWanNlcForSource(self, item_id, source):
-
 
3160
    """
-
 
3161
    Parameters:
-
 
3162
     - item_id
-
 
3163
     - source
-
 
3164
    """
-
 
3165
    self.send_getWanNlcForSource(item_id, source)
-
 
3166
    return self.recv_getWanNlcForSource()
-
 
3167
 
-
 
3168
  def send_getWanNlcForSource(self, item_id, source):
-
 
3169
    self._oprot.writeMessageBegin('getWanNlcForSource', TMessageType.CALL, self._seqid)
-
 
3170
    args = getWanNlcForSource_args()
-
 
3171
    args.item_id = item_id
-
 
3172
    args.source = source
-
 
3173
    args.write(self._oprot)
-
 
3174
    self._oprot.writeMessageEnd()
-
 
3175
    self._oprot.trans.flush()
-
 
3176
 
-
 
3177
  def recv_getWanNlcForSource(self, ):
-
 
3178
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3179
    if mtype == TMessageType.EXCEPTION:
-
 
3180
      x = TApplicationException()
-
 
3181
      x.read(self._iprot)
-
 
3182
      self._iprot.readMessageEnd()
-
 
3183
      raise x
-
 
3184
    result = getWanNlcForSource_result()
-
 
3185
    result.read(self._iprot)
-
 
3186
    self._iprot.readMessageEnd()
-
 
3187
    if result.success is not None:
-
 
3188
      return result.success
-
 
3189
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWanNlcForSource failed: unknown result");
-
 
3190
 
-
 
3191
  def getAllAvailableAmazonFbaItemInventory(self, ):
-
 
3192
    self.send_getAllAvailableAmazonFbaItemInventory()
-
 
3193
    return self.recv_getAllAvailableAmazonFbaItemInventory()
-
 
3194
 
-
 
3195
  def send_getAllAvailableAmazonFbaItemInventory(self, ):
-
 
3196
    self._oprot.writeMessageBegin('getAllAvailableAmazonFbaItemInventory', TMessageType.CALL, self._seqid)
-
 
3197
    args = getAllAvailableAmazonFbaItemInventory_args()
-
 
3198
    args.write(self._oprot)
-
 
3199
    self._oprot.writeMessageEnd()
-
 
3200
    self._oprot.trans.flush()
-
 
3201
 
-
 
3202
  def recv_getAllAvailableAmazonFbaItemInventory(self, ):
-
 
3203
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3204
    if mtype == TMessageType.EXCEPTION:
-
 
3205
      x = TApplicationException()
-
 
3206
      x.read(self._iprot)
-
 
3207
      self._iprot.readMessageEnd()
-
 
3208
      raise x
-
 
3209
    result = getAllAvailableAmazonFbaItemInventory_result()
-
 
3210
    result.read(self._iprot)
-
 
3211
    self._iprot.readMessageEnd()
-
 
3212
    if result.success is not None:
-
 
3213
      return result.success
-
 
3214
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAvailableAmazonFbaItemInventory failed: unknown result");
-
 
3215
 
3148
 
3216
 
3149
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3217
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3150
  def __init__(self, handler):
3218
  def __init__(self, handler):
3151
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3219
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3152
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
3220
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
Line 3225... Line 3293...
3225
    self._processMap["getFlipkartInventorySnapshot"] = Processor.process_getFlipkartInventorySnapshot
3293
    self._processMap["getFlipkartInventorySnapshot"] = Processor.process_getFlipkartInventorySnapshot
3226
    self._processMap["getFlipkartlInventoryForItem"] = Processor.process_getFlipkartlInventoryForItem
3294
    self._processMap["getFlipkartlInventoryForItem"] = Processor.process_getFlipkartlInventoryForItem
3227
    self._processMap["getStateMaster"] = Processor.process_getStateMaster
3295
    self._processMap["getStateMaster"] = Processor.process_getStateMaster
3228
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
3296
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
3229
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
3297
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
-
 
3298
    self._processMap["getWanNlcForSource"] = Processor.process_getWanNlcForSource
-
 
3299
    self._processMap["getAllAvailableAmazonFbaItemInventory"] = Processor.process_getAllAvailableAmazonFbaItemInventory
3230
 
3300
 
3231
  def process(self, iprot, oprot):
3301
  def process(self, iprot, oprot):
3232
    (name, type, seqid) = iprot.readMessageBegin()
3302
    (name, type, seqid) = iprot.readMessageBegin()
3233
    if name not in self._processMap:
3303
    if name not in self._processMap:
3234
      iprot.skip(TType.STRUCT)
3304
      iprot.skip(TType.STRUCT)
Line 4171... Line 4241...
4171
    oprot.writeMessageBegin("updateFlipkartStockAtEOD", TMessageType.REPLY, seqid)
4241
    oprot.writeMessageBegin("updateFlipkartStockAtEOD", TMessageType.REPLY, seqid)
4172
    result.write(oprot)
4242
    result.write(oprot)
4173
    oprot.writeMessageEnd()
4243
    oprot.writeMessageEnd()
4174
    oprot.trans.flush()
4244
    oprot.trans.flush()
4175
 
4245
 
-
 
4246
  def process_getWanNlcForSource(self, seqid, iprot, oprot):
-
 
4247
    args = getWanNlcForSource_args()
-
 
4248
    args.read(iprot)
-
 
4249
    iprot.readMessageEnd()
-
 
4250
    result = getWanNlcForSource_result()
-
 
4251
    result.success = self._handler.getWanNlcForSource(args.item_id, args.source)
-
 
4252
    oprot.writeMessageBegin("getWanNlcForSource", TMessageType.REPLY, seqid)
-
 
4253
    result.write(oprot)
-
 
4254
    oprot.writeMessageEnd()
-
 
4255
    oprot.trans.flush()
-
 
4256
 
-
 
4257
  def process_getAllAvailableAmazonFbaItemInventory(self, seqid, iprot, oprot):
-
 
4258
    args = getAllAvailableAmazonFbaItemInventory_args()
-
 
4259
    args.read(iprot)
-
 
4260
    iprot.readMessageEnd()
-
 
4261
    result = getAllAvailableAmazonFbaItemInventory_result()
-
 
4262
    result.success = self._handler.getAllAvailableAmazonFbaItemInventory()
-
 
4263
    oprot.writeMessageBegin("getAllAvailableAmazonFbaItemInventory", TMessageType.REPLY, seqid)
-
 
4264
    result.write(oprot)
-
 
4265
    oprot.writeMessageEnd()
-
 
4266
    oprot.trans.flush()
-
 
4267
 
4176
 
4268
 
4177
# HELPER FUNCTIONS AND STRUCTURES
4269
# HELPER FUNCTIONS AND STRUCTURES
4178
 
4270
 
4179
class addWarehouse_args:
4271
class addWarehouse_args:
4180
  """
4272
  """
Line 14291... Line 14383...
14291
    oprot.writeFieldStop()
14383
    oprot.writeFieldStop()
14292
    oprot.writeStructEnd()
14384
    oprot.writeStructEnd()
14293
 
14385
 
14294
  def validate(self):
14386
  def validate(self):
14295
    return
14387
    return
-
 
14388
 
-
 
14389
 
-
 
14390
  def __repr__(self):
-
 
14391
    L = ['%s=%r' % (key, value)
-
 
14392
      for key, value in self.__dict__.iteritems()]
-
 
14393
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14394
 
-
 
14395
  def __eq__(self, other):
-
 
14396
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14397
 
-
 
14398
  def __ne__(self, other):
-
 
14399
    return not (self == other)
-
 
14400
 
-
 
14401
class getWanNlcForSource_args:
-
 
14402
  """
-
 
14403
  Attributes:
-
 
14404
   - item_id
-
 
14405
   - source
-
 
14406
  """
-
 
14407
 
-
 
14408
  thrift_spec = (
-
 
14409
    None, # 0
-
 
14410
    (1, TType.I64, 'item_id', None, None, ), # 1
-
 
14411
    (2, TType.I64, 'source', None, None, ), # 2
-
 
14412
  )
-
 
14413
 
-
 
14414
  def __init__(self, item_id=None, source=None,):
-
 
14415
    self.item_id = item_id
-
 
14416
    self.source = source
-
 
14417
 
-
 
14418
  def read(self, iprot):
-
 
14419
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14420
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14421
      return
-
 
14422
    iprot.readStructBegin()
-
 
14423
    while True:
-
 
14424
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14425
      if ftype == TType.STOP:
-
 
14426
        break
-
 
14427
      if fid == 1:
-
 
14428
        if ftype == TType.I64:
-
 
14429
          self.item_id = iprot.readI64();
-
 
14430
        else:
-
 
14431
          iprot.skip(ftype)
-
 
14432
      elif fid == 2:
-
 
14433
        if ftype == TType.I64:
-
 
14434
          self.source = iprot.readI64();
-
 
14435
        else:
-
 
14436
          iprot.skip(ftype)
-
 
14437
      else:
-
 
14438
        iprot.skip(ftype)
-
 
14439
      iprot.readFieldEnd()
-
 
14440
    iprot.readStructEnd()
-
 
14441
 
-
 
14442
  def write(self, oprot):
-
 
14443
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14444
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14445
      return
-
 
14446
    oprot.writeStructBegin('getWanNlcForSource_args')
-
 
14447
    if self.item_id is not None:
-
 
14448
      oprot.writeFieldBegin('item_id', TType.I64, 1)
-
 
14449
      oprot.writeI64(self.item_id)
-
 
14450
      oprot.writeFieldEnd()
-
 
14451
    if self.source is not None:
-
 
14452
      oprot.writeFieldBegin('source', TType.I64, 2)
-
 
14453
      oprot.writeI64(self.source)
-
 
14454
      oprot.writeFieldEnd()
-
 
14455
    oprot.writeFieldStop()
-
 
14456
    oprot.writeStructEnd()
-
 
14457
 
-
 
14458
  def validate(self):
-
 
14459
    return
-
 
14460
 
-
 
14461
 
-
 
14462
  def __repr__(self):
-
 
14463
    L = ['%s=%r' % (key, value)
-
 
14464
      for key, value in self.__dict__.iteritems()]
-
 
14465
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14466
 
-
 
14467
  def __eq__(self, other):
-
 
14468
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14469
 
-
 
14470
  def __ne__(self, other):
-
 
14471
    return not (self == other)
-
 
14472
 
-
 
14473
class getWanNlcForSource_result:
-
 
14474
  """
-
 
14475
  Attributes:
-
 
14476
   - success
-
 
14477
  """
-
 
14478
 
-
 
14479
  thrift_spec = (
-
 
14480
    (0, TType.DOUBLE, 'success', None, None, ), # 0
-
 
14481
  )
-
 
14482
 
-
 
14483
  def __init__(self, success=None,):
-
 
14484
    self.success = success
-
 
14485
 
-
 
14486
  def read(self, iprot):
-
 
14487
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14488
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14489
      return
-
 
14490
    iprot.readStructBegin()
-
 
14491
    while True:
-
 
14492
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14493
      if ftype == TType.STOP:
-
 
14494
        break
-
 
14495
      if fid == 0:
-
 
14496
        if ftype == TType.DOUBLE:
-
 
14497
          self.success = iprot.readDouble();
-
 
14498
        else:
-
 
14499
          iprot.skip(ftype)
-
 
14500
      else:
-
 
14501
        iprot.skip(ftype)
-
 
14502
      iprot.readFieldEnd()
-
 
14503
    iprot.readStructEnd()
-
 
14504
 
-
 
14505
  def write(self, oprot):
-
 
14506
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14507
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14508
      return
-
 
14509
    oprot.writeStructBegin('getWanNlcForSource_result')
-
 
14510
    if self.success is not None:
-
 
14511
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
-
 
14512
      oprot.writeDouble(self.success)
-
 
14513
      oprot.writeFieldEnd()
-
 
14514
    oprot.writeFieldStop()
-
 
14515
    oprot.writeStructEnd()
-
 
14516
 
-
 
14517
  def validate(self):
-
 
14518
    return
-
 
14519
 
-
 
14520
 
-
 
14521
  def __repr__(self):
-
 
14522
    L = ['%s=%r' % (key, value)
-
 
14523
      for key, value in self.__dict__.iteritems()]
-
 
14524
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14525
 
-
 
14526
  def __eq__(self, other):
-
 
14527
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14528
 
-
 
14529
  def __ne__(self, other):
-
 
14530
    return not (self == other)
-
 
14531
 
-
 
14532
class getAllAvailableAmazonFbaItemInventory_args:
-
 
14533
 
-
 
14534
  thrift_spec = (
-
 
14535
  )
-
 
14536
 
-
 
14537
  def read(self, iprot):
-
 
14538
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14539
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14540
      return
-
 
14541
    iprot.readStructBegin()
-
 
14542
    while True:
-
 
14543
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14544
      if ftype == TType.STOP:
-
 
14545
        break
-
 
14546
      else:
-
 
14547
        iprot.skip(ftype)
-
 
14548
      iprot.readFieldEnd()
-
 
14549
    iprot.readStructEnd()
-
 
14550
 
-
 
14551
  def write(self, oprot):
-
 
14552
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14553
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14554
      return
-
 
14555
    oprot.writeStructBegin('getAllAvailableAmazonFbaItemInventory_args')
-
 
14556
    oprot.writeFieldStop()
-
 
14557
    oprot.writeStructEnd()
-
 
14558
 
-
 
14559
  def validate(self):
-
 
14560
    return
-
 
14561
 
-
 
14562
 
-
 
14563
  def __repr__(self):
-
 
14564
    L = ['%s=%r' % (key, value)
-
 
14565
      for key, value in self.__dict__.iteritems()]
-
 
14566
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14567
 
-
 
14568
  def __eq__(self, other):
-
 
14569
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14570
 
-
 
14571
  def __ne__(self, other):
-
 
14572
    return not (self == other)
-
 
14573
 
-
 
14574
class getAllAvailableAmazonFbaItemInventory_result:
-
 
14575
  """
-
 
14576
  Attributes:
-
 
14577
   - success
-
 
14578
  """
-
 
14579
 
-
 
14580
  thrift_spec = (
-
 
14581
    (0, TType.LIST, 'success', (TType.STRUCT,(AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot.thrift_spec)), None, ), # 0
-
 
14582
  )
-
 
14583
 
-
 
14584
  def __init__(self, success=None,):
-
 
14585
    self.success = success
-
 
14586
 
-
 
14587
  def read(self, iprot):
-
 
14588
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14589
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14590
      return
-
 
14591
    iprot.readStructBegin()
-
 
14592
    while True:
-
 
14593
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14594
      if ftype == TType.STOP:
-
 
14595
        break
-
 
14596
      if fid == 0:
-
 
14597
        if ftype == TType.LIST:
-
 
14598
          self.success = []
-
 
14599
          (_etype342, _size339) = iprot.readListBegin()
-
 
14600
          for _i343 in xrange(_size339):
-
 
14601
            _elem344 = AmazonFbaInventorySnapshot()
-
 
14602
            _elem344.read(iprot)
-
 
14603
            self.success.append(_elem344)
-
 
14604
          iprot.readListEnd()
-
 
14605
        else:
-
 
14606
          iprot.skip(ftype)
-
 
14607
      else:
-
 
14608
        iprot.skip(ftype)
-
 
14609
      iprot.readFieldEnd()
-
 
14610
    iprot.readStructEnd()
-
 
14611
 
-
 
14612
  def write(self, oprot):
-
 
14613
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14614
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14615
      return
-
 
14616
    oprot.writeStructBegin('getAllAvailableAmazonFbaItemInventory_result')
-
 
14617
    if self.success is not None:
-
 
14618
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
14619
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
14620
      for iter345 in self.success:
-
 
14621
        iter345.write(oprot)
-
 
14622
      oprot.writeListEnd()
-
 
14623
      oprot.writeFieldEnd()
-
 
14624
    oprot.writeFieldStop()
-
 
14625
    oprot.writeStructEnd()
-
 
14626
 
-
 
14627
  def validate(self):
-
 
14628
    return
14296
 
14629
 
14297
 
14630
 
14298
  def __repr__(self):
14631
  def __repr__(self):
14299
    L = ['%s=%r' % (key, value)
14632
    L = ['%s=%r' % (key, value)
14300
      for key, value in self.__dict__.iteritems()]
14633
      for key, value in self.__dict__.iteritems()]