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

[AC-2568] Added invoices and transaction history endpoints. Added cursor paging for each #4692

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

cturnbull-bitwarden
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/AC-2568

📔 Objective

Added invoices and transaction history endpoints. Added cursor paging for each

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 25.21008% with 89 lines in your changes missing coverage. Please review.

Project coverage is 41.83%. Comparing base (ebf8bc0) to head (87f2fcb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...lling/Controllers/OrganizationBillingController.cs 6.66% 28 Missing ⚠️
...i/Billing/Controllers/AccountsBillingController.cs 0.00% 24 Missing ⚠️
...cture.Dapper/Repositories/TransactionRepository.cs 0.00% 23 Missing ⚠️
...ityFramework/Repositories/TransactionRepository.cs 0.00% 12 Missing ⚠️
.../Services/Implementations/PaymentHistoryService.cs 92.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #4692    +/-   ##
========================================
  Coverage   41.82%   41.83%            
========================================
  Files        1293     1294     +1     
  Lines       61632    61740   +108     
  Branches     5681     5693    +12     
========================================
+ Hits        25778    25827    +49     
- Misses      34664    34722    +58     
- Partials     1190     1191     +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Aug 23, 2024

Logo
Checkmarx One – Scan Summary & Detailsc8c10694-dedd-4d63-aca0-ecb78de9de9c

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Privacy_Violation /src/Api/Auth/Controllers/TwoFactorController.cs: 488 Attack Vector
MEDIUM Privacy_Violation /src/Api/Controllers/DevicesController.cs: 133 Attack Vector
MEDIUM Privacy_Violation /src/Api/Auth/Controllers/AccountsController.cs: 412 Attack Vector
MEDIUM Privacy_Violation /src/Api/Auth/Controllers/AccountsController.cs: 549 Attack Vector
MEDIUM Privacy_Violation /src/Api/Vault/Controllers/CiphersController.cs: 906 Attack Vector
MEDIUM Privacy_Violation /src/Api/Auth/Controllers/AccountsController.cs: 847 Attack Vector
MEDIUM Privacy_Violation /src/Api/Auth/Controllers/AccountsController.cs: 829 Attack Vector
MEDIUM Privacy_Violation /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 259 Attack Vector
MEDIUM Privacy_Violation /src/Api/Controllers/DevicesController.cs: 159 Attack Vector
MEDIUM Privacy_Violation /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 350 Attack Vector
MEDIUM Privacy_Violation /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 403 Attack Vector
LOW Log_Forging /src/Billing/Controllers/StripeController.cs: 164 Attack Vector
LOW Log_Forging /src/Billing/Controllers/StripeController.cs: 164 Attack Vector
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 217 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 412 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 423 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 445 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 839 Attack Vector
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 898 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 103 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 118 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 165 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 174 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 191 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 200 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 231 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 249 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 288 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 297 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 306 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 323 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 332 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 340 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/TwoFactorController.cs: 393 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 404 Attack Vector
LOW Log_Forging /src/Api/Controllers/DevicesController.cs: 124 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 541 Attack Vector
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 821 Attack Vector
LOW Log_Forging /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 239 Attack Vector
LOW Log_Forging /src/Api/Controllers/DevicesController.cs: 150 Attack Vector
LOW Log_Forging /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 378 Attack Vector
LOW Log_Forging /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 315 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 107
MEDIUM CSRF /src/Api/Controllers/DevicesController.cs: 74
MEDIUM CSRF /src/Api/Controllers/DevicesController.cs: 61
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 98
MEDIUM CSRF /src/Api/Auth/Controllers/TwoFactorController.cs: 118
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 98
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 229
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 478
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 551
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 283
MEDIUM CSRF /src/Api/Billing/Public/Controllers/OrganizationController.cs: 47
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 176
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 445
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 503
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 478
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 565
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/OrganizationController.cs: 43
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 357
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 337
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 107
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 255
MEDIUM CSRF /src/Api/Controllers/DevicesController.cs: 61
MEDIUM CSRF /src/Api/Controllers/DevicesController.cs: 74
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 676
MEDIUM Privacy_Violation /src/Core/Auth/UserFeatures/TdeOffboardingPassword/TdeOffboardingPasswordCommand.cs: 81
MEDIUM Privacy_Violation /src/Core/Auth/UserFeatures/TdeOffboardingPassword/TdeOffboardingPasswordCommand.cs: 81
MEDIUM Privacy_Violation /src/Core/Auth/UserFeatures/UserMasterPassword/SetInitialMasterPasswordCommand.cs: 59
MEDIUM Privacy_Violation /src/Core/Auth/UserFeatures/UserMasterPassword/SetInitialMasterPasswordCommand.cs: 59
LOW Log_Forging /src/Api/AdminConsole/Controllers/ProvidersController.cs: 72
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 882
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 246
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 366

cyprain-okeke
cyprain-okeke previously approved these changes Aug 23, 2024
Copy link
Contributor

@cyprain-okeke cyprain-okeke left a comment

Choose a reason for hiding this comment

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

Looks Good

Copy link
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

Just a few ⛏️s, but all looks good to me. Do you think it's worth adding some unit tests for the new service? Could also add controller tests, but the action methods are pretty simple so I'm not worried about them.

rkac-bw
rkac-bw previously approved these changes Aug 23, 2024
Copy link
Contributor

@rkac-bw rkac-bw left a comment

Choose a reason for hiding this comment

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

lgtm

# Conflicts:
#	src/Api/Billing/Controllers/OrganizationBillingController.cs
Copy link
Contributor

@rkac-bw rkac-bw left a comment

Choose a reason for hiding this comment

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

lgtm

@cturnbull-bitwarden cturnbull-bitwarden merged commit 46ac2a9 into main Sep 9, 2024
53 of 54 checks passed
@cturnbull-bitwarden cturnbull-bitwarden deleted the billing/AC-2568/invoice-pagination branch September 9, 2024 13:39
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.

5 participants