SearchGiftsForResale class

Returns upgraded gifts that can be bought from other owners using sendResoldGift or getGiftOnChainPurchaseTransaction Returns GiftsForResale

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

SearchGiftsForResale({required int giftId, required GiftForResaleOrder order, required bool forCrafting, required bool forStars, required bool forGrams, required bool forFragment, required List<UpgradedGiftAttributeId> attributes, required String offset, required int limit})
const

Properties

attributes → List<UpgradedGiftAttributeId>
attributes Attributes used to filter gifts. If multiple attributes of the same type are specified, then all of them are allowed. If no attributes of a specific type are specified, then all values for this attribute type are allowed
final
forCrafting → bool
forCrafting Pass true to get only gifts suitable for crafting
final
forFragment → bool
forFragment Pass true to get gifts sold on-chain on Fragment; may be true only if getOption("can_buy_on_chain_gifts") is true. Must be false if for_crafting is true or if the gift will be bought for another user or a channel chat
final
forGrams → bool
forGrams Pass true to get gifts that can be bought using TON Grams, including gifts sold on-chain using a fixed-price sale contract if getOption("can_buy_on_chain_fixed_price_gifts") is true. The filter must be shown only if getOption("show_gift_resale_gram_filter") is true and must be selected by default if getOption("select_gift_resale_gram_filter_by_default") is true
final
forStars → bool
forStars Pass true to get gifts that can be bought using Telegram Stars. If none of for_stars, for_grams, and for_fragment is true, then gifts that can be bought using Telegram Stars or TON Grams are returned, except gifts sold on-chain. The filter must be shown only if getOption("show_gift_resale_star_filter") is true and must be selected by default if getOption("select_gift_resale_star_filter_by_default") is true
final
giftId → int
giftId Identifier of the regular gift that was upgraded to a unique gift
final
hashCode → int
The hash code for this object.
no setteroverride
limit → int
limit The maximum number of gifts to return
final
offset → String
offset Offset of the first entry to return as received from the previous request with the same order and attributes; use an empty string to get the first chunk of results
final
order → GiftForResaleOrder
order Order in which the results will be sorted
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? giftId, GiftForResaleOrder? order, bool? forCrafting, bool? forStars, bool? forGrams, bool? forFragment, List<UpgradedGiftAttributeId>? attributes, String? offset, int? limit}) → SearchGiftsForResale

Available on SearchGiftsForResale, provided by the SearchGiftsForResaleExtensions extension

getConstructor() → String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

constructor → const String