Subversion Repositories SmartDukaan

Rev

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

Rev 19247 Rev 19686
Line 1382... Line 1382...
1382
    Parameters:
1382
    Parameters:
1383
     - itemPricingList
1383
     - itemPricingList
1384
    """
1384
    """
1385
    pass
1385
    pass
1386
 
1386
 
-
 
1387
  def bulkUpdateCatalog(self, bulkUploadCatalog):
-
 
1388
    """
-
 
1389
    Parameters:
-
 
1390
     - bulkUploadCatalog
-
 
1391
    """
-
 
1392
    pass
-
 
1393
 
1387
 
1394
 
1388
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1395
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1389
  def __init__(self, iprot, oprot=None):
1396
  def __init__(self, iprot, oprot=None):
1390
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1397
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1391
 
1398
 
Line 7378... Line 7385...
7378
    self._iprot.readMessageEnd()
7385
    self._iprot.readMessageEnd()
7379
    if result.success is not None:
7386
    if result.success is not None:
7380
      return result.success
7387
      return result.success
7381
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemPricing failed: unknown result");
7388
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemPricing failed: unknown result");
7382
 
7389
 
-
 
7390
  def bulkUpdateCatalog(self, bulkUploadCatalog):
-
 
7391
    """
-
 
7392
    Parameters:
-
 
7393
     - bulkUploadCatalog
-
 
7394
    """
-
 
7395
    self.send_bulkUpdateCatalog(bulkUploadCatalog)
-
 
7396
    self.recv_bulkUpdateCatalog()
-
 
7397
 
-
 
7398
  def send_bulkUpdateCatalog(self, bulkUploadCatalog):
-
 
7399
    self._oprot.writeMessageBegin('bulkUpdateCatalog', TMessageType.CALL, self._seqid)
-
 
7400
    args = bulkUpdateCatalog_args()
-
 
7401
    args.bulkUploadCatalog = bulkUploadCatalog
-
 
7402
    args.write(self._oprot)
-
 
7403
    self._oprot.writeMessageEnd()
-
 
7404
    self._oprot.trans.flush()
-
 
7405
 
-
 
7406
  def recv_bulkUpdateCatalog(self, ):
-
 
7407
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7408
    if mtype == TMessageType.EXCEPTION:
-
 
7409
      x = TApplicationException()
-
 
7410
      x.read(self._iprot)
-
 
7411
      self._iprot.readMessageEnd()
-
 
7412
      raise x
-
 
7413
    result = bulkUpdateCatalog_result()
-
 
7414
    result.read(self._iprot)
-
 
7415
    self._iprot.readMessageEnd()
-
 
7416
    if result.cex is not None:
-
 
7417
      raise result.cex
-
 
7418
    return
-
 
7419
 
7383
 
7420
 
7384
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7421
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7385
  def __init__(self, handler):
7422
  def __init__(self, handler):
7386
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7423
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7387
    self._processMap["addItem"] = Processor.process_addItem
7424
    self._processMap["addItem"] = Processor.process_addItem
Line 7579... Line 7616...
7579
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7616
    self._processMap["deleteBulkPricingForItem"] = Processor.process_deleteBulkPricingForItem
7580
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7617
    self._processMap["getBulkPricingByItemId"] = Processor.process_getBulkPricingByItemId
7581
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
7618
    self._processMap["updateBulkPricesOnProduction"] = Processor.process_updateBulkPricesOnProduction
7582
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
7619
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
7583
    self._processMap["updateItemPricing"] = Processor.process_updateItemPricing
7620
    self._processMap["updateItemPricing"] = Processor.process_updateItemPricing
-
 
7621
    self._processMap["bulkUpdateCatalog"] = Processor.process_bulkUpdateCatalog
7584
 
7622
 
7585
  def process(self, iprot, oprot):
7623
  def process(self, iprot, oprot):
7586
    (name, type, seqid) = iprot.readMessageBegin()
