NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

sovIHubBillAboutToExpire.py (1240B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\notifications\common\formatters\sovIHubBillAboutToExpire.py
      2 from notifications.common.formatters.baseFormatter import BaseNotificationFormatter
      3 from localization import GetByLabel
      4 CORP_ID = 'corpID'
      5 SOLAR_SYSTEM_ID = 'solarSystemID'
      6 DUE_DATETIME = 'dueDate'
      7 BILL_ID = 'billID'
      8 
      9 class IHubBillAboutToExpire(BaseNotificationFormatter):
     10 
     11     def __init__(self):
     12         BaseNotificationFormatter.__init__(self, subjectLabel='Notifications/subjSovereigntyIHubBillWarning', bodyLabel='Notifications/bodySovereigntyIHubBillWarning')
     13 
     14     def Format(self, notification):
     15         data = notification.data
     16         notification.subject = GetByLabel(self.subjectLabel)
     17         notification.body = GetByLabel(self.bodyLabel, solarSystemID=data[SOLAR_SYSTEM_ID], dueDate=data[DUE_DATETIME])
     18 
     19     @staticmethod
     20     def MakeData(billID, corporationID, solarSystemID, dueDateTime):
     21         return {BILL_ID: billID,
     22          CORP_ID: corporationID,
     23          SOLAR_SYSTEM_ID: solarSystemID,
     24          DUE_DATETIME: dueDateTime}
     25 
     26     @staticmethod
     27     def MakeSampleData(variant = 0):
     28         return IHubBillAboutToExpire.MakeData(0, 99000001, 30004797, 135808394095944399L)