import 'package:json_annotation/json_annotation.dart'; part 'payment.g.dart'; @JsonSerializable() class PaymentMethodDTO { PaymentMethodDTO(this.id, {required this.description, required this.shortCode}); final String id; final String description; final String shortCode; factory PaymentMethodDTO.fromJson(Map json) => _$PaymentMethodDTOFromJson(json); Map toJson() => _$PaymentMethodDTOToJson(this); }