Package com.flutterwave.services
Class SubAccounts
java.lang.Object
com.flutterwave.services.SubAccounts
Manage Collection Subaccounts.
- Author:
- Cleopatra Douglas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunCreateSubAccounts(CollectionsSubAccountRequest collectionsSubAccountRequest, Optional<PayoutSubAccountRequest> payoutSubAccountRequest, SubAccountTypes type) Create a subaccount on Flutterwave.runDeleteCollectionSubAccounts(int id) Delete a collection subaccount on Flutterwave.runGetPayoutSubAccountBalance(String account_reference, String currency) Fetch the available balance on a payout/transfer subaccount on Flutterwave.runGetPayoutSubAccountStaticVirtualAccount(String account_reference, String currency) Fetch a static virtual account on a payout/transfer subaccount on FlutterwaverunGetPayoutSubAccountTransactions(String account_reference, String from, String to, String currency) Fetch a transaction on a payout/transfer subaccount on Flutterwave.runGetSubAccount(int id, Optional<String> account_reference, Optional<String> include_limit, SubAccountTypes type) Fetch a subaccount on Flutterwave.runGetSubAccounts(Optional<String> account_bank, Optional<String> account_number, Optional<String> bank_name, Optional<Integer> page, SubAccountTypes type) List all subaccounts on Flutterwave.updateSubAccount(int id, UpdateCollectionSubAccountRequest updateCollectionSubAccountRequest, Optional<UpdatePayoutSubAccountRequest> updatePayoutSubAccountRequest, Optional<String> account_reference, SubAccountTypes type) Update a collection subaccount on Flutterwave.
-
Constructor Details
-
SubAccounts
public SubAccounts()
-
-
Method Details
-
runCreateSubAccounts
public Response runCreateSubAccounts(CollectionsSubAccountRequest collectionsSubAccountRequest, Optional<PayoutSubAccountRequest> payoutSubAccountRequest, SubAccountTypes type) Create a subaccount on Flutterwave.- Parameters:
collectionsSubAccountRequest- beanpayoutSubAccountRequest- beantype- COLLECTION or PAYOUT- Returns:
- Response
-
runGetSubAccounts
public ListResponse runGetSubAccounts(Optional<String> account_bank, Optional<String> account_number, Optional<String> bank_name, Optional<Integer> page, SubAccountTypes type) List all subaccounts on Flutterwave.- Parameters:
account_bank- Optional This is the sub-accounts bank ISO codeaccount_number- Optional This is the account number associated with the subaccount you want to fetchbank_name- Optional This is the name of the bank associated with the ISO code provided in account_bankfieldpage- Optional This is the page number to retrieve e.g. setting 1 retrieves the first pagetype- COLLECTION or PAYOUT- Returns:
- ListResponse
-
runGetSubAccount
public Response runGetSubAccount(int id, Optional<String> account_reference, Optional<String> include_limit, SubAccountTypes type) Fetch a subaccount on Flutterwave.- Parameters:
id- INT This is the unique id of the sub account you want to fetch. It is returned in the call to create a sub account as data.idaccount_reference- Optional The unique reference for the payoutinclude_limit- Optional Pass this parameter to ensure the limit for the subaccount are returned in the responsetype- COLLECTION or PAYOUT- Returns:
- Response
-
updateSubAccount
public Response updateSubAccount(int id, UpdateCollectionSubAccountRequest updateCollectionSubAccountRequest, Optional<UpdatePayoutSubAccountRequest> updatePayoutSubAccountRequest, Optional<String> account_reference, SubAccountTypes type) Update a collection subaccount on Flutterwave.- Parameters:
id- int This is the unique id of the subaccount you want to update. It is returned in the call to create a subaccount as data.idupdateCollectionSubAccountRequest- beanupdatePayoutSubAccountRequest- beanaccount_reference- Optional The unique reference for the payouttype- COLLECTION or PAYOUT- Returns:
-
runDeleteCollectionSubAccounts
Delete a collection subaccount on Flutterwave.- Parameters:
id- int This is the unique id of the sub account you want to fetch. It is returned in the call to create a sub account as data.id- Returns:
- Response
-
runGetPayoutSubAccountTransactions
public Response runGetPayoutSubAccountTransactions(String account_reference, String from, String to, String currency) Fetch a transaction on a payout/transfer subaccount on Flutterwave.- Parameters:
account_reference- String The unique reference for the payoutfrom- String start dateto- String end datecurrency- String currency of the subaccount. The possible values are USD, EUR, GBP and NGN- Returns:
- Response
-
runGetPayoutSubAccountBalance
Fetch the available balance on a payout/transfer subaccount on Flutterwave.- Parameters:
account_reference- String The unique reference for the payoutcurrency- String currency of the subaccount. The possible values are USD, EUR, GBP and NGN- Returns:
- Response
-
runGetPayoutSubAccountStaticVirtualAccount
public Response runGetPayoutSubAccountStaticVirtualAccount(String account_reference, String currency) Fetch a static virtual account on a payout/transfer subaccount on Flutterwave- Parameters:
account_reference- String The unique reference for the payoutcurrency- String currency of the subaccount. The possible values are USD, EUR, GBP and NGN- Returns:
- Response
-