mirror of
https://github.com/bitwarden/server.git
synced 2025-04-26 07:12:20 -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)
|
IEnumerable<string> organizationOwnerEmails)
|
||||||
{
|
{
|
||||||
if (provider.IsBillable() &&
|
if (provider.IsBillable() &&
|
||||||
organization.IsValidClient() &&
|
organization.IsValidClient())
|
||||||
!string.IsNullOrEmpty(organization.GatewayCustomerId))
|
|
||||||
{
|
{
|
||||||
|
// 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
|
var customer = await _stripeAdapter.CustomerUpdateAsync(organization.GatewayCustomerId, new CustomerUpdateOptions
|
||||||
{
|
{
|
||||||
Description = string.Empty,
|
Description = string.Empty,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user