@@ -15,10 +15,10 @@ function New-ITGlueConfigurationStatuses {
1515 $ITGlue_Headers.Add (' x-api-key' , (New-Object - TypeName System.Management.Automation.PSCredential - ArgumentList ' N/A' , $ITGlue_API_Key ).GetNetworkCredential().Password)
1616 $rest_output = Invoke-RestMethod - method ' POST' - uri ($ITGlue_Base_URI + $resource_uri ) - headers $ITGlue_Headers `
1717 - body $body - ErrorAction Stop - ErrorVariable $web_error
18- $ITGlue_Headers.Remove (' x-api-key' ) > $null # Quietly clean up scope so the API key doesn't persist
18+ [ void ] ( $ITGlue_Headers.Remove (' x-api-key' )) # Quietly clean up scope so the API key doesn't persist
1919
2020 $data = @ {}
21- $data = $rest_output
21+ $data = $rest_output
2222 return $data
2323}
2424
@@ -53,7 +53,7 @@ function Get-ITGlueConfigurationStatuses {
5353 }
5454 if ($sort ) {
5555 $body += @ {' sort' = $sort }
56- }
56+ }
5757 if ($page_number ) {
5858 $body += @ {' page[number]' = $page_number }
5959 }
@@ -65,10 +65,10 @@ function Get-ITGlueConfigurationStatuses {
6565 $ITGlue_Headers.Add (' x-api-key' , (New-Object - TypeName System.Management.Automation.PSCredential - ArgumentList ' N/A' , $ITGlue_API_Key ).GetNetworkCredential().Password)
6666 $rest_output = Invoke-RestMethod - method ' GET' - uri ($ITGlue_Base_URI + $resource_uri ) - headers $ITGlue_Headers `
6767 - body $body - ErrorAction Stop - ErrorVariable $web_error
68- $ITGlue_Headers.Remove (' x-api-key' ) > $null # Quietly clean up scope so the API key doesn't persist
68+ [ void ] ( $ITGlue_Headers.Remove (' x-api-key' )) # Quietly clean up scope so the API key doesn't persist
6969
7070 $data = @ {}
71- $data = $rest_output
71+ $data = $rest_output
7272 return $data
7373}
7474
@@ -81,7 +81,7 @@ function Set-ITGlueConfigurationStatuses {
8181 $data
8282 )
8383
84- $resource_uri = (' /configuration_statuses/{0}' -f $id )
84+ $resource_uri = (' /configuration_statuses/{0}' -f $id )
8585
8686 $body = @ {}
8787
@@ -92,9 +92,9 @@ function Set-ITGlueConfigurationStatuses {
9292 $ITGlue_Headers.Add (' x-api-key' , (New-Object - TypeName System.Management.Automation.PSCredential - ArgumentList ' N/A' , $ITGlue_API_Key ).GetNetworkCredential().Password)
9393 $rest_output = Invoke-RestMethod - method ' PATCH' - uri ($ITGlue_Base_URI + $resource_uri ) - headers $ITGlue_Headers `
9494 - body $body - ErrorAction Stop - ErrorVariable $web_error
95- $ITGlue_Headers.Remove (' x-api-key' ) > $null # Quietly clean up scope so the API key doesn't persist
95+ [ void ] ( $ITGlue_Headers.Remove (' x-api-key' )) # Quietly clean up scope so the API key doesn't persist
9696
9797 $data = @ {}
98- $data = $rest_output
98+ $data = $rest_output
9999 return $data
100- }
100+ }
0 commit comments