pub struct CreateInvoiceParamsBuilder<A = Missing, C = Missing, P = Missing, U = Missing> {Show 14 fields
pub currency_type: Option<CurrencyType>,
pub asset: Option<CryptoCurrencyCode>,
pub fiat: Option<FiatCurrencyCode>,
pub accept_asset: Option<Vec<CryptoCurrencyCode>>,
pub amount: Decimal,
pub description: Option<String>,
pub hidden_message: Option<String>,
pub paid_btn_name: Option<PayButtonName>,
pub paid_btn_url: Option<String>,
pub swap_to: Option<SwapToAssets>,
pub payload: Option<String>,
pub allow_comments: Option<bool>,
pub allow_anonymous: Option<bool>,
pub expires_in: Option<u32>,
/* private fields */
}Fields§
§currency_type: Option<CurrencyType>§asset: Option<CryptoCurrencyCode>§fiat: Option<FiatCurrencyCode>§accept_asset: Option<Vec<CryptoCurrencyCode>>§amount: Decimal§description: Option<String>§paid_btn_name: Option<PayButtonName>§paid_btn_url: Option<String>§swap_to: Option<SwapToAssets>§payload: Option<String>§allow_comments: Option<bool>§allow_anonymous: Option<bool>§expires_in: Option<u32>Implementations§
Source§impl<C, P, U> CreateInvoiceParamsBuilder<Missing, C, P, U>
impl<C, P, U> CreateInvoiceParamsBuilder<Missing, C, P, U>
Sourcepub fn amount(self, amount: Decimal) -> CreateInvoiceParamsBuilder<Set, C, P, U>
pub fn amount(self, amount: Decimal) -> CreateInvoiceParamsBuilder<Set, C, P, U>
Set the amount for the invoice.
Source§impl<A, P, U> CreateInvoiceParamsBuilder<A, Missing, P, U>
impl<A, P, U> CreateInvoiceParamsBuilder<A, Missing, P, U>
Sourcepub fn asset(
self,
asset: CryptoCurrencyCode,
) -> CreateInvoiceParamsBuilder<A, Set, P, U>
pub fn asset( self, asset: CryptoCurrencyCode, ) -> CreateInvoiceParamsBuilder<A, Set, P, U>
Set the asset for the invoice, if the currency type is crypto.
Sourcepub fn fiat(
self,
fiat: FiatCurrencyCode,
) -> CreateInvoiceParamsBuilder<A, Set, P, U>
pub fn fiat( self, fiat: FiatCurrencyCode, ) -> CreateInvoiceParamsBuilder<A, Set, P, U>
Set the fiat for the invoice, if the currency type is fiat.
Source§impl<A, C, U> CreateInvoiceParamsBuilder<A, C, Missing, U>
impl<A, C, U> CreateInvoiceParamsBuilder<A, C, Missing, U>
Sourcepub fn paid_btn_name(
self,
paid_btn_name: PayButtonName,
) -> CreateInvoiceParamsBuilder<A, C, Set, U>
pub fn paid_btn_name( self, paid_btn_name: PayButtonName, ) -> CreateInvoiceParamsBuilder<A, C, Set, U>
Set the paid button name for the invoice. Optional. Label of the button which will be presented to a user after the invoice is paid. Supported names: viewItem – “View Item”, openChannel – “View Channel”, openBot – “Open Bot”, callback – “Return to the bot”
Source§impl<A, C> CreateInvoiceParamsBuilder<A, C, Set, Missing>
impl<A, C> CreateInvoiceParamsBuilder<A, C, Set, Missing>
Sourcepub fn paid_btn_url(
self,
paid_btn_url: impl Into<String>,
) -> CreateInvoiceParamsBuilder<A, C, Set, Set>
pub fn paid_btn_url( self, paid_btn_url: impl Into<String>, ) -> CreateInvoiceParamsBuilder<A, C, Set, Set>
Set the paid button URL for the invoice. Optional. Required if paid_btn_name is specified. URL opened using the button which will be presented to a user after the invoice is paid. You can set any callback link (for example, a success link or link to homepage). Starts with https or http.
Source§impl<A, C, P, U> CreateInvoiceParamsBuilder<A, C, P, U>
impl<A, C, P, U> CreateInvoiceParamsBuilder<A, C, P, U>
Sourcepub fn accept_asset(self, accept_asset: Vec<CryptoCurrencyCode>) -> Self
pub fn accept_asset(self, accept_asset: Vec<CryptoCurrencyCode>) -> Self
Set the accepted assets for the invoice. Optional. Defaults to all currencies.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description for the invoice. Optional. Description for the invoice. User will see this description when they pay the invoice. Up to 1024 characters.
Set the hidden message for the invoice. Optional. Text of the message which will be presented to a user after the invoice is paid. Up to 2048 characters.
Sourcepub fn payload(self, payload: impl Into<String>) -> Self
pub fn payload(self, payload: impl Into<String>) -> Self
Set the payload for the invoice. Optional. Any data you want to attach to the invoice (for example, user ID, payment ID, ect). Up to 4kb.
Sourcepub fn allow_comments(self, allow_comments: bool) -> Self
pub fn allow_comments(self, allow_comments: bool) -> Self
Set the allow comments for the invoice. Optional. Allow a user to add a comment to the payment. Defaults to true.
Sourcepub fn allow_anonymous(self, allow_anonymous: bool) -> Self
pub fn allow_anonymous(self, allow_anonymous: bool) -> Self
Set the allow anonymous for the invoice. Optional. Allow a user to pay the invoice anonymously. Defaults to true.
Sourcepub fn expires_in(self, expires_in: u32) -> Self
pub fn expires_in(self, expires_in: u32) -> Self
Set the expiration time for the invoice. Optional. You can set a payment time limit for the invoice in seconds. Values between 1-2678400 are accepted.