WebhookConversion.fromJson constructor

WebhookConversion.fromJson(
  1. Map<String, dynamic> json
)

Creates a WebhookConversion from JSON data.

Implementation

factory WebhookConversion.fromJson(Map<String, dynamic> json) {
  final tempClientConfigJson = json['clientConfig'];
  final tempConversionReviewVersionsJson = json['conversionReviewVersions'];

  final WebhookClientConfig? tempClientConfig = tempClientConfigJson != null
      ? WebhookClientConfig.fromJson(tempClientConfigJson)
      : null;
  final List<String> tempConversionReviewVersions =
      List<String>.from(tempConversionReviewVersionsJson);

  return WebhookConversion(
    clientConfig: tempClientConfig,
    conversionReviewVersions: tempConversionReviewVersions,
  );
}