QuickbooksDescriptionOnlyLine.fromMap constructor

QuickbooksDescriptionOnlyLine.fromMap(
  1. Map<String, dynamic> map
)

Converts from a map value

Implementation

factory QuickbooksDescriptionOnlyLine.fromMap(Map<String, dynamic> map) {
  return QuickbooksDescriptionOnlyLine(
    id: map['Id'],
    lineNum: int.tryParse(map['LineNum'].toString()) ?? 0,
    description: map['Description'],
    amount: double.tryParse(map['Amount'].toString()) ?? 0,
    type: QuickbooksLineDetailType.descriptionOnlyLineDetail,
    descriptionLineDetail: QuickbooksDescriptionLineDetails.fromMap(
        map['DescriptionLineDetails']),
  );
}