InvoiceCreatedEvent class

Event fired when an invoice is created

Inheritance

Constructors

InvoiceCreatedEvent({required String invoiceId, required String walletId, required List<String> addresses, required BigInt amount, List<InvoiceOutputSpec>? outputs, String? description, DateTime? expiresAt, Map<String, dynamic>? invoiceMetadata, String? eventId, DateTime? timestamp, int? version, Map<String, dynamic>? metadata})

Properties

addresses List<String>
Legacy: P2PKH addresses for the invoice
final
aggregateId String
The ID of the aggregate this event belongs to
no setterinherited
aggregateType String
The type of aggregate this event belongs to
no setterinherited
amount BigInt
Legacy: Total amount for the invoice
final
correlationId String
The correlation ID of the message.
no setterinherited
description String?
final
eventId String
Unique identifier for this event Used for deduplication and correlation
no setterinherited
expiresAt DateTime?
final
hashCode int
The hash code for this object.
no setterinherited
invoiceId String
finalinherited
invoiceMetadata Map<String, dynamic>?
final
metadata Map<String, dynamic>
Additional metadata for the event Can include correlation IDs, causation IDs, user context, etc.
no setterinherited
outputs List<InvoiceOutputSpec>?
Structured output specifications (P2PKH, P2MS, etc.) When present, this takes precedence over addresses/amount
final
replyTo → ActorRef?
The actor to reply to.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
Timestamp when the event occurred
no setterinherited
version int
Version/sequence number of this event within its aggregate Used for ordering and optimistic concurrency control
no setterinherited
walletId String
finalinherited

Methods

getEventData() Map<String, dynamic>
Implementation of SerializableEvent.getEventData
inherited
getInvoiceEventData() Map<String, dynamic>
Get event-specific data for serialization
override
getValidationErrors() List<String>
Get validation errors Override in subclasses to provide specific error messages
inherited
isValid() bool
Validate the event Override in subclasses for custom validation
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCbor() List<int>
Serialize event to CBOR bytes
inherited
toMap() Map<String, dynamic>
Convert event to a map for serialization Override in subclasses to include event-specific data
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromMap(Map<String, dynamic> map) InvoiceCreatedEvent
Create event from a map during deserialization This is a factory method that should be implemented by concrete event classes