StarTransaction class abstract
This object describes a Telegram Star transaction.
- Annotations
-
- @freezed
Constructors
- StarTransaction.new({@JsonKey(name: 'id') required String id, @JsonKey(name: 'amount') required int amount, @JsonKey(name: 'date') required int date, @JsonKey(name: 'source') TransactionPartner? source, @JsonKey(name: 'receiver') TransactionPartner? receiver, @JsonKey(name: 'nanostar_amount') int? nanostarAmount})
-
Creates a new StarTransaction object.
constfactory
-
StarTransaction.fromJson(Map<
String, dynamic> json) -
Creates a new StarTransaction object from json.
factory
Properties
- amount → int
-
Number of Telegram Stars transferred by the transaction.
no setterinherited
-
copyWith
→ $StarTransactionCopyWith<
StarTransaction> -
Create a copy of StarTransaction
with the given fields replaced by the non-null parameter values.
no setterinherited
- date → int
-
Date the transaction was created in Unix time.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of the transaction. Coincides with the identifier of
the original transaction for refund transactions. Coincides with
SuccessfulPayment
for successful incoming payments from users.no setterinherited - nanostarAmount → int?
-
Optional. The number of 1/1000000000 shares of Telegram Stars
transferred by the transaction; from 0 to 999999999
no setterinherited
- receiver → TransactionPartner?
-
Optional. Receiver of an outgoing transaction (e.g., a user for a
purchase refund, Fragment for a withdrawal). Only for outgoing
transactions.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → TransactionPartner?
-
Optional. Source of an incoming transaction (e.g., a user purchasing
goods or services, Fragment refunding a failed withdrawal). Only for
incoming transactions.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this StarTransaction to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited