BotSubscriptionUpdated class abstract
This object contains information about changes to a user payment subscription toward the current bot.
- Available extensions
- Annotations
-
- @freezed
Constructors
- BotSubscriptionUpdated({@JsonKey.new(name: 'user') required User user, @JsonKey.new(name: 'invoice_payload') required String invoicePayload, @JsonKey.new(name: 'state') required String state})
-
Creates a new BotSubscriptionUpdated object.
constfactory
-
BotSubscriptionUpdated.fromJson(Map<
String, dynamic> json) -
Creates a new BotSubscriptionUpdated object from a JSON Map.
factory
Properties
-
copyWith
→ $BotSubscriptionUpdatedCopyWith<
BotSubscriptionUpdated> -
Create a copy of BotSubscriptionUpdated
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- invoicePayload → String
-
Bot-specified invoice payload
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → String
-
The new state of the subscription. Currently, it can be one of “canceled”
if the user canceled the subscription, “active” if the user re-enabled a
previously canceled subscription, or “failed” if payment for the
subscription failed.
no setterinherited
- user → User
-
User who subscribed for payments toward the bot
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_BotSubscriptionUpdated value)) → TResult -
Available on BotSubscriptionUpdated, provided by the BotSubscriptionUpdatedPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_BotSubscriptionUpdated value)?) → TResult? -
Available on BotSubscriptionUpdated, provided by the BotSubscriptionUpdatedPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_BotSubscriptionUpdated value)?, {required TResult orElse()}) → TResult -
Available on BotSubscriptionUpdated, provided by the BotSubscriptionUpdatedPatterns extension
A variant ofmapthat fallback to returningorElse. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this BotSubscriptionUpdated to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited