BillingCycle enum

How often a subscription is charged.

It exists because a tier and a price are not the same thing. A vendor selling pro at a monthly rate and again at a discounted annual rate has ONE tier and TWO prices, and every part of the purchase path has to agree which of the two is in play: the catalogue shows a figure, the checkout charges one, and the renewal line names one. When the cycle travels nowhere, those three answers come from three different places and disagree.

Both directions match on LITERALS rather than on .name, the same way ManageVia and BillingProvider do. The two words happen to be identical to the member names today, so .name would work and read shorter; it would also be the only place in this package where adding a member silently changes the wire. A future semiAnnual would encode as semiAnnual to a producer that spells it semi_annual, fromWire would round-trip it happily, and the enum test would stay green while the request 422s. The literals cost four lines and cannot do that.

Inheritance
Available extensions

Values

monthly → const BillingCycle

Charged every month, at the tier's full rate.

annual → const BillingCycle

Charged every year, at the tier's discounted effective-per-month rate.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toWire() → String
The word to send on the wire.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromWire(String? raw) → BillingCycle?
Decodes a cycle wire value, answering null for an absent or unrecognised one.

Constants

values → const List<BillingCycle>
A constant List of the values in this enum, in order of their declaration.