Share 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.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Sub RevertPromoCodeRedemption ( _
    promoCode As String, _
    basketOrderGroupId As Guid _
)
'Usage
Dim instance As MarketingWebService
Dim promoCode As String
Dim basketOrderGroupId As Guid

instance.RevertPromoCodeRedemption(promoCode, _
    basketOrderGroupId)
[WebMethodAttribute]
public virtual void RevertPromoCodeRedemption(
    string promoCode,
    Guid basketOrderGroupId
)
[WebMethodAttribute]
public:
virtual 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 identifier 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

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. The promo code history is set back to PromoCodeHistoryStatus.NotReserved with a validation reason of Reverted PromoCodeNotValidReason.Reverted; and the transaction table will have its use count decremented by one.

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace