pub struct CallCreateInvoiceLink<'a> { /* private fields */ }

Implementations§

source§

impl<'a> CallCreateInvoiceLink<'a>

source

pub fn title(self, title: &'a str) -> Self

Product name, 1-32 characters

source

pub fn description(self, description: &'a str) -> Self

Product description, 1-255 characters

source

pub fn payload(self, payload: &'a str) -> Self

Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.

source

pub fn provider_token(self, provider_token: &'a str) -> Self

Payment provider token, obtained via BotFather

source

pub fn currency(self, currency: &'a str) -> Self

Three-letter ISO 4217 currency code, see more on currencies

source

pub fn prices(self, prices: &'a Vec<LabeledPrice>) -> Self

Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)

source

pub fn max_tip_amount(self, max_tip_amount: i64) -> Self

The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0

source

pub fn suggested_tip_amounts(self, suggested_tip_amounts: Vec<i64>) -> Self

A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.

source

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

JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.

source

pub fn photo_url(self, photo_url: &'a str) -> Self

URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.

source

pub fn photo_size(self, photo_size: i64) -> Self

Photo size in bytes

source

pub fn photo_width(self, photo_width: i64) -> Self

Photo width

source

pub fn photo_height(self, photo_height: i64) -> Self

Photo height

source

pub fn need_name(self, need_name: bool) -> Self

Pass True if you require the user’s full name to complete the order

source

pub fn need_phone_number(self, need_phone_number: bool) -> Self

Pass True if you require the user’s phone number to complete the order

source

pub fn need_email(self, need_email: bool) -> Self

Pass True if you require the user’s email address to complete the order

source

pub fn need_shipping_address(self, need_shipping_address: bool) -> Self

Pass True if you require the user’s shipping address to complete the order

source

pub fn send_phone_number_to_provider( self, send_phone_number_to_provider: bool ) -> Self

Pass True if the user’s phone number should be sent to the provider

source

pub fn send_email_to_provider(self, send_email_to_provider: bool) -> Self

Pass True if the user’s email address should be sent to the provider

source

pub fn is_flexible(self, is_flexible: bool) -> Self

Pass True if the final price depends on the shipping method

source

pub async fn build(self) -> BotResult<String>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more