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