Public/Get-GCBillingReports.ps1

<#
.SYNOPSIS
    Retrieves billing reports for billable usage.

.DESCRIPTION
    Returns billing reports for the specified date range in Genesys Cloud.
    Uses the GET /api/v2/billing/reports/billableusage endpoint.

.PARAMETER StartDate
    The start date for the billing report (ISO 8601 format).

.PARAMETER EndDate
    The end date for the billing report (ISO 8601 format).

.EXAMPLE
    Get-GCBillingReports -StartDate '2024-01-01T00:00:00Z' -EndDate '2024-01-31T23:59:59Z'

.NOTES
    Genesys Cloud API: GET /api/v2/billing/reports/billableusage
#>

function Get-GCBillingReports {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$StartDate,

        [Parameter(Mandatory = $true)]
        [string]$EndDate
    )

    $endpoint = "billing/reports/billableusage"
    $queryParams = @{
        startDate = $StartDate
        endDate   = $EndDate
    }

    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams
}