copyWith method
Creates a copy of this PaymentIntent with the given fields replaced.
Implementation
PaymentIntent copyWith({
String? id,
int? amount,
String? currency,
PaymentIntentStatus? status,
String? clientSecret,
String? phoneNumber,
String? description,
Map<String, dynamic>? metadata,
DateTime? createdAt,
DateTime? updatedAt,
String? errorMessage,
String? providerReference,
}) {
return PaymentIntent(
id: id ?? this.id,
amount: amount ?? this.amount,
currency: currency ?? this.currency,
status: status ?? this.status,
clientSecret: clientSecret ?? this.clientSecret,
phoneNumber: phoneNumber ?? this.phoneNumber,
description: description ?? this.description,
metadata: metadata ?? this.metadata,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
errorMessage: errorMessage ?? this.errorMessage,
providerReference: providerReference ?? this.providerReference,
);
}