Last active
November 18, 2020 00:28
-
-
Save RobertWaiteREPAY/d0d2bc5697328a1c7da063797482e325 to your computer and use it in GitHub Desktop.
PSBlog011
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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