#[derive(Debug, Clone)]
pub struct StediClient {
api_key: String,
}
impl StediClient {
pub fn new(api_key: impl Into<String>) -> Self {
Self {
api_key: api_key.into(),
}
}
}
macro_rules! service_config {
($method:ident, $feature:literal, $module:ident) => {
#[cfg(feature = $feature)]
impl StediClient {
#[doc = concat!("Configuration for the Stedi `", stringify!($module), "` API.")]
pub fn $method(&self) -> crate::$module::apis::configuration::Configuration {
let mut config = crate::$module::apis::configuration::Configuration::default();
config.api_key = Some(crate::$module::apis::configuration::ApiKey {
prefix: Some("Key".to_string()),
key: self.api_key.clone(),
});
config.user_agent =
Some(format!("autogen-stedi/{}", env!("CARGO_PKG_VERSION")));
config
}
}
};
}
service_config!(claims, "claims", claims);
service_config!(core, "core", core);
service_config!(enrollment, "enrollment", enrollment);
service_config!(event_destinations, "event-destinations", event_destinations);
service_config!(healthcare, "healthcare", healthcare);
service_config!(manager, "manager", manager);
service_config!(payers, "payers", payers);