Skip to content

Commit 22d5047

Browse files
authored
Add virtual IBAN support. (#426)
1 parent fd217a1 commit 22d5047

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

src/NoFrixion.MoneyMoov/Models/Account/PaymentAccount.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,12 @@ public string Summary
216216
/// If an account receives a payment it will be automatically unarchived.
217217
/// </summary>
218218
public bool IsArchived { get; set; }
219+
220+
/// <summary>
221+
/// If non-null it indicates that the account is a virtual account and this ID represents the
222+
/// backing physical account.
223+
/// </summary>
224+
public Guid? PhysicalAccountID { get; set; }
225+
226+
public bool IsVirtual => PhysicalAccountID.HasValue;
219227
}

src/NoFrixion.MoneyMoov/Models/Account/PaymentAccountCreate.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
//
1010
// History:
1111
// 09 Dec 2022 Aaron Clauson Created, Stillorgan Wood, Dublin, Ireland.
12-
// 11 Dec 2022 Aaron Clauson Renamed from PaymentAccountCreate to PaymentAccountCreate.
1312
//
1413
// License:
1514
// MIT.
@@ -51,7 +50,7 @@ public class PaymentAccountCreate
5150
/// <summary>
5251
/// For internal use only. Leave empty unless requested otherwise.
5352
/// </summary>
54-
public Guid PhysicalAccountID { get; set; }
53+
public Guid SupplierPhysicalAccountID { get; set; }
5554

5655
/// <summary>
5756
/// If specified the account type will be set to the specified value
@@ -64,6 +63,13 @@ public class PaymentAccountCreate
6463
/// </summary>
6564
public string? TribeAccountId { get; set; }
6665

66+
/// <summary>
67+
/// For EUR accounts this can be set to the ID of another account that will act as the
68+
/// backing phyiscal account. The new account will then act as a Virtual account, able to
69+
/// receive funds but the transactions will be recorded aginst the backing physical account.
70+
/// </summary>
71+
public Guid? PhysicalAccountID { get; set; }
72+
6773
/// <summary>
6874
/// Places all the payment request's properties into a dictionary.
6975
/// </summary>
@@ -76,9 +82,10 @@ public Dictionary<string, string> ToDictionary()
7682
{ nameof(MerchantID), MerchantID.ToString() },
7783
{ nameof(Currency), Currency.ToString() },
7884
{ nameof(AccountName), AccountName ?? string.Empty },
79-
{ nameof(PhysicalAccountID), PhysicalAccountID.ToString() },
85+
{ nameof(SupplierPhysicalAccountID), SupplierPhysicalAccountID.ToString() },
8086
{ nameof(AccountType), AccountType?.ToString() ?? string.Empty },
81-
{ nameof(TribeAccountId), TribeAccountId ?? string.Empty }
87+
{ nameof(TribeAccountId), TribeAccountId ?? string.Empty },
88+
{ nameof(PhysicalAccountID), PhysicalAccountID?.ToString() ?? string.Empty }
8289
};
8390
}
8491
}

src/NoFrixion.MoneyMoov/Models/Transaction/Transaction.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,9 @@ public class Transaction : IWebhookPayload
110110
/// ID of the payout that resulted in the transaction.
111111
/// </summary>
112112
public Guid? PayoutID { get; set; }
113+
114+
/// <summary>
115+
/// If set it indicates the payin was to a virtual IBAN.
116+
/// </summary>
117+
public string VirtualIBAN { get; set; }
113118
}

0 commit comments

Comments
 (0)