use crate::api::*;
use crate::{ApiError, ClientConfig, HttpClient, RequestOptions};
use reqwest::Method;
pub struct PayoutAccountsClient {
pub http_client: HttpClient,
}
impl PayoutAccountsClient {
pub fn new(config: ClientConfig) -> Result<Self, ApiError> {
Ok(Self {
http_client: HttpClient::new(config.clone())?,
})
}
pub async fn retrieve(
&self,
id: &str,
options: Option<RequestOptions>,
) -> Result<PayoutAccount, ApiError> {
self.http_client
.execute_request(
Method::GET,
&format!("payout_accounts/{}", id),
None,
None,
options,
)
.await
}
}