/// Résultat de création d'un Payment Link Stripe
class PaymentLinkResult {
  final String paymentLinkId;
  final String url;
  final int amount;
  final int? passageId;

  PaymentLinkResult({
    required this.paymentLinkId,
    required this.url,
    required this.amount,
    this.passageId,
  });

  factory PaymentLinkResult.fromJson(Map<String, dynamic> json) {
    return PaymentLinkResult(
      paymentLinkId: json['payment_link_id'] as String,
      url: json['url'] as String,
      amount: json['amount'] as int,
      passageId: json['passage_id'] as int?,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'payment_link_id': paymentLinkId,
      'url': url,
      'amount': amount,
      'passage_id': passageId,
    };
  }
}
