pub struct Refund { /* private fields */ }Expand description
A Refund as returned by Stripe’s REST API.
A refund returns some or all of a charge’s money. amount is the
part being returned by this refund alone, so summing the refunds
attached to one charge reconstructs the total refunded.
Implementations§
Source§impl Refund
impl Refund
Sourcepub fn get_amount(&self) -> Result<Money, StripeParseError>
pub fn get_amount(&self) -> Result<Money, StripeParseError>
Return the amount this refund returns.
§Returns
Result<Money, StripeParseError>- the amount, or an error when the response carried a currency this crate does not model.
Sourcepub fn is_succeeded(&self) -> bool
pub fn is_succeeded(&self) -> bool
Return whether Stripe has fully processed this refund.
§Returns
bool-trueonce the money is on its way back.
Sourcepub fn is_involuntary(&self) -> bool
pub fn is_involuntary(&self) -> bool
Return whether the merchant chose this reason themselves.
§Returns
bool-truefor reasons the merchant did not pick.
Source§impl Refund
impl Refund
pub fn get_id(&self) -> &String
pub fn get_charge(&self) -> &String
pub fn get_reason(&self) -> RefundReason
pub fn get_succeeded(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Refund
impl<'de> Deserialize<'de> for Refund
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Refund, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Refund, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Refund
Source§impl Serialize for Refund
impl Serialize for Refund
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Refund
Auto Trait Implementations§
impl Freeze for Refund
impl RefUnwindSafe for Refund
impl Send for Refund
impl Sync for Refund
impl Unpin for Refund
impl UnsafeUnpin for Refund
impl UnwindSafe for Refund
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more