PriceRecurring.fromJson constructor
PriceRecurring.fromJson(
- Object? json
Implementation
factory PriceRecurring.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PriceRecurring(
aggregateUsage: map['aggregate_usage'] == null
? null
: PlanAggregateUsage.fromJson(map['aggregate_usage']),
interval: InvoiceitemPlanInterval.fromJson(map['interval']),
intervalCount: map['interval_count'] == null
? null
: (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: map['usage_type'] == null
? null
: InvoiceitemPlanUsageType.fromJson(map['usage_type']),
);
}