pub struct CustomObjectFields {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl CustomObjectFields
impl CustomObjectFields
Sourcepub async fn list_custom_objects_custom_object_api_name_fields<'a>(
&'a self,
cursor: Option<String>,
custom_object_api_name: &'a str,
) -> Result<ListCustomObjectsCustomObjectApiNameFieldsResponse, Error>
pub async fn list_custom_objects_custom_object_api_name_fields<'a>( &'a self, cursor: Option<String>, custom_object_api_name: &'a str, ) -> Result<ListCustomObjectsCustomObjectApiNameFieldsResponse, Error>
List custom object fields
A List of custom object fields
- Requires:
API Tier 1
Parameters:
cursor: Option<String>
custom_object_api_name: &'astr
(required)
use futures_util::TryStreamExt;
async fn example_custom_object_fields_list_custom_objects_custom_object_api_name_fields_stream(
) -> anyhow::Result<()> {
let client = rippling_api::Client::new_from_env();
let mut custom_object_fields = client.custom_object_fields();
let mut stream = custom_object_fields
.list_custom_objects_custom_object_api_name_fields_stream("some-string");
loop {
match stream.try_next().await {
Ok(Some(item)) => {
println!("{:?}", item);
}
Ok(None) => {
break;
}
Err(err) => {
return Err(err.into());
}
}
}
Ok(())
}
Sourcepub async fn create_custom_objects_custom_object_api_name_fields<'a>(
&'a self,
custom_object_api_name: &'a str,
body: &CreateCustomObjectsCustomObjectApiNameFieldsRequestBody,
) -> Result<CustomObjectField, Error>
pub async fn create_custom_objects_custom_object_api_name_fields<'a>( &'a self, custom_object_api_name: &'a str, body: &CreateCustomObjectsCustomObjectApiNameFieldsRequestBody, ) -> Result<CustomObjectField, Error>
Create a new custom object field
Create a new custom object field
Parameters:
custom_object_api_name: &'astr
(required)
async fn example_custom_object_fields_create_custom_objects_custom_object_api_name_fields(
) -> anyhow::Result<()> {
let client = rippling_api::Client::new_from_env();
let result: rippling_api::types::CustomObjectField = client
.custom_object_fields()
.create_custom_objects_custom_object_api_name_fields(
"some-string",
&rippling_api::types::CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
name: Some("some-string".to_string()),
description: Some("some-string".to_string()),
required: Some(true),
is_unique: Some(true),
enable_history: Some(true),
derived_field_formula: Some("some-string".to_string()),
},
)
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn get_custom_objects_custom_object_api_name_fields<'a>(
&'a self,
custom_object_api_name: &'a str,
field_api_name: &'a str,
) -> Result<CustomObjectField, Error>
pub async fn get_custom_objects_custom_object_api_name_fields<'a>( &'a self, custom_object_api_name: &'a str, field_api_name: &'a str, ) -> Result<CustomObjectField, Error>
Retrieve a specific custom object field
Retrieve a specific custom object field
Parameters:
custom_object_api_name: &'astr
(required)field_api_name: &'astr
(required)
async fn example_custom_object_fields_get_custom_objects_custom_object_api_name_fields(
) -> anyhow::Result<()> {
let client = rippling_api::Client::new_from_env();
let result: rippling_api::types::CustomObjectField = client
.custom_object_fields()
.get_custom_objects_custom_object_api_name_fields("some-string", "some-string")
.await?;
println!("{:?}", result);
Ok(())
}
Sourcepub async fn delete_custom_objects_custom_object_api_name_fields<'a>(
&'a self,
custom_object_api_name: &'a str,
field_api_name: &'a str,
) -> Result<(), Error>
pub async fn delete_custom_objects_custom_object_api_name_fields<'a>( &'a self, custom_object_api_name: &'a str, field_api_name: &'a str, ) -> Result<(), Error>
Delete a custom object field
Delete a custom object field
Parameters:
custom_object_api_name: &'astr
(required)field_api_name: &'astr
(required)
async fn example_custom_object_fields_delete_custom_objects_custom_object_api_name_fields(
) -> anyhow::Result<()> {
let client = rippling_api::Client::new_from_env();
client
.custom_object_fields()
.delete_custom_objects_custom_object_api_name_fields("some-string", "some-string")
.await?;
Ok(())
}
Sourcepub async fn update_custom_objects_custom_object_api_name_fields<'a>(
&'a self,
custom_object_api_name: &'a str,
field_api_name: &'a str,
body: &UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody,
) -> Result<CustomObjectField, Error>
pub async fn update_custom_objects_custom_object_api_name_fields<'a>( &'a self, custom_object_api_name: &'a str, field_api_name: &'a str, body: &UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody, ) -> Result<CustomObjectField, Error>
Update a custom object field
Updated a specific custom object field
Parameters:
custom_object_api_name: &'astr
(required)field_api_name: &'astr
(required)
async fn example_custom_object_fields_update_custom_objects_custom_object_api_name_fields(
) -> anyhow::Result<()> {
let client = rippling_api::Client::new_from_env();
let result: rippling_api::types::CustomObjectField = client
.custom_object_fields()
.update_custom_objects_custom_object_api_name_fields(
"some-string",
"some-string",
&rippling_api::types::UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
name: Some("some-string".to_string()),
description: Some("some-string".to_string()),
required: Some(true),
is_unique: Some(true),
enable_history: Some(true),
derived_field_formula: Some("some-string".to_string()),
},
)
.await?;
println!("{:?}", result);
Ok(())
}
Trait Implementations§
Source§impl Clone for CustomObjectFields
impl Clone for CustomObjectFields
Source§fn clone(&self) -> CustomObjectFields
fn clone(&self) -> CustomObjectFields
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CustomObjectFields
impl !RefUnwindSafe for CustomObjectFields
impl Send for CustomObjectFields
impl Sync for CustomObjectFields
impl Unpin for CustomObjectFields
impl !UnwindSafe for CustomObjectFields
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