copyWith method

PaymentData copyWith({
  1. int? id,
  2. String? domain,
  3. String? status,
  4. String? reference,
  5. String? receiptNumber,
  6. int? amount,
  7. int? requestedAmount,
  8. String? message,
  9. String? gatewayResponse,
  10. String? paidAt,
  11. String? createdAt,
  12. String? channel,
  13. String? currency,
  14. String? ipAddress,
  15. String? orderId,
  16. int? fees,
  17. dynamic feesSplit,
  18. Authorization? authorization,
  19. Customer? customer,
})

Returns a copy of this PaymentData with the specified fields replaced.

Implementation

PaymentData copyWith({
  int? id,
  String? domain,
  String? status,
  String? reference,
  String? receiptNumber,
  int? amount,
  int? requestedAmount,
  String? message,
  String? gatewayResponse,
  String? paidAt,
  String? createdAt,
  String? channel,
  String? currency,
  String? ipAddress,
  String? orderId,
  int? fees,
  dynamic feesSplit,
  Authorization? authorization,
  Customer? customer,
}) {
  return PaymentData(
    id: id ?? this.id,
    domain: domain ?? this.domain,
    status: status ?? this.status,
    reference: reference ?? this.reference,
    receiptNumber: receiptNumber ?? this.receiptNumber,
    amount: amount ?? this.amount,
    requestedAmount: requestedAmount ?? this.requestedAmount,
    message: message ?? this.message,
    gatewayResponse: gatewayResponse ?? this.gatewayResponse,
    paidAt: paidAt ?? this.paidAt,
    createdAt: createdAt ?? this.createdAt,
    channel: channel ?? this.channel,
    currency: currency ?? this.currency,
    ipAddress: ipAddress ?? this.ipAddress,
    orderId: orderId ?? this.orderId,
    fees: fees ?? this.fees,
    feesSplit: feesSplit ?? this.feesSplit,
    authorization: authorization ?? this.authorization,
    customer: customer ?? this.customer,
  );
}