Rapidata billing manager
RapidataBillingManager #
Read what the current billing period has cost and what credit is left.
Billing is settled per organization, so the figures cover everything the organization spent, not only the jobs this client created.
Access this manager via attr:
RapidataClient.billing.
Source code in src/rapidata/rapidata_client/billing/rapidata_billing_manager.py
get_current_billing_period #
get_current_billing_period() -> BillingPeriod
Get the billing period that is currently accruing cost.
Returns:
| Name | Type | Description |
|---|---|---|
BillingPeriod |
BillingPeriod
|
The current period, its outstanding cost and the remaining prepaid credits. |
Raises:
| Type | Description |
|---|---|
RapidataError
|
With status 404 if the organization has no active billing period — a period only opens once there is something to bill. |
Source code in src/rapidata/rapidata_client/billing/rapidata_billing_manager.py
get_outstanding_balance #
Get the total the organization currently owes, in US dollars.
Covers finalized-but-unpaid invoices plus the settled cost of ended periods not yet invoiced. The current, still-accruing period is not part of this — nothing is due until a period ends and settles. The figure is already net of any voucher coverage and discounts.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The total owed, in US dollars rounded to the cent. |