all method
Future<Response<RazorpayIinList> >
all({
- String? flow,
- String? subType,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayIinList> ?
Fetch all IINs supporting native otp
or business sub-type
@param params - Check doc for required params Requires either 'flow' or 'sub_type'.
Implementation
Future<Response<RazorpayIinList>> all({
String? flow,
String? subType,
void Function(RazorpayApiException?, Response<RazorpayIinList>?)? callback,
}) async {
if (flow == null && subType == null) {
throw ArgumentError('Either flow or subType parameter is required.');
}
if (flow != null && subType != null) {
throw ArgumentError('Provide either flow or subType, not both.');
}
final queryParams = <String, dynamic>{};
if (flow != null) queryParams['flow'] = flow;
if (subType != null) queryParams['sub_type'] = subType;
return api.get<RazorpayIinList>(
{
'url': '$BASE_URL/list',
'data': queryParams,
},
fromJsonFactory: RazorpayIinList.fromJson,
callback: callback,
);
}