Subversion Repositories SmartDukaan

Rev

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

Rev 17990 Rev 19247
Line 673... Line 673...
673
    Parameters:
673
    Parameters:
674
     - itemIds
674
     - itemIds
675
    """
675
    """
676
    pass
676
    pass
677
 
677
 
-
 
678
  def addVendorItemPricingInBulk(self, vendorItemPricingList):
-
 
679
    """
-
 
680
    Parameters:
-
 
681
     - vendorItemPricingList
-
 
682
    """
-
 
683
    pass
-
 
684
 
-
 
685
  def addInventoryInBulk(self, bulkInventoryList):
-
 
686
    """
-
 
687
    Parameters:
-
 
688
     - bulkInventoryList
-
 
689
    """
-
 
690
    pass
-
 
691
 
678
 
692
 
679
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
693
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
680
  def __init__(self, iprot, oprot=None):
694
  def __init__(self, iprot, oprot=None):
681
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
695
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
682
 
696
 
Line 3248... Line 3262...
3248
    self._iprot.readMessageEnd()
3262
    self._iprot.readMessageEnd()
3249
    if result.success is not None:
3263
    if result.success is not None:
3250
      return result.success
3264
      return result.success
3251
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemAvailabilityForItemIds failed: unknown result");
3265
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemAvailabilityForItemIds failed: unknown result");
3252
 
3266
 
-
 
3267
  def addVendorItemPricingInBulk(self, vendorItemPricingList):
-
 
3268
    """
-
 
3269
    Parameters:
-
 
3270
     - vendorItemPricingList
-
 
3271
    """
-
 
3272
    self.send_addVendorItemPricingInBulk(vendorItemPricingList)
-
 
3273
    return self.recv_addVendorItemPricingInBulk()
-
 
3274
 
-
 
3275
  def send_addVendorItemPricingInBulk(self, vendorItemPricingList):
-
 
3276
    self._oprot.writeMessageBegin('addVendorItemPricingInBulk', TMessageType.CALL, self._seqid)
-
 
3277
    args = addVendorItemPricingInBulk_args()
-
 
3278
    args.vendorItemPricingList = vendorItemPricingList
-
 
3279
    args.write(self._oprot)
-
 
3280
    self._oprot.writeMessageEnd()
-
 
3281
    self._oprot.trans.flush()
-
 
3282
 
-
 
3283
  def recv_addVendorItemPricingInBulk(self, ):
-
 
3284
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3285
    if mtype == TMessageType.EXCEPTION:
-
 
3286
      x = TApplicationException()
-
 
3287
      x.read(self._iprot)
-
 
3288
      self._iprot.readMessageEnd()
-
 
3289
      raise x
-
 
3290
    result = addVendorItemPricingInBulk_result()
-
 
3291
    result.read(self._iprot)
-
 
3292
    self._iprot.readMessageEnd()
-
 
3293
    if result.success is not None:
-
 
3294
      return result.success
-
 
3295
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addVendorItemPricingInBulk failed: unknown result");
-
 
3296
 
-
 
3297
  def addInventoryInBulk(self, bulkInventoryList):
-
 
3298
    """
-
 
3299
    Parameters:
-
 
3300
     - bulkInventoryList
-
 
3301
    """
-
 
3302
    self.send_addInventoryInBulk(bulkInventoryList)
-
 
3303
    self.recv_addInventoryInBulk()
-
 
3304
 
-
 
3305
  def send_addInventoryInBulk(self, bulkInventoryList):
-
 
3306
    self._oprot.writeMessageBegin('addInventoryInBulk', TMessageType.CALL, self._seqid)
-
 
3307
    args = addInventoryInBulk_args()
-
 
3308
    args.bulkInventoryList = bulkInventoryList
-
 
3309
    args.write(self._oprot)
-
 
3310
    self._oprot.writeMessageEnd()
-
 
3311
    self._oprot.trans.flush()
-
 
3312
 
-
 
3313
  def recv_addInventoryInBulk(self, ):
-
 