7624
    (name, type, seqid) = iprot.readMessageBegin()
7587
    if name not in self._processMap:
7625
    if name not in self._processMap:
7588
      iprot.skip(TType.STRUCT)
7626
      iprot.skip(TType.STRUCT)
Line 9906... Line 9944...
9906
    oprot.writeMessageBegin("updateItemPricing", TMessageType.REPLY, seqid)
9944
    oprot.writeMessageBegin("updateItemPricing", TMessageType.REPLY, seqid)
9907
    result.write(oprot)
9945
    result.write(oprot)
9908
    oprot.writeMessageEnd()
9946
    oprot.writeMessageEnd()
9909
    oprot.trans.flush()
9947
    oprot.trans.flush()
9910
 
9948
 
-
 
9949
  def process_bulkUpdateCatalog(self, seqid, iprot, oprot):
-
 
9950
    args = bulkUpdateCatalog_args()
-
 
9951
    args.read(iprot)
-
 
9952
    iprot.readMessageEnd()
-
 
9953
    result = bulkUpdateCatalog_result()
-
 
9954
    try:
-
 
9955
      self._handler.bulkUpdateCatalog(args.bulkUploadCatalog)
-
 
9956
    except CatalogServiceException, cex:
-
 
9957
      result.cex = cex
-
 
9958
    oprot.writeMessageBegin("bulkUpdateCatalog", TMessageType.REPLY, seqid)
-
 
9959
    result.write(oprot)
-
 
9960
    oprot.writeMessageEnd()
-
 
9961
    oprot.trans.flush()
-
 
9962
 
9911
 
9963
 
9912
# HELPER FUNCTIONS AND STRUCTURES
9964
# HELPER FUNCTIONS AND STRUCTURES
9913
 
9965
 
9914
class addItem_args:
9966
class addItem_args:
9915
  """
9967
  """
Line 34962... Line 35014...
34962
      oprot.writeFieldEnd()
35014
      oprot.writeFieldEnd()
34963
    oprot.writeFieldStop()
35015
    oprot.writeFieldStop()
34964
    oprot.writeStructEnd()
35016
    oprot.writeStructEnd()
34965
 
35017
 
34966
  def validate(self):
35018
  def validate(self):
-
 
35019
    return
-
 
35020
 
-
 
35021
 
-
 
35022
  def __repr__(self):
-
 
35023
    L = ['%s=%r' % (key, value)
-
 
35024
      for key, value in self.__dict__.iteritems()]
-
 
35025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
35026
 
-
 
35027
  def __eq__(self, other):
-
 
35028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
35029
 
-
 
35030
  def __ne__(self, other):
-
 
35031
    return not (self == other)
-
 
35032
 
-
 
35033
class bulkUpdateCatalog_args:
-
 
35034
  """
-
 
35035
  Attributes:
-
 
35036
   - bulkUploadCatalog
-
 
35037
  """
-
 
35038
 
-
 
35039
  thrift_spec = (
-
 
35040
    None, # 0
-
 
35041
    (1, TType.LIST, 'bulkUploadCatalog', (TType.STRUCT,(BulkUploadCatalog, BulkUploadCatalog.thrift_spec)), None, ), # 1
-
 
35042
  )
-
 
35043
 
-
 
35044
  def __init__(self, bulkUploadCatalog=None,):
-
 
35045
    self.bulkUploadCatalog = bulkUploadCatalog
-
 
35046
 
-
 
35047
  def read(self, iprot):
-
 
35048
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
35049
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
35050
      return
-
 
35051
    iprot.readStructBegin()
-
 
35052
    while True:
-
 
35053
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
35054
      if ftype == TType.STOP:
-
 
35055
        break
-
 
35056
      if fid == 1:
-
 
35057
        if ftype == TType.LIST:
-
 
35058
          self.bulkUploadCatalog = []
-
 
35059
          (_etype936, _size933) = iprot.readListBegin()
