copyWith method
Use to attach Payment Intent and returns a PaymentIntentAttachResponse object
https://developers.paymongo.com/docs/accepting-cards#3-send-card-information-to-paymongo
Implementation
PaymentIntentAttach copyWith({
String? paymentMethod,
String? clientKey,
String? returnUrl,
}) {
return PaymentIntentAttach(
paymentMethod: paymentMethod ?? this.paymentMethod,
clientKey: clientKey ?? this.clientKey,
returnUrl: returnUrl ?? this.returnUrl,
);
}