LineItemsTaxAmount.fromJson constructor
LineItemsTaxAmount.fromJson(
- Object? json
Implementation
factory LineItemsTaxAmount.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return LineItemsTaxAmount(
amount: (map['amount'] as num).toInt(),
rate: TaxRate.fromJson(map['rate']),
taxabilityReason: map['taxability_reason'] == null
? null
: CreditNoteTaxAmountTaxabilityReason.fromJson(
map['taxability_reason']),
taxableAmount: map['taxable_amount'] == null
? null
: (map['taxable_amount'] as num).toInt(),
);
}