Struct ApiErrors

Source
pub struct ApiErrors {
Show 16 fields pub advice_code: Option<String>, pub charge: Option<String>, pub code: Option<ApiErrorsCode>, pub decline_code: Option<String>, pub doc_url: Option<String>, pub message: Option<String>, pub network_advice_code: Option<String>, pub network_decline_code: Option<String>, pub param: Option<String>, pub payment_intent: Option<PaymentIntent>, pub payment_method: Option<PaymentMethod>, pub payment_method_type: Option<String>, pub request_log_url: Option<String>, pub setup_intent: Option<SetupIntent>, pub source: Option<PaymentSource>, pub type_: ApiErrorsType,
}

Fields§

§advice_code: Option<String>

For card errors resulting from a card issuer decline, a short string indicating how to proceed with an error if they provide one.

§charge: Option<String>

For card errors, the ID of the failed charge.

§code: Option<ApiErrorsCode>

For some errors that could be handled programmatically, a short string indicating the error code reported.

§decline_code: Option<String>

For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one.

§doc_url: Option<String>

A URL to more information about the error code reported.

§message: Option<String>

A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.

§network_advice_code: Option<String>

For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.

§network_decline_code: Option<String>

For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.

§param: Option<String>

If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.

§payment_intent: Option<PaymentIntent>§payment_method: Option<PaymentMethod>§payment_method_type: Option<String>

If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.

§request_log_url: Option<String>

A URL to the request log entry in your dashboard.

§setup_intent: Option<SetupIntent>§source: Option<PaymentSource>§type_: ApiErrorsType

The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error.

Trait Implementations§

Source§

impl Clone for ApiErrors

Source§

fn clone(&self) -> ApiErrors

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApiErrors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deserialize for ApiErrors

Source§

fn begin(out: &mut Option<Self>) -> &mut dyn Visitor

The only correct implementation of this method is: Read more
Source§

impl FromValueOpt for ApiErrors

Source§

impl ObjectDeser for ApiErrors

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.