pub struct PremiumGiftPaymentOption {
pub currency: String,
pub amount: i64,
pub star_count: i64,
pub discount_percentage: i32,
pub month_count: i32,
pub store_product_id: String,
pub sticker: Option<Sticker>,
}Expand description
Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars
Fields§
§currency: StringISO 4217 currency code for the payment
amount: i64The amount to pay, in the smallest units of the currency
star_count: i64The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible
discount_percentage: i32The discount associated with this option, as a percentage
month_count: i32Number of months the Telegram Premium subscription will be active
store_product_id: StringIdentifier of the store product associated with the option
sticker: Option<Sticker>A sticker to be shown along with the option; may be null if unknown
Trait Implementations§
Source§impl Clone for PremiumGiftPaymentOption
impl Clone for PremiumGiftPaymentOption
Source§fn clone(&self) -> PremiumGiftPaymentOption
fn clone(&self) -> PremiumGiftPaymentOption
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 PremiumGiftPaymentOption
impl Debug for PremiumGiftPaymentOption
Source§impl<'de> Deserialize<'de> for PremiumGiftPaymentOption
impl<'de> Deserialize<'de> for PremiumGiftPaymentOption
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 PremiumGiftPaymentOption
impl PartialEq for PremiumGiftPaymentOption
Source§fn eq(&self, other: &PremiumGiftPaymentOption) -> bool
fn eq(&self, other: &PremiumGiftPaymentOption) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PremiumGiftPaymentOption
impl Serialize for PremiumGiftPaymentOption
impl StructuralPartialEq for PremiumGiftPaymentOption
Auto Trait Implementations§
impl Freeze for PremiumGiftPaymentOption
impl RefUnwindSafe for PremiumGiftPaymentOption
impl Send for PremiumGiftPaymentOption
impl Sync for PremiumGiftPaymentOption
impl Unpin for PremiumGiftPaymentOption
impl UnsafeUnpin for PremiumGiftPaymentOption
impl UnwindSafe for PremiumGiftPaymentOption
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