// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'delivery.dart';

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

DeliveryOptionDTO _$DeliveryOptionDTOFromJson(Map<String, dynamic> json) =>
    DeliveryOptionDTO(
      numerical: json['numerical'] as bool,
      value: json['value'] as String,
      display: json['display'] as String,
      key: json['key'] as String,
    );

Map<String, dynamic> _$DeliveryOptionDTOToJson(DeliveryOptionDTO instance) =>
    <String, dynamic>{
      'numerical': instance.numerical,
      'value': instance.value,
      'display': instance.display,
      'key': instance.key,
    };

DeliveryDTO _$DeliveryDTOFromJson(Map<String, dynamic> json) => DeliveryDTO(
    internalReceiptNo: json['internal_receipt_no'] as String,
    specialAggreements: json['special_aggreements'] as String?,
    currency: json['currency'] as String?,
    notes:
        (json['notes'] as List<dynamic>)
            .map((e) => NoteDTO.fromJson(e as Map<String, dynamic>))
            .toList(),
    totalPrice: json['total_price'] as String,
    prepayment: json['prepayment'] as String,
    paymentAtDelivery: json['payment_at_delivery'] as String,
    desiredTime: json['desired_time'] as String,
    contactPerson: ContactPersonDTO.fromJson(
      json['contact_person'] as Map<String, dynamic>,
    ),
    articles:
        (json['articles'] as List<dynamic>)
            .map((e) => ArticleDTO.fromJson(e as Map<String, dynamic>))
            .toList(),
    totalNetValue: json['total_net_value'] as String,
    totalGrossValue: json['total_gross_value'] as String,
    images:
        (json['images'] as List<dynamic>)
            .map((e) => ImageNoteDTO.fromJson(e as Map<String, dynamic>))
            .toList(),
    customer: CustomerDTO.fromJson(json['customer'] as Map<String, dynamic>),
    finishedTime: json['finished_time'] as String,
    note: json['note'] as String,
    state: json['state'] as String,
    payment: PaymentMethodDTO.fromJson(json['payment'] as Map<String, dynamic>),
    carId: json['car_id'] as String,
    options:
        (json['options'] as List<dynamic>)
            .map((e) => DeliveryOptionDTO.fromJson(e as Map<String, dynamic>))
            .toList(),
  )
  ..discount =
      json['discount'] == null
          ? null
          : DiscountDTO.fromJson(json['discount'] as Map<String, dynamic>);

Map<String, dynamic> _$DeliveryDTOToJson(DeliveryDTO instance) =>
    <String, dynamic>{
      'internal_receipt_no': instance.internalReceiptNo,
      'special_aggreements': instance.specialAggreements,
      'customer': instance.customer,
      'total_price': instance.totalPrice,
      'desired_time': instance.desiredTime,
      'total_gross_value': instance.totalGrossValue,
      'total_net_value': instance.totalNetValue,
      'contact_person': instance.contactPerson,
      'currency': instance.currency,
      'articles': instance.articles,
      'note': instance.note,
      'finished_time': instance.finishedTime,
      'car_id': instance.carId,
      'state': instance.state,
      'prepayment': instance.prepayment,
      'payment_at_delivery': instance.paymentAtDelivery,
      'discount': instance.discount,
      'payment': instance.payment,
      'notes': instance.notes,
      'images': instance.images,
      'options': instance.options,
    };
