Table of Contents

Class PaymentInvoiceRequest

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

An invoice the caller issues for what it already measured — usage, typically — and has the provider charge.

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

Constructors

PaymentInvoiceRequest(string, string, IReadOnlyList<PaymentInvoiceLineRequest>, string, string?, string?, DateTimeOffset?, DateTimeOffset?, IDictionary<string, string>?, bool, string?)

An invoice the caller issues for what it already measured — usage, typically — and has the provider charge.

public PaymentInvoiceRequest(string CustomerId, string CurrencyCode, IReadOnlyList<PaymentInvoiceLineRequest> Lines, string IdempotencyKey, string? Description = null, string? StatementDescriptor = null, DateTimeOffset? PeriodStartUtc = null, DateTimeOffset? PeriodEndUtc = null, IDictionary<string, string>? Metadata = null, bool ChargeAutomatically = true, string? PaymentMethodId = null)

Parameters

CustomerId string

Who owes it.

CurrencyCode string

ISO 4217, in any case.

Lines IReadOnlyList<PaymentInvoiceLineRequest>

What it charges for; at least one.

IdempotencyKey string

The caller's own key, from which every provider call is keyed. The same key issues the same invoice once, however often the request is repeated.

Description string

A memo printed on the invoice.

StatementDescriptor string

What the customer's card statement shows for the charge, naming the product the money is for. The account's own descriptor when null.

PeriodStartUtc DateTimeOffset?

The start of the period the lines cover, printed on each.

PeriodEndUtc DateTimeOffset?

The end of the period the lines cover.

Metadata IDictionary<string, string>

Stored on the invoice; the caller's own identifiers belong here.

ChargeAutomatically bool

Whether the provider charges the customer's default payment method as soon as it is issued. When false it stays open for the customer to pay.

PaymentMethodId string

The customer's saved payment method this invoice is charged to, instead of the customer's default — for a customer who pays each product with a different card. It must already be attached to the customer. The default when null.

Properties

ChargeAutomatically

Whether the provider charges the customer's default payment method as soon as it is issued. When false it stays open for the customer to pay.

public bool ChargeAutomatically { get; init; }

Property Value

bool

CurrencyCode

ISO 4217, in any case.

public string CurrencyCode { get; init; }

Property Value

string

CustomerId

Who owes it.

public string CustomerId { get; init; }

Property Value

string

Description

A memo printed on the invoice.

public string? Description { get; init; }

Property Value

string

IdempotencyKey

The caller's own key, from which every provider call is keyed. The same key issues the same invoice once, however often the request is repeated.

public string IdempotencyKey { get; init; }

Property Value

string

Lines

What it charges for; at least one.

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

Property Value

IReadOnlyList<PaymentInvoiceLineRequest>

Metadata

Stored on the invoice; the caller's own identifiers belong here.

public IDictionary<string, string>? Metadata { get; init; }

Property Value

IDictionary<string, string>

PaymentMethodId

The customer's saved payment method this invoice is charged to, instead of the customer's default — for a customer who pays each product with a different card. It must already be attached to the customer. The default when null.

public string? PaymentMethodId { get; init; }

Property Value

string

PeriodEndUtc

The end of the period the lines cover.

public DateTimeOffset? PeriodEndUtc { get; init; }

Property Value

DateTimeOffset?

PeriodStartUtc

The start of the period the lines cover, printed on each.

public DateTimeOffset? PeriodStartUtc { get; init; }

Property Value

DateTimeOffset?

StatementDescriptor

What the customer's card statement shows for the charge, naming the product the money is for. The account's own descriptor when null.

public string? StatementDescriptor { get; init; }

Property Value

string