pub struct BusinessHoursResource { /* private fields */ }Expand description
Business hours — /api/v2/business-hours.
Implementations§
Source§impl BusinessHoursResource
impl BusinessHoursResource
Sourcepub async fn list_all(&self) -> Result<Vec<BusinessHour>, ManagerError>
pub async fn list_all(&self) -> Result<Vec<BusinessHour>, ManagerError>
List all business-hour profiles (auto-paginated).
Sourcepub async fn create(
&self,
body: RestCreateBusinessHour,
) -> Result<BusinessHourItemResponse, ManagerError>
pub async fn create( &self, body: RestCreateBusinessHour, ) -> Result<BusinessHourItemResponse, ManagerError>
Create a business-hour profile.
Sourcepub async fn get(
&self,
id: &str,
) -> Result<BusinessHourItemResponse, ManagerError>
pub async fn get( &self, id: &str, ) -> Result<BusinessHourItemResponse, ManagerError>
Get a business-hour profile by id.
Sourcepub async fn update(
&self,
id: &str,
body: RestUpdateBusinessHour,
) -> Result<BusinessHourItemResponse, ManagerError>
pub async fn update( &self, id: &str, body: RestUpdateBusinessHour, ) -> Result<BusinessHourItemResponse, ManagerError>
Update a business-hour profile.
Sourcepub async fn delete(&self, id: &str) -> Result<(), ManagerError>
pub async fn delete(&self, id: &str) -> Result<(), ManagerError>
Delete a business-hour profile.
Sourcepub async fn add_ranges(
&self,
id: &str,
body: BusinessHourRangesBody,
) -> Result<BusinessHourItemResponse, ManagerError>
pub async fn add_ranges( &self, id: &str, body: BusinessHourRangesBody, ) -> Result<BusinessHourItemResponse, ManagerError>
Add (replace) the time ranges of a business-hour profile.
Sourcepub async fn list_ranges(
&self,
id: &str,
) -> Result<BusinessHourRangeListResponse, ManagerError>
pub async fn list_ranges( &self, id: &str, ) -> Result<BusinessHourRangeListResponse, ManagerError>
List a business-hour profile’s time ranges.
Sourcepub async fn get_range(
&self,
id: &str,
range_id: &str,
) -> Result<BusinessHourRangeItemResponse, ManagerError>
pub async fn get_range( &self, id: &str, range_id: &str, ) -> Result<BusinessHourRangeItemResponse, ManagerError>
Get a single time range of a business-hour profile.
Sourcepub async fn remove_range(
&self,
id: &str,
range_id: &str,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn remove_range( &self, id: &str, range_id: &str, ) -> Result<DefaultV2MessageResponse, ManagerError>
Remove a time range from a business-hour profile.
Sourcepub async fn bulk_delete(
&self,
ids: Vec<String>,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn bulk_delete( &self, ids: Vec<String>, ) -> Result<DefaultV2MessageResponse, ManagerError>
Bulk-delete business-hour profiles by id.
Sourcepub async fn bulk_update(
&self,
body: BusinessHourBulkUpdateRequest,
) -> Result<BusinessHourListResponse, ManagerError>
pub async fn bulk_update( &self, body: BusinessHourBulkUpdateRequest, ) -> Result<BusinessHourListResponse, ManagerError>
Bulk-update business-hour profiles.
Auto Trait Implementations§
impl !RefUnwindSafe for BusinessHoursResource
impl !UnwindSafe for BusinessHoursResource
impl Freeze for BusinessHoursResource
impl Send for BusinessHoursResource
impl Sync for BusinessHoursResource
impl Unpin for BusinessHoursResource
impl UnsafeUnpin for BusinessHoursResource
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