I am trying to use a function called get_loan_transactions_by_date_range() to get some information on loan transactions. As a part of the function's parameters, an object called date_column is needed that is derived from the DateColumn class. To use this class, a parameter called value is needed. The issue that I am running into is I cannot find anywhere in the documentation what value is supposed to be. How does a person use the DateColumn class using value?
This is a snippet of the code I am attempting to run:
page_counter = 1
yesterday = self.get_yesterday()
trans_obj = GeneratedTransactions(
logger=self.logger,
hq_credentials=self.hq_credentials,
ret_table_obj=True
)
try:
while True:
date_column = DateColumn(value=1)
transactions = await trans_obj.get_loan_transactions_by_date_range(
start_date=yesterday,
end_date=yesterday,
date_column=date_column,
page_number=page_counter,
page_size=200,
transaction_status_filter=None,
filter_on_gt_data_name=None
)
if len(transactions) >= 1:
self.logger.info(f'\n\n{transactions}\n\n')
page_counter += 1
else:
break
except Exception:
self.logger.error("""An error occurred when using \
get_loan_transactions_by_date_range() to get a list of transactions.""")
raise Exception
The docs on the function get_loan_transactions_by_date() and the DateColumn class can be found here: https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/generated_transactions.html#q2_sdk.hq.db.generated_transactions.DateColumn