Table of Contents

Class PaymentSubscriptionDTO

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

A subscription as the provider holds it now.

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

Constructors

PaymentSubscriptionDTO(string, string, PaymentSubscriptionStatusType, string, string?, DateTimeOffset?, bool, IReadOnlyDictionary<string, string>, IReadOnlyList<PaymentSubscriptionItemDTO>?)

A subscription as the provider holds it now.

public PaymentSubscriptionDTO(string SubscriptionId, string CustomerId, PaymentSubscriptionStatusType Status, string ProviderStatus, string? PriceLookupKey, DateTimeOffset? CurrentPeriodEndUtc, bool CancelAtPeriodEnd, IReadOnlyDictionary<string, string> Metadata, IReadOnlyList<PaymentSubscriptionItemDTO>? Items = null)

Parameters

SubscriptionId string

The provider's identifier for it.

CustomerId string

Who pays for it.

Status PaymentSubscriptionStatusType

Where it stands.

ProviderStatus string

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

PriceLookupKey string

The lookup key of the price it is charged at — the stable name a caller's catalogue refers to — or null when the price has none.

CurrentPeriodEndUtc DateTimeOffset?

When the period already paid for ends.

CancelAtPeriodEnd bool

Whether it ends at CurrentPeriodEndUtc rather than renewing.

Metadata IReadOnlyDictionary<string, string>

What the caller stored on it when it was started.

Items IReadOnlyList<PaymentSubscriptionItemDTO>

Every price it is charged at, with its quantity: the plan's own price and, on a subscription that also sells seats, one item per seat price. PriceLookupKey is the first of them.

Properties

CancelAtPeriodEnd

Whether it ends at CurrentPeriodEndUtc rather than renewing.

public bool CancelAtPeriodEnd { get; init; }

Property Value

bool

CurrentPeriodEndUtc

When the period already paid for ends.

public DateTimeOffset? CurrentPeriodEndUtc { get; init; }

Property Value

DateTimeOffset?

CustomerId

Who pays for it.

public string CustomerId { get; init; }

Property Value

string

Items

Every price it is charged at, with its quantity: the plan's own price and, on a subscription that also sells seats, one item per seat price. PriceLookupKey is the first of them.

public IReadOnlyList<PaymentSubscriptionItemDTO>? Items { get; init; }

Property Value

IReadOnlyList<PaymentSubscriptionItemDTO>

Metadata

What the caller stored on it when it was started.

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

Property Value

IReadOnlyDictionary<string, string>

PriceLookupKey

The lookup key of the price it is charged at — the stable name a caller's catalogue refers to — or null when the price has none.

public string? PriceLookupKey { get; init; }

Property Value

string

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 PaymentSubscriptionStatusType Status { get; init; }

Property Value

PaymentSubscriptionStatusType

SubscriptionId

The provider's identifier for it.

public string SubscriptionId { get; init; }

Property Value

string