32 lines
678 B
Dart
32 lines
678 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'card.g.dart';
|
|
|
|
|
|
@JsonSerializable()
|
|
class CardEndpointDTO {
|
|
final String pan;
|
|
final String firstName;
|
|
final String lastName;
|
|
|
|
@JsonKey(name: 'exp_month')
|
|
final int? expMonth;
|
|
|
|
@JsonKey(name: 'exp_year')
|
|
final int? expYear;
|
|
|
|
final String? country;
|
|
|
|
const CardEndpointDTO({
|
|
required this.pan,
|
|
required this.firstName,
|
|
required this.lastName,
|
|
required this.expMonth,
|
|
required this.expYear,
|
|
this.country,
|
|
});
|
|
|
|
factory CardEndpointDTO.fromJson(Map<String, dynamic> json) => _$CardEndpointDTOFromJson(json);
|
|
Map<String, dynamic> toJson() => _$CardEndpointDTOToJson(this);
|
|
}
|