Input$CouponInput.fromJson constructor

Input$CouponInput.fromJson(
  1. Map<String, dynamic> data
)

Implementation

factory Input$CouponInput.fromJson(Map<String, dynamic> data) {
  final result$data = <String, dynamic>{};
  final l$target = data['target'];
  result$data['target'] =
      Input$TargetACIInput.fromJson((l$target as Map<String, dynamic>));
  final l$discount = data['discount'];
  result$data['discount'] =
      Input$DiscountDtoInput.fromJson((l$discount as Map<String, dynamic>));
  if (data.containsKey('from')) {
    final l$from = data['from'];
    result$data['from'] = l$from == null ? null : dateTimeFromJson(l$from);
  }
  if (data.containsKey('to')) {
    final l$to = data['to'];
    result$data['to'] = l$to == null ? null : dateTimeFromJson(l$to);
  }
  return Input$CouponInput._(result$data);
}