tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::ShippingAddress Struct Reference

This object represents a shipping address. https://core.telegram.org/bots/api#shippingaddress. More...

#include <ShippingAddress.hpp>

Public Member Functions

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

Public Attributes

std::string countryCode
 Two-letter ISO 3166-1 alpha-2 country code. More...
 
std::string state
 State, if applicable. More...
 
std::string city
 City. More...
 
std::string streetLine1
 First line for the address. More...
 
std::string streetLine2
 Second line for the address. More...
 
std::string postCode
 Address post code. More...
 

Detailed Description

This object represents a shipping address. https://core.telegram.org/bots/api#shippingaddress.

Definition at line 12 of file ShippingAddress.hpp.

Constructor & Destructor Documentation

◆ ShippingAddress() [1/2]

tgbotxx::ShippingAddress::ShippingAddress ( )
default

◆ ShippingAddress() [2/2]

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

Definition at line 14 of file ShippingAddress.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 50 of file ShippingAddress.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 38 of file ShippingAddress.hpp.

Member Data Documentation

◆ city

std::string tgbotxx::ShippingAddress::city

City.

Definition at line 25 of file ShippingAddress.hpp.

◆ countryCode

std::string tgbotxx::ShippingAddress::countryCode

Two-letter ISO 3166-1 alpha-2 country code.

Definition at line 19 of file ShippingAddress.hpp.

◆ postCode

std::string tgbotxx::ShippingAddress::postCode

Address post code.

Definition at line 34 of file ShippingAddress.hpp.

◆ state

std::string tgbotxx::ShippingAddress::state

State, if applicable.

Definition at line 22 of file ShippingAddress.hpp.

◆ streetLine1

std::string tgbotxx::ShippingAddress::streetLine1

First line for the address.

Definition at line 28 of file ShippingAddress.hpp.

◆ streetLine2

std::string tgbotxx::ShippingAddress::streetLine2

Second line for the address.

Definition at line 31 of file ShippingAddress.hpp.


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