ronami-core 1.5.0

Core part of the `ronami` library — Telegram Bot API client
Documentation
//! Generated by `codegen_payloads`, do not edit by hand.

use serde::Serialize;

use crate::types::BusinessConnectionId;
use crate::types::OwnedGiftId;
use crate::types::True;

impl_payload! {
    /// 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.
    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
    pub UpgradeGift (UpgradeGiftSetters) => True {
        required {
            /// Unique identifier of the business connection
            pub business_connection_id: BusinessConnectionId,
            /// Unique identifier of the regular gift that should be converted to Telegram Stars
            pub owned_gift_id: OwnedGiftId,
        }
        optional {
            /// Pass _true_ to keep the original gift text, sender and receiver in the upgraded gift
            pub keep_original_details: bool,
            /// 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.
            pub star_count: u32,
        }
    }
}