SubscriptionBillingThresholds.fromJson constructor

SubscriptionBillingThresholds.fromJson(
  1. Object? json
)

Implementation

factory SubscriptionBillingThresholds.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SubscriptionBillingThresholds(
    amountGte:
        map['amount_gte'] == null ? null : (map['amount_gte'] as num).toInt(),
    resetBillingCycleAnchor: map['reset_billing_cycle_anchor'] == null
        ? null
        : (map['reset_billing_cycle_anchor'] as bool),
  );
}