Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/NoFrixion.MoneyMoov/Models/Payouts/PayoutCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,26 @@ public class PayoutCreate
public decimal? Amount { get; set; }

/// <summary>
/// Gets or Sets the your reference property.
/// The Your reference field is an optional field that gets set locally on the payer's transaction record. It does not get
/// sent out through the payment network. The maximum length for the field is 256 chracters. An empty value is also supported.
/// Supported chracters:
/// a b c d e f g h i j k l m n o p q r s t u v w x y z
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
/// 0 1 2 3 4 5 6 7 8 9
/// / - ? : ( ) . , ' + Space
/// In addition the field cannot start with a : or - character.
/// </summary>
public string? YourReference { get; set; }

/// <summary>
/// The Their reference field gets sent to the payee and appears on their transaction record.
/// The maximum length for the field varies depending on the payment network. For SEPA (Euro) it is 140 chracters. For Faster Payments (GBP) it is 18 characters.
/// a b c d e f g h i j k l m n o p q r s t u v w x y z
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
/// 0 1 2 3 4 5 6 7 8 9
/// / - ? : ( ) . , ' + Space
/// In addition the field cannot start with a : or - character.
/// </summary>
public string? TheirReference { get; set; }

[Obsolete("Please use Destination.")]
Expand Down
21 changes: 20 additions & 1 deletion src/NoFrixion.MoneyMoov/Models/Payouts/PayoutUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,30 @@ public class PayoutUpdate

public CurrencyTypeEnum? Currency { get; set; }

[Range(0.01, double.MaxValue, ErrorMessage = "Minimum value of 0.01 is required for Amount.")]
[Range(0.0001, double.MaxValue, ErrorMessage = "Minimum value of 0.0001 is required for Amount.")]
public decimal? Amount { get; set; }

/// <summary>
/// The Your reference field is an optional field that gets set locally on the payer's transaction record. It does not get
/// sent out through the payment network. The maximum length for the field is 256 chracters. An empty value is also supported.
/// Supported chracters:
/// a b c d e f g h i j k l m n o p q r s t u v w x y z
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
/// 0 1 2 3 4 5 6 7 8 9
/// / - ? : ( ) . , ' + Space
/// In addition the field cannot start with a : or - character.
/// </summary>
public string? YourReference { get; set; }

/// <summary>
/// The Their reference field gets sent to the payee and appears on their transaction record.
/// The maximum length for the field varies depending on the payment network. For SEPA (Euro) it is 140 chracters. For Faster Payments (GBP) it is 18 characters.
/// a b c d e f g h i j k l m n o p q r s t u v w x y z
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
/// 0 1 2 3 4 5 6 7 8 9
/// / - ? : ( ) . , ' + Space
/// In addition the field cannot start with a : or - character.
/// </summary>
public string? TheirReference { get; set; }

[Obsolete("Please use Destination.")]
Expand Down
5 changes: 2 additions & 3 deletions src/NoFrixion.MoneyMoov/Models/Payouts/PayoutsValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,14 @@ public static class PayoutsValidator
public const string FALLBACK_THEIR_REFERENCE = "NFXN {0}";

/// <summary>
/// Validation reqex for the Name amd Reference (Your and Their) fields with Banking Cirlce. It must
/// Validation reqex for the Name amd Reference (Your and Their) fields with Banking Circle. It must
/// have at least one non space character. Total of all characters must be 140 or less.
/// Banking Circle supported chars see https://docs.bankingcircleconnect.com/docs/initiate-payments:
/// a b c d e f g h i j k l m n o p q r s t u v w x y z
/// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
/// 0 1 2 3 4 5 6 7 8 9
/// / - ? : ( ) . , ' +
/// / - ? : ( ) . , ' + Space
/// In addition the field cannot start with a : or - character and must have one none space char.
/// Space
/// </summary>
public const string BANKING_CIRCLE_ALLOWED_CHARS_REGEX = @"^(?![\:\-])[a-zA-Z0-9\s\/\-\.\+\(\)\?\:\,']*$";

Expand Down
Loading