fromJson static method

ChatRevenueStatistics? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static ChatRevenueStatistics? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return ChatRevenueStatistics(
    revenueByHourGraph: StatisticalGraph.fromJson(
        json['revenue_by_hour_graph'] as Map<String, dynamic>?)!,
    revenueGraph: StatisticalGraph.fromJson(
        json['revenue_graph'] as Map<String, dynamic>?)!,
    revenueAmount: ChatRevenueAmount.fromJson(
        json['revenue_amount'] as Map<String, dynamic>?)!,
    usdRate: (json['usd_rate'] as num?)?.toDouble() ?? 0.0,
  );
}