all method
Future<Response<RazorpaySettlementListResponse> >
all({
- RazorpayPaginationOptions? params,
- void callback(
- RazorpayApiException?,
- Response<
RazorpaySettlementListResponse> ?
Get all standard settlements
@param params - Check doc for required params
Implementation
Future<Response<RazorpaySettlementListResponse>> all({
RazorpayPaginationOptions? params,
void Function(
RazorpayApiException?,
Response<RazorpaySettlementListResponse>?,
)? callback,
}) async {
const url = BASE_URL;
final from = params?.from;
final to = params?.to;
final count = params?.count ?? 10;
final skip = params?.skip ?? 0;
// No date normalization in JS version for this
final queryParams = {
'from': from,
'to': to,
'count': count,
'skip': skip,
...?params?.toJson(),
};
queryParams.removeWhere((key, value) => value == null);
// Use the specific list response model
return api.get<RazorpaySettlementListResponse>(
{
'url': url,
'data': queryParams,
},
callback: callback,
fromJsonFactory: RazorpaySettlementListResponse.fromJson,
);
}