teloxide_core/payloads/transfer_gift.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{BusinessConnectionId, ChatId, OwnedGiftId, True};
6
7impl_payload! {
8 /// 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.
9 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
10 pub TransferGift (TransferGiftSetters) => 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 /// Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours
17 pub new_owner_chat_id: ChatId [into],
18 }
19 optional {
20 /// 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
21 pub star_count: u32,
22 }
23 }
24}