pub struct UpgradeGift { /* private fields */ }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.
Implementations§
Source§impl UpgradeGift
impl UpgradeGift
Sourcepub fn new<A, B>(business_connection_id: A, owned_gift_id: B) -> Self
pub fn new<A, B>(business_connection_id: A, owned_gift_id: B) -> Self
Creates a new UpgradeGift.
§Arguments
business_connection_id- Unique identifier of the business connection.owned_gift_id- Unique identifier of the regular gift that should be upgraded to a unique one.
Sourcepub fn with_keep_original_details(self, value: bool) -> Self
pub fn with_keep_original_details(self, value: bool) -> Self
Sets a new value for the keep_original_details flag.
§Arguments
value- Whether to keep the original gift text, sender and receiver in the upgraded gift.
Sourcepub fn with_star_count(self, value: Integer) -> Self
pub fn with_star_count(self, value: Integer) -> Self
Sets a new star count.
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.
value- The amount of Telegram Stars that will be paid for the upgrade from the business account balance.
Trait Implementations§
Source§impl Clone for UpgradeGift
impl Clone for UpgradeGift
Source§fn clone(&self) -> UpgradeGift
fn clone(&self) -> UpgradeGift
Returns a duplicate of the value. Read more
1.0.0 · 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 UpgradeGift
impl Debug for UpgradeGift
Source§impl Method for UpgradeGift
impl Method for UpgradeGift
Auto Trait Implementations§
impl Freeze for UpgradeGift
impl RefUnwindSafe for UpgradeGift
impl Send for UpgradeGift
impl Sync for UpgradeGift
impl Unpin 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