Public/Set-FlexaDocAssetArchive.ps1
|
function Set-FlexaDocAssetArchive { [CmdletBinding()] Param ( [Parameter(Mandatory = $true)] [Int]$Id, [Alias("company_id")] [Parameter(Mandatory = $true)] [Int]$CompanyId, [Parameter(Mandatory = $true)] [Bool]$Archive ) if ($Archive) { $Response = Invoke-FlexaDocRequest -Method put -Resource "/api/v1/companies/$CompanyId/assets/$Id/archive" } else { $Response = Invoke-FlexaDocRequest -Method put -Resource "/api/v1/companies/$CompanyId/assets/$Id/unarchive" } $Response } |