copyWith method
PaymentConfig
copyWith({
- PaymentProvider? provider,
- String? apiKey,
- PaymentEnvironment? environment,
- String? backendUrl,
- String? webhookUrl,
- Map<
String, String> ? customHeaders,
Create a copy of this config with updated values
Implementation
PaymentConfig copyWith({
PaymentProvider? provider,
String? apiKey,
PaymentEnvironment? environment,
String? backendUrl,
String? webhookUrl,
Map<String, String>? customHeaders,
}) {
return PaymentConfig(
provider: provider ?? this.provider,
apiKey: apiKey ?? this.apiKey,
environment: environment ?? this.environment,
backendUrl: backendUrl ?? this.backendUrl,
webhookUrl: webhookUrl ?? this.webhookUrl,
customHeaders: customHeaders ?? this.customHeaders,
);
}