Skip to content

Commit d672596

Browse files
committed
Merge branch 'release/biz-0.1.54'
2 parents 2a2bbdd + 4ad4f71 commit d672596

File tree

6 files changed

+31
-11
lines changed

6 files changed

+31
-11
lines changed

src/NoFrixion.MoneyMoov/Extensions/PaymentSchedule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static string GetFormattedScheduleDayOnly(DateTimeOffset? scheduleDate) =
3434
scheduleDate == null ? NO_SCHEDULED_DATE_DESCRIPTION : GetScheduleDayOnlyString(scheduleDate.Value);
3535

3636
public static string GetScheduleDayOnlyString(DateTimeOffset scheduleDate) =>
37-
$"{scheduleDate.ToString("MMM")} {scheduleDate.Day}" + (scheduleDate.Year == DateTimeOffset.Now.Year ? string.Empty : $", {scheduleDate.Year}");
37+
$"{scheduleDate.ToString("MMM")} {scheduleDate.Day}" + (scheduleDate.Year == DateTimeOffset.Now.Year ? string.Empty : $", {scheduleDate.Year}") + $" at {scheduleDate.LocalDateTime:HH:mm}";
3838

3939
public static string GetDateSuffix(int num)
4040
{

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/Mandates/Mandate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ public class Mandate
9292
/// <summary>
9393
/// Customer's account number in case of GBP account.
9494
/// </summary>
95-
public int? CustomerAccountNumber { get; set; }
95+
public string? CustomerAccountNumber { get; set; }
9696

9797
/// <summary>
9898
/// Customer's sort code in case of GBP account.
9999
/// </summary>
100-
public int? CustomerSortCode { get; set; }
100+
public string? CustomerSortCode { get; set; }
101101

102102
/// <summary>
103103
/// Reference assigned to this mandate.

src/NoFrixion.MoneyMoov/Models/Mandates/MandateCreate.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ public class MandateCreate
8989
/// Account number of the customer's bank account in case of GBP account.
9090
/// </summary>
9191
[MaxLength(8)]
92-
[RegularExpression("^[a-zA-Z0-9\\-,'. ]+$", ErrorMessage = "Please, provide a valid account number.")]
93-
public int? AccountNumber { get; set; }
92+
[RegularExpression("^[0-9]*$", ErrorMessage = "Please, provide a valid account number.")]
93+
public string? AccountNumber { get; set; }
9494

9595
/// <summary>
9696
/// Sort code of the customer's bank account in case of GBP account.
9797
/// </summary>
9898
[MaxLength(6)]
99-
[RegularExpression("^[a-zA-Z0-9\\-,'. ]+$", ErrorMessage = "Please, provide a valid sort code.")]
100-
public int? SortCode { get; set; }
99+
[RegularExpression("^[0-9\\-]*$", ErrorMessage = "Please, provide a valid sort code.")]
100+
public string? SortCode { get; set; }
101101

102102
/// <summary>
103103
/// Customer's email address.

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)