copyWith method

Data copyWith({
  1. String? id,
  2. String? clientReferenceId,
  3. int? amount,
  4. String? currency,
  5. String? paymentMethod,
  6. NextAction? nextAction,
  7. String? status,
  8. Map<String, dynamic>? metadata,
  9. DateTime? createdAt,
  10. DateTime? expireAt,
})

Implementation

Data copyWith({
  String? id,
  String? clientReferenceId,
  int? amount,
  String? currency,
  String? paymentMethod,
  NextAction? nextAction,
  String? status,
  Map<String, dynamic>? metadata,
  DateTime? createdAt,
  DateTime? expireAt,
}) =>
    Data(
      id: id ?? this.id,
      clientReferenceId: clientReferenceId ?? this.clientReferenceId,
      amount: amount ?? this.amount,
      currency: currency ?? this.currency,
      paymentMethod: paymentMethod ?? this.paymentMethod,
      nextAction: nextAction ?? this.nextAction,
      status: status ?? this.status,
      metadata: metadata ?? this.metadata,
      createdAt: createdAt ?? this.createdAt,
      expireAt: expireAt ?? this.expireAt,
    );