validateCsr function
Valida CSR: debe existir y tener 'csr' string no vacĂo.
Implementation
void validateCsr(Map<String, dynamic>? encryptedCSR) {
if (encryptedCSR == null ||
encryptedCSR['csr'] is! String ||
(encryptedCSR['csr'] as String).trim().isEmpty) {
throw ApacuanaAPIError(
'The "encryptedCSR" parameter is required and must be an object '
'with a non-empty "csr" string property.',
statusCode: 400,
errorCode: 'INVALID_PARAMETER_FORMAT',
);
}
}