pub enum RefundReason {
RequestedByCustomer,
Duplicate,
Fraudulent,
OrderCancellation,
}Expand description
Why Stripe moved a charge’s money back to the customer.
The reason is set when the refund is created and never changes afterwards, so it stays an enum rather than a free string.
Variants§
RequestedByCustomer
The customer asked for the money back.
Duplicate
Stripe could not deliver the product or service.
Fraudulent
The merchant recorded the charge in error.
OrderCancellation
An order was cancelled before the product shipped.
Implementations§
Source§impl RefundReason
impl RefundReason
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Return the wire string Stripe uses for this reason.
§Returns
&'static str- thereasonvalue in a Stripe request.
Sourcepub const fn is_involuntary(&self) -> bool
pub const fn is_involuntary(&self) -> bool
Return whether the reason marks an involuntary return.
§Returns
bool-truefor reasons the merchant did not choose.
Trait Implementations§
Source§impl Clone for RefundReason
impl Clone for RefundReason
Source§fn clone(&self) -> RefundReason
fn clone(&self) -> RefundReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RefundReason
Source§impl Debug for RefundReason
impl Debug for RefundReason
Source§impl Default for RefundReason
impl Default for RefundReason
Source§fn default() -> RefundReason
fn default() -> RefundReason
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RefundReason
impl<'de> Deserialize<'de> for RefundReason
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RefundReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RefundReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RefundReason
impl Display for RefundReason
impl Eq for RefundReason
Source§impl Hash for RefundReason
impl Hash for RefundReason
Source§impl PartialEq for RefundReason
impl PartialEq for RefundReason
Source§impl Serialize for RefundReason
impl Serialize for RefundReason
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 RefundReason
Auto Trait Implementations§
impl Freeze for RefundReason
impl RefUnwindSafe for RefundReason
impl Send for RefundReason
impl Sync for RefundReason
impl Unpin for RefundReason
impl UnsafeUnpin for RefundReason
impl UnwindSafe for RefundReason
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