import 'package:json_annotation/json_annotation.dart';

import 'package:pshared/api/requests/payment/base.dart';
import 'package:pshared/data/dto/payment/intent/payment.dart';

part 'initiate.g.dart';

@JsonSerializable()
class InitiatePaymentRequest extends PaymentBaseRequest {
  final PaymentIntentDTO? intent;
  final String? quoteRef;
  final String? clientPaymentRef;

  const InitiatePaymentRequest({
    required super.idempotencyKey,
    super.metadata,
    this.intent,
    this.quoteRef,
    this.clientPaymentRef,
  });

  factory InitiatePaymentRequest.fromJson(Map<String, dynamic> json) =>
      _$InitiatePaymentRequestFromJson(json);
  @override
  Map<String, dynamic> toJson() => _$InitiatePaymentRequestToJson(this);
}
