pub struct TransactionSplitEndpoints<T: HttpClient + Default> { /* private fields */ }Expand description
A struct to hold all the functions of the transaction split API endpoint
Implementations§
Source§impl<T: HttpClient + Default> TransactionSplitEndpoints<T>
impl<T: HttpClient + Default> TransactionSplitEndpoints<T>
Sourcepub async fn create_transaction_split(
&self,
split_body: TransactionSplitRequest,
) -> PaystackResult<TransactionSplitResponseData>
pub async fn create_transaction_split( &self, split_body: TransactionSplitRequest, ) -> PaystackResult<TransactionSplitResponseData>
Create a split payment on your integration.
This method takes a TransactionSplitRequest object as a parameter.
Sourcepub async fn list_transaction_splits(
&self,
split_name: Option<&str>,
split_active: Option<bool>,
) -> PaystackResult<Vec<TransactionSplitResponseData>>
pub async fn list_transaction_splits( &self, split_name: Option<&str>, split_active: Option<bool>, ) -> PaystackResult<Vec<TransactionSplitResponseData>>
List the transaction splits available on your integration
Takes in the following parameters:
- split_name: (Optional) name of the split to retrieve.
- split_active: (Optional) status of the split to retrieve.
Sourcepub async fn fetch_transaction_split(
&self,
split_id: &str,
) -> PaystackResult<TransactionSplitResponseData>
pub async fn fetch_transaction_split( &self, split_id: &str, ) -> PaystackResult<TransactionSplitResponseData>
Get details of a split on your integration.
Takes in the following parameter:
- split_id: ID of the transaction split.
Sourcepub async fn update_transaction_split(
&self,
split_id: &str,
update_body: UpdateTransactionSplitRequest,
) -> PaystackResult<TransactionSplitResponseData>
pub async fn update_transaction_split( &self, split_id: &str, update_body: UpdateTransactionSplitRequest, ) -> PaystackResult<TransactionSplitResponseData>
Update a transaction split details on your integration.
Takes in a
update_bodyas aUpdateTransactionSplitRequeststruct which is created from theUpdateTransactionSplitRequestBuilderstructsplit_id, the ID of the split to update
Sourcepub async fn add_or_update_subaccount_split(
&self,
split_id: &str,
body: SubaccountBody,
) -> PaystackResult<TransactionSplitResponseData>
pub async fn add_or_update_subaccount_split( &self, split_id: &str, body: SubaccountBody, ) -> PaystackResult<TransactionSplitResponseData>
Add a Subaccount to a Transaction Split, or update the share of an existing Subaccount in a Transaction Split
Takes in the following parameters:
- split_id: Id of the transaction split to update.
- body: Subaccount to add to the transaction split.
Sourcepub async fn remove_subaccount_from_transaction_split(
&self,
split_id: &str,
subaccount: DeleteSubAccountBody,
) -> PaystackResult<String>
pub async fn remove_subaccount_from_transaction_split( &self, split_id: &str, subaccount: DeleteSubAccountBody, ) -> PaystackResult<String>
Remove a subaccount from a transaction split.
Takes in the following parameters - split_id: Id of the transaction split - subaccount: subaccount code to remove
Trait Implementations§
Source§impl<T: Clone + HttpClient + Default> Clone for TransactionSplitEndpoints<T>
impl<T: Clone + HttpClient + Default> Clone for TransactionSplitEndpoints<T>
Source§fn clone(&self) -> TransactionSplitEndpoints<T>
fn clone(&self) -> TransactionSplitEndpoints<T>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more