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

[PM-3892] Implement dollar threshold for all subscriptions (#3283)

* Initial commit

* Fix the failing text

* Fix the unpaid invoice issue

* fix the unpaid invoice issue

* Changes for the threshold amount

* remove the billing threshold

* Add some comments to the old method

* Fixing issues on secret manager test

* import missing package

* Resolve pr comments

* Refactor PreviewUpcomingInvoiceAndPayAsync method

* Resolve some pr comments

* Resolving the comment around constant

* Resolve pr comment

* Add new class

* Resolve pr comments

* Change the prorateThreshold from 5 to 500 dollars

* Fix the failing test

* Fix the server returns a 500 error with the banner
This commit is contained in:
cyprain-okeke
2023-11-01 15:19:28 +01:00
committed by GitHub
parent f9fc43dbb1
commit d9faa9a6df
8 changed files with 692 additions and 56 deletions

View File

@ -1,4 +1,5 @@
using Bit.Core.Models.BitStripe;
using Stripe;
namespace Bit.Core.Services;
@ -14,8 +15,11 @@ public interface IStripeAdapter
Task<Stripe.Subscription> SubscriptionUpdateAsync(string id, Stripe.SubscriptionUpdateOptions options = null);
Task<Stripe.Subscription> SubscriptionCancelAsync(string Id, Stripe.SubscriptionCancelOptions options = null);
Task<Stripe.Invoice> InvoiceUpcomingAsync(Stripe.UpcomingInvoiceOptions options);
Task<Stripe.Invoice> InvoiceCreateAsync(Stripe.InvoiceCreateOptions options);
Task<Stripe.InvoiceItem> InvoiceItemCreateAsync(Stripe.InvoiceItemCreateOptions options);
Task<Stripe.Invoice> InvoiceGetAsync(string id, Stripe.InvoiceGetOptions options);
Task<Stripe.StripeList<Stripe.Invoice>> InvoiceListAsync(Stripe.InvoiceListOptions options);
IEnumerable<InvoiceItem> InvoiceItemListAsync(InvoiceItemListOptions options);
Task<Stripe.Invoice> InvoiceUpdateAsync(string id, Stripe.InvoiceUpdateOptions options);
Task<Stripe.Invoice> InvoiceFinalizeInvoiceAsync(string id, Stripe.InvoiceFinalizeOptions options);
Task<Stripe.Invoice> InvoiceSendInvoiceAsync(string id, Stripe.InvoiceSendOptions options);