pub struct UpgradeGift {
pub business_connection_id: BusinessConnectionId,
pub owned_gift_id: OwnedGiftId,
pub keep_original_details: Option<bool>,
pub star_count: Option<u32>,
}Expand description
Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns true on success.
Fields§
§business_connection_id: BusinessConnectionIdUnique identifier of the business connection
owned_gift_id: OwnedGiftIdUnique identifier of the regular gift that should be converted to Telegram Stars
keep_original_details: Option<bool>Pass true to keep the original gift text, sender and receiver in the upgraded gift
star_count: Option<u32>The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.
Implementations§
Source§impl UpgradeGift
impl UpgradeGift
pub fn new( business_connection_id: BusinessConnectionId, owned_gift_id: OwnedGiftId, ) -> Self
Trait Implementations§
Source§impl Clone for UpgradeGift
impl Clone for UpgradeGift
Source§impl Debug for UpgradeGift
impl Debug for UpgradeGift
impl Eq for UpgradeGift
Source§impl Hash for UpgradeGift
impl Hash for UpgradeGift
Source§impl PartialEq for UpgradeGift
impl PartialEq for UpgradeGift
Source§impl Payload for UpgradeGift
impl Payload for UpgradeGift
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for UpgradeGift
impl Serialize for UpgradeGift
impl StructuralPartialEq for UpgradeGift
Auto Trait Implementations§
impl Forget for UpgradeGift
impl Freeze for UpgradeGift
impl RefUnwindSafe for UpgradeGift
impl Send for UpgradeGift
impl Sync for UpgradeGift
impl Unpin for UpgradeGift
impl UnsafeUnpin for UpgradeGift
impl UnwindSafe for UpgradeGift
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying payload.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> UpgradeGiftSetters for Pwhere
P: HasPayload<Payload = UpgradeGift>,
impl<P> UpgradeGiftSetters for Pwhere
P: HasPayload<Payload = UpgradeGift>,
Source§fn business_connection_id(self, value: BusinessConnectionId) -> Self
fn business_connection_id(self, value: BusinessConnectionId) -> Self
Setter for
business_connection_id field.Source§fn owned_gift_id(self, value: OwnedGiftId) -> Self
fn owned_gift_id(self, value: OwnedGiftId) -> Self
Setter for
owned_gift_id field.Source§fn keep_original_details(self, value: bool) -> Self
fn keep_original_details(self, value: bool) -> Self
Setter for
keep_original_details field.Source§fn star_count(self, value: u32) -> Self
fn star_count(self, value: u32) -> Self
Setter for
star_count field.