stripe/resources/
balance_ext.rs

1use crate::client::{Client, Response};
2use crate::ids::AccountId;
3use crate::resources::Balance;
4
5impl Balance {
6    /// Retrieves balance object by AccountId. Does not change stripe_account of the client.
7    ///
8    /// For more details see <https://stripe.com/docs/api/balance/balance_retrieve>.
9    pub fn retrieve(client: &Client, account_id: Option<AccountId>) -> Response<Balance> {
10        match account_id {
11            Some(account_id) => client.clone().with_stripe_account(account_id).get("/balance"),
12            None => client.get("/balance"),
13        }
14    }
15}