+ quotation provider
This commit is contained in:
34
frontend/pshared/lib/data/dto/payment/intent/fx.dart
Normal file
34
frontend/pshared/lib/data/dto/payment/intent/fx.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pshared/data/dto/payment/currency_pair.dart';
|
||||
|
||||
part 'fx.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class FxIntentDTO {
|
||||
final CurrencyPairDTO? pair;
|
||||
final String? side;
|
||||
final bool firm;
|
||||
|
||||
@JsonKey(name: 'ttl_ms')
|
||||
final int? ttlMs;
|
||||
|
||||
@JsonKey(name: 'preferred_provider')
|
||||
final String? preferredProvider;
|
||||
|
||||
@JsonKey(name: 'max_age_ms')
|
||||
final int? maxAgeMs;
|
||||
|
||||
const FxIntentDTO({
|
||||
this.pair,
|
||||
this.side,
|
||||
this.firm = false,
|
||||
this.ttlMs,
|
||||
this.preferredProvider,
|
||||
this.maxAgeMs,
|
||||
});
|
||||
|
||||
factory FxIntentDTO.fromJson(Map<String, dynamic> json) => _$FxIntentDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$FxIntentDTOToJson(this);
|
||||
}
|
||||
36
frontend/pshared/lib/data/dto/payment/intent/payment.dart
Normal file
36
frontend/pshared/lib/data/dto/payment/intent/payment.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pshared/data/dto/payment/endpoint.dart';
|
||||
import 'package:pshared/data/dto/payment/intent/fx.dart';
|
||||
import 'package:pshared/data/dto/payment/money.dart';
|
||||
|
||||
part 'payment.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class PaymentIntentDTO {
|
||||
final String? kind;
|
||||
final PaymentEndpointDTO? source;
|
||||
final PaymentEndpointDTO? destination;
|
||||
final MoneyDTO? amount;
|
||||
|
||||
final FxIntentDTO? fx;
|
||||
|
||||
@JsonKey(name: 'settlement_mode')
|
||||
final String? settlementMode;
|
||||
|
||||
final Map<String, String>? attributes;
|
||||
|
||||
const PaymentIntentDTO({
|
||||
this.kind,
|
||||
this.source,
|
||||
this.destination,
|
||||
this.amount,
|
||||
this.fx,
|
||||
this.settlementMode,
|
||||
this.attributes,
|
||||
});
|
||||
|
||||
factory PaymentIntentDTO.fromJson(Map<String, dynamic> json) => _$PaymentIntentDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$PaymentIntentDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user