Last active
November 18, 2020 00:22
-
-
Save RobertWaiteREPAY/5085f1b815a8ff07170d85f56e312f6c to your computer and use it in GitHub Desktop.
PSBlog008
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 Get-Invoice | |
{ | |
param( | |
[Parameter(Mandatory=$true)] | |
[Microsoft.PowerShell.Commands.WebRequestSession]$WebSession, | |
$EndPoint = $env:AcumaticaTestEndPoint, | |
[Parameter(Mandatory=$true)] | |
$ReferenceNbr) | |
$HashArguments = @{ | |
Uri = "$EndPoint/entity/default/18.200.001/Invoice?`$Filter=ReferenceNbr eq `'$ReferenceNbr`'" | |
Method = 'GET' | |
Headers = $headers | |
WebSession = $WebSession} | |
$response = Invoke-RestMethod @HashArguments | |
$InvoiceAsPSObject = $response | ConvertTo-Json | ConvertFrom-Json | |
Return $InvoiceAsPSObject | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment