copyWith method

OutboundOperation copyWith({
  1. String? id,
  2. OutboundOperationType? type,
  3. String? data,
  4. int? retryCount,
  5. OutboundOperationStatus? status,
  6. DateTime? createdAt,
  7. DateTime? processedAt,
  8. String? errorMessage,
})

Creates a copy with updated fields.

Implementation

OutboundOperation copyWith({
  String? id,
  OutboundOperationType? type,
  String? data,
  int? retryCount,
  OutboundOperationStatus? status,
  DateTime? createdAt,
  DateTime? processedAt,
  String? errorMessage,
}) {
  return OutboundOperation(
    id: id ?? this.id,
    type: type ?? this.type,
    data: data ?? this.data,
    retryCount: retryCount ?? this.retryCount,
    status: status ?? this.status,
    createdAt: createdAt ?? this.createdAt,
    processedAt: processedAt ?? this.processedAt,
    errorMessage: errorMessage ?? this.errorMessage,
  );
}