StarSubscription class final

Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars

Inheritance

Constructors

StarSubscription({required String id, required int chatId, required int expirationDate, required bool isCanceled, required bool isExpiring, required StarSubscriptionPricing pricing, required StarSubscriptionType type})
Contains information about subscription to a channel chat, a bot, or a business account that was paid in Telegram Stars
const
StarSubscription.fromJson(Map<String, dynamic> json)
Parses a StarSubscription from TDLib JSON.
factory

Properties

chatId → int
Identifier of the chat that is subscribed
final
clientId → int?
Identifier of the TDLib client that sent this object, when known.
no setterinherited
expirationDate → int
Point in time (Unix timestamp) when the subscription will expire or expired
final
extra → dynamic
"@extra" of the request this object answers; null for updates.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier of the subscription
final
isCanceled → bool
True, if the subscription was canceled
final
isExpiring → bool
True, if the subscription expires soon and there aren't 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
type → StarSubscriptionType
Type of the subscription
final

Methods

copyWith({String? id, int? chatId, int? expirationDate, bool? isCanceled, bool? isExpiring, StarSubscriptionPricing? pricing, StarSubscriptionType? type}) → StarSubscription
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.