PassioTokenBudget class

This class holds information about the API name, the budget cap, the tokens used in a certain period, and the total usage for that period.

Constructors

PassioTokenBudget({required String apiName, required int budgetCap, required int periodUsage, required int tokensUsed})
Creates a new instance of PassioTokenBudget with the provided values.
const
PassioTokenBudget.fromJson(Map<String, dynamic> json)
Creates a PassioTokenBudget instance from a JSON map.
factory

Properties

apiName String
The name of the API.
final
budgetCap int
The maximum budget cap for tokens.
final
hashCode int
The hash code for this object.
no setteroverride
periodUsage int
The amount of tokens used in the current period.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokensUsed int
The total number of tokens used so far.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this PassioTokenBudget instance to a JSON map.
toString() String
A string representation of this object.
override
usedPercent() double
Calculates the percentage of the budget used so far.

Operators

operator ==(Object other) bool
The equality operator.
override