pub struct FinanceSplitTransactionsResource<'a> { /* private fields */ }Expand description
client.finance().split_transactions()
Implementations§
Source§impl<'a> FinanceSplitTransactionsResource<'a>
impl<'a> FinanceSplitTransactionsResource<'a>
Sourcepub fn create(
&self,
body: &SplitTransactionCreate,
) -> Result<Option<SplitTransaction>>
pub fn create( &self, body: &SplitTransactionCreate, ) -> Result<Option<SplitTransaction>>
Create new split transaction
POST /finance/splittransactions
Creates a grouped booking from new children or existing standalone booking IDs. Child notes, amounts, accounts and assignments are supplied separately; document date and number come from the parent. New child accounts must allow posting; supplied existing child accounts require period edit permission. Children must meet the shared-account and amount-sum rules. A new child must belong to an open period containing the document date. Generated tax amounts are derived from the gross child inputs. With one child the group is converted to an ordinary booking and HTTP 204 is returned without its ID. For multiple children, returns the split parent with child booking data.
Use Self::create_with to pass query parameters.
§Example
let body = models::SplitTransactionCreate {
amount: 30000,
document_date: "2026-09-14".parse()?,
note: Some("Offering and building fund".into()),
split_children: vec![models::SplitTransactionChildCreate {
account_id: 10,
amount: 7812,
contra_account_id: 11,
note: Some("Building fund".into()),
..Default::default()
}],
..Default::default()
};
let result = client.finance().split_transactions().create(&body)?;
println!("{:?}", result);Sourcepub fn create_with(
&self,
query: &PostFinanceSplittransactionsQuery,
body: &SplitTransactionCreate,
) -> Result<Option<SplitTransaction>>
pub fn create_with( &self, query: &PostFinanceSplittransactionsQuery, body: &SplitTransactionCreate, ) -> Result<Option<SplitTransaction>>
Create new split transaction
Like Self::create, with query parameters.
POST /finance/splittransactions
Creates a grouped booking from new children or existing standalone booking IDs. Child notes, amounts, accounts and assignments are supplied separately; document date and number come from the parent. New child accounts must allow posting; supplied existing child accounts require period edit permission. Children must meet the shared-account and amount-sum rules. A new child must belong to an open period containing the document date. Generated tax amounts are derived from the gross child inputs. With one child the group is converted to an ordinary booking and HTTP 204 is returned without its ID. For multiple children, returns the split parent with child booking data.
Sourcepub fn delete(&self, id: impl Display) -> Result<()>
pub fn delete(&self, id: impl Display) -> Result<()>
Delete split transaction
DELETE /finance/splittransactions/{id}
Deletes the entire split parent, its ordinary and generated tax children, related cancellation group, and attached receipts/files. Related statement movements are reset to open and unlinked. Requires edit permission for every child’s period. Each child must be mutable and its period open. dry_run=true returns HTTP 409 with a deletion assessment without deleting, including when deletion is possible.
Use Self::delete_with to pass query parameters.
§Example
client.finance().split_transactions().delete(1)?;Sourcepub fn delete_with(
&self,
id: impl Display,
query: &DeleteFinanceSplittransactionsIdQuery,
) -> Result<()>
pub fn delete_with( &self, id: impl Display, query: &DeleteFinanceSplittransactionsIdQuery, ) -> Result<()>
Delete split transaction
Like Self::delete, with query parameters.
DELETE /finance/splittransactions/{id}
Deletes the entire split parent, its ordinary and generated tax children, related cancellation group, and attached receipts/files. Related statement movements are reset to open and unlinked. Requires edit permission for every child’s period. Each child must be mutable and its period open. dry_run=true returns HTTP 409 with a deletion assessment without deleting, including when deletion is possible.
Sourcepub fn duplicate(
&self,
id: impl Display,
body: &BTreeMap<String, Value>,
) -> Result<SplitTransaction>
pub fn duplicate( &self, id: impl Display, body: &BTreeMap<String, Value>, ) -> Result<SplitTransaction>
Duplicate split transaction
POST /finance/splittransactions/{id}/duplicate
Creates a new split group from the source children, regenerating tax bookings and copying parent receipts/files. Requires permission to create each child using its source accounts and cost center; periods must be open and dates valid. Copies the original date, notes, donor assignments, waiver and cash discount. Uses the parent number plus -Kopie and numbered child suffixes, without guaranteeing uniqueness. New children are mutable and non-synced. Unlike ordinary duplicate, child donor/spouse consistency is checked during creation.
§Example
let body: std::collections::BTreeMap<String, serde_json::Value> = Default::default();
let split_transaction = client.finance().split_transactions().duplicate(1, &body)?;
println!("{}", split_transaction.id);Sourcepub fn get(&self, id: impl Display) -> Result<SplitTransaction>
pub fn get(&self, id: impl Display) -> Result<SplitTransaction>
Get a split transaction
GET /finance/splittransactions/{id}
Returns a split parent with its ordinary child bookings, including generated tax rows. The caller must be allowed to view every child; one inaccessible child rejects the entire request. Donor details and notes are censored per child according to donor visibility. include[]=bills adds receipts attached to the parent. The parent note is returned independently of the child notes.
Use Self::get_with to pass query parameters.
§Example
let split_transaction = client.finance().split_transactions().get(1)?;
println!("{}", split_transaction.id);Sourcepub fn get_with(
&self,
id: impl Display,
query: &GetFinanceSplittransactionsIdQuery,
) -> Result<SplitTransaction>
pub fn get_with( &self, id: impl Display, query: &GetFinanceSplittransactionsIdQuery, ) -> Result<SplitTransaction>
Get a split transaction
Like Self::get, with query parameters.
GET /finance/splittransactions/{id}
Returns a split parent with its ordinary child bookings, including generated tax rows. The caller must be allowed to view every child; one inaccessible child rejects the entire request. Donor details and notes are censored per child according to donor visibility. include[]=bills adds receipts attached to the parent. The parent note is returned independently of the child notes.
Sourcepub fn update(
&self,
id: impl Display,
body: &SplitTransactionUpdate,
) -> Result<Option<SplitTransaction>>
pub fn update( &self, id: impl Display, body: &SplitTransactionUpdate, ) -> Result<Option<SplitTransaction>>
Update split transaction, or convert to normal transaction, if only one split child is given,
PUT /finance/splittransactions/{id}
Replaces a split parent and its complete child list. Existing children not included in the request are deleted. Child notes, amounts, accounts and assignments are supplied separately; document date and number come from the parent. New child accounts must allow posting; supplied existing child accounts require period edit permission. Children must meet the shared-account and amount-sum rules. A new child must belong to an open period containing the document date. Generated tax amounts are derived from the gross child inputs. With one child the group is converted to an ordinary booking and HTTP 204 is returned without its ID. For multiple children, returns the split parent with child booking data.
Use Self::update_with to pass query parameters.
§Example
let body = models::SplitTransactionUpdate {
amount: 30000,
document_date: "2026-09-14".parse()?,
note: Some("Offering and building fund".into()),
split_children: vec![models::SplitTransactionChildCreate {
account_id: 10,
amount: 7812,
contra_account_id: 11,
note: Some("Building fund".into()),
..Default::default()
}],
..Default::default()
};
let result = client.finance().split_transactions().update(1, &body)?;
println!("{:?}", result);Sourcepub fn update_with(
&self,
id: impl Display,
query: &PutFinanceSplittransactionsIdQuery,
body: &SplitTransactionUpdate,
) -> Result<Option<SplitTransaction>>
pub fn update_with( &self, id: impl Display, query: &PutFinanceSplittransactionsIdQuery, body: &SplitTransactionUpdate, ) -> Result<Option<SplitTransaction>>
Update split transaction, or convert to normal transaction, if only one split child is given,
Like Self::update, with query parameters.
PUT /finance/splittransactions/{id}
Replaces a split parent and its complete child list. Existing children not included in the request are deleted. Child notes, amounts, accounts and assignments are supplied separately; document date and number come from the parent. New child accounts must allow posting; supplied existing child accounts require period edit permission. Children must meet the shared-account and amount-sum rules. A new child must belong to an open period containing the document date. Generated tax amounts are derived from the gross child inputs. With one child the group is converted to an ordinary booking and HTTP 204 is returned without its ID. For multiple children, returns the split parent with child booking data.
Sourcepub fn update_storno(
&self,
id: impl Display,
body: &SplitTransactionStornoCreate,
) -> Result<SplitTransaction>
pub fn update_storno( &self, id: impl Display, body: &SplitTransactionStornoCreate, ) -> Result<SplitTransaction>
Cancel split transaction
PUT /finance/splittransactions/{id}/storno
Creates and returns one cancellation split parent containing opposite bookings for the original children, including tax bookings. Original records remain and reference their cancellations. Requires edit permission for each child period. Unlike ordinary cancellation, a second cancellation attempt is rejected with 403 if a child already has a cancellation. This operation does not explicitly require an open period. The original document date and amount are retained; the parent document number receives -Storno. The result is one object, not an array.
§Example
let body = models::SplitTransactionStornoCreate {
note: "Incorrect allocation".into(),
..Default::default()
};
let result = client.finance().split_transactions().update_storno(1, &body)?;
println!("{}", result.id);