Share via


Set-PartnerCustomerCart

Updates an order for a customer in a cart.

Syntax

Default (Default)

Set-PartnerCustomerCart
    -CartId <String>
    -CustomerId <String>
    -LineItems <PSCartLineItem[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Updates an order for a customer in a cart.

Examples

Example 1

PS C:\> # Create the object that will be needed.
PS C:\> $lineItem = New-Object -TypeName Microsoft.Store.PartnerCenter.PowerShell.Models.Carts.PSCartLineItem
PS C:\>
PS C:\> # Configure the appropriate properties for the line item.
PS C:\> $lineItem.BillingCycle = 'OneTime'
PS C:\> $lineItem.CatalogItemId = 'DG7GMGF0DWTL:0001:DG7GMGF0DSJB'
PS C:\> $lineItem.FriendlyName = 'My Purchase'
PS C:\> $lineItem.ProvisioningContext =  @{duration='1Year'; scope='shared'; subscriptionId='aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'}
PS C:\> $lineItem.Quantity 10
PS C:\>
PS C:\> # Update the cart; this operation will replace the existing line items.
PS C:\> Set-PartnerCustomerCart -CartId '65faf57b-0205-47ee-92b3-08dcf233ea73' -CustomerId '46a62ece-10ad-42e5-b3f1-b2ed53e6fc08' -LineItems $lineItem

Updates an order for a customer in a cart.

Parameters

-CartId

The identifier for the cart.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomerId

The identifier for the customer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LineItems

The line items for the cart.

Parameter properties

Type:

PSCartLineItem[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

Microsoft.Store.PartnerCenter.PowerShell.Models.Carts.PSCart