3314
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3315
    if mtype == TMessageType.EXCEPTION:
-
 
3316
      x = TApplicationException()
-
 
3317
      x.read(self._iprot)
-
 
3318
      self._iprot.readMessageEnd()
-
 
3319
      raise x
-
 
3320
    result = addInventoryInBulk_result()
-
 
3321
    result.read(self._iprot)
-
 
3322
    self._iprot.readMessageEnd()
-
 
3323
    if result.cex is not None:
-
 
3324
      raise result.cex
-
 
3325
    return
-
 
3326
 
3253
 
3327
 
3254
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3328
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3255
  def __init__(self, handler):
3329
  def __init__(self, handler):
3256
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3330
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3257
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
3331
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
Line 3333... Line 3407...
3333
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
3407
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
3334
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
3408
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
3335
    self._processMap["getWanNlcForSource"] = Processor.process_getWanNlcForSource
3409
    self._processMap["getWanNlcForSource"] = Processor.process_getWanNlcForSource
3336
    self._processMap["getAllAvailableAmazonFbaItemInventory"] = Processor.process_getAllAvailableAmazonFbaItemInventory
3410
    self._processMap["getAllAvailableAmazonFbaItemInventory"] = Processor.process_getAllAvailableAmazonFbaItemInventory
3337
    self._processMap["updateItemAvailabilityForItemIds"] = Processor.process_updateItemAvailabilityForItemIds
3411
    self._processMap["updateItemAvailabilityForItemIds"] = Processor.process_updateItemAvailabilityForItemIds
-
 
3412
    self._processMap["addVendorItemPricingInBulk"] = Processor.process_addVendorItemPricingInBulk
-
 
3413
    self._processMap["addInventoryInBulk"] = Processor.process_addInventoryInBulk
3338
 
3414
 
3339
  def process(self, iprot, oprot):
3415
  def process(self, iprot, oprot):
3340
    (name, type, seqid) = iprot.readMessageBegin()
3416
    (name, type, seqid) = iprot.readMessageBegin()
3341
    if name not in self._processMap:
3417
    if name not in self._processMap:
3342
      iprot.skip(TType.STRUCT)
3418
      iprot.skip(TType.STRUCT)
Line 4312... Line 4388...
4312
    oprot.writeMessageBegin("updateItemAvailabilityForItemIds", TMessageType.REPLY, seqid)
4388
    oprot.writeMessageBegin("updateItemAvailabilityForItemIds", TMessageType.REPLY, seqid)
4313
    result.write(oprot)
4389
    result.write(oprot)
4314
    oprot.writeMessageEnd()
4390
    oprot.writeMessageEnd()
4315
    oprot.trans.flush()
4391
    oprot.trans.flush()
4316
 
4392
 
-
 
4393
  def process_addVendorItemPricingInBulk(self, seqid, iprot, oprot):
-
 
4394
    args = addVendorItemPricingInBulk_args()
-
 
4395
    args.read(iprot)
-
 
4396
    iprot.readMessageEnd()
-
 
4397
    result = addVendorItemPricingInBulk_result()
-
 
4398
    result.success = self._handler.addVendorItemPricingInBulk(args.vendorItemPricingList)
-
 
4399
    oprot.writeMessageBegin("addVendorItemPricingInBulk", TMessageType.REPLY, seqid)
-
 
4400
    result.write(oprot)
-
 
4401
    oprot.writeMessageEnd()
-
 
4402
    oprot.trans.flush()
-
 
4403
 
-
 
4404
  def process_addInventoryInBulk(self, seqid, iprot, oprot):
-
 
4405
    args = addInventoryInBulk_args()
-
 
4406
    args.read(iprot)
-
 
4407
    iprot.readMessageEnd()
-
 
4408
    result = addInventoryInBulk_result()
-
 
4409
    try:
-
 
4410
      self._handler.addInventoryInBulk(args.bulkInventoryList)
-
 
4411
    except InventoryServiceException, cex:
-
 
4412
      result.cex = cex
-
 
