toJson method
Convert to JSON for backend communication
Implementation
Map<String, dynamic> toJson() {
return {
'provider': provider.name,
'apiKey': apiKey,
'environment': environment.name,
'backendUrl': backendUrl,
if (webhookUrl != null) 'webhookUrl': webhookUrl,
if (customHeaders != null) 'customHeaders': customHeaders,
};
}