Skip to content

Instantly share code, notes, and snippets.

@RobertWaiteREPAY
Last active November 18, 2020 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertWaiteREPAY/5085f1b815a8ff07170d85f56e312f6c to your computer and use it in GitHub Desktop.
Save RobertWaiteREPAY/5085f1b815a8ff07170d85f56e312f6c to your computer and use it in GitHub Desktop.
PSBlog008
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