Public/Orders/Get-Pax8OrderById.ps1

function Get-Pax8OrderById {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory)]
        [ValidateScript({
                try {
                    [System.Guid]::Parse($_) | Out-Null; $true
                } catch {
                    $PSCmdlet.ThrowTerminatingError($_)
                }
            })]
        [string]$orderId
    )
    
    $endPoint = "orders/$($orderId)"
    Invoke-Pax8GetRequest -Arguments $PSBoundParameters -EndPoint $endPoint
}