teloxide_core/payloads/
upgrade_gift.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{BusinessConnectionId, OwnedGiftId, True};
6
7impl_payload! {
8    /// Upgrades a given regular gift to a unique gift. Requires the _can_transfer_and_upgrade_gifts_ business bot right. Additionally requires the _can_transfer_stars_ business bot right if the upgrade is paid. Returns _true_ on success.
9    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
10    pub UpgradeGift (UpgradeGiftSetters) => True {
11        required {
12            /// Unique identifier of the business connection
13            pub business_connection_id: BusinessConnectionId,
14            /// Unique identifier of the regular gift that should be converted to Telegram Stars
15            pub owned_gift_id: OwnedGiftId,
16        }
17        optional {
18            /// Pass _true_ to keep the original gift text, sender and receiver in the upgraded gift
19            pub keep_original_details: bool,
20            /// The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If `gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the _can_transfer_stars_ business bot right is required and `gift.upgrade_star_count` must be passed.
21            pub star_count: u32,
22        }
23    }
24}