stripe_pay_core/refund/struct.rs
1use super::*;
2
3/// A Refund as returned by Stripe's REST API.
4///
5/// A refund returns some or all of a charge's money. `amount` is the
6/// part being returned by this refund alone, so summing the refunds
7/// attached to one charge reconstructs the total refunded.
8#[derive(Clone, Debug, Eq, Getter, PartialEq, serde::Deserialize, serde::Serialize)]
9pub struct Refund {
10 /// Stripe's identifier for this refund.
11 pub(super) id: String,
12 /// The charge this refund belongs to.
13 pub(super) charge: String,
14 /// The amount returned, in minor units.
15 #[get(skip)]
16 pub(super) amount: i64,
17 /// The ISO 4217 code the amount is denominated in.
18 #[get(skip)]
19 pub(super) currency: String,
20 /// Why the money was returned.
21 #[get(type(copy))]
22 pub(super) reason: RefundReason,
23 /// Whether Stripe has fully processed the refund.
24 #[get(type(copy))]
25 pub(super) succeeded: bool,
26}