fetchAccountDoc method
Future<Response<RazorpayAccountDocuments> >
fetchAccountDoc({
- required String accountId,
- void callback(
- RazorpayApiException?,
- Response<
RazorpayAccountDocuments> ?
Fetches account documents
@param accountId - The unique identifier of the account.
Implementation
Future<Response<RazorpayAccountDocuments>> fetchAccountDoc({
required String accountId,
void Function(RazorpayApiException?, Response<RazorpayAccountDocuments>?)?
callback,
}) async {
if (accountId.isEmpty) {
throw ArgumentError('accountId is required');
}
return api.get<RazorpayAccountDocuments>(
{
'version': 'v2',
'url': '$BASE_URL/$accountId/documents',
},
fromJsonFactory: RazorpayAccountDocuments.fromJson,
callback: callback,
);
}