InvoiceitemPriceRecurring.fromJson constructor

InvoiceitemPriceRecurring.fromJson(
  1. Object? json
)

Implementation

factory InvoiceitemPriceRecurring.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InvoiceitemPriceRecurring(
    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']),
  );
}