DataDto.fromJson constructor
Implementation
factory DataDto.fromJson(Map<String, dynamic> json) {
return DataDto(
currency: json["currency"] as String?,
fullAmountInclVat: double.parse(json["fullAmountInclVat"].toString()),
paymentTypes: (json["paymentTypes"] as List<dynamic>?)
?.map((e) =>
PaymentTypeInformationDto.fromJson(e as Map<String, dynamic>))
.toList(),
vatAmounts: (json["vatAmounts"] as List<dynamic>?)
?.map((e) => DataVatAmountDto.fromJson(e as Map<String, dynamic>))
.toList(),
lines: (json["lines"] as List<dynamic>?)
?.map((e) => LineBaseDto.fromJson(e as Map<String, dynamic>))
.toList(),
positionCount: json["positionCount"] as int?,
discounts: (json["discounts"] as List<dynamic>?)
?.map((e) => BillDiscountDto.fromJson(e as Map<String, dynamic>))
.toList(),
warranties: (json["warranties"] as List<dynamic>?)
?.map((e) => WarrantyDto.fromJson(e as Map<String, dynamic>))
.toList(),
fullAmountInclVatBeforeDiscounts:
double.tryParse(json["fullAmountInclVatBeforeDiscounts"].toString()),
tip: double.tryParse(json["tip"].toString()),
equivalentValueName: json["equivalentValueName"] as String?,
fullEquivalentValue: json["fullEquivalentValue"] as String?,
);
}