MessagePremiumGiftCode class final
A Telegram Premium gift code was created for the user
- Inheritance
-
- Object
- TdObject
- MessageContent
- MessagePremiumGiftCode
Constructors
- MessagePremiumGiftCode({MessageSender? creatorId, required bool isFromGiveaway, required bool isUnclaimed, required String currency, required int amount, required String cryptocurrency, required int cryptocurrencyAmount, required int monthCount, Sticker? sticker, required String code})
-
A Telegram Premium gift code was created for the user
const
-
MessagePremiumGiftCode.fromJson(Map<
String, dynamic> json) -
Parses a MessagePremiumGiftCode from TDLib JSON.
factory
Properties
- amount → int
-
The paid amount, in the smallest units of the currency; 0 if unknown
final
- clientId → int?
-
Identifier of the TDLib client that sent this object, when known.
no setterinherited
- code → String
-
The gift code
final
- creatorId → MessageSender?
-
Identifier of a chat or a user that created the gift code; may be null if unknown
final
- cryptocurrency → String
-
Cryptocurrency used to pay for the gift; may be empty if none or unknown
final
- cryptocurrencyAmount → int
-
The paid amount, in the smallest units of the cryptocurrency; 0 if unknown
final
- currency → String
-
Currency for the paid amount; empty if unknown
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
- isFromGiveaway → bool
-
True, if the gift code was created for a giveaway
final
- isUnclaimed → bool
-
True, if the winner for the corresponding Telegram Premium subscription wasn't chosen
final
- monthCount → int
-
Number of months the Telegram Premium subscription will be active after code activation
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(
{MessageSender? creatorId()?, bool? isFromGiveaway, bool? isUnclaimed, String? currency, int? amount, String? cryptocurrency, int? cryptocurrencyAmount, int? monthCount, Sticker? sticker()?, String? code}) → MessagePremiumGiftCode -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it.override -
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.