CollectionEvent class
Tracks billing/collection events for the ERP cobranza system.
Stored in Firestore collectionEvents collection.
Created by Cloud Functions (webhook handlers + checkOverduePayments).
Constructors
- CollectionEvent({String id = '', String userId = '', String userEmail = '', String userName = '', String userPhone = '', String type = '', String invoiceId = '', String subscriptionId = '', double amount = 0.0, String currency = 'MXN', int attemptNumber = 0, bool whatsappSent = false, String whatsappMessageId = '', int escalationLevel = 1, int createdAt = 0, String failureReason = '', String failureMessage = '', String paymentMethodBrand = '', String paymentMethodLast4 = '', String planName = '', int nextRetryDate = 0})
-
CollectionEvent.fromJSON(Map<
String, dynamic> data)
Properties
- amount ↔ double
-
getter/setter pair
- attemptNumber ↔ int
-
getter/setter pair
- createdAt ↔ int
-
getter/setter pair
- currency ↔ String
-
getter/setter pair
- escalationLabel → String
-
Escalation level label
no setter
- escalationLevel ↔ int
-
getter/setter pair
- failureMessage ↔ String
-
getter/setter pair
- failureReason ↔ String
-
getter/setter pair
- failureReasonLabel → String
-
Human-readable failure reason
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
getter/setter pair
- invoiceId ↔ String
-
getter/setter pair
- nextRetryDate ↔ int
-
getter/setter pair
- paymentMethodBrand ↔ String
-
getter/setter pair
- paymentMethodDisplay → String
-
Formatted payment method
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
- subscriptionId ↔ String
-
getter/setter pair
- type ↔ String
-
getter/setter pair
- typeLabel → String
-
Human-readable type label
no setter
- userEmail ↔ String
-
getter/setter pair
- userId ↔ String
-
getter/setter pair
- userName ↔ String
-
getter/setter pair
- userPhone ↔ String
-
getter/setter pair
- whatsappMessageId ↔ String
-
getter/setter pair
- whatsappSent ↔ bool
-
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