PlanLimit constructor

PlanLimit({
  1. required int total,
  2. required int spent,
  3. required int left,
  4. @JsonKey.new(name: 'key_total') int? keyTotal,
  5. @JsonKey.new(name: 'key_spent') @Default.new(0) int keySpent,
  6. @JsonKey.new(name: 'key_left') int? keyLeft,
  7. @JsonKey.new(name: 'limited_by', unknownEnumValue: PlanLimitAllowance.unknown) @Default.new(PlanLimitAllowance.subject) PlanLimitAllowance limitedBy,
})

Implementation

factory PlanLimit({
  /// Daily request allowance shared by every key in the subscription.
  required int total,

  /// Requests charged today across the subscription.
  required int spent,

  /// Requests remaining under the more restrictive active allowance.
  required int left,

  /// Daily allowance attached to this key, or `null` when it has no cap.
  @JsonKey(name: 'key_total') int? keyTotal,

  /// Requests charged today to this key.
  @JsonKey(name: 'key_spent') @Default(0) int keySpent,

  /// Requests remaining for this key, or `null` when it has no cap.
  @JsonKey(name: 'key_left') int? keyLeft,

  /// Allowance that currently determines [left].
  @JsonKey(name: 'limited_by', unknownEnumValue: PlanLimitAllowance.unknown)
  @Default(PlanLimitAllowance.subject)
  PlanLimitAllowance limitedBy,
}) = _PlanLimit;