1
0
mirror of https://github.com/bitwarden/server synced 2025-12-18 17:23:28 +00:00

[PM-27553] Resolve premium purchase for user with account credit that used payment method (#6514)

* Update payment method for customer purchasing premium who has account credit but used a payment method

* Claude feedback + dotnet run format
This commit is contained in:
Alex Morask
2025-10-31 12:37:01 -05:00
committed by GitHub
parent e102a7488e
commit 410e754cd9
3 changed files with 145 additions and 42 deletions

View File

@@ -11,7 +11,9 @@ public class PaymentMethod(OneOf<TokenizedPaymentMethod, NonTokenizedPaymentMeth
public static implicit operator PaymentMethod(TokenizedPaymentMethod tokenized) => new(tokenized);
public static implicit operator PaymentMethod(NonTokenizedPaymentMethod nonTokenized) => new(nonTokenized);
public bool IsTokenized => IsT0;
public TokenizedPaymentMethod AsTokenized => AsT0;
public bool IsNonTokenized => IsT1;
public NonTokenizedPaymentMethod AsNonTokenized => AsT1;
}
internal class PaymentMethodJsonConverter : JsonConverter<PaymentMethod>