InvoiceItemThresholdReason.fromJson constructor

InvoiceItemThresholdReason.fromJson(
  1. Object? json
)

Implementation

factory InvoiceItemThresholdReason.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InvoiceItemThresholdReason(
    lineItemIds: (map['line_item_ids'] as List<Object?>)
        .map((el) => (el as String))
        .toList(),
    usageGte: (map['usage_gte'] as num).toInt(),
  );
}