stripe/resources/generated/
fee_refund.rs

1// ======================================
2// This file was automatically generated.
3// ======================================
4
5use crate::ids::ApplicationFeeRefundId;
6use crate::params::{Expandable, Metadata, Object, Timestamp};
7use crate::resources::{ApplicationFee, BalanceTransaction, Currency};
8use serde::{Deserialize, Serialize};
9
10/// The resource representing a Stripe "FeeRefund".
11///
12/// For more details see <https://stripe.com/docs/api/fee_refunds/object>
13#[derive(Clone, Debug, Default, Deserialize, Serialize)]
14pub struct ApplicationFeeRefund {
15    /// Unique identifier for the object.
16    pub id: ApplicationFeeRefundId,
17
18    /// Amount, in cents (or local equivalent).
19    pub amount: i64,
20
21    /// Balance transaction that describes the impact on your account balance.
22    pub balance_transaction: Option<Expandable<BalanceTransaction>>,
23
24    /// Time at which the object was created.
25    ///
26    /// Measured in seconds since the Unix epoch.
27    pub created: Timestamp,
28
29    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
30    ///
31    /// Must be a [supported currency](https://stripe.com/docs/currencies).
32    pub currency: Currency,
33
34    /// ID of the application fee that was refunded.
35    pub fee: Expandable<ApplicationFee>,
36
37    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
38    ///
39    /// This can be useful for storing additional information about the object in a structured format.
40    pub metadata: Option<Metadata>,
41}
42
43impl Object for ApplicationFeeRefund {
44    type Id = ApplicationFeeRefundId;
45    fn id(&self) -> Self::Id {
46        self.id.clone()
47    }
48    fn object(&self) -> &'static str {
49        "fee_refund"
50    }
51}