4413
    oprot.writeMessageBegin("addInventoryInBulk", TMessageType.REPLY, seqid)
-
 
4414
    result.write(oprot)
-
 
4415
    oprot.writeMessageEnd()
-
 
4416
    oprot.trans.flush()
-
 
4417
 
4317
 
4418
 
4318
# HELPER FUNCTIONS AND STRUCTURES
4419
# HELPER FUNCTIONS AND STRUCTURES
4319
 
4420
 
4320
class addWarehouse_args:
4421
class addWarehouse_args:
4321
  """
4422
  """
Line 14799... Line 14900...
14799
      oprot.writeFieldEnd()
14900
      oprot.writeFieldEnd()
14800
    oprot.writeFieldStop()
14901
    oprot.writeFieldStop()
14801
    oprot.writeStructEnd()
14902
    oprot.writeStructEnd()
14802
 
14903
 
14803
  def validate(self):
14904
  def validate(self):
-
 
14905
    return
-
 
14906
 
-
 
14907
 
-
 
14908
  def __repr__(self):
-
 
14909
    L = ['%s=%r' % (key, value)
-
 
14910
      for key, value in self.__dict__.iteritems()]
-
 
14911
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14912
 
-
 
14913
  def __eq__(self, other):
-
 
14914
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14915
 
-
 
14916
  def __ne__(self, other):
-
 
14917
    return not (self == other)
-
 
14918
 
-
 
14919
class addVendorItemPricingInBulk_args:
-
 
14920
  """
-
 
14921
  Attributes:
-
 
14922
   - vendorItemPricingList
-
 
14923
  """
-
 
14924
 
-
 
14925
  thrift_spec = (
-
 
14926
    None, # 0
-
 
14927
    (1, TType.LIST, 'vendorItemPricingList', (TType.STRUCT,(VendorItemPricing, VendorItemPricing.thrift_spec)), None, ), # 1
-
 
14928
  )
-
 
14929
 
-
 
14930
  def __init__(self, vendorItemPricingList=None,):
-
 
14931
    self.vendorItemPricingList = vendorItemPricingList
-
 
14932
 
-
 
14933
  def read(self, iprot):
-
 
14934
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14935
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14936
      return
-
 
14937
    iprot.readStructBegin()
-
 
14938
    while True:
-
 
14939
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14940
      if ftype == TType.STOP:
-
 
14941
        break
-
 
14942
      if fid == 1:
-
 
14943
        if ftype == TType.LIST:
-
 
14944
          self.vendorItemPricingList = []
-
 
14945
          (_etype356, _size353) = iprot.readListBegin()
-
 
14946
          for _i357 in xrange(_size353):
-
 
14947
            _elem358 = VendorItemPricing()
-
 
14948
            _elem358.read(iprot)
-
 
14949
            self.vendorItemPricingList.append(_elem358)
-
 
14950
          iprot.readListEnd()
-
 
14951
        else:
-
 
14952
          iprot.skip(ftype)
-
 
14953
      else:
-
 
14954
        iprot.skip(ftype)
-
 
14955
      iprot.readFieldEnd()
-
 
14956
    iprot.readStructEnd()
-
 
14957
 
-
 
14958
  def write(self, oprot):
-
 
14959
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14960
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14961
      return
-
 
14962
    oprot.writeStructBegin('addVendorItemPricingInBulk_args')
-
 
14963
    if self.vendorItemPricingList is not None:
-
 
14964
      oprot.writeFieldBegin('vendorItemPricingList', TType.LIST, 1)
-
 
14965
      oprot.writeListBegin(TType.STRUCT, len(self.vendorItemPricingList))
-
 
14966
      for iter359 in self.vendorItemPricingList:
-
 
14967
        iter359.write(oprot)
-
 
14968
      oprot.writeListEnd()
-
 
14969
      oprot.writeFieldEnd()
-
 
14970
    oprot.writeFieldStop()
-
 
14971
    oprot.writeStructEnd()
-
 
14972
 
-
 
14973
  def validate(self):
-
 
14974
    return
-
 
