StarTransaction class abstract

This object describes a Telegram Star transaction.

Available extensions
Annotations
  • @freezed

Constructors

StarTransaction({@JsonKey.new(name: 'id') required String id, @JsonKey.new(name: 'amount') required int amount, @JsonKey.new(name: 'date') required int date, @JsonKey.new(name: 'source') TransactionPartner? source, @JsonKey.new(name: 'receiver') TransactionPartner? receiver, @JsonKey.new(name: 'nanostar_amount') int? nanostarAmount})
Creates a new StarTransaction object.
const
factory
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

map<TResult extends Object?>(TResult $default(_StarTransaction value)) → TResult

Available on StarTransaction, provided by the StarTransactionPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_StarTransaction value)?) → TResult?

Available on StarTransaction, provided by the StarTransactionPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_StarTransaction value)?, {required TResult orElse()}) → TResult

Available on StarTransaction, provided by the StarTransactionPatterns extension

A variant of map that fallback to returning orElse.
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