mirror of
https://github.com/bitwarden/server
synced 2026-01-04 17:43:53 +00:00
[AC-1608] Send offboarding survey response to Stripe on subscription cancellation (#3734)
* Added offboarding survey response to cancellation when FF is on. * Removed service methods to prevent unnecessary upstream registrations * Forgot to actually remove the injected command in the services * Rui's feedback * Add missing summary * Missed [FromBody]
This commit is contained in:
@@ -14,7 +14,8 @@ public interface ISubscriber
|
||||
string BraintreeCustomerIdPrefix();
|
||||
string BraintreeIdField();
|
||||
string BraintreeCloudRegionField();
|
||||
string GatewayIdField();
|
||||
bool IsOrganization();
|
||||
bool IsUser();
|
||||
string SubscriberType();
|
||||
bool IsExpired();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Bit.Core.Entities;
|
||||
|
||||
public class User : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscriber, IRevisable, ITwoFactorProvidersUser, IReferenceable
|
||||
public class User : ITableObject<Guid>, IStorableSubscriber, IRevisable, ITwoFactorProvidersUser, IReferenceable
|
||||
{
|
||||
private Dictionary<TwoFactorProviderType, TwoFactorProvider> _twoFactorProviders;
|
||||
|
||||
@@ -111,6 +111,8 @@ public class User : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscri
|
||||
return "userId";
|
||||
}
|
||||
|
||||
public bool IsOrganization() => false;
|
||||
|
||||
public bool IsUser()
|
||||
{
|
||||
return true;
|
||||
@@ -121,6 +123,8 @@ public class User : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscri
|
||||
return "Subscriber";
|
||||
}
|
||||
|
||||
public bool IsExpired() => PremiumExpirationDate.HasValue && PremiumExpirationDate.Value <= DateTime.UtcNow;
|
||||
|
||||
public Dictionary<TwoFactorProviderType, TwoFactorProvider> GetTwoFactorProviders()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TwoFactorProviders))
|
||||
|
||||
Reference in New Issue
Block a user