Bing 广告 API - 在过滤报告时添加多个 CampaignStatusReportFilter

Bing Ads API - Adding more than one CampaignStatusReportFilter while filtering Reports

我正在尝试过滤 Bing 广告 Api 中的 SearchQueryPerformanceReport,我可以很好地恢复报告,但我想通过多个 CampaignStatus

过滤报告

例如

var report = new SearchQueryPerformanceReportRequest
            {
                Aggregation = aggregation,
                ExcludeColumnHeaders = excludeColumnHeaders,
                ExcludeReportFooter = excludeReportFooter,
                ExcludeReportHeader = excludeReportHeader,
                Format = ReportFileFormat,
                ReturnOnlyCompleteData = returnOnlyCompleteData,
                Time = time,
                ReportName = "My Search Query Performance Report",
                Scope = new AccountThroughAdGroupReportScope
                {
                    AccountIds = new[] { accountId }
                },
                Filter = new SearchQueryPerformanceReportFilter
                {    
                    CampaignStatus = CampaignStatusReportFilter.Active,
                    AdGroupStatus = AdGroupStatusReportFilter.Active
                },
                Columns = new[]
                {
                    SearchQueryPerformanceReportColumn.SearchQuery,
                    SearchQueryPerformanceReportColumn.Clicks,
                    SearchQueryPerformanceReportColumn.Spend,
                    SearchQueryPerformanceReportColumn.Conversions,
                    SearchQueryPerformanceReportColumn.Revenue,
                    SearchQueryPerformanceReportColumn.CampaignId,
                    SearchQueryPerformanceReportColumn.CampaignName,
                    SearchQueryPerformanceReportColumn.AdGroupId,
                    SearchQueryPerformanceReportColumn.AdGroupName
                },
            };

现在我想获取所有不是 CampaignStatusReportFilter.Deleted 的 CampaignStatus。文档说我应该能够做到这一点。在我看来它应该是这样的,但这显然是不正确的。

 Filter = new SearchQueryPerformanceReportFilter
            {    
                CampaignStatus = CampaignStatusReportFilter.Active,
                CampaignStatus = CampaignStatusReportFilter.Paused,
                AdGroupStatus = AdGroupStatusReportFilter.Active
            },

Filter = new SearchQueryPerformanceReportFilter
            {    
                CampaignStatus = !CampaignStatusReportFilter.Deleted,
                AdGroupS

对于列表类型,您可以包含多个值作为标志。如何指定多个标志取决于您使用的编程语言。例如,C# 将这些值视为标志值,而 Java 将它们视为字符串数组。这是 C# 中的一个片段:

CampaignStatus = CampaignStatusReportFilter.Active | CampaignStatusReportFilter.Paused

SOAP 应包含一个字符串,其中包含 space 分隔的值列表,例如:

<CampaignStatus>Active Paused</CampaignStatus>