Skip to content

Commit 44ba888

Browse files
Merge pull request #415 from nofrixion/MOOV-3586-New-Account-Type-Called-Tribe
New account type Tribe
2 parents 7b467cf + eaaf277 commit 44ba888

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// -----------------------------------------------------------------------------
2+
// Filename: AccountTypeEnum.cs
3+
//
4+
// Description: Provides an enumeration of account types. Mainly for fee calculations.
5+
//
6+
// Author(s):
7+
// Axel Granillo ([email protected])
8+
//
9+
// History:
10+
// 16 07 2024 Axel Granillo Created, Remote, Mexico City, Mexico.
11+
//
12+
// License:
13+
// Proprietary NoFrixion.
14+
// -----------------------------------------------------------------------------
15+
16+
namespace NoFrixion.MoneyMoov.Enums;
17+
18+
/// <summary>
19+
/// Enumeration of all possible account types.
20+
/// </summary>
21+
public enum AccountTypeEnum
22+
{
23+
/// <summary>
24+
/// Standard accounts. No fees applied.
25+
/// </summary>
26+
Standard,
27+
28+
/// <summary>
29+
/// Standard fee accounts. Fees are applied.
30+
/// </summary>
31+
StandardFee,
32+
33+
/// <summary>
34+
/// Account associated with Tribe.
35+
/// </summary>
36+
Tribe,
37+
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// MIT.
1616
//-----------------------------------------------------------------------------
1717

18+
using NoFrixion.MoneyMoov.Enums;
19+
1820
namespace NoFrixion.MoneyMoov.Models;
1921

2022
public class PaymentAccountCreate
@@ -50,6 +52,17 @@ public class PaymentAccountCreate
5052
/// For internal use only. Leave empty unless requested otherwise.
5153
/// </summary>
5254
public Guid PhysicalAccountID { get; set; }
55+
56+
/// <summary>
57+
/// If specified the account type will be set to the specified value
58+
/// disregarding the merchant default account type.
59+
/// </summary>
60+
public AccountTypeEnum? AccountType { get; set; }
61+
62+
/// <summary>
63+
/// If creating a Tribe account type, then this is the tribe account id
64+
/// </summary>
65+
public string? TribeAccountId { get; set; }
5366

5467
/// <summary>
5568
/// Places all the payment request's properties into a dictionary.
@@ -64,6 +77,8 @@ public Dictionary<string, string> ToDictionary()
6477
{ nameof(Currency), Currency.ToString() },
6578
{ nameof(AccountName), AccountName ?? string.Empty },
6679
{ nameof(PhysicalAccountID), PhysicalAccountID.ToString() },
80+
{ nameof(AccountType), AccountType?.ToString() ?? string.Empty },
81+
{ nameof(TribeAccountId), TribeAccountId ?? string.Empty }
6782
};
6883
}
6984
}

0 commit comments

Comments
 (0)