Public/Set-GCLearningModule.ps1

<#
.SYNOPSIS
    Updates an existing learning module.

.DESCRIPTION
    Updates the specified learning module in Genesys Cloud.
    Uses the PUT /api/v2/learning/modules/{moduleId} endpoint.

.PARAMETER ModuleId
    The unique identifier of the learning module to update.

.PARAMETER Body
    The updated learning module definition object.

.EXAMPLE
    $moduleBody = @{ name = 'Updated Training'; description = 'Updated description' }
    Set-GCLearningModule -ModuleId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' -Body $moduleBody

.NOTES
    Genesys Cloud API: PUT /api/v2/learning/modules/{moduleId}
#>

function Set-GCLearningModule {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$ModuleId,

        [Parameter(Mandatory = $true)]
        [object]$Body
    )

    $endpoint = "learning/modules/$ModuleId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method PUT -Body $Body
}