-
 
35060
          for _i937 in xrange(_size933):
-
 
35061
            _elem938 = BulkUploadCatalog()
-
 
35062
            _elem938.read(iprot)
-
 
35063
            self.bulkUploadCatalog.append(_elem938)
-
 
35064
          iprot.readListEnd()
-
 
35065
        else:
-
 
35066
          iprot.skip(ftype)
-
 
35067
      else:
-
 
35068
        iprot.skip(ftype)
-
 
35069
      iprot.readFieldEnd()
-
 
35070
    iprot.readStructEnd()
-
 
35071
 
-
 
35072
  def write(self, oprot):
-
 
35073
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
35074
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
35075
      return
-
 
35076
    oprot.writeStructBegin('bulkUpdateCatalog_args')
-
 
35077
    if self.bulkUploadCatalog is not None:
-
 
35078
      oprot.writeFieldBegin('bulkUploadCatalog', TType.LIST, 1)
-
 
35079
      oprot.writeListBegin(TType.STRUCT, len(self.bulkUploadCatalog))
-
 
35080
      for iter939 in self.bulkUploadCatalog:
-
 
35081
        iter939.write(oprot)
-
 
35082
      oprot.writeListEnd()
-
 
35083
      oprot.writeFieldEnd()
-
 
35084
    oprot.writeFieldStop()
-
 
35085
    oprot.writeStructEnd()
-
 
35086
 
-
 
35087
  def validate(self):
-
 
35088
    return
-
 
35089
 
-
 
35090
 
-
 
35091
  def __repr__(self):
-
 
35092
    L = ['%s=%r' % (key, value)
-
 
35093
      for key, value in self.__dict__.iteritems()]
-
 
35094
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
35095
 
-
 
35096
  def __eq__(self, other):
-
 
35097
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
35098
 
-
 
35099
  def __ne__(self, other):
-
 
35100
    return not (self == other)
-
 
35101
 
-
 
35102
class bulkUpdateCatalog_result:
-
 
35103
  """
-
 
35104
  Attributes:
-
 
35105
   - cex
-
 
35106
  """
-
 
35107
 
-
 
35108
  thrift_spec = (
-
 
35109
    None, # 0
-
 
35110
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
-
 
35111
  )
-
 
35112
 
-
 
35113
  def __init__(self, cex=None,):
-
 
35114
    self.cex = cex
-
 
35115
 
-
 
35116
  def read(self, iprot):
-
 
35117
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
35118
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
35119
      return
-
 
35120
    iprot.readStructBegin()
-
 
35121
    while True:
-
 
35122
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
35123
      if ftype == TType.STOP:
-
 
35124
        break
-
 
35125
      if fid == 1:
-
 
35126
        if ftype == TType.STRUCT:
-
 
35127
          self.cex = CatalogServiceException()
-
 
35128
          self.cex.read(iprot)
-
 
35129
        else:
-
 
35130
          iprot.skip(ftype)
-
 
35131
      else:
-
 
35132
        iprot.skip(ftype)
-
 
35133
      iprot.readFieldEnd()
-
 
35134
    iprot.readStructEnd()
-
 
35135
 
-
 
35136
  def write(self, oprot):
-
 
35137
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
35138
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
35139
      return
-
 
35140
    oprot.writeStructBegin('bulkUpdateCatalog_result')
-
 
35141
    if self.cex is not None:
-
 
35142
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
-
 
35143
      self.cex.write(oprot)
-
 
35144
      oprot.writeFieldEnd()
-
 
35145
    oprot.writeFieldStop()
-
 
35146
    oprot.writeStructEnd()
-
 
35147
 
-
 
35148
  def validate(self):
34967
    return
35149
    return
34968
 
35150
 
34969
 
35151
 
34970
  def __repr__(self):
35152
  def __repr__(self):
34971
    L = ['%s=%r' % (key, value)
35153
    L = ['%s=%r' % (key, value)