pub struct CompanyManagers {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl CompanyManagers
impl CompanyManagers
Sourcepub async fn get_index<'a>(
&'a self,
company_id: Option<String>,
page: Option<i64>,
page_size: Option<i64>,
) -> Result<CompanyManagersResponse, Error>
pub async fn get_index<'a>( &'a self, company_id: Option<String>, page: Option<i64>, page_size: Option<i64>, ) -> Result<CompanyManagersResponse, Error>
List Company Managers
List all company managers of an integration. If filtered by the company_id param, it lists only company managers belonging to the specified company.
Parameters:
company_id: Option<String>
: A Company ID to filter the results (only applicable for Integration Partners).page: Option<i64>
: Starts fetching records after the given pagepage_size: Option<i64>
: Change the amount of records returned per page, defaults to 20, limited to 100
async fn example_company_managers_get_index() -> anyhow::Result<()> {
let client = remote_api::Client::new_from_env();
let result: remote_api::types::CompanyManagersResponse = client
.company_managers()
.get_index(
Some("some-string".to_string()),
Some(4 as i64),
Some(4 as i64),
)
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn post_create<'a>(
&'a self,
body: &CompanyManagerParams,
) -> Result<CompanyManagerCreatedResponse, Error>
pub async fn post_create<'a>( &'a self, body: &CompanyManagerParams, ) -> Result<CompanyManagerCreatedResponse, Error>
Create and invite a Company Manager
Create a Company Manager and sends the invitation email for signing in to the Remote Platform.
async fn example_company_managers_post_create() -> anyhow::Result<()> {
let client = remote_api::Client::new_from_env();
let result: remote_api::types::CompanyManagerCreatedResponse = client
.company_managers()
.post_create(&remote_api::types::CompanyManagerParams {
company_id: Some("some-string".to_string()),
email: "email@example.com".to_string(),
name: "some-string".to_string(),
role: "some-string".to_string(),
})
.await?;
println!("{:?}", result);
Ok(())
}
Trait Implementations§
Source§impl Clone for CompanyManagers
impl Clone for CompanyManagers
Source§fn clone(&self) -> CompanyManagers
fn clone(&self) -> CompanyManagers
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CompanyManagers
impl !RefUnwindSafe for CompanyManagers
impl Send for CompanyManagers
impl Sync for CompanyManagers
impl Unpin for CompanyManagers
impl !UnwindSafe for CompanyManagers
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