ronami_core/payloads/upgrade_gift.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::OwnedGiftId;
7use crate::types::True;
8
9impl_payload! {
10 /// 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.
11 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
12 pub UpgradeGift (UpgradeGiftSetters) => True {
13 required {
14 /// Unique identifier of the business connection
15 pub business_connection_id: BusinessConnectionId,
16 /// Unique identifier of the regular gift that should be converted to Telegram Stars
17 pub owned_gift_id: OwnedGiftId,
18 }
19 optional {
20 /// Pass _true_ to keep the original gift text, sender and receiver in the upgraded gift
21 pub keep_original_details: bool,
22 /// 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.
23 pub star_count: u32,
24 }
25 }
26}