MessageGiftedPremium class final

MessageGiftedPremium (messageGiftedPremium) - child of MessageContent

Telegram Premium was gifted to a user.

  • gifterUserId: The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
  • receiverUserId: The identifier of a user that received Telegram Premium; 0 if the gift is incoming.
  • currency: Currency for the paid amount.
  • amount: The paid amount, in the smallest units of the currency.
  • cryptocurrency: Cryptocurrency used to pay for the gift; may be empty if none.
  • cryptocurrencyAmount: The paid amount, in the smallest units of the cryptocurrency; 0 if none.
  • monthCount: Number of months the Telegram Premium subscription will be active.
  • sticker: A sticker to be shown in the message; may be null if unknown (optional).
Inheritance

Constructors

MessageGiftedPremium({required int gifterUserId, required int receiverUserId, required String currency, required int amount, required String cryptocurrency, required int cryptocurrencyAmount, required int monthCount, Sticker? sticker})
MessageGiftedPremium (messageGiftedPremium) - child of MessageContent
const
MessageGiftedPremium.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

amount → int
The paid amount, in the smallest units of the currency
final
clientId → int?
Client ID, from which this object was received
no setterinherited
cryptocurrency → String
Cryptocurrency used to pay for the gift; may be empty if none
final
cryptocurrencyAmount → int
The paid amount, in the smallest units of the cryptocurrency; 0 if none
final
currency → String
Currency for the paid amount
final
currentObjectId → String
TDLib object type for current class instance
no setteroverride
extra → dynamic
A sign from TDLib update
no setterinherited
gifterUserId → int
The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing
final
hashCode → int
The hash code for this object.
no setterinherited
monthCount → int
Number of months the Telegram Premium subscription will be active
final
receiverUserId → int
The identifier of a user that received Telegram Premium; 0 if the gift is incoming
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sticker → Sticker?
A sticker to be shown in the message; may be null if unknown
final

Methods

copyWith({int? gifterUserId, int? receiverUserId, String? currency, int? amount, String? cryptocurrency, int? cryptocurrencyAmount, int? monthCount, Sticker? sticker}) → MessageGiftedPremium
Copy model with modified properties.
override
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