InvoiceThresholdReason.fromJson constructor
InvoiceThresholdReason.fromJson(
- Object? json
Implementation
factory InvoiceThresholdReason.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return InvoiceThresholdReason(
amountGte:
map['amount_gte'] == null ? null : (map['amount_gte'] as num).toInt(),
itemReasons: (map['item_reasons'] as List<Object?>)
.map((el) => InvoiceItemThresholdReason.fromJson(el))
.toList(),
);
}