BillingAccount.fromJson constructor

BillingAccount.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory BillingAccount.fromJson(Map<String, Object?> json) => BillingAccount(
  plan: DripPlanId.fromWire(json['plan'] as String),
  flutterflowPlan: FlutterFlowPlanId.fromWire(
    json['flutterflowPlan'] as String,
  ),
  role: BillingAccountRole.fromWire(json['role'] as String),
  teamName: json['teamName'] as String?,
  status: BillingAccountStatus.fromWire(json['status'] as String),
  monthly: json['monthly'] == null
      ? null
      : BillingMoney.fromJson(
          (json['monthly'] as Map).cast<String, Object?>(),
        ),
  interval: json['interval'] == null
      ? null
      : BillingAccountInterval.fromWire(json['interval'] as String),
  currentPeriodEnd: json['currentPeriodEnd'] as String?,
  pendingChange: json['pendingChange'] == null
      ? null
      : BillingPendingChange.fromJson(
          (json['pendingChange'] as Map).cast<String, Object?>(),
        ),
  card: json['card'] == null
      ? null
      : BillingCard.fromJson((json['card'] as Map).cast<String, Object?>()),
  seats: (json['seats'] as num).toInt(),
  otherPaidPlans: (json['otherPaidPlans'] as num).toInt(),
);