Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19334 - Adding Find EFT Accounts Endpoint #1392

Closed
wants to merge 5 commits into from
Closed

Conversation

rodrigo-barraza
Copy link
Collaborator

Issue #:19334
bcgov/entity#19334

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).

commit ef9265c5a623edc516843c8c84237f19af033e78
Merge: 440bc022 3954c24
Author: Rodrigo Barraza <hello@rod.dev>
Date:   Tue Jan 30 14:11:01 2024 -0800

    Merge branch 'main' into feature/19934

commit 440bc02284e78881bf0b366a289cb2ae99137e64
Author: Rodrigo Barraza <hello@rod.dev>
Date:   Tue Jan 30 14:10:24 2024 -0800

    Find Eft accounts
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 123 lines in your changes are missing coverage. Please review.

Comparison is base (79924ce) 91.45% compared to head (34924d3) 92.10%.
Report is 91 commits behind head on main.

❗ Current head 34924d3 differs from pull request most recent head a4c391f. Consider uploading reports for the commit a4c391f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1392      +/-   ##
==========================================
+ Coverage   91.45%   92.10%   +0.64%     
==========================================
  Files         186      193       +7     
  Lines       11319    12732    +1413     
==========================================
+ Hits        10352    11727    +1375     
- Misses        967     1005      +38     
Flag Coverage Δ
bcolapi ?
eventlistenerqueue 82.00% <100.00%> (+0.18%) ⬆️
payapi 93.67% <92.17%> (-0.07%) ⬇️
paymentjobs 84.45% <96.36%> (+4.23%) ⬆️
paymentreconciliationsqueue 92.39% <93.93%> (+0.95%) ⬆️
reportapi ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
jobs/payment-jobs/tasks/common/dataclasses.py 100.00% <100.00%> (ø)
jobs/payment-jobs/tasks/common/enums.py 100.00% <ø> (ø)
jobs/payment-jobs/tasks/distribution_task.py 97.70% <100.00%> (-0.06%) ⬇️
...ayment-jobs/tasks/ejv_partner_distribution_task.py 99.17% <100.00%> (+0.03%) ⬆️
jobs/payment-jobs/tasks/ejv_payment_task.py 96.61% <100.00%> (+0.14%) ⬆️
.../payment-jobs/tasks/statement_notification_task.py 79.74% <100.00%> (+47.92%) ⬆️
jobs/payment-jobs/tasks/statement_task.py 91.39% <100.00%> (+10.96%) ⬆️
pay-api/src/pay_api/config.py 99.35% <100.00%> (+<0.01%) ⬆️
pay-api/src/pay_api/models/__init__.py 100.00% <100.00%> (ø)
pay-api/src/pay_api/models/custom_query.py 100.00% <100.00%> (ø)
... and 72 more

... and 23 files with indirect coverage changes

@@ -652,6 +654,34 @@ def find_by_id(cls, account_id: int):
account._dao = PaymentAccountModel.find_by_id(account_id) # pylint: disable=protected-access
return account

@classmethod
def find_eft_accounts(cls, page: int, limit: int):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find_unlinked_eft_accounts or have the state as a filter param?

Copy link
Collaborator

@seeker25 seeker25 Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup need this otherwise pagination wont work that well for the two screens

Copy link

sonarcloud bot commented Feb 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

1 Security Hotspot

See analysis details on SonarCloud

query = query.order_by(PaymentAccountModel.id)
pagination = query.paginate(per_page=eft_accounts_search.limit, page=eft_accounts_search.page)

total = pagination.total
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'total': pagination.total

eft_accounts_list = [PaymentAccountSearchModel.from_row(eft_account) for eft_account in pagination.items]


eft_accounts_list = [PaymentAccountSearchModel.from_row(eft_account) for eft_account in eft_accounts]
converter = Converter()
eft_accounts_list = converter.unstructure(eft_accounts_list)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converter().unstructure(eft_accounts_list)

@seeker25 seeker25 closed this Feb 1, 2024
@rodrigo-barraza rodrigo-barraza deleted the feature/19334 branch September 4, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants