toJson method
Implementation
Map<String, dynamic> toJson() => {
'campaignId': campaignId,
'action': action?.index,
'mediaCode': mediaCode,
'oncePerSession': oncePerSession,
'customParameters': customParameters
?.map((key, value) => MapEntry(key.toString(), value))
};