GeneratedTransactions
- class q2_sdk.hq.db.generated_transactions.GetGeneratedTransactionsParams(customer_id, from_date, to_date, recurring_transaction_id=None)[source]
Bases:
object
GetGeneratedTransactionsParams(customer_id: int, from_date: str, to_date: str, recurring_transaction_id: Optional[int] = None)
- class q2_sdk.hq.db.generated_transactions.AddTransactionNoteParams(transaction_id, admin_login_name, note, note_date=None)[source]
Bases:
object
AddTransactionNoteParams(transaction_id: int, admin_login_name: int, note: int, note_date: Optional[str] = None)
- enum q2_sdk.hq.db.generated_transactions.DateColumn(value)[source]
Bases:
Enum
Valid values are as follows:
- CreateDate = <DateColumn.CreateDate: 'Create'>
- ProcessDate = <DateColumn.ProcessDate: 'Process'>
- exception q2_sdk.hq.db.generated_transactions.DateTimeEntryError[source]
Bases:
Exception
Transaction CreateDates are not entered correctly
- class q2_sdk.hq.db.generated_transactions.GeneratedTransactionsPending(element, row_class=None, rename_fields=None)[source]
Bases:
TableRow
- class q2_sdk.hq.db.generated_transactions.ExternalGeneratedTransfer(element, row_class=None, rename_fields=None)[source]
Bases:
TableRow
- class q2_sdk.hq.db.generated_transactions.GeneratedTransactionsRow(element, row_class=None, rename_fields=None)[source]
Bases:
TableRow
- class q2_sdk.hq.db.generated_transactions.GeneratedLoanTransaction(element, row_class=None, rename_fields=None)[source]
Bases:
TableRow
- class q2_sdk.hq.db.generated_transactions.GeneratedTransactions(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 = 'GeneratedTransactions'
- REPRESENTATION_ROW_CLASS
alias of
GeneratedTransactionsRow
- async get(customer_id, from_date, to_date, recurring_transaction_id=None, serialize_for_cli=False)[source]
- Return type:
- async add_transaction_note(transaction_id, admin_login_name, note, note_date=None)[source]
Adds a note to transaction
- async get_by_create_date_range(start_date, end_date, page_number=1, page_size=200, transaction_status_filter=None)[source]
Get external transactions by create date range and supports pagination
- Parameters:
start_date (
datetime
) – The start date of the date range, as a datetime objectend_date (
datetime
) – The end date of the date range, as a datetime objectpage_number – the starting point for pagination. Defaults to 1
page_size – The number of transactions to get per page
transaction_status_filter (
Optional
[TransactionStatus
]) – an optional filter to get transactions that are in a specific status
- Return type:
- Returns:
A list of transactions that fit the provided parameters
- async get_by_process_date_range(start_date, end_date, page_number=1, page_size=200, transaction_status_filter=None)[source]
Get external transactions by process date range and supports pagination
- Parameters:
start_date (
datetime
) – The start date of the date range, as a datetime objectend_date (
datetime
) – The end date of the date range, as a datetime objectpage_number – the starting point for pagination. Defaults to 1
page_size – The number of transactions to get per page
transaction_status_filter (
Optional
[TransactionStatus
]) – an optional filter to get transactions that are in a specific status
- Return type:
- Returns:
A list of transactions that fit the provided parameters
- async get_loan_transactions_by_date_range(start_date, end_date, date_column, page_number=1, page_size=200, transaction_status_filter=None, filter_on_gt_data_name=None)[source]
Get generated transactions to hydra product type L by date range and supports pagination
- Parameters:
start_date (
datetime
) – The start date of the date range, as a datetime objectend_date (
datetime
) – The end date of the date range, as a datetime objectdate_column (
DateColumn
) – The date column to filter the date onpage_number – the starting point for pagination. Defaults to 1
page_size – The number of transactions to get per page
transaction_status_filter (
Optional
[TransactionStatus
]) – an optional filter to get transactions that are in a specific statusfilter_on_gt_data_name (
Optional
[str
]) – an optional filter to only get transactions with specific gt data attached
- Return type:
- Returns:
A list of transactions that fit the provided parameters
- async get_transactions_by_date_range_with_gt_data(start_date, end_date, date_column, page_number=1, page_size=200, transaction_status_filter=None, filter_on_gt_data_name=None, customer_id=None)[source]
Get generated transactions with gt data by date range and supports pagination
- Parameters:
start_date (
datetime
) – The start date of the date range, as a datetime objectend_date (
datetime
) – The end date of the date range, as a datetime objectdate_column (
DateColumn
) – The date column to filter the date onpage_number – the starting point for pagination. Defaults to 1
page_size – The number of transactions to get per page
transaction_status_filter (
Optional
[TransactionStatus
]) – an optional filter to get transactions that are in a specific statusfilter_on_gt_data_name (
Optional
[str
]) – an optional filter to only get transactions with specific gt data attachedcustomer_id (
Optional
[int
]) – If provided, will filter the results by Q2_Customer.CustomerID
- Return type:
- Returns:
A list of transactions that fit the provided parameters
- async get_pending_transactions(page_number=1, page_size=200, transaction_type_ids_to_omit=None)[source]
Get pending transactions. Pending transactions include the following statuses: PendingProcessing, Authorized, Drafted, Suspect
- Param:
page_number: the starting point for pagination. Defaults to 1
- Param:
page_size: The number of transactions to get per page. Defaults to 200
- Param:
transaction_type_ids_to_omit: The transaction types to omit from the search
- Return type: