CourierUserPreferencesTopic.fromJson constructor

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

Implementation

factory CourierUserPreferencesTopic.fromJson(Map<String, dynamic> json) {
  return CourierUserPreferencesTopic(
    defaultStatus: CourierUserPreferencesStatus.fromJson(json['default_status'] as String),
    hasCustomRouting: json['has_custom_routing'] as bool,
    customRouting: (json['custom_routing'] as List<dynamic>).map((item) => CourierUserPreferencesChannel.fromJson(item)).toList(),
    status: CourierUserPreferencesStatus.fromJson(json['status'] as String),
    topicId: json['topic_id'] as String,
    topicName: json['topic_name'] as String,
    sectionName: json['section_name'] as String,
    sectionId: json['section_id'] as String,
  );
}