Skip to content

Commit 7dadaf5

Browse files
authored
Merge pull request #34 from homotechsual/33-feature-add-paymentstatuses-paramtert-to-get-haloinvoice
#33 (feat) Add `PaymentStatuses` parameter to `Get-HaloInvoice`
2 parents 5abece4 + f2b25a7 commit 7dadaf5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+84
-87
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/githubreleaser.yml

Whitespace-only changes.

HaloAPI.build.ps1

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,28 @@ if ($Push) {
4040
## Requires PlatyPS, Pester, PSScriptAnalyzer and Alt3.Docusaurus.PowerShell installed.
4141

4242
if ($UpdateHelp) {
43-
if (-Not($DocusaurusPath)) {
44-
throw 'DocusaurusPath parameter is required when updating help'
45-
} elseif (-Not(Resolve-Path -Path $DocusaurusPath)) {
46-
throw 'DocusaurusPath does not resolve to a valid path'
43+
$DocsFolderPath = Join-Path -Path $DocusaurusPath -ChildPath 'docs' -AdditionalChildPath $Script:ModuleName
44+
if (-Not(Test-Path -Path $DocsFolderPath)) {
45+
New-Item -Path $DocsFolderPath -ItemType Directory | Out-Null
4746
}
47+
$MarkdownHeader = @'
48+
:::powershell[Generated Cmdlet Help]
49+
This page has been generated from the {0} PowerShell module source. To make changes please edit the appropriate PowerShell source file.
50+
:::
51+
'@ -f $Script:ModuleName
4852
$ExcludeFiles = Get-ChildItem -Path "$($PSScriptRoot)\Private" -Filter '*.ps1' -Recurse | ForEach-Object { [System.IO.Path]::GetFileNameWithoutExtension($_.FullName) }
4953
$NewDocusaurusHelpParams = @{
50-
Module = ('.\{0}.psm1' -f $ModuleName)
51-
DocsFolder = Join-Path -Path $DocusaurusPath -ChildPath 'docs' -AdditionalChildPath $ModuleName
54+
Module = ('.\{0}.psd1' -f $Script:ModuleName)
55+
DocsFolder = $DocsFolderPath
5256
Exclude = $ExcludeFiles
5357
Sidebar = 'commandlets'
5458
# MetaDescription = 'Generated cmdlet help for the %1 commandlet.'
55-
NoPlaceHolderExamples = $true
5659
GroupByVerb = $true
5760
UseDescriptionFromHelp = $true
61+
NoPlaceHolderExamples = $true
62+
UseCustomShortTitles = $false
63+
PrependMarkdown = $MarkdownHeader
64+
RemoveParameters = @('-ProgressAction', '-FakeParam')
5865
}
5966
New-DocusaurusHelp @NewDocusaurusHelpParams | Out-Null
6067
$CommandletDocsFolder = Join-Path -Path $DocusaurusPath -ChildPath 'docs' -AdditionalChildPath @($ModuleName, 'commandlets')

Private/New-HaloQuery.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ function New-HaloQuery {
2323
Write-Debug "Excluding system parameter $($Parameter.Name)."
2424
Continue
2525
}
26+
# Skip optional system parameters.
27+
if (([System.Management.Automation.Cmdlet]::OptionalCommonParameters).Contains($Parameter.Name)) {
28+
Write-Verbose "Excluding optional system parameter $($Parameter.Name)."
29+
Continue
30+
}
2631
$ParameterVariable = Get-Variable -Name $Parameter.Name -ErrorAction SilentlyContinue
27-
if (($Parameter.ParameterType.Name -eq 'String') -or ($Parameter.ParameterType.Name -eq 'String[]')) {
32+
if (($Parameter.ParameterType.Name -eq 'String') -or ($Parameter.ParameterType.Name -eq 'String[]') -or ($Parameter.ParameterType.Name -eq 'Object') -or ($Parameter.ParameterType.Name -eq 'Object[]')) {
2833
Write-Debug "Found String or String Array param $($ParameterVariable.Name)"
2934
if ([String]::IsNullOrEmpty($ParameterVariable.Value)) {
3035
Write-Debug "Skipping unset param $($ParameterVariable.Name)"

Public/Get/Get-HaloAction.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function Get-HaloAction {
7676
[switch]$NonSystem
7777
)
7878
Invoke-HaloPreFlightCheck
79-
$CommandName = $MyInvocation.MyCommand.Name
79+
$CommandName = $MyInvocation.InvocationName
8080
$Parameters = (Get-Command -Name $CommandName).Parameters
8181
# Workaround to prevent the query string processor from adding an 'actionid=' parameter by removing it from the set parameters.
8282
if ($ActionID) {

Public/Get/Get-HaloAgent.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function Get-HaloAgent {
7070

7171
)
7272
Invoke-HaloPreFlightCheck
73-
$CommandName = $MyInvocation.MyCommand.Name
73+
$CommandName = $MyInvocation.InvocationName
7474
$Parameters = (Get-Command -Name $CommandName).Parameters
7575
# Workaround to prevent the query string processor from adding an 'agentid=' parameter by removing it from the set parameters.
7676
if ($AgentID) {

Public/Get/Get-HaloAppointment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Get-HaloAppointment {
6262
[switch]$IncludeDetails
6363
)
6464
Invoke-HaloPreFlightCheck
65-
$CommandName = $MyInvocation.MyCommand.Name
65+
$CommandName = $MyInvocation.InvocationName
6666
$Parameters = (Get-Command -Name $CommandName).Parameters
6767
# Workaround to prevent the query string processor from adding a 'appointmentid=' parameter by removing it from the set parameters.
6868
if ($AppointmentID) {

Public/Get/Get-HaloAsset.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function Get-HaloAsset {
8787
[Switch]$IncludeDiagramDetails
8888
)
8989
Invoke-HaloPreFlightCheck
90-
$CommandName = $MyInvocation.MyCommand.Name
90+
$CommandName = $MyInvocation.InvocationName
9191
$Parameters = (Get-Command -Name $CommandName).Parameters
9292
# Workaround to prevent the query string processor from adding a 'assetid=' parameter by removing it from the set parameters.
9393
if ($AssetID) {

Public/Get/Get-HaloAssetType.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function Get-HaloAssetType {
6060
[Switch]$ShowAll
6161
)
6262
Invoke-HaloPreFlightCheck
63-
$CommandName = $MyInvocation.MyCommand.Name
63+
$CommandName = $MyInvocation.InvocationName
6464
$Parameters = (Get-Command -Name $CommandName).Parameters
6565
# Workaround to prevent the query string processor from adding a 'assettypeid=' parameter by removing it from the set parameters.
6666
if ($AssetTypeID) {

Public/Get/Get-HaloAttachment.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ function Get-HaloAttachment {
4343
[String]$OutPath,
4444
# Return the attachment as a base64 encoded string
4545
[Parameter( ParameterSetName = 'Single' )]
46-
[Switch]$AsBase64
46+
[Switch]$AsBase64,
47+
# Get the token for accessing the image using the token parameter(s).
48+
[Parameter( ParameterSetName = 'Single' )]
49+
[Switch]$GetToken
4750
)
4851
Invoke-HaloPreFlightCheck
49-
$CommandName = $MyInvocation.MyCommand.Name
52+
$CommandName = $MyInvocation.InvocationName
5053
$Parameters = (Get-Command -Name $CommandName).Parameters
5154
# Workaround to prevent the query string processor from adding a 'attachmentid=' parameter by removing it from the set parameters.
5255
if ($AttachmentID) {

0 commit comments

Comments
 (0)