mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
14 lines
614 B
C#
14 lines
614 B
C#
namespace BTCPayServer.Data;
|
|
|
|
public abstract record CustomerSelector
|
|
{
|
|
public static Id ById(string customerId) => new Id(customerId);
|
|
public static ExternalRef ByExternalRef(string externalId) => new ExternalRef(externalId);
|
|
public static Identity ByIdentity(string type, string value) => new Identity(type, value);
|
|
public static Identity ByEmail(string email) => new Identity("Email", email);
|
|
|
|
public record Id(string CustomerId) : CustomerSelector;
|
|
public record ExternalRef(string Ref) : CustomerSelector;
|
|
public record Identity(string Type, string Value) : CustomerSelector;
|
|
}
|