Subversion Repositories SmartDukaan

Rev

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

Rev 4996 Rev 5055
Line 243... Line 243...
243
     - url
243
     - url
244
     - text
244
     - text
245
    """
245
    """
246
    pass
246
    pass
247
 
247
 
-
 
248
  def getEmailsForNotificationsSent(self, startDatetime, endDatetime):
-
 
249
    """
-
 
250
    Returns a list of emails to which product notifications have been sent in a given date range
-
 
251
 
-
 
252
    Parameters:
-
 
253
     - startDatetime
-
 
254
     - endDatetime
-
 
255
    """
-
 
256
    pass
-
 
257
 
248
 
258
 
249
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
259
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
250
  def __init__(self, iprot, oprot=None):
260
  def __init__(self, iprot, oprot=None):
251
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
261
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
252
 
262
 
Line 1141... Line 1151...
1141
    self._iprot.readMessageEnd()
1151
    self._iprot.readMessageEnd()
1142
    if result.hse is not None:
1152
    if result.hse is not None:
1143
      raise result.hse
1153
      raise result.hse
1144
    return
1154
    return
1145
 
1155
 
-
 
1156
  def getEmailsForNotificationsSent(self, startDatetime, endDatetime):
-
 
1157
    """
-
 
1158
    Returns a list of emails to which product notifications have been sent in a given date range
-
 
1159
 
-
 
1160
    Parameters:
-
 
1161
     - startDatetime
-
 
1162
     - endDatetime
-
 
1163
    """
-
 
1164
    self.send_getEmailsForNotificationsSent(startDatetime, endDatetime)
-
 
1165
    return self.recv_getEmailsForNotificationsSent()
-
 
1166
 
-
 
1167
  def send_getEmailsForNotificationsSent(self, startDatetime, endDatetime):
-
 
1168
    self._oprot.writeMessageBegin('getEmailsForNotificationsSent', TMessageType.CALL, self._seqid)
-
 
1169
    args = getEmailsForNotificationsSent_args()
-
 
1170
    args.startDatetime = startDatetime
-
 
1171
    args.endDatetime = endDatetime
-
 
1172
    args.write(self._oprot)
-
 
1173
    self._oprot.writeMessageEnd()
-
 
1174
    self._oprot.trans.flush()
-
 
1175
 
-
 
1176
  def recv_getEmailsForNotificationsSent(self, ):
-
 
1177
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1178
    if mtype == TMessageType.EXCEPTION:
-
 
1179
      x = TApplicationException()
-
 
1180
      x.read(self._iprot)
-
 
1181
      self._iprot.readMessageEnd()
-
 
1182
      raise x
-
 
1183
    result = getEmailsForNotificationsSent_result()
-
 
1184
    result.read(self._iprot)
-
 
1185
    self._iprot.readMessageEnd()
-
 
1186
    if result.success is not None:
-
 
1187
      return result.success
-
 
1188
    if result.hse is not None:
-
 
1189
      raise result.hse
-
 
1190
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmailsForNotificationsSent failed: unknown result");
-
 
1191
 
1146
 
1192
 
1147
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1193
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1148
  def __init__(self, handler):
1194
  def __init__(self, handler):
1149
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1195
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1150
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
1196
    self._processMap["saveUserEmailForSending"] = Processor.process_saveUserEmailForSending
Line 1172... Line 1218...
1172
    self._processMap["getRoleNamesForAgent"] = Processor.process_getRoleNamesForAgent
1218
    self._processMap["getRoleNamesForAgent"] = Processor.process_getRoleNamesForAgent
1173
    self._processMap["getPermissionsForRoleName"] = Processor.process_getPermissionsForRoleName
1219
    self._processMap["getPermissionsForRoleName"] = Processor.process_getPermissionsForRoleName
1174
    self._processMap["saveQuickLink"] = Processor.process_saveQuickLink
1220
    self._processMap["saveQuickLink"] = Processor.process_saveQuickLink
1175
    self._processMap["getQuickLinks"] = Processor.process_getQuickLinks
1221
    self._processMap["getQuickLinks"] = Processor.process_getQuickLinks
1176
    self._processMap["updateQuickLink"] = Processor.process_updateQuickLink
1222
    self._processMap["updateQuickLink"] = Processor.process_updateQuickLink
-
 
1223
    self._processMap["getEmailsForNotificationsSent"] = Processor.process_getEmailsForNotificationsSent
1177
 
1224
 
