Class PaymentMethodDTO
A payment method as a screen shows it — never the number.
public record PaymentMethodDTO : IEquatable<PaymentMethodDTO>
- Inheritance
-
PaymentMethodDTO
- Implements
- Inherited Members
Constructors
PaymentMethodDTO(string, string?, string?, int?, int?, bool)
A payment method as a screen shows it — never the number.
public PaymentMethodDTO(string PaymentMethodId, string? Brand, string? Last4, int? ExpiryMonth = null, int? ExpiryYear = null, bool IsDefault = false)
Parameters
PaymentMethodIdstringThe provider's identifier for it.
BrandstringThe card network, when the method is a card.
Last4stringThe last four digits, which is as much as anyone needs to recognise it.
ExpiryMonthint?The month the card expires, 1 to 12, when the method is a card.
ExpiryYearint?The four-digit year the card expires, when the method is a card.
IsDefaultboolWhether later charges are taken from it. Set when methods are listed; a call that reads only the default leaves it false, because there it says nothing.
Properties
Brand
The card network, when the method is a card.
public string? Brand { get; init; }
Property Value
ExpiryMonth
The month the card expires, 1 to 12, when the method is a card.
public int? ExpiryMonth { get; init; }
Property Value
- int?
ExpiryYear
The four-digit year the card expires, when the method is a card.
public int? ExpiryYear { get; init; }
Property Value
- int?
IsDefault
Whether later charges are taken from it. Set when methods are listed; a call that reads only the default leaves it false, because there it says nothing.
public bool IsDefault { get; init; }
Property Value
Last4
The last four digits, which is as much as anyone needs to recognise it.
public string? Last4 { get; init; }
Property Value
PaymentMethodId
The provider's identifier for it.
public string PaymentMethodId { get; init; }