copyWith method

PaymayaSinglePayment copyWith({
  1. PaymayaRedirectUrls? redirectUrl,
  2. SinglePaymentAmount? totalAmount,
  3. String? requestReferenceNumber,
  4. Map<String, dynamic>? metadata,
})

Not identical with PaymayaAmount.

This was intended for SinglePayment method which uses the value as String instead of num

Implementation

PaymayaSinglePayment copyWith({
  PaymayaRedirectUrls? redirectUrl,
  SinglePaymentAmount? totalAmount,
  String? requestReferenceNumber,
  Map<String, dynamic>? metadata,
}) {
  return PaymayaSinglePayment(
    redirectUrl: redirectUrl ?? this.redirectUrl,
    totalAmount: totalAmount ?? this.totalAmount,
    requestReferenceNumber:
        requestReferenceNumber ?? this.requestReferenceNumber,
    metadata: metadata ?? this.metadata,
  );
}