// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'payment.model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

Payment _$PaymentFromJson(Map<String, dynamic> json) {
  return Payment()
    ..id = json['id'] as int
    ..payment_type_id = json['payment_type_id'] as int
    ..charged = json['charged'] as bool
    ..amount = double.parse(json["amount"].toString())
    ..created_at = json['created_at'] == null
        ? null
        : DateTime.parse(json['created_at'] as String)
    ..updated_at = json['updated_at'] == null
        ? null
        : DateTime.parse(json['updated_at'] as String)
    ..payment_type = json['payment_type'] == null
        ? null
        : PaymentType.fromJson(json['payment_type'] as Map<String, dynamic>);
}

Map<String, dynamic> _$PaymentToJson(Payment instance) => <String, dynamic>{
      'id': instance.id,
      'payment_type_id': instance.payment_type_id,
      'charged': instance.charged,
      'amount': instance.amount,
      'created_at': instance.created_at?.toIso8601String(),
      'updated_at': instance.updated_at?.toIso8601String(),
      'payment_type': instance.payment_type,
    };
