import 'package:json_annotation/json_annotation.dart'; part 'customer.g.dart'; @JsonSerializable() class CustomerDTO { final String id; @JsonKey(name: 'first_name') final String? firstName; @JsonKey(name: 'middle_name') final String? middleName; @JsonKey(name: 'last_name') final String? lastName; final String? ip; final String? zip; final String? country; final String? state; final String? city; final String? address; const CustomerDTO({ required this.id, this.firstName, this.middleName, this.lastName, this.ip, this.zip, this.country, this.state, this.city, this.address, }); factory CustomerDTO.fromJson(Map json) => _$CustomerDTOFromJson(json); Map toJson() => _$CustomerDTOToJson(this); }