pub struct Allowance {
pub limit: Option<i32>,
pub plan: Option<String>,
pub resets: Option<i32>,
pub spent: Option<bool>,
pub used: Option<i32>,
pub window: Option<String>,
}Fields§
§limit: Option<i32>calls the plan allows per period; 0 = unbounded
plan: Option<String>the tier the limit came from
resets: Option<i32>unix seconds; when THAT window starts again
spent: Option<bool>the subject is at the limit
used: Option<i32>Used is how many zero-priced calls this subject has been SERVED in the period ending at Resets — the UTC calendar day. Only a served call counts, so an admission check, a refusal, or a vendor that never answered leaves it where it stood. It stops AT Limit rather than climbing past it, so Limit-Used is what remains and never goes negative.
window: Option<String>Window is which ceiling these numbers describe — "hour" or "day" — because a caller is held to both and only one of them is the answer. It is the window that REFUSED where one did, and otherwise the one with least left, so Limit-Used is always the number that will actually stop them next. Empty where no window bounds the subject at all.