rctab.routers.accounting.cost_recovery

Charge subscriptions’ spending to a cost centre.

Functions

calc_cost_recovery(recovery_month, ...)

Calculates the cost recovery for a given period.

calc_cost_recovery_app(recovery_period[, _, ...])

Route for the usage app to trigger cost recovery calculation.

get_calc_cost_recovery_cli(recovery_month[, ...])

Route for the CLI to do a dry-run of the cost recovery calculation.

post_calc_cost_recovery_cli(recovery_month)

Route for the CLI to trigger cost recovery calculation.

validate_month(month_to_recover, ...)

Raise if month shouldn't be recovered.

Classes

CostRecoveryMonth(*, first_day)

A month to do cost-recovery for.