diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceResponse.cs b/src/Mollie.Api/Models/Balance/Response/BalanceResponse.cs index 187e7521..23006b77 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceResponse.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceResponse.cs @@ -22,45 +22,45 @@ public class BalanceResponse : IResponseObject { /// /// The balance’s ISO 4217 currency code. /// - public string Currency { get; set; } + public required string Currency { get; init; } /// /// The status of the balance. /// [JsonConverter(typeof(StringEnumConverter))] - public BalanceResponseStatus Status { get; set; } + public required BalanceResponseStatus Status { get; init; } /// /// The frequency at which the available amount on the balance will be settled to the configured transfer destination. /// See transferDestination. /// - public string TransferFrequency { get; set; } + public required string TransferFrequency { get; init; } /// /// The minimum amount configured for scheduled automatic settlements. As soon as the amount on the balance exceeds this threshold, /// the complete balance will be paid out to the transferDestination according to the configured transferFrequency. /// - public Amount TransferThreshold { get; set; } + public required Amount TransferThreshold { get; init; } /// /// The transfer reference set to be included in all the transfers for this balance. Either a string or null. /// - public string TransferReference { get; set; } + public string? TransferReference { get; set; } /// /// The destination where the available amount will be automatically transferred to according to the configured transferFrequency. /// - public BalanceTransferDestination TransferDestination { get; set; } + public required BalanceTransferDestination TransferDestination { get; init; } /// /// The amount directly available on the balance, e.g. {"currency":"EUR", "value":"100.00"}. /// - public Amount AvailableAmount { get; set; } + public required Amount AvailableAmount { get; init; } /// /// The total amount that is queued to be transferred to your balance. For example, a credit card payment can take a few days to clear. /// - public Amount PendingAmount { get; set; } + public required Amount PendingAmount { get; init; } /// /// An object with several URL objects relevant to the balance. Every URL object will contain an href and a type field. diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceResponseLinks.cs b/src/Mollie.Api/Models/Balance/Response/BalanceResponseLinks.cs index 83d519de..cf8ca8aa 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceResponseLinks.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceResponseLinks.cs @@ -5,7 +5,7 @@ public class BalanceResponseLinks { /// /// The API resource URL of the balance itself. /// - public UrlObjectLink Self { get; set; } + public required UrlObjectLink Self { get; init; } /// /// The URL to the order retrieval endpoint documentation. diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransaction.cs index b80b5375..f9a98193 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransaction.cs @@ -17,20 +17,20 @@ public class BalanceTransaction { /// /// The type of movement, for example payment or refund. See Mollie docs for a full list of values /// - public string Type { get; set; } + public required string Type { get; init; } /// /// The final amount that was moved to or from the balance, e.g. {"currency":"EUR", "value":"100.00"}. /// If the transaction moves funds away from the balance, for example when it concerns a refund, the /// amount will be negative. /// - public Amount ResultAmount { get; set; } + public required Amount ResultAmount { get; init; } /// /// The amount that was to be moved to or from the balance, excluding deductions. If the transaction /// moves funds away from the balance, for example when it concerns a refund, the amount will be negative. /// - public Amount InitialAmount { get; set; } + public required Amount InitialAmount { get; init; } /// /// The total amount of deductions withheld from the movement. For example, if a €10,00 payment comes in @@ -38,7 +38,7 @@ public class BalanceTransaction { /// to a balance, we always round the deduction to a ‘real’ amount. Any differences between these realtime /// rounded amounts and the final invoice will be compensated when the invoice is generated. /// - public Amount Deductions { get; set; } + public required Amount Deductions { get; init; } /// /// The date and time of the movement, in ISO 8601 format. diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponse.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponse.cs index 1483651c..880de3ac 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponse.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponse.cs @@ -7,19 +7,19 @@ public class BalanceTransactionResponse { /// The number of transactions found in _embedded, which is either the requested number /// (with a maximum of 250) or the default number. /// - public int Count { get; set; } + public required int Count { get; init; } /// /// The object containing the queried data. /// [JsonProperty("_embedded")] - public BalanceTransactionEmbeddedResponse Embedded { get; set; } + public required BalanceTransactionEmbeddedResponse Embedded { get; init; } /// /// Links to help navigate through the lists of balance transactions. Every URL object will contain an href and a type field. /// [JsonProperty("_links")] - public BalanceTransactionResponseLinks Links { get; set; } + public required BalanceTransactionResponseLinks Links { get; init; } } public class BalanceTransactionEmbeddedResponse { diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponseLinks.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponseLinks.cs index 86f0b6ec..b4677c1e 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponseLinks.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/BalanceTransactionResponseLinks.cs @@ -5,17 +5,17 @@ public class BalanceTransactionResponseLinks { /// /// The URL to the current set of balance transactions. /// - public UrlObjectLink Self { get; set; } + public required UrlObjectLink Self { get; init; } /// /// The previous set of balance transactions, if available. /// - public UrlLink Previous { get; set; } + public required UrlLink Previous { get; init; } /// /// The next set of balance transactions, if available. /// - public UrlLink Next { get; set; } + public required UrlLink Next { get; init; } /// /// The URL to the balance transactions list endpoint documentation. diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/CaptureBalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/CaptureBalanceTransaction.cs index b1c45e75..a7ddf71e 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/CaptureBalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/CaptureBalanceTransaction.cs @@ -1,10 +1,10 @@ namespace Mollie.Api.Models.Balance.Response.BalanceTransaction.Specific { public class CaptureBalanceTransaction : BalanceTransaction { - public CaptureTransactionContext Context { get; set; } + public required CaptureTransactionContext Context { get; init; } } public class CaptureTransactionContext { - public string PaymentId { get; set; } - public string CaptureId { get; set; } + public required string PaymentId { get; init; } + public required string CaptureId { get; init; } } } \ No newline at end of file diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/ChargebackBalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/ChargebackBalanceTransaction.cs index 9cb52377..27ac325d 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/ChargebackBalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/ChargebackBalanceTransaction.cs @@ -1,10 +1,10 @@ namespace Mollie.Api.Models.Balance.Response.BalanceTransaction.Specific { public class ChargebackBalanceTransaction : BalanceTransaction { - public ChargebackTransactionContext Context { get; set; } + public required ChargebackTransactionContext Context { get; init; } } public class ChargebackTransactionContext { - public string PaymentId { get; set; } - public string ChargebackId { get; set; } + public required string PaymentId { get; init; } + public required string ChargebackId { get; init; } } } \ No newline at end of file diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/InvoiceBalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/InvoiceBalanceTransaction.cs index 6a8c5160..d90b075e 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/InvoiceBalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/InvoiceBalanceTransaction.cs @@ -1,9 +1,9 @@ namespace Mollie.Api.Models.Balance.Response.BalanceTransaction.Specific { public class InvoiceBalanceTransaction : BalanceTransaction { - public InvoiceTransactionContext Context { get; set; } + public required InvoiceTransactionContext Context { get; init; } } public class InvoiceTransactionContext { - public string InvoiceId { get; set; } + public required string InvoiceId { get; init; } } } \ No newline at end of file diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/PaymentBalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/PaymentBalanceTransaction.cs index c6685bcc..0ac4c2bb 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/PaymentBalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/PaymentBalanceTransaction.cs @@ -1,9 +1,9 @@ namespace Mollie.Api.Models.Balance.Response.BalanceTransaction.Specific { public class PaymentBalanceTransaction : BalanceTransaction { - public PaymentTransactionContext Context { get; set; } + public required PaymentTransactionContext Context { get; init; } } public class PaymentTransactionContext { - public string PaymentId { get; set; } + public required string PaymentId { get; init; } } } \ No newline at end of file diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/RefundBalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/RefundBalanceTransaction.cs index 39b34947..bc67c2dc 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/RefundBalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/RefundBalanceTransaction.cs @@ -1,10 +1,10 @@ namespace Mollie.Api.Models.Balance.Response.BalanceTransaction.Specific { public class RefundBalanceTransaction : BalanceTransaction { - public RefundTransactionContext Context { get; set; } + public required RefundTransactionContext Context { get; init; } } public class RefundTransactionContext { - public string PaymentId { get; set; } - public string RefundId { get; set; } + public required string PaymentId { get; init; } + public required string RefundId { get; init; } } } \ No newline at end of file diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/SettlementBalanceTransaction.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/SettlementBalanceTransaction.cs index 3cfbb92d..0957baf2 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/SettlementBalanceTransaction.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransaction/Specific/SettlementBalanceTransaction.cs @@ -1,10 +1,10 @@ namespace Mollie.Api.Models.Balance.Response.BalanceTransaction.Specific { public class SettlementBalanceTransaction : BalanceTransaction { - public SettlementTransactionContext Context { get; set; } + public required SettlementTransactionContext Context { get; init; } } public class SettlementTransactionContext { - public string TransferId { get; set; } - public string SettlementId { get; set; } + public required string TransferId { get; init; } + public required string SettlementId { get; init; } } } \ No newline at end of file diff --git a/src/Mollie.Api/Models/Balance/Response/BalanceTransferDestination.cs b/src/Mollie.Api/Models/Balance/Response/BalanceTransferDestination.cs index 54cb0de1..13b3c612 100644 --- a/src/Mollie.Api/Models/Balance/Response/BalanceTransferDestination.cs +++ b/src/Mollie.Api/Models/Balance/Response/BalanceTransferDestination.cs @@ -3,17 +3,17 @@ public class BalanceTransferDestination { /// /// The default destination of automatic scheduled transfers. Currently only bank-account is supported. /// - public string Type { get; set; } + public required string Type { get; init; } /// /// The configured bank account number of the beneficiary the balance amount is to be transferred to. /// - public string BankAccount { get; set; } + public required string BankAccount { get; init; } /// /// The full name of the beneficiary the balance amount is to be transferred to. /// - public string BeneficiaryName { get; set; } + public required string BeneficiaryName { get; init; } public override string ToString() { return $"{Type} - {BankAccount} - {BeneficiaryName}";