toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (recipientType != null) {
    json['recipient_type'] = recipientType!.value;
  }
  if (recipientName != null) json['recipient_name'] = recipientName!.toJson();
  if (nationalAddress != null) {
    json['national_address'] =
        nationalAddress!.map((e) => e.toJson()).toList();
  }
  return json;
}