AffiliateInfo class abstract
Contains information about the affiliate that received a commission via this transaction.
- Annotations
-
- @freezed
Constructors
- AffiliateInfo.new({@JsonKey(name: 'affiliate_user') User? affiliateUser, @JsonKey(name: 'affiliate_chat') Chat? affiliateChat, @JsonKey(name: 'commission_per_mille') required int commissionPerMille, @JsonKey(name: 'amount') required int amount, @JsonKey(name: 'nanostar_amount') int? nanostarAmount})
-
Constructs an AffiliateInfo object.
constfactory
-
AffiliateInfo.fromJson(Map<
String, dynamic> json) -
Creates an AffiliateInfo object from JSON.
factory
Properties
- affiliateChat → Chat?
-
The chat that received an affiliate commission if it was received by a
chat.
no setterinherited
- affiliateUser → User?
-
The bot or the user that received an affiliate commission if it was
received by a bot or a user.
no setterinherited
- amount → int
-
Integer amount of Telegram Stars received by the affiliate from the
transaction, rounded to 0; can be negative for refunds.
no setterinherited
- commissionPerMille → int
-
The number of Telegram Stars received by the affiliate for each 1000
Telegram Stars received by the bot from referred users.
no setterinherited
-
copyWith
→ $AffiliateInfoCopyWith<
AffiliateInfo> -
Create a copy of AffiliateInfo
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- nanostarAmount → int?
-
The number of 1/1000000000 shares of Telegram Stars received by the
affiliate; from -999999999 to 999999999; can be negative for refunds.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this AffiliateInfo to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited