Notification
- class q2_sdk.hq.db.notification.NotificationAddResponse(success=False, error_message='', id=None)[source]
Bases:
objectNotificationAddResponse(success: bool = False, error_message: str = ‘’, id: int = None)
- success: bool = False
- error_message: str = ''
- id: int = None
- class q2_sdk.hq.db.notification.CreateNotificationParams(NotificationTypeID, CreateDate, NotificationStatusID, TargetAddress, NotificationSubject, RetryCount='0', NotificationTime=None, NotificationBody=None, AccessCodeID=None, ErrorMessage=None, UserID=None, TransactionID=None, UiLanguageID=None, HtmlBody=None, TargetAddressRaw=None, CountryID=None, NotificationFlavorID=None, ZoneID=None, SessionId=None)[source]
Bases:
objectCreateNotificationParams(NotificationTypeID: str, CreateDate: str, NotificationStatusID: str, TargetAddress: str, NotificationSubject: str, RetryCount: str = ‘0’, NotificationTime: Optional[str] = None, NotificationBody: Optional[str] = None, AccessCodeID: Optional[str] = None, ErrorMessage: Optional[str] = None, UserID: Optional[str] = None, TransactionID: Optional[str] = None, UiLanguageID: Optional[str] = None, HtmlBody: Optional[str] = None, TargetAddressRaw: Optional[str] = None, CountryID: Optional[str] = None, NotificationFlavorID: Optional[str] = None, ZoneID: Optional[str] = None, SessionId: Optional[str] = None)
- NotificationTypeID: str
- CreateDate: str
- NotificationStatusID: str
- TargetAddress: str
- NotificationSubject: str
- RetryCount: str = '0'
- NotificationTime: str | None = None
- NotificationBody: str | None = None
- AccessCodeID: str | None = None
- ErrorMessage: str | None = None
- UserID: str | None = None
- TransactionID: str | None = None
- UiLanguageID: str | None = None
- HtmlBody: str | None = None
- TargetAddressRaw: str | None = None
- CountryID: str | None = None
- NotificationFlavorID: str | None = None
- ZoneID: str | None = None
- SessionId: str | None = None
- class q2_sdk.hq.db.notification.NotificationRow(element, row_class=None, rename_fields=None)[source]
Bases:
TableRow- NotificationID: str
- NotificationTypeID: str
- CreateDate: str
- NotificationStatusID: str
- NotificationTime: str
- TargetAddress: str
- NotificationSubject: str
- NotificationBody: str
- AccessCodeID: str
- RetryCount: str
- ErrorMessage: str
- UserID: str
- TransactionID: str
- UiLanguageID: str
- HtmlBody: str
- TargetAddressRaw: str
- CountryID: str
- NotificationFlavorID: str
- ZoneID: str
- SessionId: str
- class q2_sdk.hq.db.notification.Notification(logger, hq_credentials=None, ret_table_obj=None)[source]
Bases:
DbObjectProgrammatic access to the Q2 database. Not as flexible as a true ORM, but takes the guesswork out of database schemas and ensures safety in the transactions.
- Parameters:
logger – Reference to calling request’s logger (self.logger in your extension)
hq_credentials (
Optional[HqCredentials]) – HQ Connectivity Information (Defaults to settings file)ret_table_obj (
Optional[bool]) – Flag to return list of LXML elements ifFalseor TableRow objects from DB calls ifTrue(Defaults to settings file)
- NAME = 'Notification'
- REPRESENTATION_ROW_CLASS
alias of
NotificationRow
- async get(notification_ids, serialize_for_cli=False)[source]
Retrieves notification rows based on provided notification IDs. :type notification_ids:
list[int] :param notification_ids: List of notification IDs to search.- Return type:
List[NotificationRow]
- async add(params)[source]
Creates a notification row with the provided parameters. :type params:
CreateNotificationParams:param params: Instance of CreateNotificationParams dataclass containing thevalues of the columns to populate in the Q2_Notifications table.
- Return type: