Public/Contacts/Get-Pax8ContactById.ps1
function Get-Pax8ContactById { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateScript({ try { [System.Guid]::Parse($_) | Out-Null; $true } catch { $PSCmdlet.ThrowTerminatingError($_) } })] [string]$companyId, [Parameter(Mandatory)] [ValidateScript({ try { [System.Guid]::Parse($_) | Out-Null; $true } catch { $PSCmdlet.ThrowTerminatingError($_) } })] [string]$contactId ) $endPoint = "companies/$($companyId)/contacts/$($contactId)" Invoke-Pax8GetRequest -Arguments $PSBoundParameters -EndPoint $endPoint } |