pub struct PersonsMergeResource<'a> { /* private fields */ }Expand description
client.persons().merge()
Implementations§
Source§impl<'a> PersonsMergeResource<'a>
impl<'a> PersonsMergeResource<'a>
Sourcepub fn get(
&self,
person_id: impl Display,
duplicate_id: impl Display,
) -> Result<PersonMergeInfo>
pub fn get( &self, person_id: impl Display, duplicate_id: impl Display, ) -> Result<PersonMergeInfo>
Get information to compare two person records in order to prepare a merge
GET /persons/{personId}/merge/{duplicateId}
Caution: This API is published as Beta and subject to be changed. It is published such that customers can play evaluate it with production data.
This retrieves the basis for a merge of two person records You will receive person data, relationships, groups etc. for both persons.
§Example
let merge = client.persons().merge().get("abc123", "100")?;
println!("{:?}", merge);Sourcepub fn patch(
&self,
person_id: impl Display,
duplicate_id: impl Display,
body: &PersonUpdateable,
) -> Result<PatchPersonsPersonidMergeDuplicateidData>
pub fn patch( &self, person_id: impl Display, duplicate_id: impl Display, body: &PersonUpdateable, ) -> Result<PatchPersonsPersonidMergeDuplicateidData>
Merge two person records
PATCH /persons/{personId}/merge/{duplicateId}
Caution: This API is published as Beta and subject to be changed. It is published such that customers can play evaluate it with production data.
Generally, you can provide any person field to save, but be aware that write access to the provided ields is required. Beware, that not all fields which are listed in the Person schema can be updated. E.g. imageUrl or familyUrl
(see PATCH /api/person/{id})
- using PATCH you can perform the eventual merge, it will
- patch the person record
- replace the personId of the doublette with the Original in all related records.
- Group memberships
- Person relation
- Bookings
- Wiki-Entries
- Financial transactions
- …
- delete the doublette if
deleteDuplicateis true
all to be done within one transaction.
§Example
let body = models::PersonUpdateable {
title: Some("Hauskreis Nord".into()),
..Default::default()
};
let result = client.persons().merge().patch("abc123", "100", &body)?;
println!("{}", result.body);