Skip to content

Commit b3adbdf

Browse files
Merge pull request #617 from nofrixion/feature/MOOV-4727-get-accounts-minimal
Added PaymentAccountMinimal model
2 parents d160fd7 + 97df2e5 commit b3adbdf

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// -----------------------------------------------------------------------------
2+
// Filename: PaymentAccountMinimal.cs
3+
//
4+
// Description: A minimal representation of a payment account:
5+
//
6+
// Author(s):
7+
// Donal O'Connor ([email protected])
8+
//
9+
// History:
10+
// 24 07 2025 Donal O'Connor Created, Harcourt St, Dublin, Ireland.
11+
//
12+
// License:
13+
// Proprietary NoFrixion.
14+
// -----------------------------------------------------------------------------
15+
#nullable disable
16+
17+
namespace NoFrixion.MoneyMoov.Models;
18+
19+
public class PaymentAccountMinimal
20+
{
21+
/// <summary>
22+
/// Unique id for the account.
23+
/// </summary>
24+
public Guid ID { get; set; }
25+
26+
/// <summary>
27+
/// The ID of the merchant that owns the account.
28+
/// </summary>
29+
public Guid MerchantID { get; set; }
30+
31+
/// <summary>
32+
/// Balance of the account.
33+
/// </summary>
34+
public decimal Balance { get; set; }
35+
36+
/// <summary>
37+
/// Balance of the account expressed in the currency’s minor units (e.g. cents, pence).
38+
/// </summary>
39+
public long BalanceMinorUnits => Balance.ToAmountMinorUnits(Currency);
40+
41+
/// <summary>
42+
/// Currency of the account in ISO 4217 format
43+
/// </summary>
44+
/// <value>Currency of the account in ISO 4217 format</value>
45+
public CurrencyTypeEnum Currency { get; set; }
46+
47+
/// <summary>
48+
/// Name for the account
49+
/// </summary>
50+
/// <value>Name for the account</value>
51+
public string AccountName { get; set; }
52+
53+
/// <summary>
54+
/// The payment account identifier contains the information needed to access the account
55+
/// via a payment network.
56+
/// </summary>
57+
public AccountIdentifier Identifier { get; set; }
58+
59+
/// <summary>
60+
/// Is the account archived
61+
/// </summary>
62+
public bool IsArchived { get; set; }
63+
64+
/// <summary>
65+
/// Indicates if the payment account is an externally connected account.
66+
/// Externally connected account can be used to view account balances and transactions.
67+
/// </summary>
68+
public bool IsConnectedAccount { get; set; }
69+
}

src/NoFrixion.MoneyMoov/Models/ApiPageResponseBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ public PaymentAccountPageResponse(List<PaymentAccount> content,
7272
{ }
7373
}
7474

75+
public class PaymentAccountMinimalPageResponse(
76+
List<PaymentAccountMinimal> content,
77+
int pageNumber = 1,
78+
int pageSize = 10,
79+
long totalPages = default,
80+
long totalSize = default)
81+
: ApiPageResponseBase<PaymentAccountMinimal>(content, pageNumber, pageSize, totalPages, totalSize);
82+
7583
public class MerchantPageResponse : ApiPageResponseBase<Merchant>
7684
{
7785
public MerchantPageResponse(List<Merchant> content,

0 commit comments

Comments
 (0)