PSBlog011
Function Check-Invoice | |
{ | |
param( | |
[Parameter(Mandatory=$true)] | |
[Microsoft.PowerShell.Commands.WebRequestSession]$WebSession, | |
$EndPoint = $env:AcumaticaTestEndPoint, | |
[Parameter(Mandatory=$true)] | |
$DocDesc, | |
[Parameter(Mandatory=$true)] | |
$CustomerNbr) | |
$HashArguments = @{ | |
Uri = "$EndPoint/entity/default/18.200.001/Invoice?`$Filter=DocDesk eq `'$DocDesc`' and CustomerNbr eq `'$DocDesc`'" | |
Method = 'GET' | |
Headers = $headers | |
WebSession = $WebSession} | |
$response = Invoke-RestMethod @HashArguments | |
$InvoiceAsPSObject = $response | ConvertTo-Json | |
return [String]::IsNullOrEmpty($InvoiceAsPSObject) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment