getType function

String getType(
  1. SearchInfoType returnType
)

Precisamos mapear o enum de retorno com a string que a API recebe

Implementation

String getType(SearchInfoType returnType) {
  return returnType.toString().split('.').last;
}