copyWithWrapped method

WalletTransaction copyWithWrapped({
  1. Wrapped<String>? transactionId,
  2. Wrapped<String>? reference,
  3. Wrapped<WalletTransactionType>? type,
  4. Wrapped<WalletTransactionAmount>? amount,
  5. Wrapped<WalletTransactionCounterparty>? counterparty,
  6. Wrapped<WalletTransactionStatus>? status,
  7. Wrapped<DateTime>? createdAt,
  8. Wrapped<DateTime>? lastStatusUpdate,
  9. Wrapped<String?>? paymentId,
})

Implementation

WalletTransaction copyWithWrapped(
    {Wrapped<String>? transactionId,
    Wrapped<String>? reference,
    Wrapped<enums.WalletTransactionType>? type,
    Wrapped<WalletTransactionAmount>? amount,
    Wrapped<WalletTransactionCounterparty>? counterparty,
    Wrapped<enums.WalletTransactionStatus>? status,
    Wrapped<DateTime>? createdAt,
    Wrapped<DateTime>? lastStatusUpdate,
    Wrapped<String?>? paymentId}) {
  return WalletTransaction(
      transactionId:
          (transactionId != null ? transactionId.value : this.transactionId),
      reference: (reference != null ? reference.value : this.reference),
      type: (type != null ? type.value : this.type),
      amount: (amount != null ? amount.value : this.amount),
      counterparty:
          (counterparty != null ? counterparty.value : this.counterparty),
      status: (status != null ? status.value : this.status),
      createdAt: (createdAt != null ? createdAt.value : this.createdAt),
      lastStatusUpdate: (lastStatusUpdate != null
          ? lastStatusUpdate.value
          : this.lastStatusUpdate),
      paymentId: (paymentId != null ? paymentId.value : this.paymentId));
}