// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'usable_voucher_model.dart';

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

UsableVoucherModel _$UsableVoucherModelFromJson(
  Map<String, dynamic> json,
) => UsableVoucherModel(
  voucherID: json['voucher_id'] as String?,
  voucherItemID: json['product_item_id'] as String?,
  actionTime: json['action_time'] as String?,
  code: json['code'] as String?,
  serial: json['serial'] as String?,
  name: json['name'] as String?,
  description: json['description'] as String?,
  voucherTypeCode: json['voucher_type_code'] as String?,
  voucherTypeName: json['voucher_type_name'] as String?,
  voucherValue: json['voucher_value'] as String?,
  voucherContent: json['content'] as String?,
  voucherTermAndCondition: json['term_and_condition'] as String?,
  voucherStockRemark: json['voucher_stock_remark'] as String?,
  expiredTime: json['expired_time'] as String?,
  statusCode: json['status_code'] as String?,
  status: json['status'] as String?,
  beneficiarySiteName: json['beneficiary_site_name'] as String?,
  prices:
      (json['prices'] as List<dynamic>?)
          ?.map((e) => MobileCardPriceModel.fromJson(e as Map<String, dynamic>))
          .toList(),
  images:
      (json['images'] as List<dynamic>?)
          ?.map((e) => MobileCardImageModel.fromJson(e as Map<String, dynamic>))
          .toList(),
  brand:
      json['brand'] == null
          ? null
          : BrandModel.fromJson(json['brand'] as Map<String, dynamic>),
  likeId: json['like_id'] as String?,
  codeSecret: json['code_secret'] as String?,
  password: json['password'] as String?,
);

Map<String, dynamic> _$UsableVoucherModelToJson(UsableVoucherModel instance) =>
    <String, dynamic>{
      'voucher_id': instance.voucherID,
      'product_item_id': instance.voucherItemID,
      'action_time': instance.actionTime,
      'code': instance.code,
      'serial': instance.serial,
      'name': instance.name,
      'description': instance.description,
      'voucher_type_code': instance.voucherTypeCode,
      'voucher_type_name': instance.voucherTypeName,
      'voucher_value': instance.voucherValue,
      'content': instance.voucherContent,
      'term_and_condition': instance.voucherTermAndCondition,
      'voucher_stock_remark': instance.voucherStockRemark,
      'expired_time': instance.expiredTime,
      'status_code': instance.statusCode,
      'status': instance.status,
      'beneficiary_site_name': instance.beneficiarySiteName,
      'prices': instance.prices,
      'images': instance.images,
      'brand': instance.brand,
      'like_id': instance.likeId,
      'code_secret': instance.codeSecret,
      'password': instance.password,
    };

RedeemProductResponseModel _$RedeemProductResponseModelFromJson(
  Map<String, dynamic> json,
) => RedeemProductResponseModel(
  item:
      json['item'] == null
          ? null
          : UsableVoucherModel.fromJson(json['item'] as Map<String, dynamic>),
);

Map<String, dynamic> _$RedeemProductResponseModelToJson(
  RedeemProductResponseModel instance,
) => <String, dynamic>{'item': instance.item};
