1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

[fix] Address QA found defects for the Stripe Subscriptions admin tool (#2150)

* [fix] Clear the page on Stripe Subscription search change
[SG-404]

* [fix] Ensure page is null when selecting all Stripe Subscriptions for an action
[SG-404]

* [feat] Allow Stripe Subscriptions to be filtered by a test clock
[SG-404]
This commit is contained in:
Addison Beck
2022-07-26 13:59:41 -04:00
committed by GitHub
parent d1a2e58ce1
commit d1db4d31cb
6 changed files with 38 additions and 2 deletions

View File

@ -15,6 +15,7 @@ namespace Bit.Core.Services
private readonly Stripe.CardService _cardService;
private readonly Stripe.BankAccountService _bankAccountService;
private readonly Stripe.PriceService _priceService;
private readonly Stripe.TestHelpers.TestClockService _testClockService;
public StripeAdapter()
{
@ -29,6 +30,7 @@ namespace Bit.Core.Services
_cardService = new Stripe.CardService();
_bankAccountService = new Stripe.BankAccountService();
_priceService = new Stripe.PriceService();
_testClockService = new Stripe.TestHelpers.TestClockService();
}
public Task<Stripe.Customer> CustomerCreateAsync(Stripe.CustomerCreateOptions options)
@ -198,5 +200,19 @@ namespace Bit.Core.Services
{
return await _priceService.ListAsync(options);
}
public async Task<List<Stripe.TestHelpers.TestClock>> TestClockListAsync()
{
var items = new List<Stripe.TestHelpers.TestClock>();
var options = new Stripe.TestHelpers.TestClockListOptions()
{
Limit = 100
};
await foreach (var i in _testClockService.ListAutoPagingAsync(options))
{
items.Add(i);
}
return items;
}
}
}