14975
 
-
 
14976
 
-
 
14977
  def __repr__(self):
-
 
14978
    L = ['%s=%r' % (key, value)
-
 
14979
      for key, value in self.__dict__.iteritems()]
-
 
14980
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14981
 
-
 
14982
  def __eq__(self, other):
-
 
14983
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14984
 
-
 
14985
  def __ne__(self, other):
-
 
14986
    return not (self == other)
-
 
14987
 
-
 
14988
class addVendorItemPricingInBulk_result:
-
 
14989
  """
-
 
14990
  Attributes:
-
 
14991
   - success
-
 
14992
  """
-
 
14993
 
-
 
14994
  thrift_spec = (
-
 
14995
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
-
 
14996
  )
-
 
14997
 
-
 
14998
  def __init__(self, success=None,):
-
 
14999
    self.success = success
-
 
15000
 
-
 
15001
  def read(self, iprot):
-
 
15002
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
15003
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
15004
      return
-
 
15005
    iprot.readStructBegin()
-
 
15006
    while True:
-
 
15007
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
15008
      if ftype == TType.STOP:
-
 
15009
        break
-
 
15010
      if fid == 0:
-
 
15011
        if ftype == TType.LIST:
-
 
15012
          self.success = []
-
 
15013
          (_etype363, _size360) = iprot.readListBegin()
-
 
15014
          for _i364 in xrange(_size360):
-
 
15015
            _elem365 = iprot.readI64();
-
 
15016
            self.success.append(_elem365)
-
 
15017
          iprot.readListEnd()
-
 
15018
        else:
-
 
15019
          iprot.skip(ftype)
-
 
15020
      else:
-
 
15021
        iprot.skip(ftype)
-
 
15022
      iprot.readFieldEnd()
-
 
15023
    iprot.readStructEnd()
-
 
15024
 
-
 
15025
  def write(self, oprot):
-
 
15026
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
15027
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
15028
      return
-
 
15029
    oprot.writeStructBegin('addVendorItemPricingInBulk_result')
-
 
15030
    if self.success is not None:
-
 
15031
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
15032
      oprot.writeListBegin(TType.I64, len(self.success))
-
 
15033
      for iter366 in self.success:
-
 
15034
        oprot.writeI64(iter366)
-
 
15035
      oprot.writeListEnd()
-
 
15036
      oprot.writeFieldEnd()
-
 
15037
    oprot.writeFieldStop()
-
 
15038
    oprot.writeStructEnd()
-
 
15039
 
-
 
15040
  def validate(self):
-
 
15041
    return
-
 
15042
 
-
 
15043
 
-
 
15044
  def __repr__(self):
-
 
15045
    L = ['%s=%r' % (key, value)
-
 
15046
      for key, value in self.__dict__.iteritems()]
-
 
15047
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
15048
 
-
 
15049
  def __eq__(self, other):
-
 
15050
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
15051
 
-
 
15052
  def __ne__(self, other):
-
 
15053
    return not (self == other)
-
 
15054
 
-
 
15055
class addInventoryInBulk_args:
-
 
15056
  """
-
 
15057
  Attributes:
-
 
15058
   - bulkInventoryList
-
 
15059
  """
-
 
15060
 
-
 
15061
  thrift_spec = (
-
 
15062
    None, # 0
-
 
15063
    (1, TType.LIST, 'bulkInventoryList', (TType.STRUCT,(BulkAddInventory, BulkAddInventory.thrift_spec)), None, ), # 1
-
 
15064
  )
-
 
15065
 
-
 
15066
  def __init__(self, bulkInventoryList=None,):
-
 
15067
    self.bulkInventoryList = bulkInventoryList
-
 
15068
 
-
 
15069
  def read(self, iprot):
-
 
15070
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
15071
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
15072
      return
-
 
15073
    iprot.readStructBegin()
-
 
15074
    while True:
-
 
15075
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
15076
      if ftype == TType.STOP:
-
 
15077
        break
-
 
15078
      if fid == 1:
-
 
