QuickbooksTxnTaxDetails.fromMap constructor

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

Implementation

factory QuickbooksTxnTaxDetails.fromMap(Map<String, dynamic> map) {
  return QuickbooksTxnTaxDetails(
    txnTaxCodeRef: map['TxnTaxCodeRef'] != null
        ? QuickbooksReferenceType.fromMap(
            map['TxnTaxCodeRef'] as Map<String, dynamic>)
        : null,
    totalTax: double.tryParse(map['TotalTax'].toString()),
    taxLine: map['TaxLine'] != null
        ? List<QuickbooksLine>.from(
            (map['TaxLine'] as List).map<QuickbooksLine?>(
              (x) => QuickbooksLine.fromMap(x as Map<String, dynamic>),
            ),
          )
        : null,
  );
}