Public/New-SignDocumentMetadata.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
<#
.SYNOPSIS Gets document metadata object .DESCRIPTION Gets document metadata object. Use with Add-SingDocument #> function New-SignDocumentMetadata { [CmdletBinding(SupportsShouldProcess)] param ( # Description [Parameter(Mandatory=$false)] [string] $description='', # Signaturemode [Parameter(Mandatory=$false)] [ValidateSet('NotSigned','SignaturePage','SignatureFields')] [string] $signatureMode='SignaturePage', #Confidentiality of the document [Parameter(Mandatory=$false)] [ValidateSet('Non-confidential','Confidential','Secret')] [string] $confidentiality='Non-confidential', # Title for document [Parameter(Mandatory=$false)] [string] $title='', # orderNumber [Parameter(Mandatory=$false)] [string] $orderNumber, # Documents ownerId [Parameter(Mandatory=$false)] [string] $ownerId, # Extra attributes [Parameter(Mandatory=$false)] [System.Collections.IDictionary] $attributes ) begin { $Body = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters $signatureModes=@{'NotSigned' = 1 'SignaturePage' = 2 'SignatureFields' = 3} $Body['signatureMode'] = $signatureModes[$signatureMode] $confidentialitys=@{'Non-confidential' = 0 'Confidential' = 1 'Secret' = 2} $Body['confidentiality'] = $confidentialitys[$confidentiality] } process { if ($PSCmdlet.ShouldProcess("ShouldProcess?")) { $Body } } end { } } |