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

Describes the connection of the bot with a business account. https://core.telegram.org/bots/api#businessconnection. More...

#include <BusinessConnection.hpp>

Public Member Functions

 BusinessConnection ()=default
 
 BusinessConnection (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

std::string id
 Unique identifier of the business connection.
 
Ptr< Useruser
 Business account user that created the business connection.
 
std::int64_t userChatId {}
 Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
 
std::int32_t date {}
 Date the connection was established in Unix time.
 
Ptr< BusinessBotRightsrights
 Optional. Rights of the business bot.
 
bool isEnabled {}
 True, if the connection is active.
 

Detailed Description

Describes the connection of the bot with a business account. https://core.telegram.org/bots/api#businessconnection.

Definition at line 10 of file BusinessConnection.hpp.

Constructor & Destructor Documentation

◆ BusinessConnection() [1/2]

tgbotxx::BusinessConnection::BusinessConnection ( )
default

◆ BusinessConnection() [2/2]

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

Definition at line 12 of file BusinessConnection.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 50 of file BusinessConnection.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 38 of file BusinessConnection.hpp.

Member Data Documentation

◆ date

std::int32_t tgbotxx::BusinessConnection::date {}

Date the connection was established in Unix time.

Definition at line 28 of file BusinessConnection.hpp.

◆ id

std::string tgbotxx::BusinessConnection::id

Unique identifier of the business connection.

Definition at line 17 of file BusinessConnection.hpp.

◆ isEnabled

bool tgbotxx::BusinessConnection::isEnabled {}

True, if the connection is active.

Definition at line 34 of file BusinessConnection.hpp.

◆ rights

Ptr<BusinessBotRights> tgbotxx::BusinessConnection::rights

Optional. Rights of the business bot.

Definition at line 31 of file BusinessConnection.hpp.

◆ user

Ptr<User> tgbotxx::BusinessConnection::user

Business account user that created the business connection.

Definition at line 20 of file BusinessConnection.hpp.

◆ userChatId

std::int64_t tgbotxx::BusinessConnection::userChatId {}

Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

Definition at line 25 of file BusinessConnection.hpp.


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