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

This object represents one shipping option. https://core.telegram.org/bots/api#shippingoption. More...

#include <ShippingOption.hpp>

Public Member Functions

 ShippingOption ()=default
 
 ShippingOption (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 id
 Shipping option identifier. More...
 
std::string title
 Option title. More...
 
std::vector< Ptr< LabeledPrice > > prices
 List of price portions. More...
 

Detailed Description

This object represents one shipping option. https://core.telegram.org/bots/api#shippingoption.

Definition at line 8 of file ShippingOption.hpp.

Constructor & Destructor Documentation

◆ ShippingOption() [1/2]

tgbotxx::ShippingOption::ShippingOption ( )
default

◆ ShippingOption() [2/2]

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

Definition at line 10 of file ShippingOption.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 34 of file ShippingOption.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 25 of file ShippingOption.hpp.

Member Data Documentation

◆ id

std::string tgbotxx::ShippingOption::id

Shipping option identifier.

Definition at line 15 of file ShippingOption.hpp.

◆ prices

std::vector<Ptr<LabeledPrice> > tgbotxx::ShippingOption::prices

List of price portions.

Definition at line 21 of file ShippingOption.hpp.

◆ title

std::string tgbotxx::ShippingOption::title

Option title.

Definition at line 18 of file ShippingOption.hpp.


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