validate method
Implementation
void validate(LicenseValidationDocument document, Observer completion) {
LVEvent event;
switch (document.runtimeType) {
case LicenseValidationLicenseDocument:
event = RetrievedLicenseDataEvent(document.data);
break;
case LicenseValidationStatusDocument:
event = RetrievedStatusDataEvent(document.data);
break;
default:
throw LcpException.unknown;
}
_log("validate $event");
_observe(event, completion);
}