stripe/resources/generated/
connect_collection_transfer.rs

1// ======================================
2// This file was automatically generated.
3// ======================================
4
5use crate::ids::ConnectCollectionTransferId;
6use crate::params::{Expandable, Object};
7use crate::resources::{Account, Currency};
8use serde::{Deserialize, Serialize};
9
10/// The resource representing a Stripe "ConnectCollectionTransfer".
11#[derive(Clone, Debug, Default, Deserialize, Serialize)]
12pub struct ConnectCollectionTransfer {
13    /// Unique identifier for the object.
14    pub id: ConnectCollectionTransferId,
15
16    /// Amount transferred, in cents (or local equivalent).
17    pub amount: i64,
18
19    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
20    ///
21    /// Must be a [supported currency](https://stripe.com/docs/currencies).
22    pub currency: Currency,
23
24    /// ID of the account that funds are being collected for.
25    pub destination: Expandable<Account>,
26
27    /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
28    pub livemode: bool,
29}
30
31impl Object for ConnectCollectionTransfer {
32    type Id = ConnectCollectionTransferId;
33    fn id(&self) -> Self::Id {
34        self.id.clone()
35    }
36    fn object(&self) -> &'static str {
37        "connect_collection_transfer"
38    }
39}