PremiumPaymentOption class final
PremiumPaymentOption (premiumPaymentOption) - basic class
Describes an option for buying Telegram Premium to a user.
- currency: ISO 4217 currency code for Telegram Premium subscription payment.
- amount: The amount to pay, in the smallest units of the currency.
- discountPercentage: The discount associated with this option, as a percentage.
- monthCount: Number of months the Telegram Premium subscription will be active.
- storeProductId: Identifier of the store product associated with the option.
- paymentLink: An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available (optional).
Constructors
- PremiumPaymentOption({required String currency, required int amount, required int discountPercentage, required int monthCount, required String storeProductId, InternalLinkType? paymentLink})
-
PremiumPaymentOption (premiumPaymentOption) - basic class
const
-
PremiumPaymentOption.fromJson(Map<
String, dynamic> json) -
Parse from a json
factory
Properties
- amount → int
-
The amount to pay, in the smallest units of the currency
final
- clientId → int?
-
Client ID, from which this object was received
no setterinherited
- currency → String
-
ISO 4217 currency code for Telegram Premium subscription payment
final
- currentObjectId → String
-
TDLib object type for current class instance
no setteroverride
- discountPercentage → int
-
The discount associated with this option, as a percentage
final
- extra → dynamic
-
A sign from TDLib update
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- monthCount → int
-
Number of months the Telegram Premium subscription will be active
final
- paymentLink → InternalLinkType?
-
An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storeProductId → String
-
Identifier of the store product associated with the option
final
Methods
-
copyWith(
{String? currency, int? amount, int? discountPercentage, int? monthCount, String? storeProductId, InternalLinkType? paymentLink}) → PremiumPaymentOption - 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