Struct frankenstein::api_params::SendInvoiceParams
source · [−]pub struct SendInvoiceParams {Show 27 fields
pub chat_id: i64,
pub title: String,
pub description: String,
pub payload: String,
pub provider_token: String,
pub currency: String,
pub prices: Vec<LabeledPrice>,
pub max_tip_amount: Option<u32>,
pub suggested_tip_amounts: Option<Vec<u32>>,
pub start_parameter: Option<String>,
pub provider_data: Option<String>,
pub photo_url: Option<String>,
pub photo_size: Option<u32>,
pub photo_width: Option<u32>,
pub photo_height: Option<u32>,
pub need_name: Option<bool>,
pub need_phone_number: Option<bool>,
pub need_email: Option<bool>,
pub need_shipping_address: Option<bool>,
pub send_phone_number_to_provider: Option<bool>,
pub send_email_to_provider: Option<bool>,
pub is_flexible: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub reply_to_message_id: Option<i32>,
pub allow_sending_without_reply: Option<bool>,
pub reply_markup: Option<InlineKeyboardMarkup>,
}
Fields
chat_id: i64
title: String
description: String
payload: String
provider_token: String
currency: String
prices: Vec<LabeledPrice>
max_tip_amount: Option<u32>
suggested_tip_amounts: Option<Vec<u32>>
start_parameter: Option<String>
provider_data: Option<String>
photo_url: Option<String>
photo_size: Option<u32>
photo_width: Option<u32>
photo_height: Option<u32>
need_name: Option<bool>
need_phone_number: Option<bool>
need_email: Option<bool>
need_shipping_address: Option<bool>
send_phone_number_to_provider: Option<bool>
send_email_to_provider: Option<bool>
is_flexible: Option<bool>
disable_notification: Option<bool>
protect_content: Option<bool>
reply_to_message_id: Option<i32>
allow_sending_without_reply: Option<bool>
reply_markup: Option<InlineKeyboardMarkup>
Implementations
sourceimpl SendInvoiceParams
impl SendInvoiceParams
sourcepub fn builder(
) -> SendInvoiceParamsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> SendInvoiceParamsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building SendInvoiceParams
.
On the builder, call .chat_id(...)
, .title(...)
, .description(...)
, .payload(...)
, .provider_token(...)
, .currency(...)
, .prices(...)
, .max_tip_amount(...)
(optional), .suggested_tip_amounts(...)
(optional), .start_parameter(...)
(optional), .provider_data(...)
(optional), .photo_url(...)
(optional), .photo_size(...)
(optional), .photo_width(...)
(optional), .photo_height(...)
(optional), .need_name(...)
(optional), .need_phone_number(...)
(optional), .need_email(...)
(optional), .need_shipping_address(...)
(optional), .send_phone_number_to_provider(...)
(optional), .send_email_to_provider(...)
(optional), .is_flexible(...)
(optional), .disable_notification(...)
(optional), .protect_content(...)
(optional), .reply_to_message_id(...)
(optional), .allow_sending_without_reply(...)
(optional), .reply_markup(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of SendInvoiceParams
.
Trait Implementations
sourceimpl Clone for SendInvoiceParams
impl Clone for SendInvoiceParams
sourcefn clone(&self) -> SendInvoiceParams
fn clone(&self) -> SendInvoiceParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SendInvoiceParams
impl Debug for SendInvoiceParams
sourceimpl<'de> Deserialize<'de> for SendInvoiceParams
impl<'de> Deserialize<'de> for SendInvoiceParams
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<SendInvoiceParams> for SendInvoiceParams
impl PartialEq<SendInvoiceParams> for SendInvoiceParams
sourcefn eq(&self, other: &SendInvoiceParams) -> bool
fn eq(&self, other: &SendInvoiceParams) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SendInvoiceParams) -> bool
fn ne(&self, other: &SendInvoiceParams) -> bool
This method tests for !=
.
sourceimpl Serialize for SendInvoiceParams
impl Serialize for SendInvoiceParams
impl StructuralPartialEq for SendInvoiceParams
Auto Trait Implementations
impl RefUnwindSafe for SendInvoiceParams
impl Send for SendInvoiceParams
impl Sync for SendInvoiceParams
impl Unpin for SendInvoiceParams
impl UnwindSafe for SendInvoiceParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more