tgbot-cpp
Loading...
Searching...
No Matches
TgBot::UniqueGiftInfo Struct Reference

Describes a service message about a unique gift that was sent or received. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<UniqueGiftInfo>

Public Attributes

std::shared_ptr< UniqueGiftgift { }
 Information about the gift.
std::string origin { }
 Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers.
std::optional< std::string > lastResaleCurrency { }
 Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for TON grams.
std::optional< std::int32_t > lastResaleAmount { }
 Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanograms.
std::optional< std::string > ownedGiftId { }
 Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts.
std::optional< std::int32_t > transferStarCount { }
 Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.
std::optional< std::int32_t > nextTransferDate { }
 Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now.

Detailed Description

Describes a service message about a unique gift that was sent or received.

Definition at line 14497 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::UniqueGiftInfo::Ptr = std::shared_ptr<UniqueGiftInfo>

Definition at line 14498 of file Types.h.

Member Data Documentation

◆ gift

std::shared_ptr<UniqueGift> TgBot::UniqueGiftInfo::gift { }

Information about the gift.

Definition at line 14503 of file Types.h.

◆ lastResaleAmount

std::optional<std::int32_t> TgBot::UniqueGiftInfo::lastResaleAmount { }

Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanograms.

Definition at line 14523 of file Types.h.

◆ lastResaleCurrency

std::optional<std::string> TgBot::UniqueGiftInfo::lastResaleCurrency { }

Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for TON grams.

Definition at line 14517 of file Types.h.

◆ nextTransferDate

std::optional<std::int32_t> TgBot::UniqueGiftInfo::nextTransferDate { }

Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now.

Definition at line 14541 of file Types.h.

◆ origin

std::string TgBot::UniqueGiftInfo::origin { }

Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers.

Definition at line 14511 of file Types.h.

◆ ownedGiftId

std::optional<std::string> TgBot::UniqueGiftInfo::ownedGiftId { }

Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts.

Definition at line 14529 of file Types.h.

◆ transferStarCount

std::optional<std::int32_t> TgBot::UniqueGiftInfo::transferStarCount { }

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.

Definition at line 14535 of file Types.h.


The documentation for this struct was generated from the following file: