added comment for payment, changed intent and added amount ui in operations
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pshared/data/dto/money.dart';
|
||||
|
||||
part 'operation.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class PaymentOperationDTO {
|
||||
final String? stepRef;
|
||||
@@ -11,7 +13,8 @@ class PaymentOperationDTO {
|
||||
final String? code;
|
||||
final String? state;
|
||||
final String? label;
|
||||
final PaymentOperationMoneyDTO? money;
|
||||
final MoneyDTO? amount;
|
||||
final MoneyDTO? convertedAmount;
|
||||
final String? failureCode;
|
||||
final String? failureReason;
|
||||
final String? startedAt;
|
||||
@@ -24,7 +27,8 @@ class PaymentOperationDTO {
|
||||
this.code,
|
||||
this.state,
|
||||
this.label,
|
||||
this.money,
|
||||
this.amount,
|
||||
this.convertedAmount,
|
||||
this.failureCode,
|
||||
this.failureReason,
|
||||
this.startedAt,
|
||||
@@ -35,29 +39,3 @@ class PaymentOperationDTO {
|
||||
_$PaymentOperationDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$PaymentOperationDTOToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class PaymentOperationMoneyDTO {
|
||||
final PaymentOperationMoneySnapshotDTO? planned;
|
||||
final PaymentOperationMoneySnapshotDTO? executed;
|
||||
|
||||
const PaymentOperationMoneyDTO({this.planned, this.executed});
|
||||
|
||||
factory PaymentOperationMoneyDTO.fromJson(Map<String, dynamic> json) =>
|
||||
_$PaymentOperationMoneyDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$PaymentOperationMoneyDTOToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class PaymentOperationMoneySnapshotDTO {
|
||||
final MoneyDTO? amount;
|
||||
final MoneyDTO? convertedAmount;
|
||||
|
||||
const PaymentOperationMoneySnapshotDTO({this.amount, this.convertedAmount});
|
||||
|
||||
factory PaymentOperationMoneySnapshotDTO.fromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$PaymentOperationMoneySnapshotDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() =>
|
||||
_$PaymentOperationMoneySnapshotDTOToJson(this);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ part 'payment.g.dart';
|
||||
class PaymentDTO {
|
||||
final String? paymentRef;
|
||||
final String? state;
|
||||
final String? comment;
|
||||
final PaymentResponseEndpointDTO? source;
|
||||
final PaymentResponseEndpointDTO? destination;
|
||||
final String? failureCode;
|
||||
@@ -23,6 +24,7 @@ class PaymentDTO {
|
||||
const PaymentDTO({
|
||||
this.paymentRef,
|
||||
this.state,
|
||||
this.comment,
|
||||
this.source,
|
||||
this.destination,
|
||||
this.failureCode,
|
||||
|
||||
Reference in New Issue
Block a user