1
0
mirror of https://github.com/bitwarden/server synced 2025-12-23 03:33:35 +00:00

[AC-2567] Billing Performance Improvements (#4143)

* Moved AccountsBilling controller to be owned by Billing

* Added org billing history endpoint

* Updated GetBillingInvoicesAsync to only retrieve paid, open, and uncollectible invoices, and added option to limit results

* Removed invoices and transactions from GetBillingAsync

* Limiting the number of invoices and transactions returned

* Moved Billing models to Billing namespace

* Split billing info and billing history objects

* Removed billing method GetBillingBalanceAndSourceAsync

* Removed unused using

* Cleaned up BillingInfo a bit

* Update migration scripts to use `CREATE OR ALTER` instead of checking for the `OBJECT_ID`

* Applying limit to aggregated invoices after they return from Stripe
This commit is contained in:
Conner Turnbull
2024-06-11 13:55:23 -04:00
committed by GitHub
parent f615858724
commit fc1c488a78
30 changed files with 474 additions and 341 deletions

View File

@@ -5,8 +5,8 @@ namespace Bit.Core.Repositories;
public interface ITransactionRepository : IRepository<Transaction, Guid>
{
Task<ICollection<Transaction>> GetManyByUserIdAsync(Guid userId);
Task<ICollection<Transaction>> GetManyByOrganizationIdAsync(Guid organizationId);
Task<ICollection<Transaction>> GetManyByProviderIdAsync(Guid providerId);
Task<ICollection<Transaction>> GetManyByUserIdAsync(Guid userId, int? limit = null);
Task<ICollection<Transaction>> GetManyByOrganizationIdAsync(Guid organizationId, int? limit = null);
Task<ICollection<Transaction>> GetManyByProviderIdAsync(Guid providerId, int? limit = null);
Task<Transaction> GetByGatewayIdAsync(GatewayType gatewayType, string gatewayId);
}