mirror of
https://github.com/bitwarden/server.git
synced 2025-04-25 23:02:17 -05:00
Create customer for client organization that was converted to BU upon unlinking (#5706)
This commit is contained in:
parent
cb2860c0c1
commit
5184d10995
@ -110,9 +110,14 @@ public class RemoveOrganizationFromProviderCommand : IRemoveOrganizationFromProv
|
||||
IEnumerable<string> organizationOwnerEmails)
|
||||
{
|
||||
if (provider.IsBillable() &&
|
||||
organization.IsValidClient() &&
|
||||
!string.IsNullOrEmpty(organization.GatewayCustomerId))
|
||||
organization.IsValidClient())
|
||||
{
|
||||
// An organization converted to a business unit will not have a Customer since it was given to the business unit.
|
||||
if (string.IsNullOrEmpty(organization.GatewayCustomerId))
|
||||
{
|
||||
await _providerBillingService.CreateCustomerForClientOrganization(provider, organization);
|
||||
}
|
||||
|
||||
var customer = await _stripeAdapter.CustomerUpdateAsync(organization.GatewayCustomerId, new CustomerUpdateOptions
|
||||
{
|
||||
Description = string.Empty,
|
||||
|
Loading…
x
Reference in New Issue
Block a user