fix: Fix JsonNumberHandling for quoted numbers

This commit is contained in:
Valters Melnalksnis
2022-11-09 21:26:36 +02:00
parent 6289dd8330
commit 50ce301845
2 changed files with 4 additions and 0 deletions
@@ -2,6 +2,8 @@
// Licensed under the Apache License 2.0.
// See LICENSE file in the project root for full license information.
using System.Text.Json.Serialization;
namespace VMelnalksnis.NordigenDotNet.Accounts;
/// <summary>An amount in a specific currency.</summary>
@@ -11,5 +13,6 @@ public record AmountInCurrency
public string Currency { get; set; } = null!;
/// <summary>Gets or sets the amount.</summary>
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
public decimal Amount { get; set; }
}
@@ -22,6 +22,7 @@ public record Institution
/// <summary>Gets or sets the maximum number of days in the past the service provider will return transactions for.</summary>
[JsonPropertyName("transaction_total_days")]
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
public int TransactionTotalDays { get; set; }
/// <summary>Gets or sets all the countries supported by the service provider.</summary>