Table of Contents

Class PaymentInvoiceDTO

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

An invoice as the provider holds it now.

public record PaymentInvoiceDTO : IEquatable<PaymentInvoiceDTO>
Inheritance
PaymentInvoiceDTO
Implements
Inherited Members

Remarks

The document itself — its number, its PDF, its hosted page — is the provider's. A caller keeps a copy of what it shows in a list and refreshes it when an event about the invoice arrives.

Constructors

PaymentInvoiceDTO(string, string, string?, PaymentInvoiceStatusType, string, string, long, long, long, DateTimeOffset, DateTimeOffset?, DateTimeOffset?, DateTimeOffset?, string?, string?, string?, string?, string?, IReadOnlyDictionary<string, string>, IReadOnlyList<PaymentInvoiceLineDTO>)

An invoice as the provider holds it now.

public PaymentInvoiceDTO(string InvoiceId, string CustomerId, string? Number, PaymentInvoiceStatusType Status, string ProviderStatus, string CurrencyCode, long TotalMinor, long AmountPaidMinor, long AmountDueMinor, DateTimeOffset CreatedUtc, DateTimeOffset? PeriodStartUtc, DateTimeOffset? PeriodEndUtc, DateTimeOffset? PaidUtc, string? HostedUrl, string? SubscriptionId, string? PaymentIntentId, string? ChargeId, string? FailureReason, IReadOnlyDictionary<string, string> Metadata, IReadOnlyList<PaymentInvoiceLineDTO> Lines)

Parameters

InvoiceId string

The provider's identifier for it.

CustomerId string

Who owes it.

Number string

The number printed on it; null while it is a draft.

Status PaymentInvoiceStatusType

Where it stands.

ProviderStatus string

The provider's own name for the status, kept for Unknown.

CurrencyCode string

ISO 4217, upper case.

TotalMinor long

What it charges, in the currency's minor units.

AmountPaidMinor long

What has been paid of it.

AmountDueMinor long

What is still owed.

CreatedUtc DateTimeOffset

When it was created.

PeriodStartUtc DateTimeOffset?

The start of the period it bills, when it bills one.

PeriodEndUtc DateTimeOffset?

The end of the period it bills, when it bills one.

PaidUtc DateTimeOffset?

When it was paid.

HostedUrl string

The provider's page for it, where it can be paid and read.

SubscriptionId string

The subscription it bills, when it bills one.

PaymentIntentId string

The payment that pays it, once one was attempted.

ChargeId string

The charge that took the money, once it was taken — what a transfer funded by it names.

FailureReason string

Why its last charge was refused, while it is open after a refusal.

Metadata IReadOnlyDictionary<string, string>

What the caller stored on it.

Lines IReadOnlyList<PaymentInvoiceLineDTO>

What it charges for.

Remarks

The document itself — its number, its PDF, its hosted page — is the provider's. A caller keeps a copy of what it shows in a list and refreshes it when an event about the invoice arrives.

Properties

AmountDueMinor

What is still owed.

public long AmountDueMinor { get; init; }

Property Value

long

AmountPaidMinor

What has been paid of it.

public long AmountPaidMinor { get; init; }

Property Value

long

ChargeId

The charge that took the money, once it was taken — what a transfer funded by it names.

public string? ChargeId { get; init; }

Property Value

string

CreatedUtc

When it was created.

public DateTimeOffset CreatedUtc { get; init; }

Property Value

DateTimeOffset

CurrencyCode

ISO 4217, upper case.

public string CurrencyCode { get; init; }

Property Value

string

CustomerId

Who owes it.

public string CustomerId { get; init; }

Property Value

string

FailureReason

Why its last charge was refused, while it is open after a refusal.

public string? FailureReason { get; init; }

Property Value

string

HostedUrl

The provider's page for it, where it can be paid and read.

public string? HostedUrl { get; init; }

Property Value

string

InvoiceId

The provider's identifier for it.

public string InvoiceId { get; init; }

Property Value

string

Lines

What it charges for.

public IReadOnlyList<PaymentInvoiceLineDTO> Lines { get; init; }

Property Value

IReadOnlyList<PaymentInvoiceLineDTO>

Metadata

What the caller stored on it.

public IReadOnlyDictionary<string, string> Metadata { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Number

The number printed on it; null while it is a draft.

public string? Number { get; init; }

Property Value

string

PaidUtc

When it was paid.

public DateTimeOffset? PaidUtc { get; init; }

Property Value

DateTimeOffset?

PaymentIntentId

The payment that pays it, once one was attempted.

public string? PaymentIntentId { get; init; }

Property Value

string

PeriodEndUtc

The end of the period it bills, when it bills one.

public DateTimeOffset? PeriodEndUtc { get; init; }

Property Value

DateTimeOffset?

PeriodStartUtc

The start of the period it bills, when it bills one.

public DateTimeOffset? PeriodStartUtc { get; init; }

Property Value

DateTimeOffset?

ProviderStatus

The provider's own name for the status, kept for Unknown.

public string ProviderStatus { get; init; }

Property Value

string

Status

Where it stands.

public PaymentInvoiceStatusType Status { get; init; }

Property Value

PaymentInvoiceStatusType

SubscriptionId

The subscription it bills, when it bills one.

public string? SubscriptionId { get; init; }

Property Value

string

TotalMinor

What it charges, in the currency's minor units.

public long TotalMinor { get; init; }

Property Value

long