Subversion Repositories SmartDukaan

Rev

Rev 12696 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12696 Rev 13214
Line 356... Line 356...
356
    Parameters:
356
    Parameters:
357
     - dealer
357
     - dealer
358
    """
358
    """
359
    pass
359
    pass
360
 
360
 
-
 
361
  def addCampaignNotification(self, email, campaignType):
-
 
362
    """
-
 
363
    Parameters:
-
 
364
     - email
-
 
365
     - campaignType
-
 
366
    """
-
 
367
    pass
-
 
368
 
361
 
369
 
362
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
370
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
363
  def __init__(self, iprot, oprot=None):
371
  def __init__(self, iprot, oprot=None):
364
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
372
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
365
 
373
 
Line 1754... Line 1762...
1754
    self._iprot.readMessageEnd()
1762
    self._iprot.readMessageEnd()
1755
    if result.success is not None:
1763
    if result.success is not None:
1756
      return result.success
1764
      return result.success
1757
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authoriseDealer failed: unknown result");
1765
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authoriseDealer failed: unknown result");
1758
 
1766
 
-
 
1767
  def addCampaignNotification(self, email, campaignType):
-
 
1768
    """
-
 
1769
    Parameters:
-
 
1770
     - email
-
 
1771
     - campaignType
-
 
1772
    """
-
 
1773
    self.send_addCampaignNotification(email, campaignType)
-
 
1774
    return self.recv_addCampaignNotification()
-
 
1775
 
-
 
1776
  def send_addCampaignNotification(self, email, campaignType):
-
 
1777
    self._oprot.writeMessageBegin('addCampaignNotification', TMessageType.CALL, self._seqid)
-
 
1778
    args = addCampaignNotification_args()
-
 
1779
    args.email = email
-
 
1780
    args.campaignType = campaignType
-
 
1781
    args.write(self._oprot)
-
 
1782
    self._oprot.writeMessageEnd()
-
 
1783
    self._oprot.trans.flush()
-
 
1784
 
-
 
1785
  def recv_addCampaignNotification(self, ):
-
 
1786
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1787
    if mtype == TMessageType.EXCEPTION:
-
 
1788
      x = TApplicationException()
-
 
1789
      x.read(self._iprot)
-
 
1790
      self._iprot.readMessageEnd()
-
 
1791
      raise x
-
 
1792
    result = addCampaignNotification_result()
-
 
1793
    result.read(self._iprot)
-
 
1794
    self._iprot.readMessageEnd()
-
 
1795
    if result.success is not None:
-
 
1796
      return result.success
-
 
1797
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addCampaignNotification failed: unknown result");
-
 
1798
 
1759
 
1799
 
1760
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1800
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1761
  def __init__(self, handler):
1801
  def __init__(self, handler):
1762
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1802
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1763
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
1803
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
Line 1801... Line 1841...
1801
    self._processMap["markMessagesAsSentToOperator"] = Processor.process_markMessagesAsSentToOperator
1841
    self._processMap["markMessagesAsSentToOperator"] = Processor.process_markMessagesAsSentToOperator
1802
    self._processMap["markMessagesAsSubmittedToSmsc"] = Processor.process_markMessagesAsSubmittedToSmsc
1842
    self._processMap["markMessagesAsSubmittedToSmsc"] = Processor.process_markMessagesAsSubmittedToSmsc
1803
    self._processMap["markMessagesAsSent"] = Processor.process_markMessagesAsSent
1843
    self._processMap["markMessagesAsSent"] = Processor.process_markMessagesAsSent
1804
    self._processMap["markMessagesAsRetry"] = Processor.process_markMessagesAsRetry
1844
    self._processMap["markMessagesAsRetry"] = Processor.process_markMessagesAsRetry
1805
    self._processMap["authoriseDealer"] = Processor.process_authoriseDealer
1845
    self._processMap["authoriseDealer"] = Processor.process_authoriseDealer
-
 
1846
    self._processMap["addCampaignNotification"] = Processor.process_addCampaignNotification
1806
 
1847
 
1807
  def process(self, iprot, oprot):
1848
  def process(self, iprot, oprot):
1808
    (name, type, seqid) = iprot.readMessageBegin()
1849
    (name, type, seqid) = iprot.readMessageBegin()
1809
    if name not in self._processMap:
1850
    if name not in self._processMap:
1810
      iprot.skip(TType.STRUCT)
1851
      iprot.skip(TType.STRUCT)
Line 2377... Line 2418...
2377
    oprot.writeMessageBegin("authoriseDealer", TMessageType.REPLY, seqid)
2418
    oprot.writeMessageBegin("authoriseDealer", TMessageType.REPLY, seqid)
2378
    result.write(oprot)
2419
    result.write(oprot)
2379
    oprot.writeMessageEnd()
2420
    oprot.writeMessageEnd()
2380
    oprot.trans.flush()
2421
    oprot.trans.flush()
2381
 
2422
 
-
 
2423
  def process_addCampaignNotification(self, seqid, iprot, oprot):
-
 
2424
    args = addCampaignNotification_args()
-
 
2425
    args.read(iprot)
-
 
2426
    iprot.readMessageEnd()
-
 
2427
    result = addCampaignNotification_result()
-
 
2428
    result.success = self._handler.addCampaignNotification(args.email, args.campaignType)
-
 
2429
    oprot.writeMessageBegin("addCampaignNotification", TMessageType.REPLY, seqid)
-
 
2430
    result.write(oprot)
-
 
2431
    oprot.writeMessageEnd()
-
 
2432
    oprot.trans.flush()
-
 
2433
 
2382
 
2434
 
2383
# HELPER FUNCTIONS AND STRUCTURES
2435
# HELPER FUNCTIONS AND STRUCTURES
2384
 
