CsrNote
- class q2_sdk.hq.db.csr_note.CsrNoteRow(element, row_class=None, rename_fields=None)[source]
Bases:
TableRow
- class q2_sdk.hq.db.csr_note.CsrNote(logger, hq_credentials=None, ret_table_obj=None)[source]
Bases:
DbObject
Programmatic 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 ifFalse
or TableRow objects from DB calls ifTrue
(Defaults to settings file)
- NAME = 'CsrNote'
- REPRESENTATION_ROW_CLASS
alias of
CsrNoteRow
- async get(page_number=1, page_size=100, csr_note_id=None, customer_id=None, user_id=None, created_by_admin_user_logon='', include_deleted=False, serialize_for_cli=False)[source]
Retrieves CSR Note information by CSR note id, customer id, and/or user id paginated.
- Parameters:
page_number (
int
) – the starting point for pagination. Defaults to 1page_size (
int
) – The number of notes to get per page. Defaults to 100csr_note_id (
Optional
[int
]) – The csr note id tied to the notecustomer_id (
Optional
[int
]) – The customer id tied to the notecreated_by_admin_user_logon (
str
) – The login name of the admin that created the noteinclude_deleted (
bool
) – Boolean indicator of whether deleted entries should be returned. Defaults to False
- Return type:
- async create(customer_id, note, fraud_indicator=False, user_id=None, created_by_admin_user_logon='')[source]
Creates a CSR Note.
- Parameters:
customer_id (
int
) – The customer id tied to the notenote (
str
) – The message to add as a notefraud_indicator (
bool
) – Boolean assessor of whether potential fraudulent activity has occurreduser_id (
Optional
[int
]) – The user id tied to the note. If provided, the note will be created and appear at the user and customer level in Q2 Consolecreated_by_admin_user_logon (
str
) – The login name of the admin that is creating the note. If not provided, this information will be retrieved from the HQ Credentials CSR User
- Return type: