ronami_core/payloads/transfer_gift.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::ChatId;
7use crate::types::OwnedGiftId;
8use crate::types::True;
9
10impl_payload! {
11 /// Transfers an owned unique gift to another user. Requires the _can_transfer_and_upgrade_gifts_ business bot right. Requires _can_transfer_stars_ business bot right if the transfer is paid. Returns _true_ on success.
12 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
13 pub TransferGift (TransferGiftSetters) => True {
14 required {
15 /// Unique identifier of the business connection
16 pub business_connection_id: BusinessConnectionId,
17 /// Unique identifier of the regular gift that should be converted to Telegram Stars
18 pub owned_gift_id: OwnedGiftId,
19 /// Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours
20 pub new_owner_chat_id: ChatId [into],
21 }
22 optional {
23 /// The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the _can_transfer_stars_ business bot right is required
24 pub star_count: u32,
25 }
26 }
27}