SubscriptionEvent class

Tracks Stripe webhook events with EMXI business-language translation. Stored in Firestore subscriptionEvents collection. Used to power the ERP alert feed for COO/CEO.

Constructors

SubscriptionEvent({String id = '', String subscriptionId = '', String userId = '', String userName = '', String stripeEventType = '', String emxiStatus = '', String emxiStatusColor = 'grey', String planName = '', bool alertCOO = false, bool alertCEO = false, Map<String, dynamic> metadata = const {}, int createdAt = 0, double amount = 0, String currency = '', double stripeFees = 0, double stripeNet = 0, String invoiceId = '', String invoiceUrl = '', String chargeId = '', String paymentMethodBrand = '', String paymentMethodLast4 = '', String failureReason = '', String failureMessage = '', int currentPeriodEnd = 0, bool cancelAtPeriodEnd = false, String customerEmail = '', String couponId = '', double discountPercent = 0})
SubscriptionEvent.fromJSON(Map<String, dynamic> data)

Properties

alertCEO bool
getter/setter pair
alertCOO bool
getter/setter pair
amount double
getter/setter pair
cancelAtPeriodEnd bool
getter/setter pair
chargeId String
getter/setter pair
couponId String
getter/setter pair
createdAt int
getter/setter pair
currency String
getter/setter pair
currentPeriodEnd int
getter/setter pair
customerEmail String
getter/setter pair
discountPercent double
getter/setter pair
emxiStatus String
getter/setter pair
emxiStatusColor String
getter/setter pair
failureMessage String
getter/setter pair
failureReason String
getter/setter pair
hasFinancialData bool
Whether this event has financial data attached.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
getter/setter pair
invoiceId String
getter/setter pair
invoiceUrl String
getter/setter pair
isScheduledToCancel bool
Whether the subscription is scheduled to cancel.
no setter
metadata Map<String, dynamic>
getter/setter pair
paymentMethodBrand String
getter/setter pair
paymentMethodDisplay String
Formatted payment method (e.g. "Visa ****1234")
no setter
paymentMethodLast4 String
getter/setter pair
planName String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stripeEventType String
getter/setter pair
stripeFeePercent double
Stripe fee percentage (approximate).
no setter
stripeFees double
getter/setter pair
stripeNet double
getter/setter pair
subscriptionId String
getter/setter pair
userId String
getter/setter pair
userName String
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJSON() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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