Files
ubicloud/model/billing_record.rb
Benjamin Satzger 1a824e1b97 Add billed_by to billing rates
We bill some resources based on amount, others on duration. For
'VmCores', for instance, the core counts are stored in the amount column
of billing records and charges are based on duration. 10 minutes of
standard-4 vm usage would be calculated as
`10 (duration) x 2 (amount) x rate_for_standard_core`.
'GitHubRunnerMinutes' billing records, on the other hand, store used
minutes in the amount column and billing is based on that amount. For
instance, 10 minutes of standard-4 runner usage would be calculated as
`1 (duration) x 10 (amount) x rate_for_standard_4_runner_minute`.
Currently, 'GitHubRunnerMinutes' is the only category we bill by amount,
but 'InferenceTokens' are planned to be billed in the same way.

This commit adds a billed_by field to the rates in billing_rates.yml to
explicitly specify whether a resource is billed by `duration`
or by `amount`.
2024-10-16 13:56:06 +02:00

1.9 KiB