SubaccountClient class
It provides methods that mirror endpoints by Paystack's Subaccounts API which allows you create and manage subaccounts on your integration. Subaccounts can be used to split payment between two accounts (your main account and a sub account).
- Inheritance
-
- Object
- BaseClient
- SubaccountClient
Constructors
- SubaccountClient.new({String? secretKey})
- Create an instance of SubaccountClient.
Properties
- baseUrl → String
-
no setterinherited
- client ↔ Client
-
getter/setter pairinherited
- dataAsListKey → String
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
all(
{int perPage = 50, int page = 1, String? from, String? to}) → Future< Response> - Retrieve a list of subaccounts available on your integration
-
call(
Uri url, HttpMethod method, {NativeJsonData? data, bool dataAsList = false}) → Future< Response> -
inherited
-
create(
String businessName, String settlementBank, String accountNumber, double percentageCharge, String description, {String? primaryContactEmail, String? primaryContactName, String? primaryContactPhone, Map< String, dynamic> ? metadata}) → Future<Response> - Create a subacount on your integration
-
fetchOne(
String idOrCode) → Future< Response> - Retrieve a subaccount on your integration by its id or code
-
normalizeQueryParameters(
Map< String, dynamic> queryParameters) → Map<String, dynamic> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String idOrCode, String businessName, String settlementBank, {String? accountNumber, bool? active, double? percentageCharge, String? description, String? primaryContactEmail, String? primaryContactName, String? primaryContactPhone, SettlementSchedule settlementSchedule = SettlementSchedule.auto, Map< String, dynamic> ? metadata}) → Future<Response> - Update the details of a subaccount
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited