SetRateCardInput
No description
input SetRateCardInput {
scope: RateScope!
metric: String!
priceCents: Float
unitLabel: String
unitQuantity: BigInt
acknowledgeRepricing: Boolean
freePerHour: BigInt
freeUnits: BigInt
freePeriod: AllowancePeriod
freePerMonth: BigInt
priceBands: [RateCardBandInput!]
priceBandBasis: PriceBandBasis
clearPriceBands: Boolean
reason: String!
}
Fields
SetRateCardInput.scope ● RateScope! non-null enum
Which card to edit.
SetRateCardInput.metric ● String! non-null scalar
The metered dimension to reprice. Refused unless the platform actually meters it: a rate for an unmetered metric bills nobody while appearing configured.
SetRateCardInput.priceCents ● Float scalar
New price in cents per unitQuantity raw units. Must be >= 0; 0 means meter but do not charge. Omit to leave the price unchanged. Fractional values are accepted (the column is NUMERIC(20,6)).
SetRateCardInput.unitLabel ● String scalar
New human unit this price is quoted in, e.g. "GiB" or "GiB-mo". Must be supplied together with unitQuantity: a label on its own restates the rate card while the arithmetic keeps the old divisor. Omit both to leave the unit unchanged.
SetRateCardInput.unitQuantity ● BigInt scalar
New number of raw metric units one priceCents charge covers, as a BigInt decimal string. Must be > 0 and supplied together with unitLabel. Needed because every rate seed is ON CONFLICT DO NOTHING, so a unit corrected in the declaration never reaches a tier that is already installed.
SetRateCardInput.acknowledgeRepricing ● Boolean scalar
Required when a unit change also changes the money. Restating 19c per GiB as 1.769513c per 100 MB is the same price and needs nothing; changing 20c per 100 MB to 20c per GiB-month is a 7841x cut and must be stated deliberately. The mutation refuses rather than guessing which one you meant.
SetRateCardInput.freePerHour ● BigInt scalar
New hourly free allowance in raw metric units, as a BigInt decimal string. Must be >= 0. Omit to leave the allowance unchanged. Like a price, it applies from a dimension's next period where a period has already been charged.
SetRateCardInput.freeUnits ● BigInt scalar
New free allowance in raw metric units per freePeriod, as a BigInt decimal string. Must be >= 0. Leaves the period as it is unless freePeriod is also given. Not combinable with freePerHour, which is the older spelling of freeUnits with freePeriod HOUR. Like a price, it applies from a dimension's next period where a period has already been charged.
SetRateCardInput.freePeriod ● AllowancePeriod enum
New period for the free allowance. Leaves the units as they are unless freeUnits is also given. Moving a dimension to MONTH is how the development quota is stated.
SetRateCardInput.freePerMonth ● BigInt scalar
New monthly free allowance in raw metric units, as a BigInt decimal string. Must be >= 0. On the PLAYER card with metric player_wasm_compute_units this is the monthly TRIAL BUDGET of a player (in each app, or one across the apps of an organization from playerTrialPool.perOrganizationFrom) — the only sanctioned way to change it on a live tier. Omit to leave it unchanged. Like a price, it applies from a dimension's next period where a period has already been charged.
SetRateCardInput.priceBands ● [RateCardBandInput!] list input
A whole graduated schedule, replacing the one the dimension holds: 1 to 10 bands, ascending edges (upToUnits on a VOLUME schedule, upToBitsPerSecond on a RATE one, per priceBandBasis), the last band open, no band dearer than the one below. Band 1's price becomes priceCents (supply priceCents only if it is the same). Accepted for SHARED aggregate_data_volume only. Like every price, it applies from a dimension's next period where a period has already been charged.
SetRateCardInput.priceBandBasis ● PriceBandBasis enum
What priceBands' edges measure: VOLUME (edges in upToUnits on the period's running total) or RATE (edges in upToBitsPerSecond on each connection's per-minute rate; SHARED aggregate_data_volume only). Only with priceBands, because it changes what every edge means. Omit to keep the dimension's current basis; clearPriceBands returns it to VOLUME. Like every price, it applies from a dimension's next period where a period has already been charged.
SetRateCardInput.clearPriceBands ● Boolean scalar
true removes the dimension's bands so it is priced flat at priceCents (the former first band's price unless priceCents is also given). Not combinable with priceBands.
SetRateCardInput.reason ● String! non-null scalar
Why this price is changing. Required: a rate change with no stated reason is not auditable after the fact. Recorded in the operator log with the before and after values.
Member Of
setBillingRate mutation