pub struct SubaccountEndpoints<T: HttpClient + Default> { /* private fields */ }Expand description
A struct to hold all functions in the subaccount API route
Implementations§
Source§impl<T: HttpClient + Default> SubaccountEndpoints<T>
impl<T: HttpClient + Default> SubaccountEndpoints<T>
Sourcepub async fn create_subaccount(
&self,
subaccount_request: CreateSubaccountRequest,
) -> PaystackResult<SubaccountsResponseData>
pub async fn create_subaccount( &self, subaccount_request: CreateSubaccountRequest, ) -> PaystackResult<SubaccountsResponseData>
Sourcepub async fn list_subaccounts(
&self,
per_page: Option<u32>,
page: Option<u32>,
) -> PaystackResult<Vec<SubaccountsResponseData>>
pub async fn list_subaccounts( &self, per_page: Option<u32>, page: Option<u32>, ) -> PaystackResult<Vec<SubaccountsResponseData>>
Sourcepub async fn fetch_subaccount(
&self,
id_or_code: String,
) -> PaystackResult<SubaccountsResponseData>
pub async fn fetch_subaccount( &self, id_or_code: String, ) -> PaystackResult<SubaccountsResponseData>
Sourcepub async fn update_subaccount(
&self,
id_or_code: String,
update_request: CreateSubaccountRequest,
) -> PaystackResult<SubaccountsResponseData>
pub async fn update_subaccount( &self, id_or_code: String, update_request: CreateSubaccountRequest, ) -> PaystackResult<SubaccountsResponseData>
Update a subaccount details in your integration
§Arguments
id_or_code- Subaccount’s ID or codeupdate_request- The request data to update the subaccount. It should be created with theCreateSubaccountRequestBuilderstruct.
§Returns
A Result containing the updated subaccount response data or an error
Trait Implementations§
Source§impl<T: Clone + HttpClient + Default> Clone for SubaccountEndpoints<T>
impl<T: Clone + HttpClient + Default> Clone for SubaccountEndpoints<T>
Source§fn clone(&self) -> SubaccountEndpoints<T>
fn clone(&self) -> SubaccountEndpoints<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for SubaccountEndpoints<T>
impl<T> RefUnwindSafe for SubaccountEndpoints<T>where
T: RefUnwindSafe,
impl<T> Send for SubaccountEndpoints<T>where
T: Sync,
impl<T> Sync for SubaccountEndpoints<T>where
T: Sync,
impl<T> Unpin for SubaccountEndpoints<T>
impl<T> UnwindSafe for SubaccountEndpoints<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more