Share via


GetBatchInfosForDefinition Method

Returns an array with the BatchInfo containing info about batches in the given PromoCodeDefinition.

Namespace:  Microsoft.CommerceServer.Marketing.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Function GetBatchInfosForDefinition ( _
    promoCodeDefinitionId As Integer, _
    onlyCompletedBatches As Boolean _
) As BatchInfo()
'Usage
Dim instance As MarketingWebService
Dim promoCodeDefinitionId As Integer
Dim onlyCompletedBatches As Boolean
Dim returnValue As BatchInfo()

returnValue = instance.GetBatchInfosForDefinition(promoCodeDefinitionId, _
    onlyCompletedBatches)
[WebMethodAttribute]
public virtual BatchInfo[] GetBatchInfosForDefinition(
    int promoCodeDefinitionId,
    bool onlyCompletedBatches
)
[WebMethodAttribute]
public:
virtual array<BatchInfo^>^ GetBatchInfosForDefinition(
    int promoCodeDefinitionId, 
    bool onlyCompletedBatches
)
public function GetBatchInfosForDefinition(
    promoCodeDefinitionId : int, 
    onlyCompletedBatches : boolean
) : BatchInfo[]

Parameters

Return Value

Type: array<Microsoft.CommerceServer.Marketing..::.BatchInfo>[]()[]
An array of BatchInfo containing info about batches in the given PromoCodeDefinition.

Exceptions

Exception Condition
ArgumentOutOfRangeException

promoCodeDefinitionId is less than zero.

EntityDoesNotExistException

No definition exists with this promoCodeDefinitionId.

NotAuthorizedException

The user is not authorized to perform the requested operation.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

The returned BatchInfo array contains info about batches in the given PromoCodeDefinition. The promoCodeDefinitionId must already be associated with a PromoCodeDefinition

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace