teloxide_core/payloads/
edit_user_star_subscription.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{TelegramTransactionId, True, UserId};
6
7impl_payload! {
8    /// Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
9    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
10    pub EditUserStarSubscription (EditUserStarSubscriptionSetters) => True {
11        required {
12            /// Identifier of the user whose subscription will be edited
13            pub user_id: UserId,
14            /// Telegram payment identifier for the subscription
15            pub telegram_payment_charge_id: TelegramTransactionId,
16            /// Pass `true` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass `false` to allow the user to re-enable a subscription that was previously canceled by the bot.
17            pub is_canceled: bool,
18        }
19    }
20}