use crate::client::RevolutXClient;
use crate::error::Result;
use crate::model::configuration::{Currencies, CurrencyPairs};
use crate::transport::RequestSpec;
pub struct ConfigurationApi<'a> {
client: &'a RevolutXClient,
}
impl<'a> ConfigurationApi<'a> {
pub(crate) const fn new(client: &'a RevolutXClient) -> Self {
Self { client }
}
pub async fn currencies(&self) -> Result<Currencies> {
self.client
.send_json(RequestSpec::get("/configuration/currencies"))
.await
}
pub async fn pairs(&self) -> Result<CurrencyPairs> {
self.client
.send_json(RequestSpec::get("/configuration/pairs"))
.await
}
}