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