Viam SDK
    Preparing search index...

    Interface BillingClient

    interface BillingClient {
        getCurrentMonthUsage(
            orgId: string,
        ): Promise<GetCurrentMonthUsageResponse>;
        getInvoicePdf(id: string, orgId: string): Promise<Uint8Array<ArrayBuffer>>;
        getInvoicesSummary(orgId: string): Promise<GetInvoicesSummaryResponse>;
        getOrgBillingInformation(
            orgId: string,
        ): Promise<GetOrgBillingInformationResponse>;
    }
    Index

    Methods

    • Get the data usage information for the current month for a given organization.

      Parameters

      • orgId: string

        The organization ID.

      Returns Promise<GetCurrentMonthUsageResponse>

      const usage = await billing.getCurrentMonthUsage('<organization-id>');
      

      For more information, see Billing API.

    • Get invoice PDF data.

      Parameters

      • id: string

        The invoice ID.

      • orgId: string

        The organization ID.

      Returns Promise<Uint8Array<ArrayBuffer>>

      const invoicePdf = await billing.getInvoicePdf('<invoice-id>', '<organization-id>');
      

      For more information, see Billing API.

    • Get total outstanding balance plus invoice summaries for a given org.

      Parameters

      • orgId: string

        The organization ID.

      Returns Promise<GetInvoicesSummaryResponse>

      const invoicesSummary = await billing.getInvoicesSummary('<organization-id>');
      

      For more information, see Billing API.

    • Get the billing information (payment method, billing tier, etc.) for a given org.

      Parameters

      • orgId: string

        The organization ID.

      Returns Promise<GetOrgBillingInformationResponse>

      const billingInfo = await billing.getOrgBillingInformation('<organization-id>');
      

      For more information, see Billing API.