viam.app.billing_client
Module Contents
Classes
gRPC client for retrieving billing data from app. |
Attributes
- viam.app.billing_client.LOGGER
- class viam.app.billing_client.BillingClient(channel: grpclib.client.Channel, metadata: Mapping[str, str])[source]
gRPC client for retrieving billing data from app.
Constructor is used by ViamClient to instantiate relevant service stubs. Calls to BillingClient methods should be made through ViamClient.
- async get_current_month_usage(org_id: str, timeout: Optional[float] = None) viam.proto.app.billing.GetCurrentMonthUsageResponse [source]
Access data usage information for the current month for a given organization.
- Parameters:
org_id (str) – the ID of the organization to request usage data for
- Returns:
Current month usage information
- Return type:
- async get_invoice_pdf(invoice_id: str, org_id: str, dest: str, timeout: Optional[float] = None) None [source]
Access invoice PDF data and optionally save it to a provided file path.
- Parameters:
invoice_id (str) – the ID of the invoice being requested
org_id (str) – the ID of the org to request data from
dest (str) – filepath to save the invoice to
- async get_invoices_summary(org_id: str, timeout: Optional[float] = None) viam.proto.app.billing.GetInvoicesSummaryResponse [source]
Access total outstanding balance plus invoice summaries for a given org.
- Parameters:
org_id (str) – the ID of the org to request data for
- Returns:
Summary of org invoices
- Return type:
- async get_org_billing_information(org_id: str, timeout: Optional[float] = None) viam.proto.app.billing.GetOrgBillingInformationResponse [source]
Access billing information (payment method, billing tier, etc.) for a given org.
- Parameters:
org_id (str) – the ID of the org to request data for
- Returns:
The org billing information
- Return type: