Add-PartnerCustomerCartLineItem
Adds a new line item to the specified cart.
Syntax
Add-PartnerCustomerCartLineItem
-CartId <String>
-CustomerId <String>
-LineItem <PSCartLineItem>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Adds a new line item to the specified cart.
Examples
Example 1
PS C:\> $lineItem = New-Object -TypeName Microsoft.Store.PartnerCenter.PowerShell.Models.Carts.PSCartLineItem
PS C:\>
PS C:\> $lineItem.BillingCycle = 'OneTime'
PS C:\> $lineItem.CatalogItemId = 'DG7GMGF0DWTL:0001:DG7GMGF0DSJB'
PS C:\> $lineItem.FriendlyName = 'Sample RI Purchase'
PS C:\> $lineItem.ProvisioningContext.Add('duration', '1Year')
PS C:\> $lineItem.ProvisioningContext.Add('scope', 'shared')
PS C:\> $lineItem.ProvisioningContext.Add('subscriptionId', 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e')
PS C:\> $lineItem.Quantity = 10
PS C:\>
PS C:\> Add-PartnerCustomerCartLineItem -CartId '65faf57b-0205-47ee-92b3-08dcf233ea73' -CustomerId '46a62ece-10ad-42e5-b3f1-b2ed53e6fc08' -LineItem $lineItem
Adds a new line item to the specified cart.
Parameters
-CartId
The identifier for the cart.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CustomerId
The identifier for the customer.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LineItem
The line item to be added.
Type: | PSCartLineItem |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Microsoft.Store.PartnerCenter.PowerShell.Models.Carts.PSCart