copyWith method

SinglePaymentAmount copyWith({
  1. String? currency,
  2. String? value,
  3. Map<String, dynamic>? metadata,
})

Not identical with PaymayaAmount.

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

Implementation

SinglePaymentAmount copyWith({
  String? currency,
  String? value,
  Map<String, dynamic>? metadata,
}) {
  return SinglePaymentAmount(
    currency: currency ?? this.currency ?? 'PHP',
    value: value ?? this.value,
    metadata: metadata ?? this.metadata,
  );
}