15079
        if ftype == TType.LIST:
-
 
15080
          self.bulkInventoryList = []
-
 
15081
          (_etype370, _size367) = iprot.readListBegin()
-
 
15082
          for _i371 in xrange(_size367):
-
 
15083
            _elem372 = BulkAddInventory()
-
 
15084
            _elem372.read(iprot)
-
 
15085
            self.bulkInventoryList.append(_elem372)
-
 
15086
          iprot.readListEnd()
-
 
15087
        else:
-
 
15088
          iprot.skip(ftype)
-
 
15089
      else:
-
 
15090
        iprot.skip(ftype)
-
 
15091
      iprot.readFieldEnd()
-
 
15092
    iprot.readStructEnd()
-
 
15093
 
-
 
15094
  def write(self, oprot):
-
 
15095
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
15096
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
15097
      return
-
 
15098
    oprot.writeStructBegin('addInventoryInBulk_args')
-
 
15099
    if self.bulkInventoryList is not None:
-
 
15100
      oprot.writeFieldBegin('bulkInventoryList', TType.LIST, 1)
-
 
15101
      oprot.writeListBegin(TType.STRUCT, len(self.bulkInventoryList))
-
 
15102
      for iter373 in self.bulkInventoryList:
-
 
15103
        iter373.write(oprot)
-
 
15104
      oprot.writeListEnd()
-
 
15105
      oprot.writeFieldEnd()
-
 
15106
    oprot.writeFieldStop()
-
 
15107
    oprot.writeStructEnd()
-
 
15108
 
-
 
15109
  def validate(self):
-
 
15110
    return
-
 
15111
 
-
 
15112
 
-
 
15113
  def __repr__(self):
-
 
15114
    L = ['%s=%r' % (key, value)
-
 
15115
      for key, value in self.__dict__.iteritems()]
-
 
15116
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
15117
 
-
 
15118
  def __eq__(self, other):
-
 
15119
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
15120
 
-
 
15121
  def __ne__(self, other):
-
 
15122
    return not (self == other)
-
 
15123
 
-
 
15124
class addInventoryInBulk_result:
-
 
15125
  """
-
 
15126
  Attributes:
-
 
15127
   - cex
-
 
15128
  """
-
 
15129
 
-
 
15130
  thrift_spec = (
-
 
15131
    None, # 0
-
 
15132
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
-
 
15133
  )
-
 
15134
 
-
 
15135
  def __init__(self, cex=None,):
-
 
15136
    self.cex = cex
-
 
15137
 
-
 
15138
  def read(self, iprot):
-
 
15139
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
15140
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
15141
      return
-
 
15142
    iprot.readStructBegin()
-
 
15143
    while True:
-
 
15144
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
15145
      if ftype == TType.STOP:
-
 
15146
        break
-
 
15147
      if fid == 1:
-
 
15148
        if ftype == TType.STRUCT:
-
 
15149
          self.cex = InventoryServiceException()
-
 
15150
          self.cex.read(iprot)
-
 
15151
        else:
-
 
15152
          iprot.skip(ftype)
-
 
15153
      else:
-
 
15154
        iprot.skip(ftype)
-
 
15155
      iprot.readFieldEnd()
-
 
15156
    iprot.readStructEnd()
-
 
15157
 
-
 
15158
  def write(self, oprot):
-
 
15159
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
15160
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
15161
      return
-
 
15162
    oprot.writeStructBegin('addInventoryInBulk_result')
-
 
15163
    if self.cex is not None:
-
 
15164
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
-
 
15165
      self.cex.write(oprot)
-
 
15166
      oprot.writeFieldEnd()
-
 
15167
    oprot.writeFieldStop()
-
 
15168
    oprot.writeStructEnd()
-
 
15169
 
-
 
15170
  def validate(self):
14804
    return
15171
    return
14805
 
15172
 
14806
 
15173
 
14807
  def __repr__(self):
15174
  def __repr__(self):
14808
    L = ['%s=%r' % (key, value)
15175
    L = ['%s=%r' % (key, value)