PlanLimit constructor
PlanLimit({
- required int total,
- required int spent,
- required int left,
- @JsonKey.new(name: 'key_total') int? keyTotal,
- @JsonKey.new(name: 'key_spent') @Default.new(0) int keySpent,
- @JsonKey.new(name: 'key_left') int? keyLeft,
- @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;