Skip to content

Commit bd7d4ce

Browse files
authored
Merge pull request #170 from PetriAsi/feature/components
added min_amt parameter
2 parents 3769494 + 14ae8c1 commit bd7d4ce

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

SnipeitPS/Public/Set-SnipeitComponent.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ ID number of category
1717
.PARAMETER qty
1818
Quantity of the components you have
1919
20+
.PARAMETER min_amt
21+
Minimum Quantity of the components before alert is triggered
22+
2023
.PARAMETER location_id
2124
ID number of the location the accessory is assigned to
2225
@@ -55,6 +58,8 @@ function Set-SnipeitComponent()
5558
[parameter(mandatory = $true)]
5659
[int]$qty,
5760

61+
[int]$min_amt,
62+
5863
[string]$name,
5964

6065
[int]$company_id,

docs/Set-SnipeitComponent.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Updates component
1313
## SYNTAX
1414

1515
```
16-
Set-SnipeitComponent [-id] <Int32> [-qty] <Int32> [[-name] <String>] [[-company_id] <Int32>]
17-
[[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>]
18-
[-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
16+
Set-SnipeitComponent [-id] <Int32[]> [-qty] <Int32> [[-min_amt] <Int32>] [[-name] <String>]
17+
[[-company_id] <Int32>] [[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>]
18+
[[-purchase_cost] <Single>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -39,7 +39,7 @@ Parameter Sets: (All)
3939
Aliases:
4040

4141
Required: True
42-
Position: 10
42+
Position: 11
4343
Default value: None
4444
Accept pipeline input: False
4545
Accept wildcard characters: False
@@ -54,7 +54,7 @@ Parameter Sets: (All)
5454
Aliases:
5555

5656
Required: False
57-
Position: 4
57+
Position: 5
5858
Default value: 0
5959
Accept pipeline input: False
6060
Accept wildcard characters: False
@@ -64,14 +64,14 @@ Accept wildcard characters: False
6464
ID number of name
6565
6666
```yaml
67-
Type: Int32
67+
Type: Int32[]
6868
Parameter Sets: (All)
6969
Aliases:
7070

7171
Required: True
7272
Position: 1
7373
Default value: 0
74-
Accept pipeline input: False
74+
Accept pipeline input: True (ByPropertyName)
7575
Accept wildcard characters: False
7676
```
7777
@@ -84,7 +84,22 @@ Parameter Sets: (All)
8484
Aliases:
8585

8686
Required: False
87-
Position: 5
87+
Position: 6
88+
Default value: 0
89+
Accept pipeline input: False
90+
Accept wildcard characters: False
91+
```
92+
93+
### -min_amt
94+
Minimum Quantity of the components before alert is triggered
95+
96+
```yaml
97+
Type: Int32
98+
Parameter Sets: (All)
99+
Aliases:
100+
101+
Required: False
102+
Position: 3
88103
Default value: 0
89104
Accept pipeline input: False
90105
Accept wildcard characters: False
@@ -99,7 +114,7 @@ Parameter Sets: (All)
99114
Aliases:
100115

101116
Required: False
102-
Position: 3
117+
Position: 4
103118
Default value: None
104119
Accept pipeline input: False
105120
Accept wildcard characters: False
@@ -114,7 +129,7 @@ Parameter Sets: (All)
114129
Aliases:
115130

116131
Required: False
117-
Position: 6
132+
Position: 7
118133
Default value: None
119134
Accept pipeline input: False
120135
Accept wildcard characters: False
@@ -129,7 +144,7 @@ Parameter Sets: (All)
129144
Aliases:
130145

131146
Required: False
132-
Position: 8
147+
Position: 9
133148
Default value: 0
134149
Accept pipeline input: False
135150
Accept wildcard characters: False
@@ -144,7 +159,7 @@ Parameter Sets: (All)
144159
Aliases:
145160

146161
Required: False
147-
Position: 7
162+
Position: 8
148163
Default value: None
149164
Accept pipeline input: False
150165
Accept wildcard characters: False
@@ -174,7 +189,7 @@ Parameter Sets: (All)
174189
Aliases:
175190

176191
Required: True
177-
Position: 9
192+
Position: 10
178193
Default value: None
179194
Accept pipeline input: False
180195
Accept wildcard characters: False

0 commit comments

Comments
 (0)