import 'package:domain/generated/json/base/json_convert_content.dart';
import 'package:domain/entity/payment_intent_entity.dart';

PaymentIntentEntity $PaymentIntentEntityFromJson(Map<String, dynamic> json) {
  final PaymentIntentEntity paymentIntentEntity = PaymentIntentEntity();
  final String? clientSecret = jsonConvert.convert<String>(json['client_secret']);
  if (clientSecret != null) {
    paymentIntentEntity.clientSecret = clientSecret;
  }
  return paymentIntentEntity;
}

Map<String, dynamic> $PaymentIntentEntityToJson(PaymentIntentEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['client_secret'] = entity.clientSecret;
  return data;
}

extension PaymentIntentEntityExtension on PaymentIntentEntity {
  PaymentIntentEntity copyWith({
    String? clientSecret,
  }) {
    return PaymentIntentEntity()
      ..clientSecret = clientSecret ?? this.clientSecret;
  }
}