40 lines
1.0 KiB
Dart
40 lines
1.0 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
import 'package:pshared/data/dto/date_time.dart';
|
|
import 'package:pshared/data/dto/permissions/bound.dart';
|
|
|
|
part 'method.g.dart';
|
|
|
|
|
|
@JsonSerializable()
|
|
class PaymentMethodDTO extends PermissionBoundDTO {
|
|
final String recipientRef;
|
|
final String type;
|
|
final String name;
|
|
final String? description;
|
|
final bool isMain;
|
|
final Map<String, dynamic> data;
|
|
|
|
@JsonKey(defaultValue: false)
|
|
final bool isArchived;
|
|
|
|
const PaymentMethodDTO({
|
|
required super.id,
|
|
required super.createdAt,
|
|
required super.updatedAt,
|
|
required super.permissionRef,
|
|
required super.organizationRef,
|
|
required this.recipientRef,
|
|
required this.type,
|
|
required this.data,
|
|
required this.name,
|
|
required this.isMain,
|
|
this.description,
|
|
this.isArchived = false,
|
|
});
|
|
|
|
factory PaymentMethodDTO.fromJson(Map<String, dynamic> json) => _$PaymentMethodDTOFromJson(json);
|
|
@override
|
|
Map<String, dynamic> toJson() => _$PaymentMethodDTOToJson(this);
|
|
}
|