Private/New-DMRequestBody.ps1

function ConvertTo-DMRequestBody {
    [CmdletBinding()]
    [OutputType([hashtable])]
    param(
        [Parameter(Mandatory)]
        [System.Collections.IDictionary]$BoundParameters,

        [Parameter(Mandatory)]
        [hashtable]$Map
    )

    $body = @{}
    foreach ($parameterName in $Map.Keys) {
        if ($BoundParameters.ContainsKey($parameterName)) {
            $body[$Map[$parameterName]] = $BoundParameters[$parameterName]
        }
    }

    return $body
}