1178
  def process(self, iprot, oprot):
1225
  def process(self, iprot, oprot):
1179
    (name, type, seqid) = iprot.readMessageBegin()
1226
    (name, type, seqid) = iprot.readMessageBegin()
1180
    if name not in self._processMap:
1227
    if name not in self._processMap:
1181
      iprot.skip(TType.STRUCT)
1228
      iprot.skip(TType.STRUCT)
Line 1548... Line 1595...
1548
    oprot.writeMessageBegin("updateQuickLink", TMessageType.REPLY, seqid)
1595
    oprot.writeMessageBegin("updateQuickLink", TMessageType.REPLY, seqid)
1549
    result.write(oprot)
1596
    result.write(oprot)
1550
    oprot.writeMessageEnd()
1597
    oprot.writeMessageEnd()
1551
    oprot.trans.flush()
1598
    oprot.trans.flush()
1552
 
1599
 
-
 
1600
  def process_getEmailsForNotificationsSent(self, seqid, iprot, oprot):
-
 
1601
    args = getEmailsForNotificationsSent_args()
-
 
1602
    args.read(iprot)
-
 
1603
    iprot.readMessageEnd()
-
 
1604
    result = getEmailsForNotificationsSent_result()
-
 
1605
    try:
-
 
1606
      result.success = self._handler.getEmailsForNotificationsSent(args.startDatetime, args.endDatetime)
-
 
1607
    except HelperServiceException, hse:
-
 
1608
      result.hse = hse
-
 
1609
    oprot.writeMessageBegin("getEmailsForNotificationsSent", TMessageType.REPLY, seqid)
-
 
1610
    result.write(oprot)
-
 
1611
    oprot.writeMessageEnd()
-
 
1612
    oprot.trans.flush()
-
 
1613
 
1553
 
1614
 
1554
# HELPER FUNCTIONS AND STRUCTURES
1615
# HELPER FUNCTIONS AND STRUCTURES
1555
 
1616
 
1556
class saveUserEmailForSending_args:
1617
class saveUserEmailForSending_args:
1557
  """
1618
  """
Line 5217... Line 5278...
5217
    if self.hse is not None:
5278
    if self.hse is not None:
5218
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
5279
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
5219
      self.hse.write(oprot)
5280
      self.hse.write(oprot)
5220
      oprot.writeFieldEnd()
5281
      oprot.writeFieldEnd()
5221
    oprot.writeFieldStop()
5282
    oprot.writeFieldStop()
-
 
5283
    oprot.writeStructEnd()
-
 
5284
 
-
 
5285
  def validate(self):
-
 
5286
    return
-
 
5287
 
-
 
5288
 
-
 
5289
  def __repr__(self):
-
 
5290
    L = ['%s=%r' % (key, value)
-
 
5291
      for key, value in self.__dict__.iteritems()]
-
 
5292
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5293
 
-
 
5294
  def __eq__(self, other):
-
 
5295
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5296
 
-
 
5297
  def __ne__(self, other):
-
 
5298
    return not (self == other)
-
 
5299
 
-
 
5300
class getEmailsForNotificationsSent_args:
-
 
5301
  """
-
 
5302
  Attributes:
-
 
5303
   - startDatetime
-
 
5304
   - endDatetime
-
 
5305
  """
-
 
5306
 
-
 
5307
  thrift_spec = (
-
 
5308
    None, # 0
-
 
5309
    (1, TType.I64, 'startDatetime', None, None, ), # 1
-
 
5310
    (2, TType.I64, 'endDatetime', None, None, ), # 2
-
 
5311
  )
-
 
5312
 
-
 
5313
  def __init__(self, startDatetime=None, endDatetime=None,):
-
 
5314
    self.startDatetime = startDatetime
-
 
5315
    self.endDatetime = endDatetime
-
 
5316
 
-
 
5317
  def read(self, iprot):
-
 
5318
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5319
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5320
      return
-
 
5321
    iprot.readStructBegin()
-
 
5322
    while True:
-
 
5323
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5324
      if ftype == TType.STOP:
-
 
5325
        break
-
 
5326
      if fid == 1:
-
 
5327
        if ftype == TType.I64:
-
 
5328
          self.startDatetime = iprot.readI64();
-
 
5329
        else:
-
 
5330
          iprot.skip(ftype)
-
 
5331
      elif fid == 2:
-
 
5332
        if ftype == TType.I64:
-
 
5333
          self.endDatetime = iprot.readI64();
