StarSubscription class final

StarSubscription (starSubscription) - basic class

Contains information about subscription to a channel chat paid in Telegram Stars.

  • id: Unique identifier of the subscription.
  • chatId: Identifier of the channel chat that is subscribed.
  • expirationDate: Point in time (Unix timestamp) when the subscription will expire or expired.
  • canReuse: True, if the subscription is active and the user can use the method reuseStarSubscription to join the subscribed chat again.
  • isCanceled: True, if the subscription was canceled.
  • isExpiring: True, if the subscription expires soon and there are no enough Telegram Stars on the user's balance to extend it.
  • inviteLink: The invite link that can be used to renew the subscription if it has been expired; may be empty, if the link isn't available anymore.
  • pricing: The subscription plan.
Inheritance

Constructors

StarSubscription({required String id, required int chatId, required int expirationDate, required bool canReuse, required bool isCanceled, required bool isExpiring, required String inviteLink, required StarSubscriptionPricing pricing})
StarSubscription (starSubscription) - basic class
const
StarSubscription.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

canReuse → bool
True, if the subscription is active and the user can use the method reuseStarSubscription to join the subscribed chat again
final
chatId → int
Identifier of the channel chat that is subscribed
final
clientId → int?
Client ID, from which this object was received
no setterinherited
currentObjectId → String
TDLib object type for current class instance
no setteroverride
expirationDate → int
Point in time (Unix timestamp) when the subscription will expire or expired
final
extra → dynamic
A sign from TDLib update
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier of the subscription
final
The invite link that can be used to renew the subscription if it has been expired; may be empty, if the link isn't available anymore
final
isCanceled → bool
True, if the subscription was canceled
final
isExpiring → bool
True, if the subscription expires soon and there are no enough Telegram Stars on the user's balance to extend it
final
pricing → StarSubscriptionPricing
The subscription plan
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? id, int? chatId, int? expirationDate, bool? canReuse, bool? isCanceled, bool? isExpiring, String? inviteLink, StarSubscriptionPricing? pricing}) → StarSubscription
Copy model with modified properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Convert model to TDLib JSON format
override
toString() → String
Convert model to TDLib JSON format, encoded into String.
override

Operators

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

Constants

defaultObjectId → const String
TDLib object type