1
0
mirror of https://github.com/bitwarden/server synced 2025-12-22 11:13:27 +00:00

[AC-2965] Use OrganizationBillingService to purchase org when FF is on (#4737)

* Add PurchaseSubscription to OrganizationBillingService and call from OrganizationService.SignUpAsync when FF is on

* Run dotnet format

* Missed billing service DI for SCIM which uses the OrganizationService
This commit is contained in:
Alex Morask
2024-09-06 10:24:05 -04:00
committed by GitHub
parent 8491c58595
commit c0a4ba8de1
11 changed files with 481 additions and 39 deletions

View File

@@ -22,6 +22,16 @@ public interface ISubscriberService
OffboardingSurveyResponse offboardingSurveyResponse,
bool cancelImmediately);
/// <summary>
/// Creates a Braintree <see cref="Braintree.Customer"/> for the provided <paramref name="subscriber"/> while attaching the provided <paramref name="paymentMethodNonce"/>.
/// </summary>
/// <param name="subscriber">The subscriber to create a Braintree customer for.</param>
/// <param name="paymentMethodNonce">A nonce representing the PayPal payment method the customer will use for payments.</param>
/// <returns>The <see cref="Braintree.Customer.Id"/> of the created Braintree customer.</returns>
Task<string> CreateBraintreeCustomer(
ISubscriber subscriber,
string paymentMethodNonce);
/// <summary>
/// Retrieves a Stripe <see cref="Customer"/> using the <paramref name="subscriber"/>'s <see cref="ISubscriber.GatewayCustomerId"/> property.
/// </summary>