Skip to main content

ronami_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;
6use crate::types::True;
7use crate::types::UserId;
8
9impl_payload! {
10    /// Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
11    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
12    pub EditUserStarSubscription (EditUserStarSubscriptionSetters) => True {
13        required {
14            /// Identifier of the user whose subscription will be edited
15            pub user_id: UserId,
16            /// Telegram payment identifier for the subscription
17            pub telegram_payment_charge_id: TelegramTransactionId,
18            /// 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.
19            pub is_canceled: bool,
20        }
21    }
22}