// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'subscription.model.dart';

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

Subscription _$SubscriptionFromJson(Map<String, dynamic> json) {
  return Subscription()
    ..id = json['id'] as int
    ..company_id = json['company_id'] as int
    ..plan_id = json['plan_id'] as int
    ..start_date = json['start_date'] == null
        ? null
        : DateTime.parse(json['start_date'] as String)
    ..end_date = json['end_date'] == null
        ? null
        : DateTime.parse(json['end_date'] as String)
    ..name = json['name'] as String
    ..stripe_id = json['stripe_id'] as String
    ..stripe_status = json['stripe_status'] as String
    ..stripe_plan = json['stripe_plan'] as String
    ..quantity = json['quantity'] as int
    ..active = json['active'] as bool
    ..plan = json['plan'] == null
        ? null
        : Plan.fromJson(json['plan'] as Map<String, dynamic>)
    ..ends_at = json['ends_at'] == null
        ? null
        : DateTime.parse(json['ends_at'] as String);
}

Map<String, dynamic> _$SubscriptionToJson(Subscription instance) =>
    <String, dynamic>{
      'id': instance.id,
      'company_id': instance.company_id,
      'plan_id': instance.plan_id,
      'start_date': instance.start_date?.toIso8601String(),
      'end_date': instance.end_date?.toIso8601String(),
      'name': instance.name,
      'stripe_id': instance.stripe_id,
      'stripe_status': instance.stripe_status,
      'stripe_plan': instance.stripe_plan,
      'quantity': instance.quantity,
      'active': instance.active,
      'plan': instance.plan,
      'ends_at': instance.ends_at?.toIso8601String(),
    };
