getServiceCodesOccurrences method

Future<List<LabelledOccurence>> getServiceCodesOccurrences(
  1. String sdkId,
  2. String codeType,
  3. int minOccurrences
)

Implementation

Future<List<LabelledOccurence>> getServiceCodesOccurrences(String sdkId, String codeType, int minOccurrences) async {
	final res = await _methodChannel.invokeMethod<String>(
		'ContactBasicApi.getServiceCodesOccurrences',
		{
			"sdkId": sdkId,
			"codeType": jsonEncode(codeType),
			"minOccurrences": jsonEncode(minOccurrences),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getServiceCodesOccurrences");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as List<dynamic>).map((x1) => LabelledOccurence.fromJSON(x1) ).toList();
}