pub struct Countries {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl Countries
impl Countries
Sourcepub async fn get_supported_country<'a>(
&'a self,
) -> Result<CountriesResponse, Error>
pub async fn get_supported_country<'a>( &'a self, ) -> Result<CountriesResponse, Error>
List countries
Returns a list of all countries that are supported by Remote API alphabetically ordered.
async fn example_countries_get_supported_country() -> anyhow::Result<()> {
let client = remote_api::Client::new_from_env();
let result: remote_api::types::CountriesResponse =
client.countries().get_supported_country().await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn get_index_holiday<'a>(
&'a self,
country_code: &'a str,
country_subdivision_code: Option<String>,
year: &'a str,
) -> Result<HolidaysResponse, Error>
pub async fn get_index_holiday<'a>( &'a self, country_code: &'a str, country_subdivision_code: Option<String>, year: &'a str, ) -> Result<HolidaysResponse, Error>
List all holidays of a country
List all holidays of a country for a specific year. Optionally, it can be filtered by country subdivision.
Parameters:
country_code: &'astr
: Country code according to ISO 3166-1 3-digit alphabetic codes (required)country_subdivision_code: Option<String>
: Country subdivision code according to ISO 3166-2 codesyear: &'astr
: Year for the holidays (required)
async fn example_countries_get_index_holiday() -> anyhow::Result<()> {
let client = remote_api::Client::new_from_env();
let result: remote_api::types::HolidaysResponse = client
.countries()
.get_index_holiday(
"some-string",
Some("some-string".to_string()),
"some-string",
)
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn get_show_form_country<'a>(
&'a self,
country_code: &'a str,
form: &'a str,
) -> Result<CountryFormResponse, Error>
pub async fn get_show_form_country<'a>( &'a self, country_code: &'a str, form: &'a str, ) -> Result<CountryFormResponse, Error>
Show form schema
Returns the json schema of a supported form. Possible form names are:
- address_details
- administrative_details
- bank_account_details
- billing_address_details
- contract_details
- emergency_contact_details
- employment_document_details
- personal_details
- pricing_plan_details
Parameters:
country_code: &'astr
: Country code according to ISO 3-digit alphabetic codes (required)form: &'astr
: Name of the desired form (required)
async fn example_countries_get_show_form_country() -> anyhow::Result<()> {
let client = remote_api::Client::new_from_env();
let result: remote_api::types::CountryFormResponse = client
.countries()
.get_show_form_country("some-string", "some-string")
.await?;
println!("{:?}", result);
Ok(())
}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Countries
impl !RefUnwindSafe for Countries
impl Send for Countries
impl Sync for Countries
impl Unpin for Countries
impl !UnwindSafe for Countries
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more