Public/Get-GCRoutingQueueWrapupCodes.ps1

<#
.SYNOPSIS
    Retrieves the wrapup codes assigned to a routing queue in Genesys Cloud.

.DESCRIPTION
    Queries the Genesys Cloud API to retrieve a paginated list of wrapup codes
    associated with a specific routing queue.
    API Endpoint: GET /api/v2/routing/queues/{queueId}/wrapupcodes

.PARAMETER QueueId
    The unique identifier of the routing queue.

.PARAMETER PageSize
    The number of results per page. Default is 25.

.PARAMETER PageNumber
    The page number to retrieve. Default is 1.

.EXAMPLE
    Get-GCRoutingQueueWrapupCodes -QueueId '12345678-1234-1234-1234-123456789012'
    Retrieves the wrapup codes for the specified queue.

.NOTES
    Genesys Cloud API: GET /api/v2/routing/queues/{queueId}/wrapupcodes
#>

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

        [Parameter(Mandatory = $false)]
        [int]$PageSize = 25,

        [Parameter(Mandatory = $false)]
        [int]$PageNumber = 1
    )

    $queryParams = @{
        pageSize   = $PageSize
        pageNumber = $PageNumber
    }

    $endpoint = "routing/queues/$QueueId/wrapupcodes"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET -QueryParameters $queryParams
}