Skip to content

Commit c77e27b

Browse files
Merge pull request #642 from nofrixion/feature/MOOV-4774-merchant-token-update
Feature/moov 4774 merchant token update
2 parents 1bad829 + 2f13a83 commit c77e27b

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

src/NoFrixion.MoneyMoov/Enums/MerchantTokenEventTypeEnum.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,10 @@ public enum MerchantTokenEventTypeEnum
4040
/// <summary>
4141
/// A merchant token was archived.
4242
/// </summary>
43-
Archive = 4
43+
Archive = 4,
44+
45+
/// <summary>
46+
/// A merchant token was edited.
47+
/// </summary>
48+
Edited = 5
4449
}

src/NoFrixion.MoneyMoov/Models/Token/MerchantToken.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ public MerchantTokenPermissionsEnum Permissions
133133
/// </summary>
134134
public bool IsArchived { get; set; }
135135

136+
public required string Nonce { get; set; }
137+
136138
/// <summary>
137139
/// Gets a hash of the critical fields for the merhcant token. This hash is
138140
/// used to ensure a merchant token's details are not modified between the time the
@@ -144,7 +146,8 @@ public string GetApprovalHash()
144146
var input =
145147
Description +
146148
MerchantID +
147-
GetPermissionListHash();
149+
GetPermissionListHash() +
150+
Nonce;
148151

149152
return HashHelper.CreateHash(input);
150153
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// -----------------------------------------------------------------------------
2+
// Filename: TokenUpdate.cs
3+
//
4+
// Description: Contains details of a merchant token update request:
5+
//
6+
// Author(s):
7+
// Donal O'Connor ([email protected])
8+
//
9+
// History:
10+
// 01 09 2025 Donal O'Connor Created, Harcourt St, Dublin, Ireland.
11+
//
12+
// License:
13+
// Proprietary NoFrixion.
14+
// -----------------------------------------------------------------------------
15+
16+
namespace NoFrixion.MoneyMoov.Models;
17+
18+
public class TokenUpdate
19+
{
20+
public Guid MerchantID { get; set; }
21+
22+
public string? Description { get; set; }
23+
24+
/// <summary>
25+
/// The permissions that the merchant token supports.
26+
/// </summary>
27+
public List<MerchantTokenPermissionsEnum>? PermissionTypes { get; set; }
28+
}

0 commit comments

Comments
 (0)