all method
Future<Response<RazorpayApiResponse<RazorpayCustomer> > >
all({
- RazorpayPaginationOptions? params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayApiResponse< ?RazorpayCustomer> >
Get all customers
@param params - Check doc for required params
Implementation
Future<Response<RazorpayApiResponse<RazorpayCustomer>>> all({
RazorpayPaginationOptions? params,
void Function(
RazorpayApiException?,
Response<RazorpayApiResponse<RazorpayCustomer>>?,
)? callback,
}) async {
final count = params?.count ?? 10;
final skip = params?.skip ?? 0;
final queryParams = {
'count': count,
'skip': skip,
// Include other potential params from the input object if necessary
...?params?.toJson(),
};
queryParams.removeWhere((key, value) => value == null);
return api.get<RazorpayApiResponse<RazorpayCustomer>>(
{
'url': '/customers',
'data': queryParams,
},
callback: callback,
fromJsonFactory: (json) => RazorpayApiResponse<RazorpayCustomer>.fromJson(
json,
(itemJson) =>
RazorpayCustomer.fromJson(itemJson! as Map<String, dynamic>),
),
);
}