Struct tbot::types::parameters::Invoice[][src]

#[must_use]
pub struct Invoice { /* fields omitted */ }

Miscellaneous parameters for Invoice methods and types.

Implementations

impl Invoice[src]

pub fn new(
    title: impl Into<String>,
    description: impl Into<String>,
    payload: impl Into<String>,
    provider_token: impl Into<String>,
    currency: impl Into<String>,
    prices: impl Into<Vec<LabeledPrice>>
) -> Self
[src]

Constructs an Invoice.

pub fn provider_data(self, provider_data: impl Into<String>) -> Self[src]

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

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

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

pub const fn is_name_needed(self, is_needed: bool) -> Self[src]

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

pub const fn is_phone_number_needed(self, is_needed: bool) -> Self[src]

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

pub const fn is_email_needed(self, is_needed: bool) -> Self[src]

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

pub const fn is_shipping_address_needed(self, is_needed: bool) -> Self[src]

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

pub const fn should_send_phone_number_to_provider(self, must_send: bool) -> Self[src]

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

pub const fn should_send_email_to_provider(self, must_send: bool) -> Self[src]

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

pub const fn is_flexible(self, is_flexible: bool) -> Self[src]

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

pub fn tip(self, tip: Tip) -> Self[src]

Configures tip for the invoice. Reflects the tip parameter.

Trait Implementations

impl Clone for Invoice[src]

impl Debug for Invoice[src]

impl Hash for Invoice[src]

impl PartialEq<Invoice> for Invoice[src]

impl Serialize for Invoice[src]

impl Eq for Invoice[src]

impl StructuralEq for Invoice[src]

impl StructuralPartialEq for Invoice[src]

Auto Trait Implementations

impl RefUnwindSafe for Invoice

impl Send for Invoice

impl Sync for Invoice

impl Unpin for Invoice

impl UnwindSafe for Invoice

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> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.