Class PaymentInvoiceRequest
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
CustomerIdstringWho owes it.
CurrencyCodestringISO 4217, in any case.
LinesIReadOnlyList<PaymentInvoiceLineRequest>What it charges for; at least one.
IdempotencyKeystringThe 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.
DescriptionstringA memo printed on the invoice.
StatementDescriptorstringWhat the customer's card statement shows for the charge, naming the product the money is for. The account's own descriptor when null.
PeriodStartUtcDateTimeOffset?The start of the period the lines cover, printed on each.
PeriodEndUtcDateTimeOffset?The end of the period the lines cover.
MetadataIDictionary<string, string>Stored on the invoice; the caller's own identifiers belong here.
ChargeAutomaticallyboolWhether 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.
PaymentMethodIdstringThe 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
CurrencyCode
ISO 4217, in any case.
public string CurrencyCode { get; init; }
Property Value
CustomerId
Who owes it.
public string CustomerId { get; init; }
Property Value
Description
A memo printed on the invoice.
public string? Description { get; init; }
Property Value
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
Lines
What it charges for; at least one.
public IReadOnlyList<PaymentInvoiceLineRequest> Lines { get; init; }
Property Value
Metadata
Stored on the invoice; the caller's own identifiers belong here.
public IDictionary<string, string>? Metadata { get; init; }
Property Value
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
PeriodEndUtc
The end of the period the lines cover.
public DateTimeOffset? PeriodEndUtc { get; init; }
Property Value
PeriodStartUtc
The start of the period the lines cover, printed on each.
public DateTimeOffset? PeriodStartUtc { get; init; }
Property Value
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; }