2436
 
2385
class saveUserEmailForSending_args:
2437
class saveUserEmailForSending_args:
2386
  """
2438
  """
Line 8186... Line 8238...
8186
      oprot.writeFieldEnd()
8238
      oprot.writeFieldEnd()
8187
    oprot.writeFieldStop()
8239
    oprot.writeFieldStop()
8188
    oprot.writeStructEnd()
8240
    oprot.writeStructEnd()
8189
 
8241
 
8190
  def validate(self):
8242
  def validate(self):
-
 
8243
    return
-
 
8244
 
-
 
8245
 
-
 
8246
  def __repr__(self):
-
 
8247
    L = ['%s=%r' % (key, value)
-
 
8248
      for key, value in self.__dict__.iteritems()]
-
 
8249
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8250
 
-
 
8251
  def __eq__(self, other):
-
 
8252
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8253
 
-
 
8254
  def __ne__(self, other):
-
 
8255
    return not (self == other)
-
 
8256
 
-
 
8257
class addCampaignNotification_args:
-
 
8258
  """
-
 
8259
  Attributes:
-
 
8260
   - email
-
 
8261
   - campaignType
-
 
8262
  """
-
 
8263
 
-
 
8264
  thrift_spec = (
-
 
8265
    None, # 0
-
 
8266
    (1, TType.STRING, 'email', None, None, ), # 1
-
 
8267
    (2, TType.I64, 'campaignType', None, None, ), # 2
-
 
8268
  )
-
 
8269
 
-
 
8270
  def __init__(self, email=None, campaignType=None,):
-
 
8271
    self.email = email
-
 
8272
    self.campaignType = campaignType
-
 
8273
 
-
 
8274
  def read(self, iprot):
-
 
8275
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8276
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8277
      return
-
 
8278
    iprot.readStructBegin()
-
 
8279
    while True:
-
 
8280
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8281
      if ftype == TType.STOP:
-
 
8282
        break
-
 
8283
      if fid == 1:
-
 
8284
        if ftype == TType.STRING:
-
 
8285
          self.email = iprot.readString();
-
 
8286
        else:
-
 
8287
          iprot.skip(ftype)
-
 
8288
      elif fid == 2:
-
 
8289
        if ftype == TType.I64:
-
 
8290
          self.campaignType = iprot.readI64();
-
 
8291
        else:
-
 
8292
          iprot.skip(ftype)
-
 
8293
      else:
-
 
8294
        iprot.skip(ftype)
-
 
8295
      iprot.readFieldEnd()
-
 
8296
    iprot.readStructEnd()
-
 
8297
 
-
 
8298
  def write(self, oprot):
-
 
8299
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8300
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8301
      return
-
 
8302
    oprot.writeStructBegin('addCampaignNotification_args')
-
 
8303
    if self.email is not None:
-
 
8304
      oprot.writeFieldBegin('email', TType.STRING, 1)
-
 
8305
      oprot.writeString(self.email)
-
 
8306
      oprot.writeFieldEnd()
-
 
8307
    if self.campaignType is not None:
-
 
8308
      oprot.writeFieldBegin('campaignType', TType.I64, 2)
-
 
8309
      oprot.writeI64(self.campaignType)
-
 
8310
      oprot.writeFieldEnd()
-
 
8311
    oprot.writeFieldStop()
-
 
8312
    oprot.writeStructEnd()
-
 
8313
 
-
 
8314
  def validate(self):
-
 
8315
    return
-
 
8316
 
-
 
8317
 
-
 
8318
  def __repr__(self):
-
 
8319
    L = ['%s=%r' % (key, value)
-
 
8320
      for key, value in self.__dict__.iteritems()]
-
 
8321
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8322
 
-
 
8323
  def __eq__(self, other):
-
 
8324
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8325
 
-
 
8326
  def __ne__(self, other):
-
 
8327
    return not (self == other)
-
 
8328
 
-
 
8329
class addCampaignNotification_result:
-
 
8330
  """
-
 
8331
  Attributes:
-
 
8332
   - success
-
 
8333
  """
-
 
8334
 
-
 
8335
  thrift_spec = (
-
 
8336
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
8337
  )
-
 
8338
 
-
 
8339
  def __init__(self, success=None,):
-
 
8340
    self.success = success
-
 
8341
 
-
 
8342
  def read(self, iprot):
-
 
8343
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8344
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8345
      return
-
 
8346
    iprot.readStructBegin()
-
 
8347
    while True:
-
 
8348
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8349
      if ftype == TType.STOP:
-
 
8350
        break
-
 
8351
      if fid == 0:
-
 
8352
        if ftype == TType.STRING:
-
 
8353
          self.success = iprot.readString();
-
 
8354
        else:
-
 
8355
          iprot.skip(ftype)
-
 
8356
      else:
-
 
8357
        iprot.skip(ftype)
-
 
8358
      iprot.readFieldEnd()
-
 
8359
    iprot.readStructEnd()
-
 
8360
 
-
 
8361
  def write(self, oprot):
-
 
8362
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8363
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8364
      return
-
 
8365
    oprot.writeStructBegin('addCampaignNotification_result')
-
 
8366
    if self.success is not None:
-
 
8367
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
8368
      oprot.writeString(self.success)
-
 
8369
      oprot.writeFieldEnd()
-
 
8370
    oprot.writeFieldStop()
-
 
8371
    oprot.writeStructEnd()
-
 
8372
 
-
 
8373
  def validate(self):
8191
    return
8374
    return
8192
 
8375
 
8193
 
8376
 
8194
  def __repr__(self):
8377
  def __repr__(self):
8195
    L = ['%s=%r' % (key, value)
8378
    L = ['%s=%r' % (key, value)