StarSubscription class final
Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars
- Inheritance
- Available extensions
- Annotations
-
- @immutable
Constructors
- StarSubscription({required String id, required int chatId, required int expirationDate, required bool isCanceled, required bool isExpiring, StarSubscriptionPricing? pricing, StarSubscriptionType? type})
Properties
- chatId → int
-
chatId Identifier of the chat that is subscribed
final
- expirationDate → int
-
expirationDate Point in time (Unix timestamp) when the subscription will
expire or expired
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
id Unique identifier of the subscription
final
- isCanceled → bool
-
isCanceled True, if the subscription was canceled
final
- isExpiring → bool
-
isExpiring True, if the subscription expires soon and there aren't
enough Telegram Stars on the user's balance to extend it
final
- pricing → StarSubscriptionPricing?
-
pricing The subscription plan
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → StarSubscriptionType?
-
type Type of the subscription
final
Methods
-
copyWith(
{String? id, int? chatId, int? expirationDate, bool? isCanceled, bool? isExpiring, StarSubscriptionPricing? pricing, StarSubscriptionType? type}) → StarSubscription -
Available on StarSubscription, provided by the StarSubscriptionExtensions extension
-
getConstructor(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Map< String, dynamic> ? json) → StarSubscription?
Constants
- constructor → const String