Access data usage information for the current month for a given organization. You can also find your usage data on the Payment and billing page.
{{< tabs >}} {{% tab name="Python" %}}
Parameters:
org_id(str) (required): the ID of the organization to request usage data for.timeout(float) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.
Returns:
- (viam.proto.app.billing.GetCurrentMonthUsageResponse): the current month usage information.
Example:
usage = await billing_client.get_current_month_usage("<ORG-ID>")For more information, see the Python SDK Docs.
{{% /tab %}} {{% tab name="TypeScript" %}}
Parameters:
orgId(string) (required): The organization ID.
Returns:
- (Promise)
Example:
const usage = await billing.getCurrentMonthUsage('<organization-id>');For more information, see the TypeScript SDK Docs.
{{% /tab %}} {{< /tabs >}}
Access billing information (payment method, billing tier, etc.) for a given org. You can also find this information on the Payment and billing page.
{{< tabs >}} {{% tab name="Python" %}}
Parameters:
org_id(str) (required): the ID of the org to request data for.timeout(float) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.
Returns:
- (viam.proto.app.billing.GetOrgBillingInformationResponse): the org billing information.
Example:
information = await billing_client.get_org_billing_information("<ORG-ID>")For more information, see the Python SDK Docs.
{{% /tab %}} {{% tab name="TypeScript" %}}
Parameters:
orgId(string) (required): The organization ID.
Returns:
- (Promise<GetOrgBillingInformationResponse>)
Example:
const billingInfo = await billing.getOrgBillingInformation(
'<organization-id>'
);For more information, see the TypeScript SDK Docs.
{{% /tab %}} {{< /tabs >}}
Access total outstanding balance plus invoice summaries for a given org.
{{< tabs >}} {{% tab name="Python" %}}
Parameters:
org_id(str) (required): the ID of the org to request data for.timeout(float) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.
Returns:
- (viam.proto.app.billing.GetInvoicesSummaryResponse): the summaries of all org invoices.
Example:
summary = await billing_client.get_invoices_summary("<ORG-ID>")For more information, see the Python SDK Docs.
{{% /tab %}} {{% tab name="TypeScript" %}}
Parameters:
orgId(string) (required): The organization ID.
Returns:
- (Promise<GetInvoicesSummaryResponse>)
Example:
const invoicesSummary = await billing.getInvoicesSummary(
'<organization-id>'
);For more information, see the TypeScript SDK Docs.
{{% /tab %}} {{< /tabs >}}
Access invoice PDF data and optionally save it to a provided file path. You can also find your invoices on the Payment and billing page.
{{< tabs >}} {{% tab name="Python" %}}
Parameters:
invoice_id(str) (required): the ID of the invoice being requested.org_id(str) (required): the ID of the org to request data from.dest(str) (required): the filepath to save the invoice to.timeout(float) (optional): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call.
Returns:
- None.
Example:
await billing_client.get_invoice_pdf("<INVOICE-ID>", "<ORG-ID>", "invoice.pdf")For more information, see the Python SDK Docs.
{{% /tab %}} {{% tab name="TypeScript" %}}
Parameters:
id(string) (required): The invoice ID.orgId(string) (required): The organization ID.
Returns:
- (Promise)
Example:
const invoicePdf = await billing.getInvoicePdf(
'<invoice-id>',
'<organization-id>'
);For more information, see the TypeScript SDK Docs.
{{% /tab %}} {{< /tabs >}}