toJson method
Returns a JSON object representation.
Implementation
Map<String, dynamic> toJson() {
return <String, dynamic>{
'product': product.name,
'onComplete': onComplete,
'onFail': onFail,
'distribution': distribution?.toJson(),
}..removeWhere((key, value) => value == null);
}