Struct paystack::TransactionSplitEndpoints
source · pub struct TransactionSplitEndpoints<'a> { /* private fields */ }
Expand description
A struct to hold all the functions of the transaction split API route
Implementations§
source§impl<'a> TransactionSplitEndpoints<'a>
impl<'a> TransactionSplitEndpoints<'a>
sourcepub fn new(key: &'a str) -> TransactionSplitEndpoints<'a>
pub fn new(key: &'a str) -> TransactionSplitEndpoints<'a>
Constructor for the Transaction Split object
sourcepub async fn create_transaction_split(
&self,
split_body: CreateTransactionSplitBody
) -> PaystackResult<TransactionSplitResponse>
pub async fn create_transaction_split( &self, split_body: CreateTransactionSplitBody ) -> PaystackResult<TransactionSplitResponse>
Create a split payment on your integration.
This method takes a TransactionSplit object as a parameter.
sourcepub async fn list_transaction_splits(
&self,
split_name: Option<&str>,
split_active: Option<bool>
) -> PaystackResult<TransactionSplitListResponse>
pub async fn list_transaction_splits( &self, split_name: Option<&str>, split_active: Option<bool> ) -> PaystackResult<TransactionSplitListResponse>
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<TransactionSplitResponse>
pub async fn fetch_transaction_split( &self, split_id: &str ) -> PaystackResult<TransactionSplitResponse>
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,
body: UpdateTransactionSplitBody
) -> PaystackResult<TransactionSplitResponse>
pub async fn update_transaction_split( &self, split_id: &str, body: UpdateTransactionSplitBody ) -> PaystackResult<TransactionSplitResponse>
Update a transaction split details on your integration.
Takes in the following parameters:
- split_id
: Id of the transaction split.
- split_name
: updated name for the split.
- split_status
: updated states for the split.
- bearer_type
: (Optional) updated bearer type for the split.
- bearer_subaccount
: (Optional) updated bearer subaccount for the split
sourcepub async fn add_or_update_subaccount_split(
&self,
split_id: &str,
body: SubaccountBody
) -> PaystackResult<TransactionSplitResponse>
pub async fn add_or_update_subaccount_split( &self, split_id: &str, body: SubaccountBody ) -> PaystackResult<TransactionSplitResponse>
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<ResponseWithoutData>
pub async fn remove_subaccount_from_transaction_split( &self, split_id: &str, subaccount: DeleteSubAccountBody ) -> PaystackResult<ResponseWithoutData>
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<'a> Clone for TransactionSplitEndpoints<'a>
impl<'a> Clone for TransactionSplitEndpoints<'a>
source§fn clone(&self) -> TransactionSplitEndpoints<'a>
fn clone(&self) -> TransactionSplitEndpoints<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more