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);
}