-
 
5334
        else:
-
 
5335
          iprot.skip(ftype)
-
 
5336
      else:
-
 
5337
        iprot.skip(ftype)
-
 
5338
      iprot.readFieldEnd()
-
 
5339
    iprot.readStructEnd()
-
 
5340
 
-
 
5341
  def write(self, oprot):
-
 
5342
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5343
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5344
      return
-
 
5345
    oprot.writeStructBegin('getEmailsForNotificationsSent_args')
-
 
5346
    if self.startDatetime is not None:
-
 
5347
      oprot.writeFieldBegin('startDatetime', TType.I64, 1)
-
 
5348
      oprot.writeI64(self.startDatetime)
-
 
5349
      oprot.writeFieldEnd()
-
 
5350
    if self.endDatetime is not None:
-
 
5351
      oprot.writeFieldBegin('endDatetime', TType.I64, 2)
-
 
5352
      oprot.writeI64(self.endDatetime)
-
 
5353
      oprot.writeFieldEnd()
-
 
5354
    oprot.writeFieldStop()
-
 
5355
    oprot.writeStructEnd()
-
 
5356
 
-
 
5357
  def validate(self):
-
 
5358
    return
-
 
5359
 
-
 
5360
 
-
 
5361
  def __repr__(self):
-
 
5362
    L = ['%s=%r' % (key, value)
-
 
5363
      for key, value in self.__dict__.iteritems()]
-
 
5364
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5365
 
-
 
5366
  def __eq__(self, other):
-
 
5367
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5368
 
-
 
5369
  def __ne__(self, other):
-
 
5370
    return not (self == other)
-
 
5371
 
-
 
5372
class getEmailsForNotificationsSent_result:
-
 
5373
  """
-
 
5374
  Attributes:
-
 
5375
   - success
-
 
5376
   - hse
-
 
5377
  """
-
 
5378
 
-
 
5379
  thrift_spec = (
-
 
5380
    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
-
 
5381
    (1, TType.STRUCT, 'hse', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
5382
  )
-
 
5383
 
-
 
5384
  def __init__(self, success=None, hse=None,):
-
 
5385
    self.success = success
-
 
5386
    self.hse = hse
-
 
5387
 
-
 
5388
  def read(self, iprot):
-
 
5389
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5390
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5391
      return
-
 
5392
    iprot.readStructBegin()
-
 
5393
    while True:
-
 
5394
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5395
      if ftype == TType.STOP:
-
 
5396
        break
-
 
5397
      if fid == 0:
-
 
5398
        if ftype == TType.LIST:
-
 
5399
          self.success = []
-
 
5400
          (_etype75, _size72) = iprot.readListBegin()
-
 
5401
          for _i76 in xrange(_size72):
-
 
5402
            _elem77 = iprot.readString();
-
 
5403
            self.success.append(_elem77)
-
 
5404
          iprot.readListEnd()
-
 
5405
        else:
-
 
5406
          iprot.skip(ftype)
-
 
5407
      elif fid == 1:
-
 
5408
        if ftype == TType.STRUCT:
-
 
5409
          self.hse = HelperServiceException()
-
 
5410
          self.hse.read(iprot)
-
 
5411
        else:
-
 
5412
          iprot.skip(ftype)
-
 
5413
      else:
-
 
5414
        iprot.skip(ftype)
-
 
5415
      iprot.readFieldEnd()
-
 
5416
    iprot.readStructEnd()
-
 
5417
 
-
 
5418
  def write(self, oprot):
-
 
5419
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5420
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5421
      return
-
 
5422
    oprot.writeStructBegin('getEmailsForNotificationsSent_result')
-
 
5423
    if self.success is not None:
-
 
5424
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
5425
      oprot.writeListBegin(TType.STRING, len(self.success))
-
 
5426
      for iter78 in self.success:
-
 
5427
        oprot.writeString(iter78)
-
 
5428
      oprot.writeListEnd()
-
 
5429
      oprot.writeFieldEnd()
-
 
5430
    if self.hse is not None:
-
 
5431
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
-
 
5432
      self.hse.write(oprot)
-
 
5433
      oprot.writeFieldEnd()
-
 
5434
    oprot.writeFieldStop()
5222
    oprot.writeStructEnd()
5435
    oprot.writeStructEnd()
5223
 
5436
 
5224
  def validate(self):
5437
  def validate(self):
5225
    return
5438
    return
5226
 
5439