pub struct PremiumGiveawayPaymentOption {
pub currency: String,
pub amount: i64,
pub winner_count: i32,
pub month_count: i32,
pub store_product_id: String,
pub store_product_quantity: i32,
}Expand description
Describes an option for creating of Telegram Premium giveaway or manual distribution of Telegram Premium among chat members. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments
Fields§
§currency: StringISO 4217 currency code for Telegram Premium gift code payment
amount: i64The amount to pay, in the smallest units of the currency
winner_count: i32Number of users which will be able to activate the gift codes
month_count: i32Number of months the Telegram Premium subscription will be active
store_product_id: StringIdentifier of the store product associated with the option; may be empty if none
store_product_quantity: i32Number of times the store product must be paid
Trait Implementations§
Source§impl Clone for PremiumGiveawayPaymentOption
impl Clone for PremiumGiveawayPaymentOption
Source§fn clone(&self) -> PremiumGiveawayPaymentOption
fn clone(&self) -> PremiumGiveawayPaymentOption
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PremiumGiveawayPaymentOption
impl Debug for PremiumGiveawayPaymentOption
Source§impl Default for PremiumGiveawayPaymentOption
impl Default for PremiumGiveawayPaymentOption
Source§fn default() -> PremiumGiveawayPaymentOption
fn default() -> PremiumGiveawayPaymentOption
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PremiumGiveawayPaymentOption
impl<'de> Deserialize<'de> for PremiumGiveawayPaymentOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PremiumGiveawayPaymentOption
impl PartialEq for PremiumGiveawayPaymentOption
Source§fn eq(&self, other: &PremiumGiveawayPaymentOption) -> bool
fn eq(&self, other: &PremiumGiveawayPaymentOption) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PremiumGiveawayPaymentOption
Auto Trait Implementations§
impl Freeze for PremiumGiveawayPaymentOption
impl RefUnwindSafe for PremiumGiveawayPaymentOption
impl Send for PremiumGiveawayPaymentOption
impl Sync for PremiumGiveawayPaymentOption
impl Unpin for PremiumGiveawayPaymentOption
impl UnsafeUnpin for PremiumGiveawayPaymentOption
impl UnwindSafe for PremiumGiveawayPaymentOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more