toJson method
Converts a WebhookClientConfig instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempCaBundle = caBundle;
final tempService = service;
final tempUrl = url;
if (tempCaBundle != null) {
jsonData['caBundle'] = tempCaBundle;
}
if (tempService != null) {
jsonData['service'] = tempService.toJson();
}
if (tempUrl != null) {
jsonData['url'] = tempUrl;
}
return jsonData;
}