CustomMessageActivity.fromJson constructor

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

Implementation

factory CustomMessageActivity.fromJson(Map<String, dynamic> json) {
  return CustomMessageActivity(
    deliveryUri: json['DeliveryUri'] as String?,
    endpointTypes: (json['EndpointTypes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toEndpointTypesElement())
        .toList(),
    messageConfig: json['MessageConfig'] != null
        ? JourneyCustomMessage.fromJson(
            json['MessageConfig'] as Map<String, dynamic>)
        : null,
    nextActivity: json['NextActivity'] as String?,
    templateName: json['TemplateName'] as String?,
    templateVersion: json['TemplateVersion'] as String?,
  );
}