diff --git a/source/VMelnalksnis.NordigenDotNet/Accounts/BookedTransaction.cs b/source/VMelnalksnis.NordigenDotNet/Accounts/BookedTransaction.cs
index d72d018..59c09a4 100644
--- a/source/VMelnalksnis.NordigenDotNet/Accounts/BookedTransaction.cs
+++ b/source/VMelnalksnis.NordigenDotNet/Accounts/BookedTransaction.cs
@@ -4,26 +4,52 @@
using NodaTime;
+using VMelnalksnis.NordigenDotNet.Institutions;
+
+#pragma warning disable SA1623
+
namespace VMelnalksnis.NordigenDotNet.Accounts;
+/// A transaction that has been booked - posted to an account on the account servicer's books.
+/// The amount transferred in this transaction.
+/// Unstructured information about the transaction, usually added by the debtor.
+/// A unique transaction id created by the .
+/// The date when an entry is posted to an account on the account servicer's books.
public record BookedTransaction(
- AmountInCurrency Amount,
- string RemittanceInformationUnstructured,
+ AmountInCurrency TransactionAmount,
+ string UnstructuredInformation,
string TransactionId,
LocalDate BookingDate)
- : Transaction(Amount, RemittanceInformationUnstructured)
+ : Transaction(TransactionAmount, UnstructuredInformation)
{
+ /// The name of the counterparty that sends during the transaction.
public string? DebtorName { get; init; }
+ /// The account of the counterparty that sends during the transaction.
public TransactionAccount? DebtorAccount { get; init; }
+ /// The name of the counterparty that receives during the transaction.
public string? CreditorName { get; init; }
+ /// The account of the counterparty that receives during the transaction.
public TransactionAccount? CreditorAccount { get; init; }
+ /// The ISO 20022 bank transaction code.
+ /// Some example values:
+ ///
+ /// PMNT-ICDT-STDO
+ /// PMNT-IRCT-STDO
+ ///
public string? BankTransactionCode { get; init; }
+ /// A transaction id, used both by the transaction and any fees paid to the for the transaction.
public string? EntryReference { get; init; }
+ /// Additional structured information about the transaction from the institution.
+ ///
+ ///
+ /// PURCHASE
+ /// INWARD TRANSFER
+ ///
public string? AdditionalInformation { get; init; }
}
diff --git a/source/VMelnalksnis.NordigenDotNet/Accounts/PendingTransaction.cs b/source/VMelnalksnis.NordigenDotNet/Accounts/PendingTransaction.cs
index dbc5cff..4384678 100644
--- a/source/VMelnalksnis.NordigenDotNet/Accounts/PendingTransaction.cs
+++ b/source/VMelnalksnis.NordigenDotNet/Accounts/PendingTransaction.cs
@@ -4,7 +4,8 @@
namespace VMelnalksnis.NordigenDotNet.Accounts;
-public record PendingTransaction(
- AmountInCurrency Amount,
- string RemittanceInformationUnstructured)
- : Transaction(Amount, RemittanceInformationUnstructured);
+/// A transaction that is still pending.
+/// The amount transferred in this transaction.
+/// Unstructured information about the transaction, usually added by the debtor.
+public record PendingTransaction(AmountInCurrency TransactionAmount, string UnstructuredInformation)
+ : Transaction(TransactionAmount, UnstructuredInformation);
diff --git a/source/VMelnalksnis.NordigenDotNet/Accounts/Transaction.cs b/source/VMelnalksnis.NordigenDotNet/Accounts/Transaction.cs
index 75ca803..1ff6fb0 100644
--- a/source/VMelnalksnis.NordigenDotNet/Accounts/Transaction.cs
+++ b/source/VMelnalksnis.NordigenDotNet/Accounts/Transaction.cs
@@ -2,11 +2,21 @@
// Licensed under the Apache License 2.0.
// See LICENSE file in the project root for full license information.
+using System.Text.Json.Serialization;
+
using NodaTime;
+#pragma warning disable SA1623
+
namespace VMelnalksnis.NordigenDotNet.Accounts;
-public record Transaction(AmountInCurrency TransactionAmount, string RemittanceInformationUnstructured)
+/// Common information for all transactions.
+/// The amount transferred in this transaction.
+/// Unstructured information about the transaction, usually added by the debtor.
+public abstract record Transaction(
+ AmountInCurrency TransactionAmount,
+ [property: JsonPropertyName("remittanceInformationUnstructured")] string UnstructuredInformation)
{
- private LocalDate? ValueDate { get; init; }
+ /// The date when the transaction was valued at.
+ public LocalDate? ValueDate { get; init; }
}
diff --git a/source/VMelnalksnis.NordigenDotNet/Accounts/TransactionAccount.cs b/source/VMelnalksnis.NordigenDotNet/Accounts/TransactionAccount.cs
index 3a91574..0308f42 100644
--- a/source/VMelnalksnis.NordigenDotNet/Accounts/TransactionAccount.cs
+++ b/source/VMelnalksnis.NordigenDotNet/Accounts/TransactionAccount.cs
@@ -4,4 +4,6 @@
namespace VMelnalksnis.NordigenDotNet.Accounts;
+/// An account that can be referenced from a .
+/// The IBAN of the account.
public record TransactionAccount(string Iban);
diff --git a/source/VMelnalksnis.NordigenDotNet/Accounts/Transactions.cs b/source/VMelnalksnis.NordigenDotNet/Accounts/Transactions.cs
index 5bcbaee..6c44412 100644
--- a/source/VMelnalksnis.NordigenDotNet/Accounts/Transactions.cs
+++ b/source/VMelnalksnis.NordigenDotNet/Accounts/Transactions.cs
@@ -6,6 +6,9 @@ using System.Collections.Generic;
namespace VMelnalksnis.NordigenDotNet.Accounts;
+/// All transactions of an account.
+/// All transactions that have been booked.
+/// All transaction that are still pending.
public record Transactions(List Booked, List Pending);
internal record TransactionsWrapper(Transactions Transactions);