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
- promoCodeDefinitionId
Type: System..::.Int32
The identifier of the PromoCodeDefinition for which promo codes should be generated.
- onlyCompletedBatches
Type: System..::.Boolean
true to return only batches that have a PromoCodeOperationStatusCode enumeration value of Succeeded or FinishedWithErrors; otherwise false.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.