UserSubscription class
Constructors
-
UserSubscription({String subscriptionId = '', String userId = '', SubscriptionLevel? level, Price? price, SubscriptionStatus? status, int startDate = 0, int endDate = 0, CancellationReason? endReason, int? graceUntil, int failedAttempts = 0, bool pendingDowngrade = false, Map<
String, dynamic> ? lastFailure}) -
UserSubscription.fromJSON(Map<
String, dynamic> data)
Properties
- endDate ↔ int
-
getter/setter pair
- endReason ↔ CancellationReason?
-
getter/setter pair
- failedAttempts ↔ int
-
Número de intentos de cobro fallidos consecutivos.
getter/setter pair
- graceDaysRemaining → int
-
Días de gracia restantes (redondeo hacia arriba; 0 si no aplica).
no setter
- graceUntil ↔ int?
-
Fin del periodo de gracia (ms epoch) tras un pago fallido.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInGracePeriod → bool
-
True si está en periodo de gracia: past_due y aún dentro de la
ventana — el acceso/tier debe seguir tratándose como ACTIVO.
no setter
- isPastDue → bool
-
True cuando el último pago falló (status 'past_due').
no setter
-
lastFailure
↔ Map<
String, dynamic> ? -
Detalle del último fallo de pago (reason, message, brand, last4,
invoiceUrl, amount, currency) escrito por el webhook.
getter/setter pair
- level ↔ SubscriptionLevel?
-
getter/setter pair
- pendingDowngrade ↔ bool
-
True cuando Stripe agotó los reintentos y el downgrade es inminente.
getter/setter pair
- price ↔ Price?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startDate ↔ int
-
getter/setter pair
- status ↔ SubscriptionStatus?
-
getter/setter pair
- subscriptionId ↔ String
-
getter/setter pair
- userId ↔ 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