pub struct ServiceGroupsResource<'a> { /* private fields */ }Expand description
client.service_groups()
Implementations§
Source§impl<'a> ServiceGroupsResource<'a>
impl<'a> ServiceGroupsResource<'a>
Sourcepub fn create(&self, body: &ServiceGroupCreate) -> Result<ServiceGroup>
pub fn create(&self, body: &ServiceGroupCreate) -> Result<ServiceGroup>
Create a service group
POST /servicegroups
Creates a reusable service group master-data record. Requires the “edit masterdata” permission for the service planning domain.
§Example
let body = models::ServiceGroupCreate {
name: "Hauskreis Nord".into(),
..Default::default()
};
let result = client.service_groups().create(&body)?;
println!("{}", result.name);Sourcepub fn delete(&self, service_group_id: impl Display) -> Result<()>
pub fn delete(&self, service_group_id: impl Display) -> Result<()>
Delete a service group
DELETE /servicegroups/{serviceGroupId}
Deletes the service group master-data record through the dependency-aware deletion service. A dependency conflict returns 409. Requires the “edit masterdata” permission for the service planning domain.
§Example
client.service_groups().delete(13)?;Sourcepub fn get(&self, service_group_id: impl Display) -> Result<ServiceGroup>
pub fn get(&self, service_group_id: impl Display) -> Result<ServiceGroup>
Get a service group
GET /servicegroups/{serviceGroupId}
Returns the reusable service group master-data record with the specified ID.
§Example
let service_group = client.service_groups().get(13)?;
println!("{}", service_group.name);Sourcepub fn list(&self) -> Result<Vec<ServiceGroup>>
pub fn list(&self) -> Result<Vec<ServiceGroup>>
Get all service groups
GET /servicegroups
Returns all service groups as an unpaginated list, sorted by sortKey and then name, both ascending.
§Example
for service_group in client.service_groups().list()? {
println!("{}", service_group.name);
}Sourcepub fn update(
&self,
service_group_id: impl Display,
body: &ServiceGroupUpdate,
) -> Result<ServiceGroup>
pub fn update( &self, service_group_id: impl Display, body: &ServiceGroupUpdate, ) -> Result<ServiceGroup>
Update a service group
PUT /servicegroups/{serviceGroupId}
Requires the “edit masterdata” permission for the service planning domain.
§Example
let body = models::ServiceGroupUpdate {
name: "Hauskreis Nord".into(),
..Default::default()
};
let result = client.service_groups().update(13, &body)?;
println!("{}", result.name);