Recurring.fromJson constructor
Recurring.fromJson(
- Object? json
Implementation
factory Recurring.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return Recurring(
aggregateUsage: map['aggregate_usage'] == null
? null
: InvoiceitemPlanAggregateUsage.fromJson(map['aggregate_usage']),
interval: InvoiceitemPlanInterval.fromJson(map['interval']),
intervalCount: (map['interval_count'] as num).toInt(),
meter: map['meter'] == null ? null : (map['meter'] as String),
trialPeriodDays: map['trial_period_days'] == null
? null
: (map['trial_period_days'] as num).toInt(),
usageType: InvoiceitemPlanUsageType.fromJson(map['usage_type']),
);
}