Public/Get-Pax8InvoiceItems.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function Get-Pax8InvoiceItems {
  [CmdletBinding()]
  Param(
    [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
    [string]$id
  )
  Process {
    $Items = Invoke-Pax8Request -method get -resource "invoices/$id/items"
    if ($Items) {
      [PSCustomObject]@{
        id      = $id
        details = $Items
      }
    }  
  }
}