// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'box_order_line.model.dart';

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

BoxOrderLine _$BoxOrderLineFromJson(Map<String, dynamic> json) {
  return BoxOrderLine()
    ..id = json['id'] as int
    ..box_order_id = json['box_order_id'] as int
    ..box_product_variant_id = json['box_product_variant_id'] as int
    ..user_subscription_id = json['user_subscription_id'] as int
    ..price = json['price'] as int
    ..quantity = json['quantity'] as int
    ..subtotal = double.parse(json["subtotal"].toString())
    ..vat = double.parse(json["vat"].toString())
    ..total = double.parse(json["total"].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)
    ..discount = json['discount'] == null
        ? null
        : Discount.fromJson(json['discount'] as Map<String, dynamic>);
}

Map<String, dynamic> _$BoxOrderLineToJson(BoxOrderLine instance) =>
    <String, dynamic>{
      'id': instance.id,
      'box_order_id': instance.box_order_id,
      'box_product_variant_id': instance.box_product_variant_id,
      'user_subscription_id': instance.user_subscription_id,
      'price': instance.price,
      'quantity': instance.quantity,
      'subtotal': instance.subtotal,
      'vat': instance.vat,
      'total': instance.total,
      'created_at': instance.created_at?.toIso8601String(),
      'updated_at': instance.updated_at?.toIso8601String(),
      'discount': instance.discount,
    };
