TDLib
Loading...
Searching...
No Matches
sendGiftPurchaseOffer Class Referencefinal

Inherits Function.

Description

Sends an offer to purchase an upgraded gift.

Returns object_ptr<Ok>.

Public Types

using ReturnType = object_ptr<ok>
 Typedef for the type returned by the function.

Public Member Functions

 sendGiftPurchaseOffer ()
 sendGiftPurchaseOffer (object_ptr< MessageSender > &&owner_id_, string const &gift_name_, object_ptr< GiftResalePrice > &&price_, int32 duration_, int53 paid_message_star_count_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

int32 duration_
 Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
string gift_name_
 Name of the upgraded gift.
object_ptr< MessageSender > owner_id_
 Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
int53 paid_message_star_count_
 The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoing_paid_message_star_count for users and 0 otherwise.
object_ptr< GiftResalePrice > price_
 The price that the user agreed to pay for the gift.

Static Public Attributes

static const std::int32_t ID = 917878931
 Identifier uniquely determining a type of the object.

Constructor & Destructor Documentation

◆ sendGiftPurchaseOffer() [1/2]

sendGiftPurchaseOffer ( )

Default constructor for a function, which sends an offer to purchase an upgraded gift.

Returns object_ptr<Ok>.

◆ sendGiftPurchaseOffer() [2/2]

sendGiftPurchaseOffer ( object_ptr< MessageSender > && owner_id_,
string const & gift_name_,
object_ptr< GiftResalePrice > && price_,
int32 duration_,
int53 paid_message_star_count_ )

Creates a function, which sends an offer to purchase an upgraded gift.

Returns object_ptr<Ok>.

Parameters
[in]owner_id_Identifier of the user or the channel chat that currently owns the gift and will receive the offer.
[in]gift_name_Name of the upgraded gift.
[in]price_The price that the user agreed to pay for the gift.
[in]duration_Duration of the offer, in seconds; must be one of 21600, 43200, 86400, 129600, 172800, or 259200. Can also be 120 if Telegram test environment is used.
[in]paid_message_star_count_The number of Telegram Stars the user agreed to pay additionally for sending of the offer message to the current gift owner; pass userFullInfo.outgoing_paid_message_star_count for users and 0 otherwise.

Member Function Documentation

◆ store()

void store ( TlStorerToString & s,
const char * field_name ) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


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