[][src]Struct tbot::methods::SendInvoice

#[must_use = "methods do nothing unless turned into a future"]
pub struct SendInvoice<'a, C> { /* fields omitted */ }

Sends an invoice.

Reflects the sendInvoice method.

Methods

impl<'a, C> SendInvoice<'a, C>[src]

pub fn provider_data(self, provider_data: &'a str) -> Self[src]

Configures data for your payment provider. Reflects the provider_data parameter.

pub fn photo(self, photo: Photo<'a>) -> Self[src]

Configures a photo for the invoice. Reflects the photo_url, photo_width and photo_height parameters.

pub fn name(self, is_needed: Requirement) -> Self[src]

Configures if the user must specify their name. Reflects the need_name parameters.

pub fn phone_number(self, is_needed: Requirement) -> Self[src]

Configures if the user must specify their phone number. Reflects the need_phone_number parameter.

pub fn email(self, is_needed: Requirement) -> Self[src]

Configures if the user must specify their email. Reflects the need_email parameter.

pub fn shipping_address(self, is_needed: Requirement) -> Self[src]

Configures if the user must specify their shipping address. Reflects the need_shipping_address parameter.

pub fn should_share_phone(self, should_send: SendToProviderState) -> Self[src]

Configures if the user's phone must be sent to your payment provider. Reflects the send_phone_number_to_provider parameter.

pub fn should_share_email(self, should_send: SendToProviderState) -> Self[src]

Configures if the user's email must be sent to your payment provider. Reflects the send_email_to_provider parameter.

pub fn flexibility(self, flexibility: Flexibility) -> Self[src]

Configures if the final price depends on the shipping method. Reflects the is_flexible parameter.

pub fn notification(self, state: NotificationState) -> Self[src]

Configures if the message will be sent silently. Reflects the disable_notification parameter.

pub fn reply_to_message_id(self, id: Id) -> Self[src]

Configures which message this invoice is sent in reply to. Reflects the reply_to_message_id parameter.

pub fn reply_markup(self, markup: Keyboard<'a>) -> Self[src]

Configures a keyboard for the message. Reflects the reply_markup parameter.

impl<'_, C: Connector> SendInvoice<'_, C>[src]

pub async fn call(self) -> Result<Message, MethodCall>[src]

Calls the method.

Trait Implementations

impl<'a, C: Clone> Clone for SendInvoice<'a, C>[src]

impl<'a, C: Debug> Debug for SendInvoice<'a, C>[src]

impl<'a, C> Serialize for SendInvoice<'a, C>[src]

Auto Trait Implementations

impl<'a, C> !RefUnwindSafe for SendInvoice<'a, C>

impl<'a, C> Send for SendInvoice<'a, C> where
    C: Sync

impl<'a, C> Sync for SendInvoice<'a, C> where
    C: Sync

impl<'a, C> Unpin for SendInvoice<'a, C>

impl<'a, C> !UnwindSafe for SendInvoice<'a, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.