CheckoutOptions
Options for Sponsorkit::open_checkout and Sponsorkit::checkout_url.
On this page
Options for Sponsorkit::open_checkout and Sponsorkit::checkout_url.
timeout, poll_interval, cancel and sign_in_method only apply to open_checkout.
use sponsorkit::CheckoutOptions;
pub struct CheckoutOptions {
pub provider: Option<Provider>,
pub amount: Option<i64>,
pub currency: Option<String>,
pub frequency: Option<Frequency>,
pub timeout: Option<Duration>,
pub poll_interval: Option<Duration>,
pub cancel: Option<CancellationToken>,
pub sign_in_method: Option<SignInMethod>,
}Fields#
provider#
pub provider: Option<Provider>Preferred provider. The checkout page never silently switches provider.
amount#
pub amount: Option<i64>Suggested amount in minor units (e.g. 500 = 5.00).
currency#
pub currency: Option<String>ISO 4217 currency, e.g. "USD". GitHub only accepts USD.
frequency#
pub frequency: Option<Frequency>Suggested frequency.
timeout#
pub timeout: Option<Duration>How long to wait for the contribution to show up once the checkout
page is open (the polling phase). Default 10 minutes. Signing in first
is bounded by crate::Options::sign_in_timeout instead.
poll_interval#
pub poll_interval: Option<Duration>Overrides the instance's checkout_poll_interval for this call.
cancel#
pub cancel: Option<CancellationToken>Stops waiting, in the sign-in or the polling phase; open_checkout
then resolves CheckoutOutcome::Unknown. Dropping the
open_checkout future also stops it (without a result).
sign_in_method#
pub sign_in_method: Option<SignInMethod>Overrides the instance's sign-in method when the user is signed out.
Trait implementations#
impl Clone for CheckoutOptionsimpl Debug for CheckoutOptionsimpl Default for CheckoutOptions