Skip to main content

SyncExternalsystemsResource

Struct SyncExternalsystemsResource 

Source
pub struct SyncExternalsystemsResource<'a> { /* private fields */ }
Expand description

client.sync().externalsystems()

Implementations§

Source§

impl<'a> SyncExternalsystemsResource<'a>

Source

pub fn adapter_proxy(&self) -> SyncExternalsystemsAdapterProxyResource<'a>

Source

pub fn field_mappings(&self) -> SyncExternalsystemsFieldMappingsResource<'a>

Source

pub fn job_configs(&self) -> SyncExternalsystemsJobConfigsResource<'a>

Source

pub fn create(&self, body: &ExternalSystemCreate) -> Result<ExternalSystem>

Create an external connection

POST /sync/externalsystems

Creates a connection using an existing adapter name and copies available field-mapping presets. Outside the trial period, the licensed connection limit is checked.

§Example
let body = models::ExternalSystemCreate {
    access_header_values: serde_json::json!({}),
    adapter: "churchtools".into(),
    name: "Accounting system".into(),
    ..Default::default()
};
let result = client.sync().externalsystems().create(&body)?;
println!("{}", result.name);
Source

pub fn delete(&self, external_system_id: impl Display) -> Result<()>

Delete an external connection

DELETE /sync/externalsystems/{externalSystemId}

Deletes the connection, its job configurations, related job logs and executions, field mappings and entity mappings. Synchronized records themselves are not deleted. Returns 204 if the connection is missing.

§Example
client.sync().externalsystems().delete(1)?;
Source

pub fn delete_entity_mappings( &self, external_system_id: impl Display, ) -> Result<()>

Delete all mappings for an external connection

DELETE /sync/externalsystems/{externalSystemId}/entitymappings

Removes all relationships belonging to the external connection. Underlying records remain. Returns 204 when no mapping exists. Requires “churchcore: administer persons” permission.

§Example
client.sync().externalsystems().delete_entity_mappings(1)?;
Source

pub fn get(&self, external_system_id: impl Display) -> Result<ExternalSystem>

Get an external connection

GET /sync/externalsystems/{externalSystemId}

Returns connection settings with masked access credentials.

§Example
let externalsystem = client.sync().externalsystems().get(1)?;
println!("{}", externalsystem.name);
Source

pub fn list(&self) -> Result<Vec<ExternalSystem>>

List external connections

GET /sync/externalsystems

Lists configured connections, including their adapter names and job counts. A connection identifies one external installation or account; several can use the same adapter.

§Example
for externalsystem in client.sync().externalsystems().list()? {
    println!("{}", externalsystem.name);
}
Source

pub fn test(&self, external_system_id: impl Display) -> Result<()>

Test a saved external connection

POST /sync/externalsystems/{externalSystemId}/test

Calls the adapter’s connection test using the saved settings. This is a connection check, not a synchronization run.

§Example
client.sync().externalsystems().test(1)?;
Source

pub fn test_settings( &self, body: &SyncExternalSystemTestCreate, ) -> Result<Value>

Test proposed external connection settings

POST /sync/externalsystems/test

Runs the adapter’s connection test without saving the supplied settings.

§Example
let body = models::SyncExternalSystemTestCreate {
    access_header_values: serde_json::json!({}),
    adapter: "churchtools".into(),
    name: "Accounting system".into(),
    ..Default::default()
};
let result = client.sync().externalsystems().test_settings(&body)?;
println!("{:?}", result);
Source

pub fn update( &self, external_system_id: impl Display, body: &ExternalSystemUpdate, ) -> Result<ExternalSystem>

Update an external connection

PUT /sync/externalsystems/{externalSystemId}

Changes the name and adapter and merges supplied access headers.

§Example
let body = models::ExternalSystemUpdate {
    access_header_values: serde_json::json!({}),
    adapter: "churchtools".into(),
    name: "Accounting system".into(),
    id: 1,
    ..Default::default()
};
let result = client.sync().externalsystems().update(1, &body)?;
println!("{}", result.name);

Trait Implementations§

Source§

impl<'a> Clone for SyncExternalsystemsResource<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for SyncExternalsystemsResource<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more