Pax8API/Public/Quoting/Get-Pax8DownloadAllAttachmentsAsZip.ps1

<#
.SYNOPSIS
Download all quote attachments
.DESCRIPTION
Downloads all quote attachments as a single zip file
OpenAPI: GET /v2/quotes/{quoteId}/attachments
Scope: Quoting. Audience: https://api.pax8.com.
.PARAMETER DownloadZip
Must be set to true to download the ZIP. Suggested values: true.
.PARAMETER QuoteId
path parameter 'quoteId'.
.PARAMETER Raw
Returns the unmodified API response instead of unwrapping paginated content.
.EXAMPLE
Get-Pax8DownloadAllAttachmentsAsZip -QuoteId '00000000-0000-0000-0000-000000000000'
.LINK
https://devx.pax8.com/openapi/quoting-endpoints.json
#>

function Get-Pax8DownloadAllAttachmentsAsZip {
    [CmdletBinding()]
    param (
        [ValidateSet('true')]
        [bool]$DownloadZip,

        [Parameter(Mandatory = $true)]
        [guid]$QuoteId,

        [switch]$Raw
    )

    process {
        $boundParameters = @{}
        foreach ($entry in $PSBoundParameters.GetEnumerator()) {
            $boundParameters[$entry.Key] = $entry.Value
        }

        Invoke-Pax8ApiOperation -CommandName $MyInvocation.MyCommand.Name -Parameters $boundParameters
    }
}