Table of Contents

Class PaymentMethodDTO

Namespace
NuvTools.Payment.DTOs
Assembly
NuvTools.Payment.dll

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

PaymentMethodId string

The provider's identifier for it.

Brand string

The card network, when the method is a card.

Last4 string

The last four digits, which is as much as anyone needs to recognise it.

ExpiryMonth int?

The month the card expires, 1 to 12, when the method is a card.

ExpiryYear int?

The four-digit year the card expires, when the method is a card.

IsDefault bool

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.

Properties

Brand

The card network, when the method is a card.

public string? Brand { get; init; }

Property Value

string

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

bool

Last4

The last four digits, which is as much as anyone needs to recognise it.

public string? Last4 { get; init; }

Property Value

string

PaymentMethodId

The provider's identifier for it.

public string PaymentMethodId { get; init; }

Property Value

string