2026-03-01 19:56:29 -06:00
|
|
|
|
|
|
|
|
using FiscalOS.Infra.Common;
|
|
|
|
|
|
2026-02-13 11:05:30 -06:00
|
|
|
namespace FiscalOS.Infra.Accounts.Plaid;
|
|
|
|
|
|
|
|
|
|
public sealed class PlaidAccountMetadata : AccountMetadata
|
|
|
|
|
{
|
|
|
|
|
public const string TypeValue = Providers.Plaid;
|
|
|
|
|
public string PlaidId { get; init; } = string.Empty;
|
|
|
|
|
public string PlaidName { get; init; } = string.Empty;
|
2026-03-01 19:56:29 -06:00
|
|
|
public string? Cursor { get; private set; }
|
2026-02-13 11:05:30 -06:00
|
|
|
|
|
|
|
|
private PlaidAccountMetadata() : base(TypeValue)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-01 19:56:29 -06:00
|
|
|
public static PlaidAccountMetadata From(
|
|
|
|
|
string plaidId,
|
|
|
|
|
string plaidName
|
|
|
|
|
)
|
2026-02-13 11:05:30 -06:00
|
|
|
{
|
|
|
|
|
return new()
|
|
|
|
|
{
|
|
|
|
|
PlaidId = plaidId,
|
|
|
|
|
PlaidName = plaidName,
|
|
|
|
|
};
|
|
|
|
|
}
|
2026-03-01 19:56:29 -06:00
|
|
|
|
|
|
|
|
public void SetCursor(string cursor)
|
|
|
|
|
{
|
|
|
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(cursor, nameof(cursor));
|
|
|
|
|
|
|
|
|
|
Cursor = cursor;
|
|
|
|
|
}
|
2026-02-13 11:05:30 -06:00
|
|
|
}
|