tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::AffiliateInfo Struct Reference

Contains information about the affiliate that received a commission via a transaction https://core.telegram.org/bots/api#affiliateinfo. More...

#include <AffiliateInfo.hpp>

Public Member Functions

 AffiliateInfo ()=default
 
 AffiliateInfo (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON.
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON.
 

Public Attributes

Ptr< UseraffiliateUser
 Optional. The bot or user that received an affiliate commission.
 
Ptr< ChataffiliateChat
 Optional. The chat that received an affiliate commission.
 
std::int32_t commissionPerMille {}
 The number of Telegram Stars received by the affiliate for each 1000 Stars received by the bot.
 
std::int32_t amount {}
 Integer amount of Telegram Stars received by the affiliate from the transaction; can be negative for refunds.
 
std::int32_t nanostarAmount {}
 Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; can be negative for refunds.
 

Detailed Description

Contains information about the affiliate that received a commission via a transaction https://core.telegram.org/bots/api#affiliateinfo.

Definition at line 10 of file AffiliateInfo.hpp.

Constructor & Destructor Documentation

◆ AffiliateInfo() [1/2]

tgbotxx::AffiliateInfo::AffiliateInfo ( )
default

◆ AffiliateInfo() [2/2]

tgbotxx::AffiliateInfo::AffiliateInfo ( const nl::json &  json)
inlineexplicit

Definition at line 12 of file AffiliateInfo.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::AffiliateInfo::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 44 of file AffiliateInfo.hpp.

◆ toJson()

nl::json tgbotxx::AffiliateInfo::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 33 of file AffiliateInfo.hpp.

Member Data Documentation

◆ affiliateChat

Ptr<Chat> tgbotxx::AffiliateInfo::affiliateChat

Optional. The chat that received an affiliate commission.

Definition at line 20 of file AffiliateInfo.hpp.

◆ affiliateUser

Ptr<User> tgbotxx::AffiliateInfo::affiliateUser

Optional. The bot or user that received an affiliate commission.

Definition at line 17 of file AffiliateInfo.hpp.

◆ amount

std::int32_t tgbotxx::AffiliateInfo::amount {}

Integer amount of Telegram Stars received by the affiliate from the transaction; can be negative for refunds.

Definition at line 26 of file AffiliateInfo.hpp.

◆ commissionPerMille

std::int32_t tgbotxx::AffiliateInfo::commissionPerMille {}

The number of Telegram Stars received by the affiliate for each 1000 Stars received by the bot.

Definition at line 23 of file AffiliateInfo.hpp.

◆ nanostarAmount

std::int32_t tgbotxx::AffiliateInfo::nanostarAmount {}

Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; can be negative for refunds.

Definition at line 29 of file AffiliateInfo.hpp.


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