Class InvoiceCreatedEvent
- Namespace
- Compendium.Core.Domain.Events.Integration
- Assembly
- Compendium.Core.dll
Integration event raised when an invoice is created.
public sealed record InvoiceCreatedEvent : IntegrationEventBase, IIntegrationEvent, IEquatable<IntegrationEventBase>, IEquatable<InvoiceCreatedEvent>
- Inheritance
-
InvoiceCreatedEvent
- Implements
- Inherited Members
Constructors
InvoiceCreatedEvent(string, string, string?, long, string, DateTimeOffset)
Integration event raised when an invoice is created.
public InvoiceCreatedEvent(string InvoiceId, string CustomerId, string? SubscriptionId, long Amount, string Currency, DateTimeOffset DueDate)
Parameters
InvoiceIdstringThe unique identifier of the invoice.
CustomerIdstringThe unique identifier of the customer.
SubscriptionIdstringThe subscription identifier, if applicable.
AmountlongThe invoice amount in the smallest currency unit (e.g., cents).
CurrencystringThe currency code (e.g., USD, EUR).
DueDateDateTimeOffsetThe due date of the invoice.
Properties
Amount
The invoice amount in the smallest currency unit (e.g., cents).
public long Amount { get; init; }
Property Value
Currency
The currency code (e.g., USD, EUR).
public string Currency { get; init; }
Property Value
CustomerId
The unique identifier of the customer.
public string CustomerId { get; init; }
Property Value
DueDate
The due date of the invoice.
public DateTimeOffset DueDate { get; init; }
Property Value
EventType
Gets the name of the event type for serialization and routing purposes.
public override string EventType { get; }
Property Value
InvoiceId
The unique identifier of the invoice.
public string InvoiceId { get; init; }
Property Value
SubscriptionId
The subscription identifier, if applicable.
public string? SubscriptionId { get; init; }