-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61c5cbc
commit 7509c98
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use crate::client::{Client, Response}; | ||
use crate::ids::AccountId; | ||
use crate::resources::Balance; | ||
|
||
impl Balance { | ||
/// Retrieves balance object by AccountId. Does not change stripe_account of the client. | ||
/// | ||
/// For more details see <https://stripe.com/docs/api/balance/balance_retrieve>. | ||
pub fn retrieve(client: &Client, account_id: Option<AccountId>) -> Response<Balance> { | ||
match account_id { | ||
Some(account_id) => client.clone().with_stripe_account(account_id).get("/balance"), | ||
None => client.get("/balance"), | ||
} | ||
} | ||
} |