1
0
mirror of https://github.com/bitwarden/server synced 2026-01-06 10:34:01 +00:00

[PM-23687] Support free organizations on Payment Details page (#6084)

* Resolve JSON serialization bug in OneOf converters and organize pricing models

* Support free organizations for payment method and billing address flows

* Run dotnet format
This commit is contained in:
Alex Morask
2025-07-14 12:39:49 -05:00
committed by GitHub
parent 0e4e060f22
commit d914ab8a98
30 changed files with 575 additions and 316 deletions

View File

@@ -25,6 +25,27 @@ public class MaskedPaymentMethodTests
Assert.Equivalent(input.AsT0, output.AsT0);
}
[Fact]
public void Write_Read_BankAccount_WithOptions_Succeeds()
{
MaskedPaymentMethod input = new MaskedBankAccount
{
BankName = "Chase",
Last4 = "9999",
Verified = true
};
var jsonSerializerOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
var json = JsonSerializer.Serialize(input, jsonSerializerOptions);
var output = JsonSerializer.Deserialize<MaskedPaymentMethod>(json, jsonSerializerOptions);
Assert.NotNull(output);
Assert.True(output.IsT0);
Assert.Equivalent(input.AsT0, output.AsT0);
}
[Fact]
public void Write_Read_Card_Succeeds()
{