Delen via


RevertPromoCodeRedemption Method

This method can be used if an order or part of an order is canceled to reflect the change in the promo code history and usage counts.

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
Public Sub RevertPromoCodeRedemption ( _
    promoCode As String, _
    basketOrderGroupId As Guid _
)
'Usage
Dim instance As PromoCodeDefinitionManager
Dim promoCode As String
Dim basketOrderGroupId As Guid

instance.RevertPromoCodeRedemption(promoCode, _
    basketOrderGroupId)
public void RevertPromoCodeRedemption(
    string promoCode,
    Guid basketOrderGroupId
)
public:
void RevertPromoCodeRedemption(
    String^ promoCode, 
    Guid basketOrderGroupId
)
public function RevertPromoCodeRedemption(
    promoCode : String, 
    basketOrderGroupId : Guid
)

Parameters

  • promoCode
    Type: System..::.String
    The promo code that was in the order for which the redemption should be reverted.
  • basketOrderGroupId
    Type: System..::.Guid
    The Id of the basket for which the redemption is to be reverted.

Exceptions

Exception Condition
ArgumentNullException

The promoCode parameter is nullNothingnullptra null reference (Nothing in Visual Basic).

EntityStateException

The redemption could not be reverted because the promotion code specified has not been redeemed in the basket.

EntityDoesNotExistException

The specified promotion code does not exist in the specified basket.

Remarks

Use this method if an order or part of an order is canceled to reflect the change in the promo code history and usage counts.

Permissions

See Also

Reference

PromoCodeDefinitionManager Class

PromoCodeDefinitionManager Members

Microsoft.CommerceServer.Marketing Namespace