set model_number and min_amt

This commit is contained in:
Petri Asikainen 2021-06-17 10:37:15 +03:00
parent 45b3bfab33
commit cbb9e13a45
4 changed files with 62 additions and 23 deletions

View file

@ -23,6 +23,9 @@ ID Number of the company the accessory is assigned to
.PARAMETER manufacturer_id
ID number of the manufacturer for this accessory.
.PARAMETER model_number
Model number for this accessory
.PARAMETER order_number
Order number for this accessory.
@ -47,7 +50,7 @@ ID number of the supplier for this accessory
.PARAMETER location_id
ID number of the location the accessory is assigned to
.PARAMETER min_qty
.PARAMETER min_amt
Min quantity of the accessory before alert is triggered
.PARAMETER url
@ -86,11 +89,13 @@ function New-SnipeitAccessory() {
[string]$order_number,
[string]$model_number,
[float]$purchase_cost,
[datetime]$purchase_date,
[int]$min_qty,
[int]$min_amt,
[ValidateRange(1, [int]::MaxValue)]
[int]$supplier_id,

View file

@ -26,6 +26,9 @@ ID Number of the company the accessory is assigned to
.PARAMETER manufacturer_id
ID number of the manufacturer for this accessory.
.PARAMETER model_number
Model number for this accessory
.PARAMETER order_number
Order number for this accessory.
@ -85,6 +88,7 @@ function Set-SnipeitAccessory() {
[Nullable[System.Int32]]$manufacturer_id,
[string]$model_number,
[string]$order_number,
@ -120,7 +124,7 @@ function Set-SnipeitAccessory() {
foreach($accessory_id in $id){
$Parameters = @{
Uri = "$url/api/v1/accessories/$accessory_id"
Method = 'Patch'
Method = 'Put'
Body = $Body
Token = $apiKey
}

View file

@ -14,8 +14,8 @@ Creates new accessory on Snipe-It system
```
New-SnipeitAccessory [-name] <String> [-qty] <Int32> [-category_id] <Int32> [[-company_id] <Int32>]
[[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-purchase_cost] <Single>]
[[-purchase_date] <DateTime>] [[-min_qty] <Int32>] [[-supplier_id] <Int32>] [[-location_id] <Int32>]
[[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-model_number] <String>] [[-purchase_cost] <Single>]
[[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>] [[-location_id] <Int32>]
[-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -40,7 +40,7 @@ Parameter Sets: (All)
Aliases:
Required: True
Position: 13
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -85,7 +85,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Position: 12
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
@ -106,7 +106,7 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -min_qty
### -min_amt
Min quantity of the accessory before alert is triggered
```yaml
@ -115,12 +115,27 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Position: 10
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -model_number
Model number for this accessory
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -name
Accessory name
@ -160,7 +175,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Position: 8
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
@ -175,7 +190,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -205,7 +220,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Position: 11
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
@ -220,7 +235,7 @@ Parameter Sets: (All)
Aliases:
Required: True
Position: 12
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

View file

@ -14,9 +14,9 @@ Updates accessory on Snipe-It system
```
Set-SnipeitAccessory [-id] <Int32[]> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>]
[[-company_id] <Int32>] [[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-purchase_cost] <Single>]
[[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>] [-url] <String> [-apiKey] <String>
[-WhatIf] [-Confirm] [<CommonParameters>]
[[-company_id] <Int32>] [[-manufacturer_id] <Int32>] [[-model_number] <String>] [[-order_number] <String>]
[[-purchase_cost] <Single>] [[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>]
[-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
```
## DESCRIPTION
@ -40,7 +40,7 @@ Parameter Sets: (All)
Aliases:
Required: True
Position: 13
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -115,7 +115,22 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -model_number
Model number for this accessory
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -145,7 +160,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -160,7 +175,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
@ -175,7 +190,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -205,7 +220,7 @@ Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Position: 12
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
@ -220,7 +235,7 @@ Parameter Sets: (All)
Aliases:
Required: True
Position: 12
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False