From 7d729590c4b77895712861d7fb003a6a149b872d Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Thu, 29 Apr 2021 13:22:09 +0800 Subject: [PATCH 01/55] Version 13.0.9 --- HISTORY.rst | 6 + bingads/manifest.py | 2 +- bingads/service_client.py | 13 +- bingads/service_info.py | 104 +- .../bulk/entities/ad_extensions/__init__.py | 3 +- .../ad_extensions/bulk_video_ad_extensions.py | 182 + .../bulk_ad_group_biddable_criterion.py | 7 + .../bulk_campaign_biddable_criterion.py | 7 + .../v13/internal/bulk/bulk_object_factory.py | 4 + bingads/v13/internal/bulk/csv_headers.py | 6 + bingads/v13/internal/bulk/string_table.py | 10 + bingads/v13/internal/extensions.py | 16 +- .../proxies/production/adinsight_service.xml | 3055 ++++ .../v13/proxies/production/bulk_service.xml | 1683 +++ .../production/campaignmanagement_service.xml | 12570 ++++++++++++++++ .../production/customerbilling_service.xml | 1088 ++ .../production/customermanagement_service.xml | 4230 ++++++ .../proxies/production/reporting_service.xml | 4094 +++++ .../v13/proxies/sandbox/adinsight_service.xml | 3055 ++++ bingads/v13/proxies/sandbox/bulk_service.xml | 1683 +++ .../campaignmanagement_service.xml} | 712 +- .../sandbox/customerbilling_service.xml | 1088 ++ .../sandbox/customermanagement_service.xml | 4230 ++++++ .../v13/proxies/sandbox/reporting_service.xml | 4094 +++++ generate_all.bat | 26 + generate_proxies.ps1 | 19 + setup.py | 2 +- 27 files changed, 41596 insertions(+), 393 deletions(-) create mode 100644 bingads/v13/bulk/entities/ad_extensions/bulk_video_ad_extensions.py create mode 100644 bingads/v13/proxies/production/adinsight_service.xml create mode 100644 bingads/v13/proxies/production/bulk_service.xml create mode 100644 bingads/v13/proxies/production/campaignmanagement_service.xml create mode 100644 bingads/v13/proxies/production/customerbilling_service.xml create mode 100644 bingads/v13/proxies/production/customermanagement_service.xml create mode 100644 bingads/v13/proxies/production/reporting_service.xml create mode 100644 bingads/v13/proxies/sandbox/adinsight_service.xml create mode 100644 bingads/v13/proxies/sandbox/bulk_service.xml rename bingads/v13/proxies/{campaign_management_service.xml => sandbox/campaignmanagement_service.xml} (93%) create mode 100644 bingads/v13/proxies/sandbox/customerbilling_service.xml create mode 100644 bingads/v13/proxies/sandbox/customermanagement_service.xml create mode 100644 bingads/v13/proxies/sandbox/reporting_service.xml create mode 100644 generate_all.bat create mode 100644 generate_proxies.ps1 diff --git a/HISTORY.rst b/HISTORY.rst index 35c385c1..ae04da1d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,12 @@ .. :changelog: Release History +13.0.9(2021-04-29) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add bulk mappings for video ad extensions i.e., BulkVideoAdExtension, BulkAccountVideoAdExtension, BulkAdGroupVideoAdExtension, and BulkCampaignVideoAdExtension. +* Add CashbackAdjustment mapping in the BulkAdGroupBiddableCriterion and BulkCampaignBiddableCriterion. +* Cache SDK snapshot of the singleWsdl proxies for all Bing Ads API Version 13 services. 13.0.8(2021-03-10) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index c51394f5..d66d238a 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.8' +VERSION = '13.0.9' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/service_client.py b/bingads/service_client.py index 7b7292ab..48718334 100644 --- a/bingads/service_client.py +++ b/bingads/service_client.py @@ -31,6 +31,7 @@ def __init__(self, service, version, authorization_data=None, environment='produ self._authorization_data = authorization_data self._refresh_oauth_tokens_automatically = True self._version = ServiceClient._format_version(version) + # TODO This is a temp fix for set default suds temp folder with user info, suds development branch has already fixed it. if 'cache' not in suds_options: @@ -94,7 +95,7 @@ def factory(self): """ return self.soap_client.factory - + @property def service_url(self): """ The wsdl url of service based on the specific service and environment. @@ -105,9 +106,8 @@ def service_url(self): key = (self._service, self._environment) service_info_dict = ServiceClient._get_service_info_dict(self._version) if key not in service_info_dict: - raise ValueError(str.format('Cannot find version: [v{0}] service: [{1}] under environment: [{2}].', - self._version, self._input_service, self._input_environment)) - return service_info_dict[(self._service, self._environment)].url + return service_info_dict[(self._service, 'sandbox')] + return service_info_dict[(self._service, self._environment)] @property @@ -200,7 +200,6 @@ def _format_version(version): return 13 raise ValueError(str.format('version error: [{0}] is not supported.', version)) - @staticmethod def _get_service_info_dict(version): """ @@ -296,9 +295,9 @@ def name(self): from suds.sudsobject import Property from suds.sax.text import Text - +# this is used to create entity only. Given the sandbox should have the same contract, we are good to use sandbox wsdl. _CAMPAIGN_MANAGEMENT_SERVICE_V13 = Client( - 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/campaign_management_service.xml')) + 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/sandbox/campaignmanagement_service.xml')) _CAMPAIGN_OBJECT_FACTORY_V13 = _CAMPAIGN_MANAGEMENT_SERVICE_V13.factory _CAMPAIGN_OBJECT_FACTORY_V13.object_cache = {} _CAMPAIGN_OBJECT_FACTORY_V13.create_without_cache = _CAMPAIGN_OBJECT_FACTORY_V13.create diff --git a/bingads/service_info.py b/bingads/service_info.py index 63058788..07fdde25 100644 --- a/bingads/service_info.py +++ b/bingads/service_info.py @@ -1,105 +1,11 @@ -class _ServiceInfo: - - @property - def name(self): - return self._name - - @property - def env(self): - return self._env - - @property - def url(self): - return self._url - - @url.setter - def url(self, url): - self._url = url - - - def __init__(self, name, env, url): - self._name = name - self._env = env - self._url = url - -_SERVICE_INFO_LIST_V13 = [ - # ad insight service - _ServiceInfo( - "adinsight", - "production", - "https://adinsight.api.bingads.microsoft.com/Api/Advertiser/AdInsight/V13/AdInsightService.svc?singleWsdl" - ), - _ServiceInfo( - "adinsight", - "sandbox", - "https://adinsight.api.sandbox.bingads.microsoft.com/Api/Advertiser/AdInsight/V13/AdInsightService.svc?singleWsdl" - ), - - # bulk service - _ServiceInfo( - "bulk", - "production", - "https://bulk.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc?singleWsdl" - ), - _ServiceInfo( - "bulk", - "sandbox", - "https://bulk.api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc?singleWsdl" - ), - - # campaign management - _ServiceInfo( - "campaignmanagement", - "production", - "https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc?singleWsdl" - ), - _ServiceInfo( - "campaignmanagement", - "sandbox", - "https://campaign.api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc?singleWsdl" - ), - - # customer billing - _ServiceInfo( - "customerbilling", - "production", - "https://clientcenter.api.bingads.microsoft.com/Api/Billing/v13/CustomerBillingService.svc?singleWsdl" - ), - _ServiceInfo( - "customerbilling", - "sandbox", - "https://clientcenter.api.sandbox.bingads.microsoft.com/Api/Billing/v13/CustomerBillingService.svc?singleWsdl" - ), - - # customer management - _ServiceInfo( - "customermanagement", - "production", - "https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc?singleWsdl" - ), - _ServiceInfo( - "customermanagement", - "sandbox", - "https://clientcenter.api.sandbox.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc?singleWsdl" - ), - - # reporting - _ServiceInfo( - "reporting", - "production", - "https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc?singleWsdl" - ), - _ServiceInfo( - "reporting", - "sandbox", - "https://reporting.api.sandbox.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc?singleWsdl" - ), -] +import pkg_resources +_SERVICE_LIST = ['adinsight', 'bulk', 'campaignmanagement', 'customerbilling', 'customermanagement', 'reporting'] SERVICE_INFO_DICT_V13 = {} -for service_info in _SERVICE_INFO_LIST_V13: - SERVICE_INFO_DICT_V13[(service_info.name, service_info.env)] = service_info +for service in _SERVICE_LIST: + SERVICE_INFO_DICT_V13[(service, 'production')] = 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/production/%s_service.xml' % (service)) + SERVICE_INFO_DICT_V13[(service, 'sandbox')] = 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/sandbox/%s_service.xml' % (service)) SERVICE_INFO_DICT = {13: SERVICE_INFO_DICT_V13} diff --git a/bingads/v13/bulk/entities/ad_extensions/__init__.py b/bingads/v13/bulk/entities/ad_extensions/__init__.py index a296f4ca..dbab11bb 100644 --- a/bingads/v13/bulk/entities/ad_extensions/__init__.py +++ b/bingads/v13/bulk/entities/ad_extensions/__init__.py @@ -12,4 +12,5 @@ from .bulk_action_ad_extensions import * from .bulk_promotion_ad_extensions import * from .bulk_filterlink_ad_extensions import * -from .bulk_flyer_ad_extensions import * \ No newline at end of file +from .bulk_flyer_ad_extensions import * +from .bulk_video_ad_extensions import * \ No newline at end of file diff --git a/bingads/v13/bulk/entities/ad_extensions/bulk_video_ad_extensions.py b/bingads/v13/bulk/entities/ad_extensions/bulk_video_ad_extensions.py new file mode 100644 index 00000000..a0dfa3e9 --- /dev/null +++ b/bingads/v13/bulk/entities/ad_extensions/bulk_video_ad_extensions.py @@ -0,0 +1,182 @@ +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.extensions import * +from .common import _BulkAdExtensionBase +from .common import _BulkCampaignAdExtensionAssociation +from .common import _BulkAdGroupAdExtensionAssociation +from .common import _BulkAccountAdExtensionAssociation + +_VideoAdExtension = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAdExtension')) + + +class BulkVideoAdExtension(_BulkAdExtensionBase): + """ Represents a video ad extension. + + This class exposes the :attr:`video_ad_extension` property that can be read and written + as fields of the Video Ad Extension record in a bulk file. + + For more information, see Video Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, account_id=None, ad_extension=None): + if ad_extension and not isinstance(ad_extension, _VideoAdExtension): + raise ValueError('The type of ad_extension is: {0}, should be: {1}'.format( + type(ad_extension), + 'VideoAdExtension' + )) + super(BulkVideoAdExtension, self).__init__( + account_id=account_id, + ad_extension=ad_extension + ) + + @property + def video_ad_extension(self): + """ The video ad extension. + + see Video Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + """ + + return self._ad_extension + + @video_ad_extension.setter + def video_ad_extension(self, value): + self._ad_extension = value + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_optional_str(c.video_ad_extension.Name, c.video_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'Name', v if v else '') + ), + _SimpleBulkMapping( + header=_StringTable.DisplayText, + field_to_csv=lambda c: bulk_optional_str(c.video_ad_extension.DisplayText, c.video_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'DisplayText', v if v else '') + ), + _SimpleBulkMapping( + header=_StringTable.AltText, + field_to_csv=lambda c: bulk_str(c.video_ad_extension.AlternativeText), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'AlternativeText', v) + ), + _SimpleBulkMapping( + header=_StringTable.ActionText, + field_to_csv=lambda c: bulk_optional_str(c.video_ad_extension.ActionText, c.video_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'ActionText', v if v else '') + ), + _SimpleBulkMapping( + header=_StringTable.ThumbnailUrl, + field_to_csv=lambda c: bulk_str(c.video_ad_extension.ThumbnailUrl), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'ThumbnailUrl', v) + ), + _SimpleBulkMapping( + header=_StringTable.ThumbnailId, + field_to_csv=lambda c: bulk_str(c.video_ad_extension.ThumbnailId), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'ThumbnailId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.VideoId, + field_to_csv=lambda c: bulk_str(c.video_ad_extension.VideoId), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'VideoId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrlSuffix, + field_to_csv=lambda c: bulk_optional_str(c.video_ad_extension.FinalUrlSuffix, c.video_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'FinalUrlSuffix', v) + ), + _SimpleBulkMapping( + header=_StringTable.TrackingTemplate, + field_to_csv=lambda c: bulk_str(c.video_ad_extension.TrackingUrlTemplate), + csv_to_field=lambda c, v: setattr(c.video_ad_extension, 'TrackingUrlTemplate', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.CustomParameter, + field_to_csv=lambda c: field_to_csv_UrlCustomParameters(c.video_ad_extension), + csv_to_field=lambda c, v: csv_to_field_UrlCustomParameters(c.video_ad_extension, v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.video_ad_extension.FinalUrls, c.video_ad_extension.Id), + csv_to_field=lambda c, v: csv_to_field_Urls(c.video_ad_extension.FinalUrls, v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalMobileUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.video_ad_extension.FinalMobileUrls, c.video_ad_extension.Id), + csv_to_field=lambda c, v: csv_to_field_Urls(c.video_ad_extension.FinalMobileUrls, v) + ) + ] + + def process_mappings_from_row_values(self, row_values): + self.video_ad_extension = _CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAdExtension') + self.video_ad_extension.Type = 'VideoAdExtension' + super(BulkVideoAdExtension, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkVideoAdExtension._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.video_ad_extension, 'video_ad_extension') + super(BulkVideoAdExtension, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkVideoAdExtension._MAPPINGS) + + +class BulkAccountVideoAdExtension(_BulkAccountAdExtensionAssociation): + """ Represents an account level video ad extension. + + This class exposes properties that can be read and written + as fields of the Account Video Ad Extension record in a bulk file. + + For more information, see Account Video Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + pass + + +class BulkCampaignVideoAdExtension(_BulkCampaignAdExtensionAssociation): + """ Represents a campaign level video ad extension. + + This class exposes properties that can be read and written + as fields of the Campaign Video Ad Extension record in a bulk file. + + For more information, see Campaign Video Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + pass + +class BulkAdGroupVideoAdExtension(_BulkAdGroupAdExtensionAssociation): + """ Represents an ad group level video ad extension. + + This class exposes properties that can be read and written + as fields of the Ad Group Video Ad Extension record in a bulk file. + + For more information, see Ad Group Video Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + pass diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py index 3077ef01..17657afa 100644 --- a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py @@ -59,6 +59,11 @@ def __init__(self, _StringTable.BidAdjustment, field_to_csv=lambda c: field_to_csv_BidAdjustment(c.biddable_ad_group_criterion), csv_to_field=lambda c, v: csv_to_field_BidAdjustment(c.biddable_ad_group_criterion, float(v) if v else None) + ), + _SimpleBulkMapping( + _StringTable.CashbackAdjustment, + field_to_csv=lambda c: field_to_csv_CashbackAdjustment(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_CashbackAdjustment(c.biddable_ad_group_criterion, float(v) if v else None) ) ] @@ -110,6 +115,8 @@ def process_mappings_from_row_values(self, row_values): self.create_criterion() self._biddable_ad_group_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') self._biddable_ad_group_criterion.CriterionBid.Type = 'BidMultiplier' + self._biddable_ad_group_criterion.CriterionCashback = _CAMPAIGN_OBJECT_FACTORY_V13.create('CashbackAdjustment') + self._biddable_ad_group_criterion.CriterionCashback.Type = 'CashbackAdjustment' row_values.convert_to_entity(self, BulkAdGroupBiddableCriterion._MAPPINGS) def create_criterion(self): diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py index f8d1e03f..8655e3fd 100644 --- a/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py +++ b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py @@ -52,6 +52,11 @@ def __init__(self, _StringTable.BidAdjustment, field_to_csv=lambda c: field_to_csv_BidAdjustment(c.biddable_campaign_criterion), csv_to_field=lambda c, v: csv_to_field_BidAdjustment(c.biddable_campaign_criterion, float(v) if v else None) + ), + _SimpleBulkMapping( + _StringTable.CashbackAdjustment, + field_to_csv=lambda c: field_to_csv_CashbackAdjustment(c.biddable_campaign_criterion), + csv_to_field=lambda c, v: csv_to_field_CashbackAdjustment(c.biddable_campaign_criterion, float(v) if v else None) ) ] @@ -88,6 +93,8 @@ def process_mappings_from_row_values(self, row_values): self.create_criterion() self._biddable_campaign_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') self._biddable_campaign_criterion.CriterionBid.Type = 'BidMultiplier' + self._biddable_campaign_criterion.CriterionCashback = _CAMPAIGN_OBJECT_FACTORY_V13.create('CashbackAdjustment') + self._biddable_campaign_criterion.CriterionCashback.Type = 'CashbackAdjustment' row_values.convert_to_entity(self, BulkCampaignBiddableCriterion._MAPPINGS) def create_criterion(self): diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index c146ca1c..5b0717b4 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -15,6 +15,10 @@ class _BulkObjectFactory(): _StringTable.Campaign: _EntityInfo(lambda: BulkCampaign()), _StringTable.AdGroup: _EntityInfo(lambda: BulkAdGroup()), _StringTable.Keyword: _EntityInfo(lambda: BulkKeyword()), + _StringTable.VideoAdExtension: _EntityInfo(lambda: BulkVideoAdExtension()), + _StringTable.AccountVideoAdExtension: _EntityInfo(lambda: BulkAccountVideoAdExtension()), + _StringTable.CampaignVideoAdExtension: _EntityInfo(lambda: BulkCampaignVideoAdExtension()), + _StringTable.AdGroupVideoAdExtension: _EntityInfo(lambda: BulkAdGroupVideoAdExtension()), _StringTable.CallAdExtension: _EntityInfo(lambda: BulkCallAdExtension()), _StringTable.CampaignCallAdExtension: _EntityInfo(lambda: BulkCampaignCallAdExtension()), _StringTable.FlyerAdExtension: _EntityInfo(lambda: BulkFlyerAdExtension()), diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 21593896..072b3e4a 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -61,6 +61,7 @@ class _CsvHeaders: _StringTable.Target, _StringTable.TargetAll, _StringTable.BidAdjustment, + _StringTable.CashbackAdjustment, _StringTable.RadiusTargetId, _StringTable.Name, _StringTable.OsNames, @@ -135,6 +136,11 @@ class _CsvHeaders: _StringTable.AdGroupFlyerAdExtension, _StringTable.FlyerName, _StringTable.MediaUrls, + + #Video Ad Extension + _StringTable.ThumbnailUrl, + _StringTable.ThumbnailId, + _StringTable.VideoId, # Product Target _StringTable.MerchantCenterId, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 6dee53d8..9a8007f3 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -67,6 +67,7 @@ class _StringTable: Profile = "Profile" ProfileId = "Profile Id" BidAdjustment = "Bid Adjustment" + CashbackAdjustment = "Cashback Percent" SubType = "Sub Type" OsNames = "OS Names" StartDate = "Start Date" @@ -154,6 +155,15 @@ class _StringTable: ActionType = "Action Type" ActionText = "Action Text" + #Video Ad Extension + VideoAdExtension = "Video Ad Extension" + ThumbnailUrl = "Thumbnail Url" + ThumbnailId = "Thumbnail Id" + VideoId = "Video Id" + AccountVideoAdExtension = "Account Video Ad Extension" + CampaignVideoAdExtension = "Campaign Video Ad Extension" + AdGroupVideoAdExtension = "Ad Group Video Ad Extension" + #Promotion AdExtension PromotionAdExtension = "Promotion Ad Extension"; AccountPromotionAdExtension = "Account Promotion Ad Extension"; diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 6cee1d57..af809760 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -33,6 +33,7 @@ AudienceCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('AudienceCriterion') BidMultiplier = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') +CashbackAdjustment = _CAMPAIGN_OBJECT_FACTORY_V13.create('CashbackAdjustment') AgeCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('AgeCriterion') DayTimeCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DayTimeCriterion') @@ -233,7 +234,7 @@ def parse_datetime(dt_str): :rtype: datetime | None """ - if not dt_str: + if not dt_str or dt_str == DELETE_VALUE: return None try: return datetime.strptime(dt_str, _BULK_DATETIME_FORMAT) @@ -242,7 +243,7 @@ def parse_datetime(dt_str): def parse_date(d_str): - if not d_str: + if not d_str or d_str == DELETE_VALUE: return None parsed_date = datetime.strptime(d_str, _BULK_DATE_FORMAT) bing_ads_date = _CAMPAIGN_OBJECT_FACTORY_V13.create('Date') @@ -1090,6 +1091,17 @@ def csv_to_field_CriterionAudienceId(entity, value): if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion, type(AudienceCriterion)): entity.Criterion.AudienceId = value +def field_to_csv_CashbackAdjustment(entity): + if entity is None or entity.CriterionCashback is None or entity.CriterionCashback.CashbackPercent is None: + return None + return bulk_str(entity.CriterionCashback.CashbackPercent) + + +def csv_to_field_CashbackAdjustment(entity, value): + if value is None or value == '': + return + if entity is not None and entity.CriterionCashback is not None and isinstance(entity.CriterionCashback, type(CashbackAdjustment)): + entity.CriterionCashback.CashbackPercent = value def field_to_csv_BidAdjustment(entity): if entity is None or entity.CriterionBid is None or entity.CriterionBid.Multiplier is None: diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml new file mode 100644 index 00000000..86fd16c3 --- /dev/null +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -0,0 +1,3055 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + + + + + + + 20 + + + + + + + 30 + + + + + + + 40 + + + + + + + 60 + + + + + + + 70 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml new file mode 100644 index 00000000..dde53e3f --- /dev/null +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -0,0 +1,1683 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + 18 + + + + + + + 19 + + + + + + + 20 + + + + + + + 21 + + + + + + + 22 + + + + + + + 23 + + + + + + + 24 + + + + + + + 25 + + + + + + + 26 + + + + + + + 27 + + + + + + + 28 + + + + + + + 29 + + + + + + + 30 + + + + + + + 31 + + + + + + + 32 + + + + + + + 33 + + + + + + + 34 + + + + + + + 35 + + + + + + + 36 + + + + + + + 37 + + + + + + + 38 + + + + + + + 39 + + + + + + + 40 + + + + + + + 41 + + + + + + + 42 + + + + + + + 43 + + + + + + + 44 + + + + + + + 45 + + + + + + + 46 + + + + + + + 47 + + + + + + + 48 + + + + + + + 49 + + + + + + + 50 + + + + + + + 51 + + + + + + + 52 + + + + + + + 53 + + + + + + + 54 + + + + + + + 55 + + + + + + + 56 + + + + + + + 57 + + + + + + + 58 + + + + + + + 59 + + + + + + + 60 + + + + + + + 61 + + + + + + + 62 + + + + + + + 63 + + + + + + + 64 + + + + + + + 65 + + + + + + + 66 + + + + + + + 67 + + + + + + + 68 + + + + + + + 69 + + + + + + + 70 + + + + + + + 71 + + + + + + + 72 + + + + + + + 73 + + + + + + + 74 + + + + + + + 75 + + + + + + + 76 + + + + + + + 77 + + + + + + + 78 + + + + + + + 79 + + + + + + + 80 + + + + + + + 81 + + + + + + + 82 + + + + + + + 83 + + + + + + + 84 + + + + + + + 85 + + + + + + + 86 + + + + + + + 87 + + + + + + + 88 + + + + + + + 89 + + + + + + + 90 + + + + + + + 91 + + + + + + + 92 + + + + + + + 93 + + + + + + + 94 + + + + + + + 95 + + + + + + + 96 + + + + + + + 97 + + + + + + + 98 + + + + + + + 99 + + + + + + + 100 + + + + + + + 101 + + + + + + + 102 + + + + + + + 103 + + + + + + + 104 + + + + + + + 105 + + + + + + + 106 + + + + + + + 107 + + + + + + + 108 + + + + + + + 109 + + + + + + + 110 + + + + + + + 111 + + + + + + + 112 + + + + + + + 113 + + + + + + + 114 + + + + + + + 115 + + + + + + + 116 + + + + + + + 117 + + + + + + + 118 + + + + + + + 119 + + + + + + + 120 + + + + + + + 121 + + + + + + + 122 + + + + + + + 123 + + + + + + + 124 + + + + + + + 125 + + + + + + + 126 + + + + + + + 127 + + + + + + + 128 + + + + + + + 129 + + + + + + + 130 + + + + + + + 131 + + + + + + + 132 + + + + + + + 133 + + + + + + + 134 + + + + + + + 135 + + + + + + + 136 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml new file mode 100644 index 00000000..69b003f0 --- /dev/null +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -0,0 +1,12570 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + + + + + 128 + + + + + + + 256 + + + + + + + 512 + + + + + + + 1024 + + + + + + + 2048 + + + + + + + 4096 + + + + + + + 8192 + + + + + + + 16384 + + + + + + + 32768 + + + + + + + 65536 + + + + + + + 131072 + + + + + + + 262144 + + + + + + + 524288 + + + + + + + 1048576 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + + + + + 128 + + + + + + + 256 + + + + + + + 512 + + + + + + + 1024 + + + + + + + 2048 + + + + + + + 4096 + + + + + + + 8192 + + + + + + + 16384 + + + + + + + 32768 + + + + + + + 65536 + + + + + + + 131072 + + + + + + + 262144 + + + + + + + 524288 + + + + + + + 1048576 + + + + + + + 2097152 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml new file mode 100644 index 00000000..23f1d262 --- /dev/null +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -0,0 +1,1088 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml new file mode 100644 index 00000000..4a19112f --- /dev/null +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -0,0 +1,4230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + + + + + + 32 + + + + + + + 11 + + + + + + + 72 + + + + + + + 25 + + + + + + + 48 + + + + + + + 68 + + + + + + + 24 + + + + + + + 43 + + + + + + + 58 + + + + + + + 3 + + + + + + + 51 + + + + + + + 37 + + + + + + + 31 + + + + + + + 21 + + + + + + + 19 + + + + + + + 47 + + + + + + + 61 + + + + + + + 54 + + + + + + + 9 + + + + + + + 46 + + + + + + + 42 + + + + + + + 55 + + + + + + + 41 + + + + + + + 8 + + + + + + + 52 + + + + + + + 59 + + + + + + + 49 + + + + + + + 64 + + + + + + + 65 + + + + + + + 27 + + + + + + + 69 + + + + + + + 10 + + + + + + + 62 + + + + + + + 29 + + + + + + + 2 + + + + + + + 56 + + + + + + + 50 + + + + + + + 66 + + + + + + + 7 + + + + + + + 40 + + + + + + + 73 + + + + + + + 39 + + + + + + + 6 + + + + + + + 63 + + + + + + + 75 + + + + + + + 18 + + + + + + + 28 + + + + + + + 38 + + + + + + + 30 + + + + + + + 26 + + + + + + + 20 + + + + + + + 17 + + + + + + + 36 + + + + + + + 4 + + + + + + + 53 + + + + + + + 74 + + + + + + + 35 + + + + + + + 70 + + + + + + + 34 + + + + + + + 57 + + + + + + + 1 + + + + + + + 14 + + + + + + + 71 + + + + + + + 16 + + + + + + + 22 + + + + + + + 60 + + + + + + + 45 + + + + + + + + 13 + + + + + + + 23 + + + + + + + 15 + + + + + + + 33 + + + + + + + 5 + + + + + + + 44 + + + + + + + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 174 + + + + + + + 175 + + + + + + + 176 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1025 + + + + + + + 5121 + + + + + + + 15361 + + + + + + + 3073 + + + + + + + 2049 + + + + + + + 11265 + + + + + + + 13313 + + + + + + + 12289 + + + + + + + 4097 + + + + + + + 6145 + + + + + + + 8193 + + + + + + + 16385 + + + + + + + 7169 + + + + + + + 14337 + + + + + + + 9217 + + + + + + + 1028 + + + + + + + 1030 + + + + + + + 1031 + + + + + + + 1033 + + + + + + + 1034 + + + + + + + 1035 + + + + + + + 1036 + + + + + + + 1037 + + + + + + + 1040 + + + + + + + 1042 + + + + + + + 1043 + + + + + + + 1044 + + + + + + + 1046 + + + + + + + 1049 + + + + + + + 1053 + + + + + + + 1054 + + + + + + + 1057 + + + + + + + 1066 + + + + + + + 2055 + + + + + + + 2057 + + + + + + + 2058 + + + + + + + 3076 + + + + + + + 3079 + + + + + + + 3081 + + + + + + + 3084 + + + + + + + 4105 + + + + + + + 5129 + + + + + + + 6153 + + + + + + + 8202 + + + + + + + 9226 + + + + + + + 10250 + + + + + + + 11274 + + + + + + + 13321 + + + + + + + 13322 + + + + + + + 16393 + + + + + + + 17417 + + + + + + + 18441 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml new file mode 100644 index 00000000..cb1dd442 --- /dev/null +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -0,0 +1,4094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + 18 + + + + + + + 19 + + + + + + + 20 + + + + + + + 21 + + + + + + + 22 + + + + + + + 23 + + + + + + + 24 + + + + + + + 25 + + + + + + + 26 + + + + + + + 27 + + + + + + + 28 + + + + + + + 29 + + + + + + + 30 + + + + + + + 31 + + + + + + + 32 + + + + + + + 33 + + + + + + + 34 + + + + + + + 35 + + + + + + + 36 + + + + + + + 37 + + + + + + + 38 + + + + + + + 39 + + + + + + + 40 + + + + + + + 41 + + + + + + + 42 + + + + + + + 43 + + + + + + + 44 + + + + + + + 45 + + + + + + + 46 + + + + + + + 47 + + + + + + + 48 + + + + + + + 49 + + + + + + + 50 + + + + + + + 51 + + + + + + + 52 + + + + + + + 53 + + + + + + + 54 + + + + + + + 55 + + + + + + + 56 + + + + + + + 57 + + + + + + + 58 + + + + + + + 59 + + + + + + + 60 + + + + + + + 61 + + + + + + + 62 + + + + + + + 63 + + + + + + + 64 + + + + + + + 65 + + + + + + + 66 + + + + + + + 67 + + + + + + + 68 + + + + + + + 69 + + + + + + + 70 + + + + + + + 71 + + + + + + + 72 + + + + + + + 73 + + + + + + + 74 + + + + + + + 75 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + + + + + + + 128 + + + + + + + 256 + + + + + + + 512 + + + + + + + 1024 + + + + + + + 4096 + + + + + + + 8192 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml new file mode 100644 index 00000000..511a254e --- /dev/null +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -0,0 +1,3055 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + + + + + + + 20 + + + + + + + 30 + + + + + + + 40 + + + + + + + 60 + + + + + + + 70 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml new file mode 100644 index 00000000..e10d014c --- /dev/null +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -0,0 +1,1683 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + 18 + + + + + + + 19 + + + + + + + 20 + + + + + + + 21 + + + + + + + 22 + + + + + + + 23 + + + + + + + 24 + + + + + + + 25 + + + + + + + 26 + + + + + + + 27 + + + + + + + 28 + + + + + + + 29 + + + + + + + 30 + + + + + + + 31 + + + + + + + 32 + + + + + + + 33 + + + + + + + 34 + + + + + + + 35 + + + + + + + 36 + + + + + + + 37 + + + + + + + 38 + + + + + + + 39 + + + + + + + 40 + + + + + + + 41 + + + + + + + 42 + + + + + + + 43 + + + + + + + 44 + + + + + + + 45 + + + + + + + 46 + + + + + + + 47 + + + + + + + 48 + + + + + + + 49 + + + + + + + 50 + + + + + + + 51 + + + + + + + 52 + + + + + + + 53 + + + + + + + 54 + + + + + + + 55 + + + + + + + 56 + + + + + + + 57 + + + + + + + 58 + + + + + + + 59 + + + + + + + 60 + + + + + + + 61 + + + + + + + 62 + + + + + + + 63 + + + + + + + 64 + + + + + + + 65 + + + + + + + 66 + + + + + + + 67 + + + + + + + 68 + + + + + + + 69 + + + + + + + 70 + + + + + + + 71 + + + + + + + 72 + + + + + + + 73 + + + + + + + 74 + + + + + + + 75 + + + + + + + 76 + + + + + + + 77 + + + + + + + 78 + + + + + + + 79 + + + + + + + 80 + + + + + + + 81 + + + + + + + 82 + + + + + + + 83 + + + + + + + 84 + + + + + + + 85 + + + + + + + 86 + + + + + + + 87 + + + + + + + 88 + + + + + + + 89 + + + + + + + 90 + + + + + + + 91 + + + + + + + 92 + + + + + + + 93 + + + + + + + 94 + + + + + + + 95 + + + + + + + 96 + + + + + + + 97 + + + + + + + 98 + + + + + + + 99 + + + + + + + 100 + + + + + + + 101 + + + + + + + 102 + + + + + + + 103 + + + + + + + 104 + + + + + + + 105 + + + + + + + 106 + + + + + + + 107 + + + + + + + 108 + + + + + + + 109 + + + + + + + 110 + + + + + + + 111 + + + + + + + 112 + + + + + + + 113 + + + + + + + 114 + + + + + + + 115 + + + + + + + 116 + + + + + + + 117 + + + + + + + 118 + + + + + + + 119 + + + + + + + 120 + + + + + + + 121 + + + + + + + 122 + + + + + + + 123 + + + + + + + 124 + + + + + + + 125 + + + + + + + 126 + + + + + + + 127 + + + + + + + 128 + + + + + + + 129 + + + + + + + 130 + + + + + + + 131 + + + + + + + 132 + + + + + + + 133 + + + + + + + 134 + + + + + + + 135 + + + + + + + 136 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/campaign_management_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml similarity index 93% rename from bingads/v13/proxies/campaign_management_service.xml rename to bingads/v13/proxies/sandbox/campaignmanagement_service.xml index e5a1daa0..0d32f1be 100644 --- a/bingads/v13/proxies/campaign_management_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1,5 +1,5 @@ - - + + @@ -26,7 +26,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -92,10 +92,10 @@ - + - - + + @@ -230,16 +230,23 @@ - + - + + + + + + + + @@ -318,6 +325,17 @@ + + + + + + + + + + + @@ -364,7 +382,7 @@ - + @@ -375,18 +393,18 @@ - + - + - + @@ -475,7 +493,7 @@ - + @@ -599,7 +617,7 @@ - + @@ -679,7 +697,7 @@ - + @@ -696,7 +714,7 @@ - + @@ -720,7 +738,7 @@ - + @@ -780,7 +798,7 @@ - + @@ -798,7 +816,7 @@ - + @@ -828,7 +846,7 @@ - + @@ -849,7 +867,7 @@ - + @@ -890,7 +908,7 @@ - + @@ -917,7 +935,7 @@ - + @@ -931,14 +949,28 @@ - + - + + + + + + + + + + + + + + + @@ -998,8 +1030,8 @@ - - + + @@ -1008,7 +1040,7 @@ - + @@ -1023,7 +1055,7 @@ - + @@ -1034,6 +1066,8 @@ + + @@ -1075,7 +1109,7 @@ - + @@ -1084,7 +1118,7 @@ - + @@ -1105,7 +1139,7 @@ - + @@ -1158,14 +1192,14 @@ - + - + @@ -1185,7 +1219,7 @@ - + @@ -1217,6 +1251,7 @@ + @@ -1233,7 +1268,7 @@ - + @@ -1300,10 +1335,10 @@ - + - - + + @@ -1328,7 +1363,7 @@ - + @@ -1350,8 +1385,8 @@ - - + + @@ -1360,7 +1395,7 @@ - + @@ -1390,7 +1425,7 @@ - + @@ -1428,7 +1463,7 @@ - + @@ -1562,7 +1597,7 @@ - + @@ -1571,7 +1606,7 @@ - + @@ -1672,6 +1707,13 @@ + + + + 64 + + + @@ -1718,7 +1760,7 @@ - + @@ -1767,7 +1809,7 @@ - + @@ -1851,26 +1893,26 @@ - + - + - - + + - + - + - + @@ -1890,9 +1932,9 @@ - + - + @@ -1932,9 +1974,9 @@ - + - + @@ -1947,9 +1989,9 @@ - + - + @@ -2040,7 +2082,7 @@ - + @@ -2086,8 +2128,8 @@ - - + + @@ -2127,9 +2169,9 @@ - + - + @@ -2203,11 +2245,11 @@ - + - + - + @@ -2263,12 +2305,12 @@ - + - + - - + + @@ -2277,6 +2319,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -2311,7 +2375,7 @@ - + @@ -2336,7 +2400,7 @@ - + @@ -2359,6 +2423,7 @@ + @@ -2404,7 +2469,7 @@ - + @@ -2493,7 +2558,7 @@ - + @@ -2521,7 +2586,7 @@ - + @@ -2598,7 +2663,7 @@ - + @@ -2637,7 +2702,7 @@ - + @@ -2645,7 +2710,7 @@ - + @@ -2732,7 +2797,7 @@ - + @@ -2748,7 +2813,7 @@ - + @@ -2783,7 +2848,7 @@ - + @@ -3154,7 +3219,7 @@ - + @@ -3168,7 +3233,7 @@ - + @@ -3189,7 +3254,7 @@ - + @@ -3292,15 +3357,15 @@ - + - + - + @@ -3379,7 +3444,7 @@ - + @@ -3402,7 +3467,7 @@ - + @@ -3464,7 +3529,7 @@ - + @@ -3570,7 +3635,7 @@ - + @@ -3602,14 +3667,14 @@ - + - + @@ -3660,7 +3725,7 @@ - + @@ -3733,7 +3798,7 @@ - + @@ -3766,7 +3831,7 @@ - + @@ -3789,7 +3854,7 @@ - + @@ -3823,7 +3888,7 @@ - + @@ -3858,7 +3923,7 @@ - + @@ -3875,7 +3940,7 @@ - + @@ -3909,7 +3974,7 @@ - + @@ -3951,7 +4016,7 @@ - + @@ -3982,7 +4047,7 @@ - + @@ -4144,7 +4209,7 @@ - + @@ -4167,7 +4232,7 @@ - + @@ -4183,7 +4248,7 @@ - + @@ -4224,7 +4289,7 @@ - + @@ -4246,7 +4311,7 @@ - + @@ -4260,7 +4325,7 @@ - + @@ -4275,7 +4340,7 @@ - + @@ -4313,7 +4378,7 @@ - + @@ -4335,7 +4400,7 @@ - + @@ -4349,7 +4414,7 @@ - + @@ -4364,7 +4429,7 @@ - + @@ -4394,14 +4459,14 @@ - + - + @@ -4636,7 +4701,7 @@ - + @@ -4670,7 +4735,7 @@ - + @@ -4692,7 +4757,7 @@ - + @@ -4706,7 +4771,7 @@ - + @@ -4722,7 +4787,7 @@ - + @@ -4792,7 +4857,7 @@ - + @@ -4849,7 +4914,7 @@ - + @@ -4864,7 +4929,7 @@ - + @@ -5016,7 +5081,7 @@ - + @@ -5036,7 +5101,7 @@ - + @@ -5060,7 +5125,7 @@ - + @@ -5168,7 +5233,7 @@ - + @@ -5176,7 +5241,7 @@ - + @@ -5204,7 +5269,7 @@ - + @@ -5263,7 +5328,7 @@ - + @@ -5280,7 +5345,7 @@ - + @@ -5323,7 +5388,7 @@ - + @@ -5331,7 +5396,7 @@ - + @@ -5359,7 +5424,7 @@ - + @@ -5457,7 +5522,7 @@ - + @@ -5477,7 +5542,7 @@ - + @@ -5494,7 +5559,7 @@ - + @@ -5538,6 +5603,13 @@ + + + + + + + @@ -5620,11 +5692,11 @@ - + - + @@ -5643,7 +5715,7 @@ - + @@ -5653,7 +5725,7 @@ - + @@ -5690,6 +5762,13 @@ + + + + 8 + + + @@ -5712,7 +5791,7 @@ - + @@ -5740,7 +5819,7 @@ - + @@ -5757,7 +5836,7 @@ - + @@ -5773,7 +5852,7 @@ - + @@ -5788,7 +5867,22 @@ - + + + + + + + + + + + + + + + + @@ -5818,13 +5912,14 @@ + - + @@ -5832,7 +5927,7 @@ - + @@ -5846,7 +5941,7 @@ - + @@ -5874,7 +5969,7 @@ - + @@ -5906,7 +6001,7 @@ - + @@ -5917,7 +6012,7 @@ - + @@ -5939,7 +6034,7 @@ - + @@ -5953,7 +6048,7 @@ - + @@ -5961,7 +6056,7 @@ - + @@ -6014,7 +6109,7 @@ - + @@ -6038,7 +6133,7 @@ - + @@ -6062,7 +6157,7 @@ - + @@ -6086,7 +6181,7 @@ - + @@ -6110,7 +6205,7 @@ - + @@ -6134,7 +6229,7 @@ - + @@ -6158,7 +6253,7 @@ - + @@ -6182,7 +6277,7 @@ - + @@ -6206,7 +6301,7 @@ - + @@ -6230,7 +6325,7 @@ - + @@ -6254,7 +6349,7 @@ - + @@ -6278,7 +6373,7 @@ - + @@ -6302,7 +6397,7 @@ - + @@ -6326,7 +6421,7 @@ - + @@ -6350,7 +6445,7 @@ - + @@ -6374,7 +6469,7 @@ - + @@ -6398,7 +6493,7 @@ - + @@ -6422,7 +6517,7 @@ - + @@ -6446,7 +6541,7 @@ - + @@ -6470,7 +6565,7 @@ - + @@ -6494,7 +6589,7 @@ - + @@ -6518,7 +6613,7 @@ - + @@ -6542,7 +6637,7 @@ - + @@ -6566,7 +6661,7 @@ - + @@ -6590,7 +6685,7 @@ - + @@ -6614,7 +6709,7 @@ - + @@ -6638,7 +6733,7 @@ - + @@ -6662,7 +6757,7 @@ - + @@ -6686,7 +6781,7 @@ - + @@ -6710,7 +6805,7 @@ - + @@ -6734,7 +6829,7 @@ - + @@ -6758,7 +6853,7 @@ - + @@ -6782,7 +6877,7 @@ - + @@ -6806,7 +6901,7 @@ - + @@ -6830,7 +6925,7 @@ - + @@ -6854,7 +6949,7 @@ - + @@ -6878,7 +6973,7 @@ - + @@ -6902,7 +6997,7 @@ - + @@ -6926,7 +7021,7 @@ - + @@ -6950,7 +7045,7 @@ - + @@ -6974,7 +7069,7 @@ - + @@ -6998,7 +7093,7 @@ - + @@ -7022,7 +7117,7 @@ - + @@ -7046,7 +7141,7 @@ - + @@ -7070,7 +7165,7 @@ - + @@ -7094,7 +7189,7 @@ - + @@ -7118,7 +7213,7 @@ - + @@ -7142,7 +7237,7 @@ - + @@ -7166,7 +7261,7 @@ - + @@ -7190,7 +7285,7 @@ - + @@ -7214,7 +7309,7 @@ - + @@ -7238,7 +7333,7 @@ - + @@ -7262,7 +7357,7 @@ - + @@ -7286,7 +7381,7 @@ - + @@ -7310,7 +7405,7 @@ - + @@ -7334,7 +7429,7 @@ - + @@ -7358,7 +7453,7 @@ - + @@ -7382,7 +7477,7 @@ - + @@ -7406,7 +7501,7 @@ - + @@ -7430,7 +7525,7 @@ - + @@ -7454,7 +7549,7 @@ - + @@ -7478,7 +7573,7 @@ - + @@ -7502,7 +7597,7 @@ - + @@ -7526,7 +7621,7 @@ - + @@ -7550,7 +7645,7 @@ - + @@ -7574,7 +7669,7 @@ - + @@ -7598,7 +7693,7 @@ - + @@ -7622,7 +7717,7 @@ - + @@ -7646,7 +7741,7 @@ - + @@ -7670,7 +7765,7 @@ - + @@ -7694,7 +7789,7 @@ - + @@ -7718,7 +7813,7 @@ - + @@ -7742,7 +7837,7 @@ - + @@ -7766,7 +7861,7 @@ - + @@ -7790,7 +7885,7 @@ - + @@ -7814,7 +7909,7 @@ - + @@ -7838,7 +7933,7 @@ - + @@ -7862,7 +7957,7 @@ - + @@ -7886,7 +7981,7 @@ - + @@ -7910,7 +8005,7 @@ - + @@ -7934,7 +8029,7 @@ - + @@ -7958,7 +8053,7 @@ - + @@ -7982,7 +8077,7 @@ - + @@ -8006,7 +8101,7 @@ - + @@ -8030,7 +8125,7 @@ - + @@ -8054,7 +8149,7 @@ - + @@ -8078,7 +8173,7 @@ - + @@ -8102,7 +8197,7 @@ - + @@ -8126,7 +8221,7 @@ - + @@ -8150,7 +8245,7 @@ - + @@ -8174,7 +8269,7 @@ - + @@ -8198,7 +8293,7 @@ - + @@ -8222,7 +8317,7 @@ - + @@ -8246,7 +8341,7 @@ - + @@ -8270,7 +8365,7 @@ - + @@ -8294,7 +8389,7 @@ - + @@ -8318,7 +8413,7 @@ - + @@ -8342,7 +8437,7 @@ - + @@ -8366,7 +8461,7 @@ - + @@ -8390,7 +8485,7 @@ - + @@ -8414,7 +8509,7 @@ - + @@ -8438,7 +8533,7 @@ - + @@ -8462,7 +8557,7 @@ - + @@ -8486,7 +8581,7 @@ - + @@ -8510,7 +8605,7 @@ - + @@ -8534,7 +8629,7 @@ - + @@ -8558,7 +8653,7 @@ - + @@ -8582,7 +8677,7 @@ - + @@ -8606,7 +8701,7 @@ - + @@ -8630,7 +8725,7 @@ - + @@ -8654,7 +8749,7 @@ - + @@ -8678,7 +8773,7 @@ - + @@ -8702,7 +8797,7 @@ - + @@ -8726,7 +8821,7 @@ - + @@ -8750,7 +8845,7 @@ - + @@ -8774,7 +8869,7 @@ - + @@ -8798,11 +8893,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8822,7 +8941,7 @@ - + @@ -8846,7 +8965,7 @@ - + @@ -8870,7 +8989,7 @@ - + @@ -8894,7 +9013,7 @@ - + @@ -9602,6 +9721,12 @@ + + + + + + @@ -12321,6 +12446,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml new file mode 100644 index 00000000..c82ca266 --- /dev/null +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -0,0 +1,1088 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml new file mode 100644 index 00000000..e54c1174 --- /dev/null +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -0,0 +1,4230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + + + + + + 32 + + + + + + + 11 + + + + + + + 72 + + + + + + + 25 + + + + + + + 48 + + + + + + + 68 + + + + + + + 24 + + + + + + + 43 + + + + + + + 58 + + + + + + + 3 + + + + + + + 51 + + + + + + + 37 + + + + + + + 31 + + + + + + + 21 + + + + + + + 19 + + + + + + + 47 + + + + + + + 61 + + + + + + + 54 + + + + + + + 9 + + + + + + + 46 + + + + + + + 42 + + + + + + + 55 + + + + + + + 41 + + + + + + + 8 + + + + + + + 52 + + + + + + + 59 + + + + + + + 49 + + + + + + + 64 + + + + + + + 65 + + + + + + + 27 + + + + + + + 69 + + + + + + + 10 + + + + + + + 62 + + + + + + + 29 + + + + + + + 2 + + + + + + + 56 + + + + + + + 50 + + + + + + + 66 + + + + + + + 7 + + + + + + + 40 + + + + + + + 73 + + + + + + + 39 + + + + + + + 6 + + + + + + + 63 + + + + + + + 75 + + + + + + + 18 + + + + + + + 28 + + + + + + + 38 + + + + + + + 30 + + + + + + + 26 + + + + + + + 20 + + + + + + + 17 + + + + + + + 36 + + + + + + + 4 + + + + + + + 53 + + + + + + + 74 + + + + + + + 35 + + + + + + + 70 + + + + + + + 34 + + + + + + + 57 + + + + + + + 1 + + + + + + + 14 + + + + + + + 71 + + + + + + + 16 + + + + + + + 22 + + + + + + + 60 + + + + + + + 45 + + + + + + + + 13 + + + + + + + 23 + + + + + + + 15 + + + + + + + 33 + + + + + + + 5 + + + + + + + 44 + + + + + + + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 174 + + + + + + + 175 + + + + + + + 176 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1025 + + + + + + + 5121 + + + + + + + 15361 + + + + + + + 3073 + + + + + + + 2049 + + + + + + + 11265 + + + + + + + 13313 + + + + + + + 12289 + + + + + + + 4097 + + + + + + + 6145 + + + + + + + 8193 + + + + + + + 16385 + + + + + + + 7169 + + + + + + + 14337 + + + + + + + 9217 + + + + + + + 1028 + + + + + + + 1030 + + + + + + + 1031 + + + + + + + 1033 + + + + + + + 1034 + + + + + + + 1035 + + + + + + + 1036 + + + + + + + 1037 + + + + + + + 1040 + + + + + + + 1042 + + + + + + + 1043 + + + + + + + 1044 + + + + + + + 1046 + + + + + + + 1049 + + + + + + + 1053 + + + + + + + 1054 + + + + + + + 1057 + + + + + + + 1066 + + + + + + + 2055 + + + + + + + 2057 + + + + + + + 2058 + + + + + + + 3076 + + + + + + + 3079 + + + + + + + 3081 + + + + + + + 3084 + + + + + + + 4105 + + + + + + + 5129 + + + + + + + 6153 + + + + + + + 8202 + + + + + + + 9226 + + + + + + + 10250 + + + + + + + 11274 + + + + + + + 13321 + + + + + + + 13322 + + + + + + + 16393 + + + + + + + 17417 + + + + + + + 18441 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml new file mode 100644 index 00000000..ecf47b09 --- /dev/null +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -0,0 +1,4094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + 18 + + + + + + + 19 + + + + + + + 20 + + + + + + + 21 + + + + + + + 22 + + + + + + + 23 + + + + + + + 24 + + + + + + + 25 + + + + + + + 26 + + + + + + + 27 + + + + + + + 28 + + + + + + + 29 + + + + + + + 30 + + + + + + + 31 + + + + + + + 32 + + + + + + + 33 + + + + + + + 34 + + + + + + + 35 + + + + + + + 36 + + + + + + + 37 + + + + + + + 38 + + + + + + + 39 + + + + + + + 40 + + + + + + + 41 + + + + + + + 42 + + + + + + + 43 + + + + + + + 44 + + + + + + + 45 + + + + + + + 46 + + + + + + + 47 + + + + + + + 48 + + + + + + + 49 + + + + + + + 50 + + + + + + + 51 + + + + + + + 52 + + + + + + + 53 + + + + + + + 54 + + + + + + + 55 + + + + + + + 56 + + + + + + + 57 + + + + + + + 58 + + + + + + + 59 + + + + + + + 60 + + + + + + + 61 + + + + + + + 62 + + + + + + + 63 + + + + + + + 64 + + + + + + + 65 + + + + + + + 66 + + + + + + + 67 + + + + + + + 68 + + + + + + + 69 + + + + + + + 70 + + + + + + + 71 + + + + + + + 72 + + + + + + + 73 + + + + + + + 74 + + + + + + + 75 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + + + + + + + 128 + + + + + + + 256 + + + + + + + 512 + + + + + + + 1024 + + + + + + + 4096 + + + + + + + 8192 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/generate_all.bat b/generate_all.bat new file mode 100644 index 00000000..5aec12d4 --- /dev/null +++ b/generate_all.bat @@ -0,0 +1,26 @@ +REM Campaign Mangement Service +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://campaign.api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc?singleWsdl" -path "bingads\v13\proxies\sandbox\campaignmanagement_service.xml" +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://campaign.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/CampaignManagementService.svc?singleWsdl" -path "bingads\v13\proxies\production\campaignmanagement_service.xml" + +REM Bulk Service +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://bulk.api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc?singleWsdl" -path "bingads\v13\proxies\sandbox\bulk_service.xml" +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://bulk.api.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v13/BulkService.svc?singleWsdl" -path "bingads\v13\proxies\production\bulk_service.xml" + +REM customerbilling Service +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://clientcenter.api.sandbox.bingads.microsoft.com/Api/Billing/v13/CustomerBillingService.svc?singleWsdl" -path "bingads\v13\proxies\sandbox\customerbilling_service.xml" +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://clientcenter.api.bingads.microsoft.com/Api/Billing/v13/CustomerBillingService.svc?singleWsdl" -path "bingads\v13\proxies\production\customerbilling_service.xml" + +REM customermanagement Service +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://clientcenter.api.sandbox.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc?singleWsdl" -path "bingads\v13\proxies\sandbox\customermanagement_service.xml" +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://clientcenter.api.bingads.microsoft.com/Api/CustomerManagement/v13/CustomerManagementService.svc?singleWsdl" -path "bingads\v13\proxies\production\customermanagement_service.xml" + +REM reporting Service +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://reporting.api.sandbox.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc?singleWsdl" -path "bingads\v13\proxies\sandbox\reporting_service.xml" +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/v13/ReportingService.svc?singleWsdl" -path "bingads\v13\proxies\production\reporting_service.xml" + +REM adinsight Service +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://adinsight.api.sandbox.bingads.microsoft.com/Api/Advertiser/AdInsight/v13/AdInsightService.svc?singleWsdl" -path "bingads\v13\proxies\sandbox\adinsight_service.xml" +Powershell.exe -executionpolicy remotesigned -File .\generate_proxies.ps1 -svcWsdl "https://adinsight.api.bingads.microsoft.com/Api/Advertiser/AdInsight/v13/AdInsightService.svc?singleWsdl" -path "bingads\v13\proxies\production\adinsight_service.xml" + + +pause \ No newline at end of file diff --git a/generate_proxies.ps1 b/generate_proxies.ps1 new file mode 100644 index 00000000..3dc9ae88 --- /dev/null +++ b/generate_proxies.ps1 @@ -0,0 +1,19 @@ +Param ( + [string]$svcWsdl, + [string]$path +) + +function Format-XML([xml]$xml, $indent=3) +{ + $StringWriter = New-Object System.IO.StringWriter + $XmlWriter = New-Object System.XMl.XmlTextWriter $StringWriter + $xmlWriter.Formatting = "indented" + $xmlWriter.Indentation = $Indent + $xml.WriteContentTo($XmlWriter) + $XmlWriter.Flush() + $StringWriter.Flush() + Write-Output $StringWriter.ToString() +} + +wget $svcWsdl -OutFile $path +Format-XML ([xml](cat $path)) | Set-Content -Path $path \ No newline at end of file diff --git a/setup.py b/setup.py index 3af6e6e5..6675912a 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.8' +VERSION = '13.0.9' with open('README.rst', 'r') as f: readme = f.read() From fd6ae7878cef0b52e1de227ce3d3409476256f85 Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Thu, 29 Apr 2021 17:52:18 +0800 Subject: [PATCH 02/55] update to version 13.0.9.1 to fix issue of missing proxies --- HISTORY.rst | 4 ++++ MANIFEST.in | 2 +- bingads/manifest.py | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index ae04da1d..af8fadd8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ .. :changelog: Release History +13.0.9.1(2021-04-29) ++++++++++++++++++++++++++ +* Fix issue of missing proxies. + 13.0.9(2021-04-29) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. diff --git a/MANIFEST.in b/MANIFEST.in index 9aab48e6..78f3f825 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include *.rst *.py *.txt include LICENSE -include bingads/v13/proxies/*xml +include bingads/v13/proxies/*/*.xml diff --git a/bingads/manifest.py b/bingads/manifest.py index d66d238a..a9d972ff 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.9' +VERSION = '13.0.9.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/setup.py b/setup.py index 6675912a..673afc36 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.9' +VERSION = '13.0.9.1' with open('README.rst', 'r') as f: readme = f.read() From c8490a04ace5d9fe8133c17254627434405af01d Mon Sep 17 00:00:00 2001 From: Jianyun Zhao Date: Thu, 17 Jun 2021 14:17:43 +0800 Subject: [PATCH 03/55] release python sdk 13.0.10 --- HISTORY.rst | 16 + bingads/authorization.py | 75 ++-- bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 1 + ..._campaign_negative_audience_association.py | 1 - .../audiences/bulk_customer_list_item.py | 4 +- bingads/v13/bulk/entities/bulk_account.py | 57 +++ bingads/v13/bulk/entities/bulk_ad_group.py | 19 + bingads/v13/bulk/entities/bulk_ads.py | 35 +- bingads/v13/bulk/entities/bulk_campaign.py | 87 ++-- bingads/v13/bulk/entities/bulk_video.py | 109 +++++ .../bulk_ad_group_biddable_criterion.py | 2 - .../bulk_campaign_biddable_criterion.py | 2 - .../v13/internal/bulk/bulk_object_factory.py | 1 + bingads/v13/internal/bulk/csv_headers.py | 17 +- bingads/v13/internal/bulk/string_table.py | 16 + bingads/v13/internal/extensions.py | 167 ++++++- .../v13/proxies/production/bulk_service.xml | 7 + .../production/campaignmanagement_service.xml | 418 +++++++++++++++++- .../production/customerbilling_service.xml | 6 +- .../production/customermanagement_service.xml | 74 ++-- .../v13/proxies/sandbox/adinsight_service.xml | 2 +- bingads/v13/proxies/sandbox/bulk_service.xml | 9 +- .../sandbox/campaignmanagement_service.xml | 418 +++++++++++++++++- .../sandbox/customerbilling_service.xml | 6 +- .../sandbox/customermanagement_service.xml | 74 ++-- setup.py | 2 +- 27 files changed, 1431 insertions(+), 196 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_video.py diff --git a/HISTORY.rst b/HISTORY.rst index af8fadd8..50b207a2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,22 @@ .. :changelog: Release History +13.0.10(2021-06-20) ++++++++++++++++++++++++++ + +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes +* Add new msads.manage scope for multi-factor authentication requirement. Eventually msads.manage will be required. Learn more here: https://go.microsoft.com/fwlink/?linkid=2155062 +* Default OAuth scope is set to the new msads.manage scope. Can be overridden temporarily with new oAuthScope parameter (replaces requireLiveConnect). +* Sandbox auth support via login.live-int.com is replaced with login.windows-ppe.net. +* Add BulkVideo for video ads support +* Add mappings for new fields in BulkResponsiveAd: CallToActionLanguage, Videos, Headlines, Descriptions +* Add mappings for new fields in BulkAdGroup: CpvBid, CpmBid +* Update ToBiddingSchemeBulkString(this BiddingScheme biddingScheme) to support MaxRoas, ManualCpv and ManualCpm +* Add mappings for new fields in BulkAccount: AdClickParallelTracking, AutoApplyRecommendations, AllowImageAutoRetrieve +* Conjunctive normal form (CNF) support is added to PageVisitorsRule and mapped in the BulkRemarketingList remarketing rule. Previously Microsoft Advertising only supported disjunctive normal form (DNF). You must ensure that your application can appropriately read and distinguish between CNF and DNF. Your application should no longer assume that the rule is disjunctive. +* Add mapping for new MultimediaAdsBidAdjustment field in BulkCampaign and BulkAdGroup +* Fix issue of DSA setting not being exported for Search Campaign + 13.0.9.1(2021-04-29) +++++++++++++++++++++++++ * Fix issue of missing proxies. diff --git a/bingads/authorization.py b/bingads/authorization.py index cbaf6b02..37e6c35c 100644 --- a/bingads/authorization.py +++ b/bingads/authorization.py @@ -11,6 +11,9 @@ PRODUCTION='production' SANDBOX='sandbox' +MSADS_MANAGE='msads.manage' +ADS_MANAGE='ads.manage' +BINGADS_MANAGE='bingads.manage' class AuthorizationData: """ Represents a user who intends to access the corresponding customer and account. @@ -285,7 +288,7 @@ class OAuthAuthorization(Authentication): * :class:`.OAuthWebAuthCodeGrant` """ - def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, require_live_connect=False, tenant='common'): + def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common'): """ Initializes a new instance of the OAuthAuthorization class. :param client_id: The client identifier corresponding to your registered application. @@ -301,7 +304,7 @@ def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, require_live_co self._oauth_tokens = oauth_tokens self._state = None self.environment=env - self._require_live_connect=require_live_connect + self._oauth_scope=oauth_scope self._tenant = tenant @property @@ -384,7 +387,7 @@ class OAuthWithAuthorizationCode(OAuthAuthorization): For more information about registering a Bing Ads application, see http://go.microsoft.com/fwlink/?LinkID=511607. """ - def __init__(self, client_id, client_secret, redirection_uri, token_refreshed_callback=None, oauth_tokens=None, env=PRODUCTION, require_live_connect=False, tenant="common"): + def __init__(self, client_id, client_secret, redirection_uri, token_refreshed_callback=None, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant="common"): """ Initialize a new instance of this class. :param client_id: The client identifier corresponding to your registered application. @@ -401,7 +404,7 @@ def __init__(self, client_id, client_secret, redirection_uri, token_refreshed_ca :return: """ - super(OAuthWithAuthorizationCode, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, require_live_connect=require_live_connect, tenant=tenant) + super(OAuthWithAuthorizationCode, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, oauth_scope=oauth_scope, tenant=tenant) self._client_secret = client_secret self._redirection_uri = redirection_uri self._token_refreshed_callback = token_refreshed_callback @@ -412,8 +415,8 @@ def get_authorization_endpoint(self): :return: The Microsoft Account authorization endpoint. :rtype: str """ - endpoint_url = _UriOAuthService.AUTHORIZE_URI[(self.environment, self._require_live_connect)] - if self.environment == PRODUCTION and self._require_live_connect == False: + endpoint_url = _UriOAuthService.AUTHORIZE_URI[(self.environment, self._oauth_scope)] + if self.environment == PRODUCTION and (self._oauth_scope == MSADS_MANAGE or self._oauth_scope == ADS_MANAGE): endpoint_url = endpoint_url.replace('common', self.tenant); endpoint = str.format( @@ -453,7 +456,7 @@ def request_oauth_tokens_by_response_uri(self, response_uri, **kwargs): grant_type='authorization_code', environment=self.environment, code=code, - requireliveconnect=self._require_live_connect, + oauth_scope=self._oauth_scope, tenant=self.tenant, **kwargs ) @@ -480,8 +483,8 @@ def request_oauth_tokens_by_refresh_token(self, refresh_token): grant_type='refresh_token', refresh_token=refresh_token, environment=self.environment, - scope=_UriOAuthService.SCOPE[(self.environment, self._require_live_connect)], - requireliveconnect=self._require_live_connect, + scope=_UriOAuthService.SCOPE[(self.environment, self._oauth_scope)], + oauth_scope=self._oauth_scope, tenant = self.tenant ) if self.token_refreshed_callback is not None: @@ -543,7 +546,7 @@ class OAuthDesktopMobileAuthCodeGrant(OAuthWithAuthorizationCode): For more information about registering a Bing Ads application, see http://go.microsoft.com/fwlink/?LinkID=511607. """ - def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, require_live_connect=False, tenant='common'): + def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common'): """ Initializes a new instance of the this class with the specified client id. :param client_id: The client identifier corresponding to your registered application. @@ -555,10 +558,10 @@ def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, require_live_co super(OAuthDesktopMobileAuthCodeGrant, self).__init__( client_id, None, - _UriOAuthService.REDIRECTION_URI[(env, require_live_connect)], + _UriOAuthService.REDIRECTION_URI[(env, oauth_scope)], oauth_tokens=oauth_tokens, env=env, - require_live_connect=require_live_connect, + oauth_scope=oauth_scope, tenant=tenant ) @@ -593,7 +596,7 @@ class OAuthDesktopMobileImplicitGrant(OAuthAuthorization): """ - def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, require_live_connect=False, tenant='common'): + def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common'): """ Initializes a new instance of the this class with the specified client id. :param client_id: The client identifier corresponding to your registered application. @@ -602,7 +605,7 @@ def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, require_live_co :type oauth_tokens: OAuthTokens """ - super(OAuthDesktopMobileImplicitGrant, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, require_live_connect=require_live_connect, tenant=tenant) + super(OAuthDesktopMobileImplicitGrant, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, oauth_scope=oauth_scope, tenant=tenant) @@ -613,14 +616,14 @@ def get_authorization_endpoint(self): :rtype: str """ - endpoint_url = _UriOAuthService.AUTHORIZE_URI[(self.environment, self._require_live_connect)] - if self.environment == PRODUCTION and self._require_live_connect == False: + endpoint_url = _UriOAuthService.AUTHORIZE_URI[(self.environment, self._oauth_scope)] + if self.environment == PRODUCTION and (self._oauth_scope == MSADS_MANAGE or self._oauth_scope == ADS_MANAGE): endpoint_url = endpoint_url.replace('common', self.tenant); endpoint = str.format( endpoint_url, self.client_id, 'token', - _UriOAuthService.REDIRECTION_URI[(self.environment, self._require_live_connect)], + _UriOAuthService.REDIRECTION_URI[(self.environment, self._oauth_scope)], ) return endpoint if self.state is None else endpoint + '&state=' + self.state @@ -650,7 +653,7 @@ def extract_access_token_from_uri(self, redirection_uri): @property def redirection_uri(self): - return _UriOAuthService.REDIRECTION_URI[(self.environment, self._require_live_connect)] + return _UriOAuthService.REDIRECTION_URI[(self.environment, self._oauth_scope)] class _UriOAuthService: @@ -659,21 +662,29 @@ class _UriOAuthService: def __init__(self): pass - REDIRECTION_URI={(PRODUCTION, True):'https://login.live.com/oauth20_desktop.srf', - (PRODUCTION, False):'https://login.microsoftonline.com/common/oauth2/nativeclient', - (SANDBOX, False):'https://login.live-int.com/oauth20_desktop.srf' + REDIRECTION_URI={ + (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/nativeclient', + (PRODUCTION, ADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/nativeclient', + (PRODUCTION, BINGADS_MANAGE): 'https://login.live.com/oauth20_desktop.srf', + (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/common/oauth2/nativeclient' } - AUTH_TOKEN_URI={(PRODUCTION, True):'https://login.live.com/oauth20_token.srf', - (PRODUCTION, False):'https://login.microsoftonline.com/common/oauth2/v2.0/token', - (SANDBOX, False):'https://login.live-int.com/oauth20_token.srf' + AUTH_TOKEN_URI={ + (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/token', + (PRODUCTION, ADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/token', + (PRODUCTION, BINGADS_MANAGE): 'https://login.live.com/oauth20_token.srf', + (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/consumers/oauth2/v2.0/token' } - AUTHORIZE_URI={(PRODUCTION, True):'https://login.live.com/oauth20_authorize.srf?client_id={0}&scope=bingads.manage&response_type={1}&redirect_uri={2}', - (PRODUCTION, False):'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fads.microsoft.com%2Fads.manage%20offline_access&response_type={1}&redirect_uri={2}', - (SANDBOX, False):'https://login.live-int.com/oauth20_authorize.srf?client_id={0}&scope=bingads.manage&response_type={1}&redirect_uri={2}&prompt=login' + AUTHORIZE_URI={ + (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fads.microsoft.com%2Fmsads.manage%20offline_access&response_type={1}&redirect_uri={2}', + (PRODUCTION, ADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fads.microsoft.com%2Fads.manage%20offline_access&response_type={1}&redirect_uri={2}', + (PRODUCTION, BINGADS_MANAGE): 'https://login.live.com/oauth20_authorize.srf?client_id={0}&scope=bingads.manage&response_type={1}&redirect_uri={2}', + (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/consumers/oauth2/v2.0/authorize?client_id={0}&scope=https://api.ads.microsoft.com/msads.manage%20offline_access&response_type={1}&redirect_uri={2}&prompt=login' } - SCOPE={(PRODUCTION, True):'bingads.manage', - (PRODUCTION, False):'https://ads.microsoft.com/ads.manage offline_access', - (SANDBOX, False):'bingads.manage' + SCOPE={ + (PRODUCTION, MSADS_MANAGE): 'https://ads.microsoft.com/msads.manage offline_access', + (PRODUCTION, ADS_MANAGE): 'https://ads.microsoft.com/ads.manage offline_access', + (PRODUCTION, BINGADS_MANAGE): 'bingads.manage', + (SANDBOX, MSADS_MANAGE): 'https://api.ads.microsoft.com/msads.manage offline_access' } @staticmethod @@ -689,10 +700,10 @@ def get_access_token(**kwargs): if 'client_secret' in kwargs and kwargs['client_secret'] is None: del kwargs['client_secret'] - if 'requireliveconnect' in kwargs and kwargs['requireliveconnect'] == True: + if 'oauth_scope' in kwargs and kwargs['oauth_scope'] == 'bingads.manage': del kwargs['tenant'] - auth_token_url = _UriOAuthService.AUTH_TOKEN_URI[(kwargs['environment'], kwargs['requireliveconnect'])] + auth_token_url = _UriOAuthService.AUTH_TOKEN_URI[(kwargs['environment'], kwargs['oauth_scope'])] if 'tenant' in kwargs and kwargs['tenant'] is not None: auth_token_url = auth_token_url.replace('common', kwargs['tenant']) diff --git a/bingads/manifest.py b/bingads/manifest.py index a9d972ff..b45b42c8 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.9.1' +VERSION = '13.0.10' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index 8f05fb1e..74a460b5 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -30,4 +30,5 @@ from .bulk_offline_conversion import * from .bulk_experiment import * from .bulk_image import * +from .bulk_video import * from .feeds import * diff --git a/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_audience_association.py b/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_audience_association.py index d90eef25..fa4b7d7e 100644 --- a/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_audience_association.py +++ b/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_audience_association.py @@ -4,7 +4,6 @@ from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.extensions import * -from docutils.nodes import row class BulkCampaignNegativeAudienceAssociation(BulkCampaignNegativeCriterion): diff --git a/bingads/v13/bulk/entities/audiences/bulk_customer_list_item.py b/bingads/v13/bulk/entities/audiences/bulk_customer_list_item.py index eb254ded..4f2899cd 100644 --- a/bingads/v13/bulk/entities/audiences/bulk_customer_list_item.py +++ b/bingads/v13/bulk/entities/audiences/bulk_customer_list_item.py @@ -31,6 +31,8 @@ def __init__(self, audience=None, parent_id=None, sub_type=None, text = None): def audience(self): """ the audience, see more detail at: https://go.microsoft.com/fwlink/?linkid=846127 + + :rtype: str """ return self._audience @@ -87,7 +89,7 @@ def text(self, value): _SimpleBulkMapping( header=_StringTable.Audience, field_to_csv=lambda c: bulk_str(c.audience), - csv_to_field=lambda c, v: setattr(c, 'audience', ve) + csv_to_field=lambda c, v: setattr(c, 'audience', v) ), _SimpleBulkMapping( header=_StringTable.SubType, diff --git a/bingads/v13/bulk/entities/bulk_account.py b/bingads/v13/bulk/entities/bulk_account.py index 6f3c99d4..8a48b493 100644 --- a/bingads/v13/bulk/entities/bulk_account.py +++ b/bingads/v13/bulk/entities/bulk_account.py @@ -28,6 +28,9 @@ def __init__(self, account_id=None, customer_id=None, sync_time=None): self._profile_expansion_enabled = None self._tracking_url_template = None self._final_url_suffix = None + self._ad_click_parallel_tracking=None + self._auto_apply_recommendations = None + self._allow_image_auto_retrieve = None @property def id(self): @@ -111,6 +114,45 @@ def final_url_suffix(self): @final_url_suffix.setter def final_url_suffix(self, v): self._final_url_suffix = v + + @property + def ad_click_parallel_tracking(self): + """ The setting of parallel tracking in the account. + + :return: The setting of parallel tracking of the account + :rtype: bool + """ + return self._ad_click_parallel_tracking + + @ad_click_parallel_tracking.setter + def ad_click_parallel_tracking(self, v): + self._ad_click_parallel_tracking = v + + @property + def allow_image_auto_retrieve(self): + """ The setting of allowing image auto retrieve in the account. + + :return: The setting of allowing image auto retrieve of the account + :rtype: bool + """ + return self._allow_image_auto_retrieve + + @allow_image_auto_retrieve.setter + def allow_image_auto_retrieve(self, v): + self._allow_image_auto_retrieve = v + + @property + def auto_apply_recommendations(self): + """ The setting of allowing image auto retrieve in the account. + + :return: The setting of allowing image auto retrieve of the account + :rtype: dict + """ + return self._auto_apply_recommendations + + @auto_apply_recommendations.setter + def auto_apply_recommendations(self, v): + self._auto_apply_recommendations = v _MAPPINGS = [ _SimpleBulkMapping( @@ -153,6 +195,21 @@ def final_url_suffix(self, v): field_to_csv=lambda c: bulk_str(c.profile_expansion_enabled), csv_to_field=lambda c, v: setattr(c, '_profile_expansion_enabled', parse_bool(v)) ), + _SimpleBulkMapping( + header=_StringTable.AdClickParallelTracking, + field_to_csv=lambda c: bulk_str(c.ad_click_parallel_tracking), + csv_to_field=lambda c, v: setattr(c, 'ad_click_parallel_tracking', parse_bool(v)) + ), + _SimpleBulkMapping( + header=_StringTable.AllowImageAutoRetrieve, + field_to_csv=lambda c: bulk_str(c.allow_image_auto_retrieve), + csv_to_field=lambda c, v: setattr(c, 'allow_image_auto_retrieve', parse_bool(v)) + ), + _SimpleBulkMapping( + header=_StringTable.AutoApplyRecommendations, + field_to_csv=lambda c: dict_bulk_str(c.auto_apply_recommendations, ';'), + csv_to_field=lambda c, v: setattr(c, 'auto_apply_recommendations', parse_dict(v)) + ) ] def process_mappings_from_row_values(self, row_values): diff --git a/bingads/v13/bulk/entities/bulk_ad_group.py b/bingads/v13/bulk/entities/bulk_ad_group.py index 04e56dc2..1d995322 100644 --- a/bingads/v13/bulk/entities/bulk_ad_group.py +++ b/bingads/v13/bulk/entities/bulk_ad_group.py @@ -189,6 +189,16 @@ def quality_score_data(self): field_to_csv=lambda c: ad_group_bid_bulk_str(c.ad_group.CpcBid), csv_to_field=lambda c, v: setattr(c.ad_group, 'CpcBid', parse_ad_group_bid(v)) ), + _SimpleBulkMapping( + header=_StringTable.CpvBid, + field_to_csv=lambda c: ad_group_bid_bulk_str(c.ad_group.CpvBid), + csv_to_field=lambda c, v: setattr(c.ad_group, 'CpvBid', parse_ad_group_bid(v)) + ), + _SimpleBulkMapping( + header=_StringTable.CpmBid, + field_to_csv=lambda c: ad_group_bid_bulk_str(c.ad_group.CpmBid), + csv_to_field=lambda c, v: setattr(c.ad_group, 'CpmBid', parse_ad_group_bid(v)) + ), _SimpleBulkMapping( header=_StringTable.Language, field_to_csv=lambda c: bulk_str(c.ad_group.Language), @@ -243,6 +253,15 @@ def quality_score_data(self): field_to_csv=lambda c: c.ad_group.AdGroupType, csv_to_field=lambda c, v: setattr(c.ad_group, 'AdGroupType', v) ), + _SimpleBulkMapping( + header=_StringTable.MultiMediaAdBidAdjustment, + field_to_csv=lambda c: bulk_str(c.ad_group.MultimediaAdsBidAdjustment), + csv_to_field=lambda c, v: setattr( + c.ad_group, + 'MultimediaAdsBidAdjustment', + int(v) if v else None + ) + ), ] diff --git a/bingads/v13/bulk/entities/bulk_ads.py b/bingads/v13/bulk/entities/bulk_ads.py index 895943f5..51aee7e9 100644 --- a/bingads/v13/bulk/entities/bulk_ads.py +++ b/bingads/v13/bulk/entities/bulk_ads.py @@ -650,7 +650,32 @@ def responsive_ad(self, responsive_ad): header=_StringTable.ImpressionTrackingUrls, field_to_csv=lambda c: field_to_csv_Urls(c.responsive_ad.ImpressionTrackingUrls, c.ad.Id), csv_to_field=lambda c, v: csv_to_field_Urls(c.responsive_ad.ImpressionTrackingUrls, v) - ) + ), + _SimpleBulkMapping( + header=_StringTable.Descriptions, + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_ad.Descriptions), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_ad.Descriptions ,v) + ), + _SimpleBulkMapping( + header=_StringTable.Headlines, + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_ad.Headlines), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_ad.Headlines, v) + ), + _SimpleBulkMapping( + header=_StringTable.Videos, + field_to_csv=lambda c: field_to_csv_VideoAssetLinks(c.responsive_ad.Videos), + csv_to_field=lambda c, v: csv_to_field_VideoAssetLinks(c.responsive_ad.Videos, v) + ), + _SimpleBulkMapping( + header=_StringTable.CallToActionLanguage, + field_to_csv=lambda c: c.responsive_ad.CallToActionLanguage, + csv_to_field=lambda c, v: setattr(c.responsive_ad, 'CallToActionLanguage', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.LongHeadlines, + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_ad.LongHeadlines), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_ad.LongHeadlines ,v) + ), ] def process_mappings_from_row_values(self, row_values): @@ -725,13 +750,13 @@ def responsive_search_ad(self, rsa): ), _SimpleBulkMapping( header=_StringTable.Headline, - field_to_csv=lambda c: field_to_csv_Rsa_TextAssetLinks(c.responsive_search_ad.Headlines), - csv_to_field=lambda c, v: csv_to_field_Rsa_TextAssetLinks(c.responsive_search_ad.Headlines, v) + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_search_ad.Headlines), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_search_ad.Headlines, v) ), _SimpleBulkMapping( header=_StringTable.Description, - field_to_csv=lambda c: field_to_csv_Rsa_TextAssetLinks(c.responsive_search_ad.Descriptions), - csv_to_field=lambda c, v: csv_to_field_Rsa_TextAssetLinks(c.responsive_search_ad.Descriptions ,v) + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_search_ad.Descriptions), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_search_ad.Descriptions ,v) ) ] diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index 90ac4576..f2631d8a 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -118,8 +118,10 @@ def _get_setting(self, setting_type, setting_name): return None settings = [setting for setting in self.campaign.Settings.Setting if isinstance(setting, setting_type)] - if len(settings) != 1: - raise ValueError('Can only have 1 ' + setting_name + ' in Campaign Settings.') + if len(settings) > 1: + raise ValueError('Can only have 1 ' + setting_name + ' at most in Campaign Settings.') + elif len(settings) == 0: + return None return settings[0] @staticmethod @@ -269,88 +271,80 @@ def _read_source(c, v): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - dsa_setting.Source = v + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + dsa_setting.Source = v @staticmethod def _write_source(c): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - return bulk_str(dsa_setting.Source) + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + return bulk_str(dsa_setting.Source) @staticmethod def _read_domain_language(c, v): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - dsa_setting.Language = v + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + dsa_setting.Language = v @staticmethod def _write_domain_language(c): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - return bulk_str(dsa_setting.Language) + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + return bulk_str(dsa_setting.Language) @staticmethod def _read_page_feed_ids(c, v): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - dsa_setting.PageFeedIds.long = csv_to_field_PageFeedIds(v) + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + dsa_setting.PageFeedIds.long = csv_to_field_PageFeedIds(v) @staticmethod def _write_page_feed_ids(c): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - return field_to_csv_Ids(dsa_setting.PageFeedIds, c.campaign.Id) + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + return field_to_csv_Ids(dsa_setting.PageFeedIds, c.campaign.Id) @staticmethod def _read_website(c, v): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - dsa_setting.DomainName = v + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + dsa_setting.DomainName = v @staticmethod def _write_website(c): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - if 'dynamicsearchads' in campgaign_types: - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - return bulk_str(dsa_setting.DomainName) + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + return bulk_str(dsa_setting.DomainName) _MAPPINGS = [ _SimpleBulkMapping( @@ -513,6 +507,15 @@ def _write_website(c): field_to_csv=lambda c: field_to_csv_UseSearcherTimeZone(c.campaign.AdScheduleUseSearcherTimeZone, None), csv_to_field=lambda c, v: setattr(c.campaign, 'AdScheduleUseSearcherTimeZone', parse_bool(v)) ), + _SimpleBulkMapping( + header=_StringTable.MultiMediaAdBidAdjustment, + field_to_csv=lambda c: bulk_str(c.campaign.MultimediaAdsBidAdjustment), + csv_to_field=lambda c, v: setattr( + c.campaign, + 'MultimediaAdsBidAdjustment', + int(v) if v else None + ) + ), ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/bulk/entities/bulk_video.py b/bingads/v13/bulk/entities/bulk_video.py new file mode 100644 index 00000000..7be37110 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_video.py @@ -0,0 +1,109 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * +from decimal import Decimal + + +class BulkVideo(_SingleRecordBulkEntity): + """ Represents a video that can be read or written in a bulk file. + + Properties of this class and of classes that it is derived from, correspond to fields of the Video record in a bulk file. + For more information, see Video at https://go.microsoft.com/fwlink/?linkid=846127 + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, video=None, account_id=None): + super(BulkVideo, self).__init__() + self._account_id = account_id + self._video=video + + @property + def video(self): + """ + the Video object + """ + return self._video + + @video.setter + def video(self, value): + self._video = value + + @property + def account_id(self): + """ the id of the account which contains the video + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: long + """ + return self._account_id + + @account_id.setter + def account_id(self, value): + self._account_id = value + + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.video.Id), + csv_to_field=lambda c, v: setattr(c.video, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.account_id), + csv_to_field=lambda c, v: setattr(c, 'account_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: c.video.Status, + csv_to_field=lambda c, v: setattr(c.video, 'Status', v) + ), + _SimpleBulkMapping( + header=_StringTable.Description, + field_to_csv=lambda c: bulk_str(c.video.Description), + csv_to_field=lambda c, v: setattr(c.video, 'Description', v) + ), + _SimpleBulkMapping( + header=_StringTable.AspectRatio, + field_to_csv=lambda c: bulk_str(c.video.AspectRatio), + csv_to_field=lambda c, v: setattr(c.video, 'AspectRatio', v) + ), + _SimpleBulkMapping( + header=_StringTable.Url, + field_to_csv=lambda c: bulk_str(c.video.Url), + csv_to_field=lambda c, v: setattr(c.video, 'Url', v) + ), + _SimpleBulkMapping( + header=_StringTable.SourceUrl, + field_to_csv=lambda c: bulk_str(c.video.SourceUrl), + csv_to_field=lambda c, v: setattr(c.video, 'SourceUrl', v) + ), + _SimpleBulkMapping( + header=_StringTable.ThumbnailUrl, + field_to_csv=lambda c: bulk_str(c.video.ThumbnailUrl), + csv_to_field=lambda c, v: setattr(c.video, 'ThumbnailUrl', v) + ), + _SimpleBulkMapping( + header=_StringTable.DurationInMillionSeconds, + field_to_csv=lambda c: bulk_str(c.video.DurationInMilliseconds), + csv_to_field=lambda c, v: setattr(c.video, 'DurationInMilliseconds', int(v) if v else None) + ) + ] + + def process_mappings_from_row_values(self, row_values): + self.video=_CAMPAIGN_OBJECT_FACTORY_V13.create('Video') + row_values.convert_to_entity(self, BulkVideo._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkVideo._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkVideo, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py index 17657afa..12e9bf22 100644 --- a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_biddable_criterion.py @@ -115,8 +115,6 @@ def process_mappings_from_row_values(self, row_values): self.create_criterion() self._biddable_ad_group_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') self._biddable_ad_group_criterion.CriterionBid.Type = 'BidMultiplier' - self._biddable_ad_group_criterion.CriterionCashback = _CAMPAIGN_OBJECT_FACTORY_V13.create('CashbackAdjustment') - self._biddable_ad_group_criterion.CriterionCashback.Type = 'CashbackAdjustment' row_values.convert_to_entity(self, BulkAdGroupBiddableCriterion._MAPPINGS) def create_criterion(self): diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py index 8655e3fd..7f3c5f4f 100644 --- a/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py +++ b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_biddable_criterion.py @@ -93,8 +93,6 @@ def process_mappings_from_row_values(self, row_values): self.create_criterion() self._biddable_campaign_criterion.CriterionBid = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') self._biddable_campaign_criterion.CriterionBid.Type = 'BidMultiplier' - self._biddable_campaign_criterion.CriterionCashback = _CAMPAIGN_OBJECT_FACTORY_V13.create('CashbackAdjustment') - self._biddable_campaign_criterion.CriterionCashback.Type = 'CashbackAdjustment' row_values.convert_to_entity(self, BulkCampaignBiddableCriterion._MAPPINGS) def create_criterion(self): diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 5b0717b4..98c71c39 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -9,6 +9,7 @@ class _BulkObjectFactory(): INDIVIDUAL_ENTITY_MAP = { _StringTable.Image: _EntityInfo(lambda: BulkImage()), + _StringTable.Video: _EntityInfo(lambda: BulkVideo()), _StringTable.Account: _EntityInfo(lambda: BulkAccount()), _StringTable.Budget: _EntityInfo(lambda: BulkBudget()), _StringTable.BidStrategy: _EntityInfo(lambda: BulkBidStrategy()), diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 072b3e4a..e5bf581d 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -15,6 +15,7 @@ class _CsvHeaders: _StringTable.SyncTime, _StringTable.ClientId, _StringTable.LastModifiedTime, + _StringTable.MultiMediaAdBidAdjustment, # Campaign _StringTable.TimeZone, @@ -29,6 +30,8 @@ class _CsvHeaders: _StringTable.NetworkDistribution, _StringTable.AdRotation, _StringTable.CpcBid, + _StringTable.CpvBid, + _StringTable.CpmBid, _StringTable.Language, _StringTable.PrivacyStatus, _StringTable.AdGroupType, @@ -125,6 +128,11 @@ class _CsvHeaders: # Image _StringTable.Height, _StringTable.Width, + + # Video + _StringTable.SourceUrl, + _StringTable.AspectRatio, + _StringTable.DurationInMillionSeconds, # Callout Ad Extension _StringTable.CalloutText, @@ -331,9 +339,14 @@ class _CsvHeaders: _StringTable.LandscapeImageMediaId, _StringTable.LandscapeLogoMediaId, _StringTable.LongHeadline, + _StringTable.LongHeadlines, _StringTable.SquareImageMediaId, _StringTable.SquareLogoMediaId, _StringTable.ImpressionTrackingUrls, + _StringTable.Headlines, + _StringTable.Descriptions, + _StringTable.CallToActionLanguage, + _StringTable.Videos, # Ad Scheduling _StringTable.AdSchedule, @@ -390,7 +403,9 @@ class _CsvHeaders: _StringTable.MSCLKIDAutoTaggingEnabled, _StringTable.IncludeViewThroughConversions, _StringTable.ProfileExpansionEnabled, - + _StringTable.AdClickParallelTracking, + _StringTable.AutoApplyRecommendations, + _StringTable.AllowImageAutoRetrieve, _StringTable.FinalUrlSuffix, # Feeds diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 9a8007f3..ffd1f89c 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -75,6 +75,8 @@ class _StringTable: NetworkDistribution = "Network Distribution" Language = "Language" CpcBid = "Cpc Bid" + CpvBid = "Cpv Bid" + CpmBid = "Cpm Bid" AdRotation = "Ad Rotation" PrivacyStatus = "Privacy Status" Account = "Account" @@ -85,6 +87,10 @@ class _StringTable: AdFormatPreference = "Ad Format Preference" IncludeViewThroughConversions = "Include View Through Conversions" ProfileExpansionEnabled = "Profile Expansion Enabled" + AdClickParallelTracking = "Ad Click Parallel Tracking" + AutoApplyRecommendations = "Auto Apply Recommendations" + AllowImageAutoRetrieve = "Allow Image Auto Retrieve" + MultiMediaAdBidAdjustment = "Multi Media Ad Bid Adjustment" # Entity Types SemanticVersion = "Format Version" @@ -508,15 +514,25 @@ class _StringTable: LandscapeImageMediaId = "Landscape Image Media Id" LandscapeLogoMediaId = "Landscape Logo Media Id" LongHeadline = "Long Headline" + LongHeadlines = "Long Headlines" SquareImageMediaId = "Square Image Media Id" SquareLogoMediaId = "Square Logo Media Id" ImpressionTrackingUrls = "Impression Tracking Urls" + CallToActionLanguage = "Call To Action Language" + Descriptions = "Descriptions" + Headlines = "Headlines" + Videos = "Videos" #Image Image = "Image" Height = "Height" Width = "Width" + # Video + Video = "Video" + SourceUrl = "Source Url" + AspectRatio = "Aspect Ratio" + DurationInMillionSeconds = "Duration In Milliseconds" # Responsive Search Ad ResponsiveSearchAd = "Responsive Search Ad" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index af809760..93762b93 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -30,6 +30,7 @@ CustomEventsRule = _CAMPAIGN_OBJECT_FACTORY_V13.create('CustomEventsRule') StringOperator = _CAMPAIGN_OBJECT_FACTORY_V13.create('StringOperator') NumberOperator = _CAMPAIGN_OBJECT_FACTORY_V13.create('NumberOperator') +NormalForm = _CAMPAIGN_OBJECT_FACTORY_V13.create('NormalForm') AudienceCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('AudienceCriterion') BidMultiplier = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') @@ -46,6 +47,7 @@ CoOpSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CoOpSetting')) TextAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TextAsset')) ImageAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset')) +VideoAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAsset')) def bulk_str(value): if value is None or (hasattr(value, 'value') and value.value is None): @@ -316,6 +318,18 @@ def field_to_csv_UrlCustomParameters(entity): params.append('{{_{0}}}={1}'.format(parameter.Key, escape_parameter_text(parameter.Value))) return '; '.join(params) +def dict_bulk_str(parameters, separator): + if parameters is None or len(parameters) == 0: + return None + return separator.join(["{0}={1}".format(key, parameters[key]) for key in parameters]) + +def parse_dict(value): + if value is None or value.strip() == '': + return + + return dict([s.split('=') for s in value.split(';') if len(s) > 0]) + pass + def csv_to_field_UrlCustomParameters(entity, value): if value is None or value.strip() == '': @@ -403,6 +417,10 @@ def field_to_csv_BidStrategyType(entity): return 'MaxConversions' elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpcBiddingScheme')): return 'ManualCpc' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpmBiddingScheme')): + return 'ManualCpcm' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpvBiddingScheme')): + return 'ManualCpv' elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetCpaBiddingScheme')): return 'TargetCpa' elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('MaxClicksBiddingScheme')): @@ -411,8 +429,10 @@ def field_to_csv_BidStrategyType(entity): return 'MaxConversionValue' elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetRoasBiddingScheme')): return 'TargetRoas' - elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetImpressionShare')): + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetImpressionShareBiddingScheme')): return 'TargetImpressionShare' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('MaxRoasBiddingScheme')): + return 'MaxRoas' else: raise TypeError('Unsupported Bid Strategy Type') @@ -434,20 +454,22 @@ def csv_to_field_BidStrategyType(entity, value): entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('MaxConversionsBiddingScheme') elif value == 'ManualCpc': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpcBiddingScheme') + elif value == 'ManualCpm': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpmBiddingScheme') + elif value == 'ManualCpv': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpvBiddingScheme') elif value == 'TargetCpa': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('TargetCpaBiddingScheme') elif value == 'MaxClicks': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('MaxClicksBiddingScheme') - elif value == 'TargetRoas': - entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('TargetRoasBiddingScheme') elif value == 'MaxConversionValue': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('MaxConversionValueBiddingScheme') + elif value == 'TargetRoas': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('TargetRoasBiddingScheme') elif value == 'TargetImpressionShare': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('TargetImpressionShareBiddingScheme') - elif value == 'ManualCpv': - entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpvBiddingScheme') - elif value == 'ManualCpm': - entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpmBiddingScheme') + elif value == 'MaxRoas': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('MaxRoasBiddingScheme') else: raise ValueError('Unknown Bid Strategy Type') entity.BiddingScheme.Type = value @@ -462,8 +484,69 @@ def field_to_csv_delimited_strings(entity): return ';'.join(entity.string) return None +def field_to_csv_VideoAssetLinks(assetLinks): + if assetLinks is None or assetLinks.AssetLink is None: + return None + assetLinkContracts = [] + for assetLink in assetLinks.AssetLink: + if assetLink.Asset is not None and isinstance(assetLink.Asset, VideoAsset_Type): + contract = {} + contract['assetPerformanceLabel'] = assetLink.AssetPerformanceLabel if hasattr(assetLink, 'AssetPerformanceLabel') else None + contract['editorialStatus'] = assetLink.EditorialStatus if hasattr(assetLink, 'EditorialStatus') else None + contract['id'] = assetLink.Asset.Id if hasattr(assetLink.Asset, 'Id') else None + contract['name'] = assetLink.Asset.Name if hasattr(assetLink.Asset, 'Name') else None + contract['pinnedField'] = assetLink.PinnedField if hasattr(assetLink, 'PinnedField') else None + contract['subType'] = assetLink.Asset.SubType if hasattr(assetLink.Asset, 'SubType') else None + thumbnailImage = assetLink.Asset.ThumbnailImage if hasattr(assetLink.Asset, 'ThumbnailImage') else None + if thumbnailImage != None: + contract['thumbnailImage'] = {} + contract['thumbnailImage']['id'] = thumbnailImage.Id + contract['thumbnailImage']['name'] = thumbnailImage.Name + contract['thumbnailImage']['type'] = thumbnailImage.Type + contract['thumbnailImage']['subType'] = thumbnailImage.SubType + contract['thumbnailImage']['cropX'] = thumbnailImage.CropX + contract['thumbnailImage']['cropY'] = thumbnailImage.CropY + contract['thumbnailImage']['cropWidth'] = thumbnailImage.CropWidth + contract['thumbnailImage']['cropHeight'] = thumbnailImage.CropHeight + assetLinkContracts.append(contract) + if len(assetLinkContracts) > 0: + return json.dumps(assetLinkContracts, sort_keys = True) + return None + + pass + +def csv_to_field_VideoAssetLinks(assetLinks, value): + if value is None or value == '': + return + assetLinkContracts = json.loads(value) + for assetLinkContract in assetLinkContracts: + asset_link = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetLink') + asset_link.Asset = _CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAsset') + asset_link.Asset.Type = 'VideoAsset' + asset_link.Asset.Id = assetLinkContract.get('id') + asset_link.Asset.Name = assetLinkContract.get('name') + asset_link.Asset.SubType = assetLinkContract.get('subType') + asset_link.AssetPerformanceLabel = assetLinkContract.get('assetPerformanceLabel') + asset_link.PinnedField = assetLinkContract.get('pinnedField') + asset_link.EditorialStatus = assetLinkContract.get('editorialStatus') + thumbnailImageContract = assetLinkContract.get('thumbnailImage') + + if thumbnailImageContract != None : + asset_link.Asset.ThumbnailImage = _CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset') + asset_link.Asset.ThumbnailImage.Type = 'ImageAsset' + asset_link.Asset.ThumbnailImage.Id = thumbnailImageContract.get('id') + asset_link.Asset.ThumbnailImage.Name = thumbnailImageContract.get('name') + asset_link.Asset.ThumbnailImage.SubType = thumbnailImageContract.get('subType') + asset_link.Asset.ThumbnailImage.CropX = thumbnailImageContract.get('cropX') + asset_link.Asset.ThumbnailImage.CropY = thumbnailImageContract.get('cropY') + asset_link.Asset.ThumbnailImage.CropWidth = thumbnailImageContract.get('cropWidth') + asset_link.Asset.ThumbnailImage.CropHeight = thumbnailImageContract.get('cropHeight') -def csv_to_field_Rsa_TextAssetLinks(assetLinks, value): + assetLinks.AssetLink.append(asset_link) + + + +def csv_to_field_TextAssetLinks(assetLinks, value): if value is None or value == '': return assetLinkContracts = json.loads(value) @@ -521,7 +604,7 @@ def csv_to_field_ImageAssetLinks(assetLinks, value): asset_link.EditorialStatus = assetLinkContract.get('editorialStatus') assetLinks.AssetLink.append(asset_link) -def field_to_csv_Rsa_TextAssetLinks(entity): +def field_to_csv_TextAssetLinks(entity): if entity is None or entity.AssetLink is None: return None assetLinkContracts = [] @@ -1003,7 +1086,7 @@ def field_to_csv_RemarketingRule(entity): rule = entity.Rule if (isinstance(rule, type(PageVisitorsRule))): - return 'PageVisitors{0}'.format(rule_item_groups_str(rule.RuleItemGroups.RuleItemGroup)) + return 'PageVisitors{0}'.format(rule_item_groups_str(rule.RuleItemGroups.RuleItemGroup, rule.NormalForm)) elif (isinstance(rule, type(PageVisitorsWhoVisitedAnotherPageRule))): return 'PageVisitorsWhoVisitedAnotherPage({0}) and ({1})'.format( rule_item_groups_str(rule.RuleItemGroups.RuleItemGroup), @@ -1020,18 +1103,23 @@ def field_to_csv_RemarketingRule(entity): raise ValueError('Unsupported Remarketing Rule type: {0}'.format(type(entity.RemarketingRule))) -def rule_item_groups_str(groups): +def rule_item_groups_str(groups, nf = NormalForm.Disjunctive): + outerOperator = ' or ' + innerOperator = ' and ' + if nf == NormalForm.Conjunctive: + outerOperator = ' and ' + innerOperator = ' or ' if groups is None or len(groups) == 0: raise ValueError('Remarketing RuleItemGroups is None or empty.') - return ' or '.join(['({0})'.format(rule_items_str(group.Items.RuleItem)) for group in groups]) + return outerOperator.join(['({0})'.format(rule_items_str(group.Items.RuleItem, innerOperator)) for group in groups]) -def rule_items_str(items): +def rule_items_str(items, innerOperator = ' and '): if items is None or len(items) == 0: raise ValueError('Remarketing RuleItem list is None or empty.') - return ' and '.join(['({0} {1} {2})'.format(item.Operand, item.Operator, item.Value) for item in items]) + return innerOperator.join(['({0} {1} {2})'.format(item.Operand, item.Operator, item.Value) for item in items]) def custom_event_rule_str(rule): @@ -1092,7 +1180,7 @@ def csv_to_field_CriterionAudienceId(entity, value): entity.Criterion.AudienceId = value def field_to_csv_CashbackAdjustment(entity): - if entity is None or entity.CriterionCashback is None or entity.CriterionCashback.CashbackPercent is None: + if entity is None or entity.CriterionCashback is None or hasattr(entity.CriterionCashback, "CashbackPercent") == False or entity.CriterionCashback.CashbackPercent is None: return None return bulk_str(entity.CriterionCashback.CashbackPercent) @@ -1100,7 +1188,9 @@ def field_to_csv_CashbackAdjustment(entity): def csv_to_field_CashbackAdjustment(entity, value): if value is None or value == '': return - if entity is not None and entity.CriterionCashback is not None and isinstance(entity.CriterionCashback, type(CashbackAdjustment)): + if entity is not None: + entity.CriterionCashback = _CAMPAIGN_OBJECT_FACTORY_V13.create('CashbackAdjustment') + entity.CriterionCashback.Type = 'CashbackAdjustment' entity.CriterionCashback.CashbackPercent = value def field_to_csv_BidAdjustment(entity): @@ -1360,9 +1450,51 @@ def create_target_setting_detail(token): pass def parse_rule_PageVisitors(rule_str): + patternDNF = ')) or ((' + patternCNF = ')) and ((' + patternAnd = ') and (' + patternOr = ') or (' + rule = _CAMPAIGN_OBJECT_FACTORY_V13.create('PageVisitorsRule') rule.Type = 'PageVisitors' - rule.RuleItemGroups = parse_rule_groups(rule_str) + rule.NormalForm = NormalForm.Disjunctive + rule.RuleItemGroups = _CAMPAIGN_OBJECT_FACTORY_V13.create('ArrayOfRuleItemGroup') + + expressionGroups = rule_str.split(patternDNF) + if len(expressionGroups) == 1: + expressionGroups = rule_str.split(patternCNF) + if len(expressionGroups) == 1: + expressions = rule_str.split(patternOr) + if len(expressions) == 1: + expressions = rule_str.split(patternAnd) + if len(expressions) == 1: + parse_rule_items(rule_str) + else: + rule.NormalForm = NormalForm.Disjunctive + else: + rule.NormalForm = NormalForm.Conjunctive + else: + rule.NormalForm = NormalForm.Conjunctive + + pattern = patternAnd + if rule.NormalForm == NormalForm.Conjunctive: + pattern = patternOr + + for expressionGroup in expressionGroups: + expressionGroup = expressionGroup.strip() + if expressionGroup[0] == '(': + expressionGroup = expressionGroup[1:] + if expressionGroup[-1] == ')': + expressionGroup = expressionGroup[:-1] + + expressions = expressionGroup.split(pattern) + rule_item_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('RuleItemGroup') + for expression in expressions: + item = parse_string_rule_item(expression) + rule_item_group.Items.RuleItem.append(item) + + rule.RuleItemGroups.RuleItemGroup.append(rule_item_group) + return rule @@ -1572,7 +1704,6 @@ def combination_rules_to_bulkstring(combination_rules): if len(combination_rules.CombinationRule) == 0: return None - return '&'.join([r.Operator + '(' + ','.join([str(id) for id in r.AudienceIds.long]) + ')' for r in combination_rules.CombinationRule]) def parse_combination_rules(combination_list, value): diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index dde53e3f..59a142a8 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1023,6 +1023,13 @@ + + + + 137 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 69b003f0..88896a36 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -70,9 +70,9 @@ + - @@ -226,6 +226,7 @@ + @@ -239,6 +240,13 @@ + + + + + + + @@ -254,30 +262,340 @@ - + + + + + + - - + + + + + + + + + + + + + + + - + - - + + + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7 + + + + + + + 28 + + + + + + + 29 + + + + + + + 40 + + + + + + + 30 + + + + + + + 35 + + + + + + + 36 + + + + + + + 55 + + + + + + + 82 + + + + + + + 88 + + + + + + + 109 + + + + + + + 112 + + + + + + + 24 + + + + + + + 137 + + + + + + + 41 + + + + + + + 87 + + + + + + + 19 + + + + + + + 27 + + + + + + + 32 + + + + + + + 26 + + + + + + + 48 + + + + + + + 70 + + + + + + + 68 + + + + + + + 75 + + + + + + + 92 + + + + + + + 106 + + + + + + + 107 + + + + + + + 123 + + + + + + + 98 + + + + + + + 138 + + + + + + + 5 + + + + + + + 71 + + + + + + + 49 + + + + + + + 56 + + + + + + + 1000 + + + + + + @@ -384,6 +702,13 @@ + + + + + + + @@ -616,6 +941,13 @@ + + + + + + + @@ -782,6 +1114,9 @@ + + + @@ -938,6 +1273,13 @@ + + + + + + + @@ -1068,6 +1410,7 @@ + @@ -1252,6 +1595,7 @@ + @@ -1707,13 +2051,20 @@ - + 64 + + + + 128 + + + @@ -2074,6 +2425,15 @@ + + + + + + + + + @@ -2437,6 +2797,7 @@ + @@ -4526,12 +4887,38 @@ + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + @@ -4773,9 +5160,20 @@ + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 23f1d262..23443acc 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -470,6 +470,8 @@ + + @@ -513,7 +515,7 @@ - + @@ -528,7 +530,7 @@ - + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 4a19112f..8bbc3636 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -354,13 +354,14 @@ + - + @@ -379,7 +380,7 @@ - + @@ -395,7 +396,7 @@ - + @@ -423,7 +424,7 @@ - + @@ -435,87 +436,87 @@ - - - - + + + + - + - + - - + + - + - - + + - - - + + + - + - - - - + + + + - + - + @@ -529,30 +530,30 @@ - + - + - + - + - + @@ -567,8 +568,8 @@ - - + + @@ -2115,6 +2116,13 @@ + + + + + + + @@ -2171,6 +2179,8 @@ + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 511a254e..c945fa27 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3049,7 +3049,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index e10d014c..4dd80fc2 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1023,6 +1023,13 @@ + + + + 137 + + + @@ -1677,7 +1684,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 0d32f1be..cbfa48b5 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -70,9 +70,9 @@ + - @@ -226,6 +226,7 @@ + @@ -239,6 +240,13 @@ + + + + + + + @@ -254,30 +262,340 @@ - + + + + + + - - + + + + + + + + + + + + + + + - + - - + + + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7 + + + + + + + 28 + + + + + + + 29 + + + + + + + 40 + + + + + + + 30 + + + + + + + 35 + + + + + + + 36 + + + + + + + 55 + + + + + + + 82 + + + + + + + 88 + + + + + + + 109 + + + + + + + 112 + + + + + + + 24 + + + + + + + 137 + + + + + + + 41 + + + + + + + 87 + + + + + + + 19 + + + + + + + 27 + + + + + + + 32 + + + + + + + 26 + + + + + + + 48 + + + + + + + 70 + + + + + + + 68 + + + + + + + 75 + + + + + + + 92 + + + + + + + 106 + + + + + + + 107 + + + + + + + 123 + + + + + + + 98 + + + + + + + 138 + + + + + + + 5 + + + + + + + 71 + + + + + + + 49 + + + + + + + 56 + + + + + + + 1000 + + + + + + @@ -384,6 +702,13 @@ + + + + + + + @@ -616,6 +941,13 @@ + + + + + + + @@ -782,6 +1114,9 @@ + + + @@ -938,6 +1273,13 @@ + + + + + + + @@ -1068,6 +1410,7 @@ + @@ -1252,6 +1595,7 @@ + @@ -1707,13 +2051,20 @@ - + 64 + + + + 128 + + + @@ -2074,6 +2425,15 @@ + + + + + + + + + @@ -2437,6 +2797,7 @@ + @@ -4526,12 +4887,38 @@ + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + @@ -4773,9 +5160,20 @@ + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index c82ca266..29261642 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -470,6 +470,8 @@ + + @@ -513,7 +515,7 @@ - + @@ -528,7 +530,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index e54c1174..0eae44e5 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -354,13 +354,14 @@ + - + @@ -379,7 +380,7 @@ - + @@ -395,7 +396,7 @@ - + @@ -423,7 +424,7 @@ - + @@ -435,87 +436,87 @@ - - - - + + + + - + - + - - + + - + - - + + - - - + + + - + - - - - + + + + - + - + @@ -529,30 +530,30 @@ - + - + - + - + - + @@ -567,8 +568,8 @@ - - + + @@ -2115,6 +2116,13 @@ + + + + + + + @@ -2171,6 +2179,8 @@ + + diff --git a/setup.py b/setup.py index 673afc36..94629b19 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.9.1' +VERSION = '13.0.10' with open('README.rst', 'r') as f: readme = f.read() From d4acce036156776852d798e01ea4d3a209c16502 Mon Sep 17 00:00:00 2001 From: eric-urban <10719770+eric-urban@users.noreply.github.com> Date: Sun, 20 Jun 2021 09:59:33 -0700 Subject: [PATCH 04/55] update examples for v13-0-10 --- examples/v13/adinsight_example_helper.py | 13 + examples/v13/auth_helper.py | 4 +- examples/v13/bulk_dynamic_search_ads.py | 10 +- .../v13/campaignmanagement_example_helper.py | 894 +++++++++++++++++- .../v13/customerbilling_example_helper.py | 48 + .../v13/customermanagement_example_helper.py | 78 +- examples/v13/dynamic_search_ads.py | 8 +- examples/v13/reporting_example_helper.py | 1 + 8 files changed, 1030 insertions(+), 26 deletions(-) diff --git a/examples/v13/adinsight_example_helper.py b/examples/v13/adinsight_example_helper.py index 55bc0060..9bda62e6 100644 --- a/examples/v13/adinsight_example_helper.py +++ b/examples/v13/adinsight_example_helper.py @@ -155,6 +155,7 @@ def output_auctioninsightkpi(data_object): output_status_message("AboveRate: {0}".format(data_object.AboveRate)) output_status_message("TopOfPageRate: {0}".format(data_object.TopOfPageRate)) output_status_message("OutrankingShare: {0}".format(data_object.OutrankingShare)) + output_status_message("AbsoluteTopOfPageRate: {0}".format(data_object.AbsoluteTopOfPageRate)) output_status_message("* * * End output_auctioninsightkpi * * *") def output_array_of_auctioninsightkpi(data_objects): @@ -1396,6 +1397,18 @@ def output_array_of_auctionsegment(value_sets): for value_set in value_sets['AuctionSegment']: output_auctionsegment(value_set) +def output_auctioninsightkpiadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_auctioninsightkpiadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of AuctionInsightKpiAdditionalField:\n") + for value_set in value_sets['AuctionInsightKpiAdditionalField']: + output_auctioninsightkpiadditionalfield(value_set) + def output_keywordideaattribute(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: diff --git a/examples/v13/auth_helper.py b/examples/v13/auth_helper.py index 0dc27bd7..e88a79b2 100644 --- a/examples/v13/auth_helper.py +++ b/examples/v13/auth_helper.py @@ -15,11 +15,11 @@ # The CLIENT_ID is required and CLIENT_STATE is recommended. # The REFRESH_TOKEN should always be in a secure location. -CLIENT_ID='db41b09d-6e50-4f4a-90ac-5a99caefb52f' +CLIENT_ID='4c0b021c-00c3-4508-838f-d3127e8167ff' CLIENT_STATE='ClientStateGoesHere' REFRESH_TOKEN="refresh.txt" -ALL_CAMPAIGN_TYPES=['Audience DynamicSearchAds Search Shopping'] +ALL_CAMPAIGN_TYPES=['Audience Search Shopping'] ALL_TARGET_CAMPAIGN_CRITERION_TYPES=['Age DayTime Device Gender Location LocationIntent Radius'] ALL_TARGET_AD_GROUP_CRITERION_TYPES=['Age DayTime Device Gender Location LocationIntent Radius'] diff --git a/examples/v13/bulk_dynamic_search_ads.py b/examples/v13/bulk_dynamic_search_ads.py index 522acb8a..e9da02f6 100644 --- a/examples/v13/bulk_dynamic_search_ads.py +++ b/examples/v13/bulk_dynamic_search_ads.py @@ -115,15 +115,14 @@ def main(authorization_data): upload_entities.append(bulk_feed_item) - # To get started with dynamic search ads, first you'll need to add a new Campaign - # with its type set to DynamicSearchAds. When you create the campaign, you'll need to - # include a DynamicSearchAdsSetting that specifies the target web site domain and language. + # To get started with dynamic search ads, first you'll need to add a new Search campaign + # Include a DynamicSearchAdsSetting that specifies the target website domain and language. # Page feeds can be associated at the campaign level via 'Source' and 'Page Feed Ids'. bulk_campaign=BulkCampaign() campaign=set_elements_to_none(campaign_service.factory.create('Campaign')) campaign.BudgetType='DailyBudgetStandard' - campaign.CampaignType=['DynamicSearchAds'] + campaign.CampaignType=['Search'] campaign.DailyBudget=50 languages=campaign_service.factory.create('ns3:ArrayOfstring') languages.string.append('All') @@ -147,12 +146,13 @@ def main(authorization_data): bulk_campaign.campaign=campaign upload_entities.append(bulk_campaign) - # Create a new ad group within the dynamic search ads campaign. + # Create a new ad group with type set to "SearchDynamic" bulk_ad_group=BulkAdGroup() bulk_ad_group.campaign_id=CAMPAIGN_ID_KEY ad_group=set_elements_to_none(campaign_service.factory.create('AdGroup')) ad_group.Id=AD_GROUP_ID_KEY + ad_group.AdGroupType='SearchDynamic' ad_group.Name="Sunglasses Sale" end_date=campaign_service.factory.create('Date') end_date.Day=31 diff --git a/examples/v13/campaignmanagement_example_helper.py b/examples/v13/campaignmanagement_example_helper.py index 827d14ed..1fd00e63 100644 --- a/examples/v13/campaignmanagement_example_helper.py +++ b/examples/v13/campaignmanagement_example_helper.py @@ -163,18 +163,26 @@ def output_adextension(data_object): output_calladextension(data_object) if data_object.Type == 'CalloutAdExtension': output_calloutadextension(data_object) + if data_object.Type == 'FilterLinkAdExtension': + output_filterlinkadextension(data_object) + if data_object.Type == 'FlyerAdExtension': + output_flyeradextension(data_object) if data_object.Type == 'ImageAdExtension': output_imageadextension(data_object) if data_object.Type == 'LocationAdExtension': output_locationadextension(data_object) if data_object.Type == 'PriceAdExtension': output_priceadextension(data_object) + if data_object.Type == 'PromotionAdExtension': + output_promotionadextension(data_object) if data_object.Type == 'ReviewAdExtension': output_reviewadextension(data_object) if data_object.Type == 'SitelinkAdExtension': output_sitelinkadextension(data_object) if data_object.Type == 'StructuredSnippetAdExtension': output_structuredsnippetadextension(data_object) + if data_object.Type == 'VideoAdExtension': + output_videoadextension(data_object) output_status_message("* * * End output_adextension * * *") def output_array_of_adextension(data_objects): @@ -292,6 +300,7 @@ def output_adgroup(data_object): output_array_of_keyvaluepairofstringstring(data_object.ForwardCompatibilityMap) output_status_message("Id: {0}".format(data_object.Id)) output_status_message("Language: {0}".format(data_object.Language)) + output_status_message("MultimediaAdsBidAdjustment: {0}".format(data_object.MultimediaAdsBidAdjustment)) output_status_message("Name: {0}".format(data_object.Name)) output_status_message("Network: {0}".format(data_object.Network)) output_status_message("PrivacyStatus: {0}".format(data_object.PrivacyStatus)) @@ -303,6 +312,12 @@ def output_adgroup(data_object): output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) output_status_message("UrlCustomParameters:") output_customparameters(data_object.UrlCustomParameters) + output_status_message("AdScheduleUseSearcherTimeZone: {0}".format(data_object.AdScheduleUseSearcherTimeZone)) + output_status_message("AdGroupType: {0}".format(data_object.AdGroupType)) + output_status_message("CpvBid:") + output_bid(data_object.CpvBid) + output_status_message("CpmBid:") + output_bid(data_object.CpmBid) output_status_message("* * * End output_adgroup * * *") def output_array_of_adgroup(data_objects): @@ -507,6 +522,8 @@ def output_asset(data_object): output_imageasset(data_object) if data_object.Type == 'TextAsset': output_textasset(data_object) + if data_object.Type == 'VideoAsset': + output_videoasset(data_object) output_status_message("* * * End output_asset * * *") def output_array_of_asset(data_objects): @@ -551,6 +568,8 @@ def output_audience(data_object): output_status_message("SupportedCampaignTypes:") output_array_of_string(data_object.SupportedCampaignTypes) output_status_message("Type: {0}".format(data_object.Type)) + if data_object.Type == 'CombinedList': + output_combinedlist(data_object) if data_object.Type == 'Custom': output_customaudience(data_object) if data_object.Type == 'InMarket': @@ -662,6 +681,8 @@ def output_biddableadgroupcriterion(data_object): output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) output_status_message("UrlCustomParameters:") output_customparameters(data_object.UrlCustomParameters) + output_status_message("CriterionCashback:") + output_criterioncashback(data_object.CriterionCashback) output_status_message("* * * End output_biddableadgroupcriterion * * *") def output_array_of_biddableadgroupcriterion(data_objects): @@ -676,6 +697,8 @@ def output_biddablecampaigncriterion(data_object): output_status_message("* * * Begin output_biddablecampaigncriterion * * *") output_status_message("CriterionBid:") output_criterionbid(data_object.CriterionBid) + output_status_message("CriterionCashback:") + output_criterioncashback(data_object.CriterionCashback) output_status_message("* * * End output_biddablecampaigncriterion * * *") def output_array_of_biddablecampaigncriterion(data_objects): @@ -695,14 +718,22 @@ def output_biddingscheme(data_object): output_inheritfromparentbiddingscheme(data_object) if data_object.Type == 'ManualCpcBiddingScheme': output_manualcpcbiddingscheme(data_object) + if data_object.Type == 'ManualCpmBiddingScheme': + output_manualcpmbiddingscheme(data_object) + if data_object.Type == 'ManualCpvBiddingScheme': + output_manualcpvbiddingscheme(data_object) if data_object.Type == 'MaxClicksBiddingScheme': output_maxclicksbiddingscheme(data_object) if data_object.Type == 'MaxConversionsBiddingScheme': output_maxconversionsbiddingscheme(data_object) + if data_object.Type == 'MaxConversionValueBiddingScheme': + output_maxconversionvaluebiddingscheme(data_object) if data_object.Type == 'MaxRoasBiddingScheme': output_maxroasbiddingscheme(data_object) if data_object.Type == 'TargetCpaBiddingScheme': output_targetcpabiddingscheme(data_object) + if data_object.Type == 'TargetImpressionShareBiddingScheme': + output_targetimpressionsharebiddingscheme(data_object) if data_object.Type == 'TargetRoasBiddingScheme': output_targetroasbiddingscheme(data_object) output_status_message("* * * End output_biddingscheme * * *") @@ -726,6 +757,24 @@ def output_array_of_bidmultiplier(data_objects): for data_object in data_objects['BidMultiplier']: output_bidmultiplier(data_object) +def output_bidstrategy(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_bidstrategy * * *") + output_status_message("AssociatedCampaignType: {0}".format(data_object.AssociatedCampaignType)) + output_status_message("AssociationCount: {0}".format(data_object.AssociationCount)) + output_status_message("BiddingScheme:") + output_biddingscheme(data_object.BiddingScheme) + output_status_message("Id: {0}".format(data_object.Id)) + output_status_message("Name: {0}".format(data_object.Name)) + output_status_message("* * * End output_bidstrategy * * *") + +def output_array_of_bidstrategy(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['BidStrategy']: + output_bidstrategy(data_object) + def output_bmcstore(data_object): if data_object is None: return @@ -805,6 +854,7 @@ def output_campaign(data_object): output_status_message("ForwardCompatibilityMap:") output_array_of_keyvaluepairofstringstring(data_object.ForwardCompatibilityMap) output_status_message("Id: {0}".format(data_object.Id)) + output_status_message("MultimediaAdsBidAdjustment: {0}".format(data_object.MultimediaAdsBidAdjustment)) output_status_message("Name: {0}".format(data_object.Name)) output_status_message("Status: {0}".format(data_object.Status)) output_status_message("SubType: {0}".format(data_object.SubType)) @@ -818,6 +868,8 @@ def output_campaign(data_object): output_status_message("BudgetId: {0}".format(data_object.BudgetId)) output_status_message("Languages:") output_array_of_string(data_object.Languages) + output_status_message("AdScheduleUseSearcherTimeZone: {0}".format(data_object.AdScheduleUseSearcherTimeZone)) + output_status_message("BidStrategyId: {0}".format(data_object.BidStrategyId)) output_status_message("* * * End output_campaign * * *") def output_array_of_campaign(data_objects): @@ -826,6 +878,22 @@ def output_array_of_campaign(data_objects): for data_object in data_objects['Campaign']: output_campaign(data_object) +def output_campaignadgroupids(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_campaignadgroupids * * *") + output_status_message("ActiveAdGroupsOnly: {0}".format(data_object.ActiveAdGroupsOnly)) + output_status_message("AdGroupIds:") + output_array_of_long(data_object.AdGroupIds) + output_status_message("CampaignId: {0}".format(data_object.CampaignId)) + output_status_message("* * * End output_campaignadgroupids * * *") + +def output_array_of_campaignadgroupids(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['CampaignAdGroupIds']: + output_campaignadgroupids(data_object) + def output_campaigncriterion(data_object): if data_object is None: return @@ -865,6 +933,48 @@ def output_array_of_campaignnegativesites(data_objects): for data_object in data_objects['CampaignNegativeSites']: output_campaignnegativesites(data_object) +def output_cashbackadjustment(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_cashbackadjustment * * *") + output_status_message("CashbackPercent: {0}".format(data_object.CashbackPercent)) + output_status_message("* * * End output_cashbackadjustment * * *") + +def output_array_of_cashbackadjustment(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['CashbackAdjustment']: + output_cashbackadjustment(data_object) + +def output_combinationrule(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_combinationrule * * *") + output_status_message("AudienceIds:") + output_array_of_long(data_object.AudienceIds) + output_status_message("Operator: {0}".format(data_object.Operator)) + output_status_message("* * * End output_combinationrule * * *") + +def output_array_of_combinationrule(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['CombinationRule']: + output_combinationrule(data_object) + +def output_combinedlist(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_combinedlist * * *") + output_status_message("CombinationRules:") + output_array_of_combinationrule(data_object.CombinationRules) + output_status_message("* * * End output_combinedlist * * *") + +def output_array_of_combinedlist(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['CombinedList']: + output_combinedlist(data_object) + def output_company(data_object): if data_object is None: return @@ -888,6 +998,7 @@ def output_conversiongoal(data_object): output_status_message("ConversionWindowInMinutes: {0}".format(data_object.ConversionWindowInMinutes)) output_status_message("CountType: {0}".format(data_object.CountType)) output_status_message("ExcludeFromBidding: {0}".format(data_object.ExcludeFromBidding)) + output_status_message("GoalCategory: {0}".format(data_object.GoalCategory)) output_status_message("Id: {0}".format(data_object.Id)) output_status_message("Name: {0}".format(data_object.Name)) output_status_message("Revenue:") @@ -977,6 +1088,8 @@ def output_criterion(data_object): output_profilecriterion(data_object) if data_object.Type == 'RadiusCriterion': output_radiuscriterion(data_object) + if data_object.Type == 'StoreCriterion': + output_storecriterion(data_object) if data_object.Type == 'Webpage': output_webpage(data_object) output_status_message("* * * End output_criterion * * *") @@ -1004,6 +1117,21 @@ def output_array_of_criterionbid(data_objects): for data_object in data_objects['CriterionBid']: output_criterionbid(data_object) +def output_criterioncashback(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_criterioncashback * * *") + output_status_message("Type: {0}".format(data_object.Type)) + if data_object.Type == 'CashbackAdjustment': + output_cashbackadjustment(data_object) + output_status_message("* * * End output_criterioncashback * * *") + +def output_array_of_criterioncashback(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['CriterionCashback']: + output_criterioncashback(data_object) + def output_customaudience(data_object): if data_object is None: return @@ -1185,6 +1313,19 @@ def output_array_of_durationgoal(data_objects): for data_object in data_objects['DurationGoal']: output_durationgoal(data_object) +def output_dynamicfeedsetting(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_dynamicfeedsetting * * *") + output_status_message("FeedId: {0}".format(data_object.FeedId)) + output_status_message("* * * End output_dynamicfeedsetting * * *") + +def output_array_of_dynamicfeedsetting(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['DynamicFeedSetting']: + output_dynamicfeedsetting(data_object) + def output_dynamicsearchad(data_object): if data_object is None: return @@ -1206,6 +1347,7 @@ def output_dynamicsearchadssetting(data_object): return output_status_message("* * * Begin output_dynamicsearchadssetting * * *") output_status_message("DomainName: {0}".format(data_object.DomainName)) + output_status_message("DynamicDescriptionEnabled: {0}".format(data_object.DynamicDescriptionEnabled)) output_status_message("Language: {0}".format(data_object.Language)) output_status_message("PageFeedIds:") output_array_of_long(data_object.PageFeedIds) @@ -1409,6 +1551,56 @@ def output_array_of_experiment(data_objects): for data_object in data_objects['Experiment']: output_experiment(data_object) +def output_fileimportjob(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_fileimportjob * * *") + output_status_message("FileSource: {0}".format(data_object.FileSource)) + output_status_message("FileUrl: {0}".format(data_object.FileUrl)) + output_status_message("* * * End output_fileimportjob * * *") + +def output_array_of_fileimportjob(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['FileImportJob']: + output_fileimportjob(data_object) + +def output_fileimportoption(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_fileimportoption * * *") + output_status_message("* * * End output_fileimportoption * * *") + +def output_array_of_fileimportoption(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['FileImportOption']: + output_fileimportoption(data_object) + +def output_filterlinkadextension(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_filterlinkadextension * * *") + output_status_message("AdExtensionHeaderType: {0}".format(data_object.AdExtensionHeaderType)) + output_status_message("FinalMobileUrls:") + output_array_of_string(data_object.FinalMobileUrls) + output_status_message("FinalUrlSuffix: {0}".format(data_object.FinalUrlSuffix)) + output_status_message("FinalUrls:") + output_array_of_string(data_object.FinalUrls) + output_status_message("Language: {0}".format(data_object.Language)) + output_status_message("Texts:") + output_array_of_string(data_object.Texts) + output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) + output_status_message("UrlCustomParameters:") + output_customparameters(data_object.UrlCustomParameters) + output_status_message("* * * End output_filterlinkadextension * * *") + +def output_array_of_filterlinkadextension(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['FilterLinkAdExtension']: + output_filterlinkadextension(data_object) + def output_fixedbid(data_object): if data_object is None: return @@ -1422,6 +1614,50 @@ def output_array_of_fixedbid(data_objects): for data_object in data_objects['FixedBid']: output_fixedbid(data_object) +def output_flyeradextension(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_flyeradextension * * *") + output_status_message("Description: {0}".format(data_object.Description)) + output_status_message("FinalAppUrls:") + output_array_of_appurl(data_object.FinalAppUrls) + output_status_message("FinalMobileUrls:") + output_array_of_string(data_object.FinalMobileUrls) + output_status_message("FinalUrlSuffix: {0}".format(data_object.FinalUrlSuffix)) + output_status_message("FinalUrls:") + output_array_of_string(data_object.FinalUrls) + output_status_message("FlyerName: {0}".format(data_object.FlyerName)) + output_status_message("ImageMediaIds:") + output_array_of_long(data_object.ImageMediaIds) + output_status_message("ImageMediaUrls:") + output_array_of_string(data_object.ImageMediaUrls) + output_status_message("StoreId: {0}".format(data_object.StoreId)) + output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) + output_status_message("UrlCustomParameters:") + output_customparameters(data_object.UrlCustomParameters) + output_status_message("* * * End output_flyeradextension * * *") + +def output_array_of_flyeradextension(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['FlyerAdExtension']: + output_flyeradextension(data_object) + +def output_frequency(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_frequency * * *") + output_status_message("Cron: {0}".format(data_object.Cron)) + output_status_message("TimeZone: {0}".format(data_object.TimeZone)) + output_status_message("Type: {0}".format(data_object.Type)) + output_status_message("* * * End output_frequency * * *") + +def output_array_of_frequency(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['Frequency']: + output_frequency(data_object) + def output_gendercriterion(data_object): if data_object is None: return @@ -1449,6 +1685,124 @@ def output_array_of_geopoint(data_objects): for data_object in data_objects['GeoPoint']: output_geopoint(data_object) +def output_googleimportjob(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_googleimportjob * * *") + output_status_message("CampaignAdGroupIds:") + output_array_of_campaignadgroupids(data_object.CampaignAdGroupIds) + output_status_message("CredentialId: {0}".format(data_object.CredentialId)) + output_status_message("GoogleAccountId: {0}".format(data_object.GoogleAccountId)) + output_status_message("GoogleUserName: {0}".format(data_object.GoogleUserName)) + output_status_message("* * * End output_googleimportjob * * *") + +def output_array_of_googleimportjob(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['GoogleImportJob']: + output_googleimportjob(data_object) + +def output_googleimportoption(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_googleimportoption * * *") + output_status_message("AccountUrlOptions: {0}".format(data_object.AccountUrlOptions)) + output_status_message("AdjustmentForBids: {0}".format(data_object.AdjustmentForBids)) + output_status_message("AdjustmentForCampaignBudgets: {0}".format(data_object.AdjustmentForCampaignBudgets)) + output_status_message("AssociatedStoreId: {0}".format(data_object.AssociatedStoreId)) + output_status_message("AssociatedUetTagId: {0}".format(data_object.AssociatedUetTagId)) + output_status_message("AutoDeviceBidOptimization: {0}".format(data_object.AutoDeviceBidOptimization)) + output_status_message("DeleteRemovedEntities: {0}".format(data_object.DeleteRemovedEntities)) + output_status_message("EnableAutoCurrencyConversion: {0}".format(data_object.EnableAutoCurrencyConversion)) + output_status_message("EnableParentLocationMapping: {0}".format(data_object.EnableParentLocationMapping)) + output_status_message("NewActiveAdsForExistingAdGroups: {0}".format(data_object.NewActiveAdsForExistingAdGroups)) + output_status_message("NewActiveCampaignsAndChildEntities: {0}".format(data_object.NewActiveCampaignsAndChildEntities)) + output_status_message("NewAdCustomizerFeeds: {0}".format(data_object.NewAdCustomizerFeeds)) + output_status_message("NewAdGroupsAndChildEntitiesForExistingCampaigns: {0}".format(data_object.NewAdGroupsAndChildEntitiesForExistingCampaigns)) + output_status_message("NewAdSchedules: {0}".format(data_object.NewAdSchedules)) + output_status_message("NewAppAdExtensions: {0}".format(data_object.NewAppAdExtensions)) + output_status_message("NewAudienceTargets: {0}".format(data_object.NewAudienceTargets)) + output_status_message("NewCallAdExtensions: {0}".format(data_object.NewCallAdExtensions)) + output_status_message("NewCalloutAdExtensions: {0}".format(data_object.NewCalloutAdExtensions)) + output_status_message("NewDemographicTargets: {0}".format(data_object.NewDemographicTargets)) + output_status_message("NewDeviceTargets: {0}".format(data_object.NewDeviceTargets)) + output_status_message("NewEntities: {0}".format(data_object.NewEntities)) + output_status_message("NewKeywordUrls: {0}".format(data_object.NewKeywordUrls)) + output_status_message("NewKeywordsForExistingAdGroups: {0}".format(data_object.NewKeywordsForExistingAdGroups)) + output_status_message("NewLabels: {0}".format(data_object.NewLabels)) + output_status_message("NewLocationAdExtensions: {0}".format(data_object.NewLocationAdExtensions)) + output_status_message("NewLocationTargets: {0}".format(data_object.NewLocationTargets)) + output_status_message("NewNegativeKeywordLists: {0}".format(data_object.NewNegativeKeywordLists)) + output_status_message("NewNegativeKeywordsForExistingParents: {0}".format(data_object.NewNegativeKeywordsForExistingParents)) + output_status_message("NewNegativeSites: {0}".format(data_object.NewNegativeSites)) + output_status_message("NewPageFeeds: {0}".format(data_object.NewPageFeeds)) + output_status_message("NewPausedAdsForExistingAdGroups: {0}".format(data_object.NewPausedAdsForExistingAdGroups)) + output_status_message("NewPausedCampaignsAndChildEntities: {0}".format(data_object.NewPausedCampaignsAndChildEntities)) + output_status_message("NewPriceAdExtensions: {0}".format(data_object.NewPriceAdExtensions)) + output_status_message("NewProductFilters: {0}".format(data_object.NewProductFilters)) + output_status_message("NewPromotionAdExtensions: {0}".format(data_object.NewPromotionAdExtensions)) + output_status_message("NewReviewAdExtensions: {0}".format(data_object.NewReviewAdExtensions)) + output_status_message("NewSitelinkAdExtensions: {0}".format(data_object.NewSitelinkAdExtensions)) + output_status_message("NewStructuredSnippetAdExtensions: {0}".format(data_object.NewStructuredSnippetAdExtensions)) + output_status_message("NewUrlOptions: {0}".format(data_object.NewUrlOptions)) + output_status_message("PauseCampaignsWithoutSupportedLocations: {0}".format(data_object.PauseCampaignsWithoutSupportedLocations)) + output_status_message("PauseNewCampaigns: {0}".format(data_object.PauseNewCampaigns)) + output_status_message("RaiseBidsToMinimum: {0}".format(data_object.RaiseBidsToMinimum)) + output_status_message("RaiseCampaignBudgetsToMinimum: {0}".format(data_object.RaiseCampaignBudgetsToMinimum)) + output_status_message("RaiseProductGroupBidsToMinimum: {0}".format(data_object.RaiseProductGroupBidsToMinimum)) + output_status_message("SearchAndDsaMixedCampaignAsSearchCampaign: {0}".format(data_object.SearchAndDsaMixedCampaignAsSearchCampaign)) + output_status_message("SearchAndReplaceForCampaignNames:") + output_importsearchandreplaceforstringproperty(data_object.SearchAndReplaceForCampaignNames) + output_status_message("SearchAndReplaceForCustomParameters:") + output_importsearchandreplaceforstringproperty(data_object.SearchAndReplaceForCustomParameters) + output_status_message("SearchAndReplaceForTrackingTemplates:") + output_importsearchandreplaceforstringproperty(data_object.SearchAndReplaceForTrackingTemplates) + output_status_message("SearchAndReplaceForUrls:") + output_importsearchandreplaceforstringproperty(data_object.SearchAndReplaceForUrls) + output_status_message("SuffixForCampaignNames: {0}".format(data_object.SuffixForCampaignNames)) + output_status_message("SuffixForTrackingTemplates: {0}".format(data_object.SuffixForTrackingTemplates)) + output_status_message("SuffixForUrls: {0}".format(data_object.SuffixForUrls)) + output_status_message("UpdateAdCustomizerFeeds: {0}".format(data_object.UpdateAdCustomizerFeeds)) + output_status_message("UpdateAdGroupNetwork: {0}".format(data_object.UpdateAdGroupNetwork)) + output_status_message("UpdateAdSchedules: {0}".format(data_object.UpdateAdSchedules)) + output_status_message("UpdateAppAdExtensions: {0}".format(data_object.UpdateAppAdExtensions)) + output_status_message("UpdateAudienceTargets: {0}".format(data_object.UpdateAudienceTargets)) + output_status_message("UpdateBiddingStrategies: {0}".format(data_object.UpdateBiddingStrategies)) + output_status_message("UpdateBids: {0}".format(data_object.UpdateBids)) + output_status_message("UpdateCallAdExtensions: {0}".format(data_object.UpdateCallAdExtensions)) + output_status_message("UpdateCalloutAdExtensions: {0}".format(data_object.UpdateCalloutAdExtensions)) + output_status_message("UpdateCampaignAdGroupLanguages: {0}".format(data_object.UpdateCampaignAdGroupLanguages)) + output_status_message("UpdateCampaignBudgets: {0}".format(data_object.UpdateCampaignBudgets)) + output_status_message("UpdateCampaignNames: {0}".format(data_object.UpdateCampaignNames)) + output_status_message("UpdateDemographicTargets: {0}".format(data_object.UpdateDemographicTargets)) + output_status_message("UpdateDeviceTargets: {0}".format(data_object.UpdateDeviceTargets)) + output_status_message("UpdateEntities: {0}".format(data_object.UpdateEntities)) + output_status_message("UpdateKeywordUrls: {0}".format(data_object.UpdateKeywordUrls)) + output_status_message("UpdateLabels: {0}".format(data_object.UpdateLabels)) + output_status_message("UpdateLocationAdExtensions: {0}".format(data_object.UpdateLocationAdExtensions)) + output_status_message("UpdateLocationTargets: {0}".format(data_object.UpdateLocationTargets)) + output_status_message("UpdateNegativeKeywordLists: {0}".format(data_object.UpdateNegativeKeywordLists)) + output_status_message("UpdateNegativeSites: {0}".format(data_object.UpdateNegativeSites)) + output_status_message("UpdatePageFeeds: {0}".format(data_object.UpdatePageFeeds)) + output_status_message("UpdatePriceAdExtensions: {0}".format(data_object.UpdatePriceAdExtensions)) + output_status_message("UpdateProductFilters: {0}".format(data_object.UpdateProductFilters)) + output_status_message("UpdatePromotionAdExtensions: {0}".format(data_object.UpdatePromotionAdExtensions)) + output_status_message("UpdateReviewAdExtensions: {0}".format(data_object.UpdateReviewAdExtensions)) + output_status_message("UpdateSitelinkAdExtensions: {0}".format(data_object.UpdateSitelinkAdExtensions)) + output_status_message("UpdateStatusForAdGroups: {0}".format(data_object.UpdateStatusForAdGroups)) + output_status_message("UpdateStatusForAds: {0}".format(data_object.UpdateStatusForAds)) + output_status_message("UpdateStatusForCampaigns: {0}".format(data_object.UpdateStatusForCampaigns)) + output_status_message("UpdateStatusForKeywords: {0}".format(data_object.UpdateStatusForKeywords)) + output_status_message("UpdateStructuredSnippetAdExtensions: {0}".format(data_object.UpdateStructuredSnippetAdExtensions)) + output_status_message("UpdateUrlOptions: {0}".format(data_object.UpdateUrlOptions)) + output_status_message("* * * End output_googleimportoption * * *") + +def output_array_of_googleimportoption(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['GoogleImportOption']: + output_googleimportoption(data_object) + def output_idcollection(data_object): if data_object is None: return @@ -1495,6 +1849,8 @@ def output_imageadextension(data_object): output_array_of_long(data_object.ImageMediaIds) output_status_message("Images:") output_array_of_assetlink(data_object.Images) + output_status_message("Layouts:") + output_array_of_string(data_object.Layouts) output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) output_status_message("UrlCustomParameters:") output_customparameters(data_object.UrlCustomParameters) @@ -1537,6 +1893,109 @@ def output_array_of_imagemediarepresentation(data_objects): for data_object in data_objects['ImageMediaRepresentation']: output_imagemediarepresentation(data_object) +def output_importentitystatistics(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_importentitystatistics * * *") + output_status_message("Additions: {0}".format(data_object.Additions)) + output_status_message("Changes: {0}".format(data_object.Changes)) + output_status_message("Deletions: {0}".format(data_object.Deletions)) + output_status_message("EntityType: {0}".format(data_object.EntityType)) + output_status_message("Errors: {0}".format(data_object.Errors)) + output_status_message("Total: {0}".format(data_object.Total)) + output_status_message("* * * End output_importentitystatistics * * *") + +def output_array_of_importentitystatistics(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ImportEntityStatistics']: + output_importentitystatistics(data_object) + +def output_importjob(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_importjob * * *") + output_status_message("CreatedByUserId: {0}".format(data_object.CreatedByUserId)) + output_status_message("CreatedByUserName: {0}".format(data_object.CreatedByUserName)) + output_status_message("CreatedDateTimeInUTC: {0}".format(data_object.CreatedDateTimeInUTC)) + output_status_message("Frequency:") + output_frequency(data_object.Frequency) + output_status_message("Id: {0}".format(data_object.Id)) + output_status_message("ImportOption:") + output_importoption(data_object.ImportOption) + output_status_message("LastRunTimeInUTC: {0}".format(data_object.LastRunTimeInUTC)) + output_status_message("Name: {0}".format(data_object.Name)) + output_status_message("NotificationEmail: {0}".format(data_object.NotificationEmail)) + output_status_message("NotificationType: {0}".format(data_object.NotificationType)) + output_status_message("Status: {0}".format(data_object.Status)) + output_status_message("Type: {0}".format(data_object.Type)) + if data_object.Type == 'FileImportJob': + output_fileimportjob(data_object) + if data_object.Type == 'GoogleImportJob': + output_googleimportjob(data_object) + output_status_message("* * * End output_importjob * * *") + +def output_array_of_importjob(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ImportJob']: + output_importjob(data_object) + +def output_importoption(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_importoption * * *") + output_status_message("ForwardCompatibilityMap:") + output_array_of_keyvaluepairofstringstring(data_object.ForwardCompatibilityMap) + output_status_message("Type: {0}".format(data_object.Type)) + if data_object.Type == 'FileImportOption': + output_fileimportoption(data_object) + if data_object.Type == 'GoogleImportOption': + output_googleimportoption(data_object) + output_status_message("* * * End output_importoption * * *") + +def output_array_of_importoption(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ImportOption']: + output_importoption(data_object) + +def output_importresult(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_importresult * * *") + output_status_message("EntityStatistics:") + output_array_of_importentitystatistics(data_object.EntityStatistics) + output_status_message("ErrorLogUrl: {0}".format(data_object.ErrorLogUrl)) + output_status_message("ForwardCompatibilityMap:") + output_array_of_keyvaluepairofstringstring(data_object.ForwardCompatibilityMap) + output_status_message("Id: {0}".format(data_object.Id)) + output_status_message("ImportJob:") + output_importjob(data_object.ImportJob) + output_status_message("StartTimeInUTC: {0}".format(data_object.StartTimeInUTC)) + output_status_message("Status: {0}".format(data_object.Status)) + output_status_message("* * * End output_importresult * * *") + +def output_array_of_importresult(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ImportResult']: + output_importresult(data_object) + +def output_importsearchandreplaceforstringproperty(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_importsearchandreplaceforstringproperty * * *") + output_status_message("ReplaceString: {0}".format(data_object.ReplaceString)) + output_status_message("SearchString: {0}".format(data_object.SearchString)) + output_status_message("* * * End output_importsearchandreplaceforstringproperty * * *") + +def output_array_of_importsearchandreplaceforstringproperty(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ImportSearchAndReplaceForStringProperty']: + output_importsearchandreplaceforstringproperty(data_object) + def output_inheritfromparentbiddingscheme(data_object): if data_object is None: return @@ -1574,6 +2033,20 @@ def output_array_of_instoretransactiongoal(data_objects): for data_object in data_objects['InStoreTransactionGoal']: output_instoretransactiongoal(data_object) +def output_keyvaluepairoflonglong(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_keyvaluepairoflonglong * * *") + output_status_message("key: {0}".format(data_object.key)) + output_status_message("value: {0}".format(data_object.value)) + output_status_message("* * * End output_keyvaluepairoflonglong * * *") + +def output_array_of_keyvaluepairoflonglong(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['KeyValuePairOflonglong']: + output_keyvaluepairoflonglong(data_object) + def output_keyvaluepairofstringstring(data_object): if data_object is None: return @@ -1716,6 +2189,30 @@ def output_array_of_manualcpcbiddingscheme(data_objects): for data_object in data_objects['ManualCpcBiddingScheme']: output_manualcpcbiddingscheme(data_object) +def output_manualcpmbiddingscheme(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_manualcpmbiddingscheme * * *") + output_status_message("* * * End output_manualcpmbiddingscheme * * *") + +def output_array_of_manualcpmbiddingscheme(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ManualCpmBiddingScheme']: + output_manualcpmbiddingscheme(data_object) + +def output_manualcpvbiddingscheme(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_manualcpvbiddingscheme * * *") + output_status_message("* * * End output_manualcpvbiddingscheme * * *") + +def output_array_of_manualcpvbiddingscheme(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['ManualCpvBiddingScheme']: + output_manualcpvbiddingscheme(data_object) + def output_maxclicksbiddingscheme(data_object): if data_object is None: return @@ -1744,6 +2241,19 @@ def output_array_of_maxconversionsbiddingscheme(data_objects): for data_object in data_objects['MaxConversionsBiddingScheme']: output_maxconversionsbiddingscheme(data_object) +def output_maxconversionvaluebiddingscheme(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_maxconversionvaluebiddingscheme * * *") + output_status_message("TargetRoas: {0}".format(data_object.TargetRoas)) + output_status_message("* * * End output_maxconversionvaluebiddingscheme * * *") + +def output_array_of_maxconversionvaluebiddingscheme(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['MaxConversionValueBiddingScheme']: + output_maxconversionvaluebiddingscheme(data_object) + def output_maxroasbiddingscheme(data_object): if data_object is None: return @@ -1890,6 +2400,20 @@ def output_array_of_negativekeywordlist(data_objects): for data_object in data_objects['NegativeKeywordList']: output_negativekeywordlist(data_object) +def output_negativesite(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_negativesite * * *") + output_status_message("Id: {0}".format(data_object.Id)) + output_status_message("Url: {0}".format(data_object.Url)) + output_status_message("* * * End output_negativesite * * *") + +def output_array_of_negativesite(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['NegativeSite']: + output_negativesite(data_object) + def output_offlineconversion(data_object): if data_object is None: return @@ -1898,6 +2422,8 @@ def output_offlineconversion(data_object): output_status_message("ConversionName: {0}".format(data_object.ConversionName)) output_status_message("ConversionTime: {0}".format(data_object.ConversionTime)) output_status_message("ConversionValue: {0}".format(data_object.ConversionValue)) + output_status_message("ExternalAttributionCredit: {0}".format(data_object.ExternalAttributionCredit)) + output_status_message("ExternalAttributionModel: {0}".format(data_object.ExternalAttributionModel)) output_status_message("MicrosoftClickId: {0}".format(data_object.MicrosoftClickId)) output_status_message("* * * End output_offlineconversion * * *") @@ -1907,10 +2433,30 @@ def output_array_of_offlineconversion(data_objects): for data_object in data_objects['OfflineConversion']: output_offlineconversion(data_object) +def output_offlineconversionadjustment(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_offlineconversionadjustment * * *") + output_status_message("AdjustmentCurrencyCode: {0}".format(data_object.AdjustmentCurrencyCode)) + output_status_message("AdjustmentTime: {0}".format(data_object.AdjustmentTime)) + output_status_message("AdjustmentType: {0}".format(data_object.AdjustmentType)) + output_status_message("AdjustmentValue: {0}".format(data_object.AdjustmentValue)) + output_status_message("ConversionName: {0}".format(data_object.ConversionName)) + output_status_message("ConversionTime: {0}".format(data_object.ConversionTime)) + output_status_message("MicrosoftClickId: {0}".format(data_object.MicrosoftClickId)) + output_status_message("* * * End output_offlineconversionadjustment * * *") + +def output_array_of_offlineconversionadjustment(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['OfflineConversionAdjustment']: + output_offlineconversionadjustment(data_object) + def output_offlineconversiongoal(data_object): if data_object is None: return output_status_message("* * * Begin output_offlineconversiongoal * * *") + output_status_message("IsExternallyAttributed: {0}".format(data_object.IsExternallyAttributed)) output_status_message("* * * End output_offlineconversiongoal * * *") def output_array_of_offlineconversiongoal(data_objects): @@ -1952,6 +2498,7 @@ def output_pagevisitorsrule(data_object): if data_object is None: return output_status_message("* * * Begin output_pagevisitorsrule * * *") + output_status_message("NormalForm: {0}".format(data_object.NormalForm)) output_status_message("RuleItemGroups:") output_array_of_ruleitemgroup(data_object.RuleItemGroups) output_status_message("* * * End output_pagevisitorsrule * * *") @@ -2008,6 +2555,18 @@ def output_array_of_paging(data_objects): for data_object in data_objects['Paging']: output_paging(data_object) +def output_placementexclusionlist(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_placementexclusionlist * * *") + output_status_message("* * * End output_placementexclusionlist * * *") + +def output_array_of_placementexclusionlist(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['PlacementExclusionList']: + output_placementexclusionlist(data_object) + def output_priceadextension(data_object): if data_object is None: return @@ -2137,6 +2696,41 @@ def output_array_of_profilecriterion(data_objects): for data_object in data_objects['ProfileCriterion']: output_profilecriterion(data_object) +def output_promotionadextension(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_promotionadextension * * *") + output_status_message("CurrencyCode: {0}".format(data_object.CurrencyCode)) + output_status_message("DiscountModifier: {0}".format(data_object.DiscountModifier)) + output_status_message("FinalAppUrls:") + output_array_of_appurl(data_object.FinalAppUrls) + output_status_message("FinalMobileUrls:") + output_array_of_string(data_object.FinalMobileUrls) + output_status_message("FinalUrlSuffix: {0}".format(data_object.FinalUrlSuffix)) + output_status_message("FinalUrls:") + output_array_of_string(data_object.FinalUrls) + output_status_message("Language: {0}".format(data_object.Language)) + output_status_message("MoneyAmountOff: {0}".format(data_object.MoneyAmountOff)) + output_status_message("OrdersOverAmount: {0}".format(data_object.OrdersOverAmount)) + output_status_message("PercentOff: {0}".format(data_object.PercentOff)) + output_status_message("PromotionCode: {0}".format(data_object.PromotionCode)) + output_status_message("PromotionEndDate:") + output_date(data_object.PromotionEndDate) + output_status_message("PromotionItem: {0}".format(data_object.PromotionItem)) + output_status_message("PromotionOccasion: {0}".format(data_object.PromotionOccasion)) + output_status_message("PromotionStartDate:") + output_date(data_object.PromotionStartDate) + output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) + output_status_message("UrlCustomParameters:") + output_customparameters(data_object.UrlCustomParameters) + output_status_message("* * * End output_promotionadextension * * *") + +def output_array_of_promotionadextension(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['PromotionAdExtension']: + output_promotionadextension(data_object) + def output_radiuscriterion(data_object): if data_object is None: return @@ -2196,6 +2790,7 @@ def output_responsivead(data_object): output_status_message("* * * Begin output_responsivead * * *") output_status_message("BusinessName: {0}".format(data_object.BusinessName)) output_status_message("CallToAction: {0}".format(data_object.CallToAction)) + output_status_message("CallToActionLanguage: {0}".format(data_object.CallToActionLanguage)) output_status_message("Descriptions:") output_array_of_assetlink(data_object.Descriptions) output_status_message("Headline: {0}".format(data_object.Headline)) @@ -2203,10 +2798,16 @@ def output_responsivead(data_object): output_array_of_assetlink(data_object.Headlines) output_status_message("Images:") output_array_of_assetlink(data_object.Images) + output_status_message("ImpressionTrackingUrls:") + output_array_of_string(data_object.ImpressionTrackingUrls) output_status_message("LongHeadline:") output_assetlink(data_object.LongHeadline) output_status_message("LongHeadlineString: {0}".format(data_object.LongHeadlineString)) + output_status_message("LongHeadlines:") + output_array_of_assetlink(data_object.LongHeadlines) output_status_message("Text: {0}".format(data_object.Text)) + output_status_message("Videos:") + output_array_of_assetlink(data_object.Videos) output_status_message("* * * End output_responsivead * * *") def output_array_of_responsivead(data_objects): @@ -2305,6 +2906,8 @@ def output_setting(data_object): output_status_message("Type: {0}".format(data_object.Type)) if data_object.Type == 'CoOpSetting': output_coopsetting(data_object) + if data_object.Type == 'DynamicFeedSetting': + output_dynamicfeedsetting(data_object) if data_object.Type == 'DynamicSearchAdsSetting': output_dynamicsearchadssetting(data_object) if data_object.Type == 'ShoppingSetting': @@ -2345,6 +2948,7 @@ def output_sharedentityassociation(data_object): output_status_message("* * * Begin output_sharedentityassociation * * *") output_status_message("EntityId: {0}".format(data_object.EntityId)) output_status_message("EntityType: {0}".format(data_object.EntityType)) + output_status_message("SharedEntityCustomerId: {0}".format(data_object.SharedEntityCustomerId)) output_status_message("SharedEntityId: {0}".format(data_object.SharedEntityId)) output_status_message("SharedEntityType: {0}".format(data_object.SharedEntityType)) output_status_message("* * * End output_sharedentityassociation * * *") @@ -2362,6 +2966,8 @@ def output_sharedlist(data_object): output_status_message("ItemCount: {0}".format(data_object.ItemCount)) if data_object.Type == 'NegativeKeywordList': output_negativekeywordlist(data_object) + if data_object.Type == 'PlacementExclusionList': + output_placementexclusionlist(data_object) output_status_message("* * * End output_sharedlist * * *") def output_array_of_sharedlist(data_objects): @@ -2379,6 +2985,8 @@ def output_sharedlistitem(data_object): output_status_message("Type: {0}".format(data_object.Type)) if data_object.Type == 'NegativeKeyword': output_negativekeyword(data_object) + if data_object.Type == 'NegativeSite': + output_negativesite(data_object) output_status_message("* * * End output_sharedlistitem * * *") def output_array_of_sharedlistitem(data_objects): @@ -2442,6 +3050,19 @@ def output_array_of_sitelinkadextension(data_objects): for data_object in data_objects['SitelinkAdExtension']: output_sitelinkadextension(data_object) +def output_storecriterion(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_storecriterion * * *") + output_status_message("StoreId: {0}".format(data_object.StoreId)) + output_status_message("* * * End output_storecriterion * * *") + +def output_array_of_storecriterion(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['StoreCriterion']: + output_storecriterion(data_object) + def output_stringruleitem(data_object): if data_object is None: return @@ -2487,6 +3108,22 @@ def output_array_of_targetcpabiddingscheme(data_objects): for data_object in data_objects['TargetCpaBiddingScheme']: output_targetcpabiddingscheme(data_object) +def output_targetimpressionsharebiddingscheme(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_targetimpressionsharebiddingscheme * * *") + output_status_message("MaxCpc:") + output_bid(data_object.MaxCpc) + output_status_message("TargetAdPosition: {0}".format(data_object.TargetAdPosition)) + output_status_message("TargetImpressionShare: {0}".format(data_object.TargetImpressionShare)) + output_status_message("* * * End output_targetimpressionsharebiddingscheme * * *") + +def output_array_of_targetimpressionsharebiddingscheme(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['TargetImpressionShareBiddingScheme']: + output_targetimpressionsharebiddingscheme(data_object) + def output_targetroasbiddingscheme(data_object): if data_object is None: return @@ -2593,6 +3230,73 @@ def output_array_of_urlgoal(data_objects): for data_object in data_objects['UrlGoal']: output_urlgoal(data_object) +def output_video(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_video * * *") + output_status_message("AspectRatio: {0}".format(data_object.AspectRatio)) + output_status_message("CreatedDateTimeInUTC: {0}".format(data_object.CreatedDateTimeInUTC)) + output_status_message("Description: {0}".format(data_object.Description)) + output_status_message("DurationInMilliseconds: {0}".format(data_object.DurationInMilliseconds)) + output_status_message("FailureCode: {0}".format(data_object.FailureCode)) + output_status_message("Id: {0}".format(data_object.Id)) + output_status_message("ModifiedDateTimeInUTC: {0}".format(data_object.ModifiedDateTimeInUTC)) + output_status_message("SourceUrl: {0}".format(data_object.SourceUrl)) + output_status_message("Status: {0}".format(data_object.Status)) + output_status_message("ThumbnailUrl: {0}".format(data_object.ThumbnailUrl)) + output_status_message("Url: {0}".format(data_object.Url)) + output_status_message("* * * End output_video * * *") + +def output_array_of_video(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['Video']: + output_video(data_object) + +def output_videoadextension(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_videoadextension * * *") + output_status_message("ActionText: {0}".format(data_object.ActionText)) + output_status_message("AlternativeText: {0}".format(data_object.AlternativeText)) + output_status_message("DisplayText: {0}".format(data_object.DisplayText)) + output_status_message("FinalAppUrls:") + output_array_of_appurl(data_object.FinalAppUrls) + output_status_message("FinalMobileUrls:") + output_array_of_string(data_object.FinalMobileUrls) + output_status_message("FinalUrlSuffix: {0}".format(data_object.FinalUrlSuffix)) + output_status_message("FinalUrls:") + output_array_of_string(data_object.FinalUrls) + output_status_message("Name: {0}".format(data_object.Name)) + output_status_message("ThumbnailId: {0}".format(data_object.ThumbnailId)) + output_status_message("ThumbnailUrl: {0}".format(data_object.ThumbnailUrl)) + output_status_message("TrackingUrlTemplate: {0}".format(data_object.TrackingUrlTemplate)) + output_status_message("UrlCustomParameters:") + output_customparameters(data_object.UrlCustomParameters) + output_status_message("VideoId: {0}".format(data_object.VideoId)) + output_status_message("* * * End output_videoadextension * * *") + +def output_array_of_videoadextension(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['VideoAdExtension']: + output_videoadextension(data_object) + +def output_videoasset(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_videoasset * * *") + output_status_message("SubType: {0}".format(data_object.SubType)) + output_status_message("ThumbnailImage:") + output_imageasset(data_object.ThumbnailImage) + output_status_message("* * * End output_videoasset * * *") + +def output_array_of_videoasset(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['VideoAsset']: + output_videoasset(data_object) + def output_webpage(data_object): if data_object is None: return @@ -2684,6 +3388,18 @@ def output_array_of_calltoaction(value_sets): for value_set in value_sets['CallToAction']: output_calltoaction(value_set) +def output_languagename(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_languagename(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of LanguageName:\n") + for value_set in value_sets['LanguageName']: + output_languagename(value_set) + def output_assetlinkeditorialstatus(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -2768,6 +3484,18 @@ def output_array_of_bidoption(value_sets): for value_set in value_sets['BidOption']: output_bidoption(value_set) +def output_campaignadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_campaignadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of CampaignAdditionalField:\n") + for value_set in value_sets['CampaignAdditionalField']: + output_campaignadditionalfield(value_set) + def output_adrotationtype(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -2816,6 +3544,30 @@ def output_array_of_adgroupstatus(value_sets): for value_set in value_sets['AdGroupStatus']: output_adgroupstatus(value_set) +def output_adgroupadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_adgroupadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of AdGroupAdditionalField:\n") + for value_set in value_sets['AdGroupAdditionalField']: + output_adgroupadditionalfield(value_set) + +def output_adadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_adadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of AdAdditionalField:\n") + for value_set in value_sets['AdAdditionalField']: + output_adadditionalfield(value_set) + def output_keywordeditorialstatus(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -2996,6 +3748,42 @@ def output_array_of_priceunit(value_sets): for value_set in value_sets['PriceUnit']: output_priceunit(value_set) +def output_promotiondiscountmodifier(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_promotiondiscountmodifier(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of PromotionDiscountModifier:\n") + for value_set in value_sets['PromotionDiscountModifier']: + output_promotiondiscountmodifier(value_set) + +def output_promotionoccasion(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_promotionoccasion(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of PromotionOccasion:\n") + for value_set in value_sets['PromotionOccasion']: + output_promotionoccasion(value_set) + +def output_adextensionheadertype(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_adextensionheadertype(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of AdExtensionHeaderType:\n") + for value_set in value_sets['AdExtensionHeaderType']: + output_adextensionheadertype(value_set) + def output_adextensionstypefilter(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -3068,6 +3856,18 @@ def output_array_of_adgroupcriteriontype(value_sets): for value_set in value_sets['AdGroupCriterionType']: output_adgroupcriteriontype(value_set) +def output_criterionadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_criterionadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of CriterionAdditionalField:\n") + for value_set in value_sets['CriterionAdditionalField']: + output_criterionadditionalfield(value_set) + def output_productpartitiontype(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -3200,6 +4000,18 @@ def output_array_of_itemaction(value_sets): for value_set in value_sets['ItemAction']: output_itemaction(value_set) +def output_bmcstoreadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_bmcstoreadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of BMCStoreAdditionalField:\n") + for value_set in value_sets['BMCStoreAdditionalField']: + output_bmcstoreadditionalfield(value_set) + def output_bmcstoresubtype(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -3212,6 +4024,18 @@ def output_array_of_bmcstoresubtype(value_sets): for value_set in value_sets['BMCStoreSubType']: output_bmcstoresubtype(value_set) +def output_entityscope(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_entityscope(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of EntityScope:\n") + for value_set in value_sets['EntityScope']: + output_entityscope(value_set) + def output_campaigncriterionstatus(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -3236,17 +4060,17 @@ def output_array_of_campaigncriteriontype(value_sets): for value_set in value_sets['CampaignCriterionType']: output_campaigncriteriontype(value_set) -def output_entityscope(value_set): +def output_normalform(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: output_status_message(value) -def output_array_of_entityscope(value_sets): +def output_array_of_normalform(value_sets): if value_sets is None or len(value_sets) == 0: return - output_status_message("Array Of EntityScope:\n") - for value_set in value_sets['EntityScope']: - output_entityscope(value_set) + output_status_message("Array Of NormalForm:\n") + for value_set in value_sets['NormalForm']: + output_normalform(value_set) def output_stringoperator(value_set): output_status_message("Values in {0}".format(value_set.Type)) @@ -3284,6 +4108,30 @@ def output_array_of_productaudiencetype(value_sets): for value_set in value_sets['ProductAudienceType']: output_productaudiencetype(value_set) +def output_logicaloperator(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_logicaloperator(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of LogicalOperator:\n") + for value_set in value_sets['LogicalOperator']: + output_logicaloperator(value_set) + +def output_audienceadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_audienceadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of AudienceAdditionalField:\n") + for value_set in value_sets['AudienceAdditionalField']: + output_audienceadditionalfield(value_set) + def output_uettagtrackingstatus(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -3332,6 +4180,18 @@ def output_array_of_conversiongoalcounttype(value_sets): for value_set in value_sets['ConversionGoalCountType']: output_conversiongoalcounttype(value_set) +def output_conversiongoalcategory(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_conversiongoalcategory(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of ConversionGoalCategory:\n") + for value_set in value_sets['ConversionGoalCategory']: + output_conversiongoalcategory(value_set) + def output_conversiongoalrevenuetype(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -3392,6 +4252,30 @@ def output_array_of_valueoperator(value_sets): for value_set in value_sets['ValueOperator']: output_valueoperator(value_set) +def output_importadditionalfield(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_importadditionalfield(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of ImportAdditionalField:\n") + for value_set in value_sets['ImportAdditionalField']: + output_importadditionalfield(value_set) + +def output_importentitytype(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_importentitytype(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of ImportEntityType:\n") + for value_set in value_sets['ImportEntityType']: + output_importentitytype(value_set) + def output_array_of_long(items): if items is None or items['long'] is None: return diff --git a/examples/v13/customerbilling_example_helper.py b/examples/v13/customerbilling_example_helper.py index fa85cbc1..0b7c737c 100644 --- a/examples/v13/customerbilling_example_helper.py +++ b/examples/v13/customerbilling_example_helper.py @@ -126,6 +126,54 @@ def output_array_of_billingdocumentinfo(data_objects): for data_object in data_objects['BillingDocumentInfo']: output_billingdocumentinfo(data_object) +def output_coupon(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_coupon * * *") + output_status_message("CouponCode: {0}".format(data_object.CouponCode)) + output_status_message("ClassName: {0}".format(data_object.ClassName)) + output_status_message("CouponType: {0}".format(data_object.CouponType)) + output_status_message("Amount: {0}".format(data_object.Amount)) + output_status_message("SpendThreshold: {0}".format(data_object.SpendThreshold)) + output_status_message("CurrencyCode: {0}".format(data_object.CurrencyCode)) + output_status_message("PercentOff: {0}".format(data_object.PercentOff)) + output_status_message("ActiveDuration: {0}".format(data_object.ActiveDuration)) + output_status_message("ExpirationDate: {0}".format(data_object.ExpirationDate)) + output_status_message("StartDate: {0}".format(data_object.StartDate)) + output_status_message("EndDate: {0}".format(data_object.EndDate)) + output_status_message("SendToEmail: {0}".format(data_object.SendToEmail)) + output_status_message("SendToDate: {0}".format(data_object.SendToDate)) + output_status_message("IsRedeemed: {0}".format(data_object.IsRedeemed)) + output_status_message("RedemptionInfo:") + output_couponredemption(data_object.RedemptionInfo) + output_status_message("* * * End output_coupon * * *") + +def output_array_of_coupon(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['Coupon']: + output_coupon(data_object) + +def output_couponredemption(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_couponredemption * * *") + output_status_message("AccountId: {0}".format(data_object.AccountId)) + output_status_message("AccountNumber: {0}".format(data_object.AccountNumber)) + output_status_message("SpendToThreshold: {0}".format(data_object.SpendToThreshold)) + output_status_message("Balance: {0}".format(data_object.Balance)) + output_status_message("CurrencyCode: {0}".format(data_object.CurrencyCode)) + output_status_message("RedemptionDate: {0}".format(data_object.RedemptionDate)) + output_status_message("ExpirationDate: {0}".format(data_object.ExpirationDate)) + output_status_message("ActivationDate: {0}".format(data_object.ActivationDate)) + output_status_message("* * * End output_couponredemption * * *") + +def output_array_of_couponredemption(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['CouponRedemption']: + output_couponredemption(data_object) + def output_insertionorder(data_object): if data_object is None: return diff --git a/examples/v13/customermanagement_example_helper.py b/examples/v13/customermanagement_example_helper.py index c4826c9b..3bd6d7fa 100644 --- a/examples/v13/customermanagement_example_helper.py +++ b/examples/v13/customermanagement_example_helper.py @@ -26,6 +26,7 @@ def output_accountinfowithcustomerdata(data_object): output_status_message("AccountNumber: {0}".format(data_object.AccountNumber)) output_status_message("AccountLifeCycleStatus: {0}".format(data_object.AccountLifeCycleStatus)) output_status_message("PauseReason: {0}".format(data_object.PauseReason)) + output_status_message("AccountMode: {0}".format(data_object.AccountMode)) output_status_message("* * * End output_accountinfowithcustomerdata * * *") def output_array_of_accountinfowithcustomerdata(data_objects): @@ -34,6 +35,22 @@ def output_array_of_accountinfowithcustomerdata(data_objects): for data_object in data_objects['AccountInfoWithCustomerData']: output_accountinfowithcustomerdata(data_object) +def output_accounttaxcertificate(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_accounttaxcertificate * * *") + output_status_message("TaxCertificateBlobContainerName: {0}".format(data_object.TaxCertificateBlobContainerName)) + output_status_message("TaxCertificates:") + output_array_of_keyvaluepairofstringbase64binary(data_object.TaxCertificates) + output_status_message("Status: {0}".format(data_object.Status)) + output_status_message("* * * End output_accounttaxcertificate * * *") + +def output_array_of_accounttaxcertificate(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['AccountTaxCertificate']: + output_accounttaxcertificate(data_object) + def output_adapierror(data_object): if data_object is None: return @@ -121,6 +138,9 @@ def output_advertiseraccount(data_object): output_address(data_object.BusinessAddress) output_status_message("AutoTagType: {0}".format(data_object.AutoTagType)) output_status_message("SoldToPaymentInstrumentId: {0}".format(data_object.SoldToPaymentInstrumentId)) + output_status_message("TaxCertificate:") + output_accounttaxcertificate(data_object.TaxCertificate) + output_status_message("AccountMode: {0}".format(data_object.AccountMode)) output_status_message("* * * End output_advertiseraccount * * *") def output_array_of_advertiseraccount(data_objects): @@ -293,6 +313,20 @@ def output_array_of_daterange(data_objects): for data_object in data_objects['DateRange']: output_daterange(data_object) +def output_keyvaluepairofstringbase64binary(data_object): + if data_object is None: + return + output_status_message("* * * Begin output_keyvaluepairofstringbase64binary * * *") + output_status_message("key: {0}".format(data_object.key)) + output_status_message("value: {0}".format(data_object.value)) + output_status_message("* * * End output_keyvaluepairofstringbase64binary * * *") + +def output_array_of_keyvaluepairofstringbase64binary(data_objects): + if data_objects is None or len(data_objects) == 0: + return + for data_object in data_objects['KeyValuePairOfstringbase64Binary']: + output_keyvaluepairofstringbase64binary(data_object) + def output_keyvaluepairofstringstring(data_object): if data_object is None: return @@ -530,6 +564,18 @@ def output_array_of_autotagtype(value_sets): for value_set in value_sets['AutoTagType']: output_autotagtype(value_set) +def output_taxcertificatestatus(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_taxcertificatestatus(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of TaxCertificateStatus:\n") + for value_set in value_sets['TaxCertificateStatus']: + output_taxcertificatestatus(value_set) + def output_customerfinancialstatus(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: @@ -578,29 +624,41 @@ def output_array_of_customerlifecyclestatus(value_sets): for value_set in value_sets['CustomerLifeCycleStatus']: output_customerlifecyclestatus(value_set) -def output_emailformat(value_set): +def output_lcid(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: output_status_message(value) -def output_array_of_emailformat(value_sets): +def output_array_of_lcid(value_sets): if value_sets is None or len(value_sets) == 0: return - output_status_message("Array Of EmailFormat:\n") - for value_set in value_sets['EmailFormat']: - output_emailformat(value_set) + output_status_message("Array Of LCID:\n") + for value_set in value_sets['LCID']: + output_lcid(value_set) -def output_lcid(value_set): +def output_accountadditionalfield(value_set): output_status_message("Values in {0}".format(value_set.Type)) for value in value_set['string']: output_status_message(value) -def output_array_of_lcid(value_sets): +def output_array_of_accountadditionalfield(value_sets): if value_sets is None or len(value_sets) == 0: return - output_status_message("Array Of LCID:\n") - for value_set in value_sets['LCID']: - output_lcid(value_set) + output_status_message("Array Of AccountAdditionalField:\n") + for value_set in value_sets['AccountAdditionalField']: + output_accountadditionalfield(value_set) + +def output_emailformat(value_set): + output_status_message("Values in {0}".format(value_set.Type)) + for value in value_set['string']: + output_status_message(value) + +def output_array_of_emailformat(value_sets): + if value_sets is None or len(value_sets) == 0: + return + output_status_message("Array Of EmailFormat:\n") + for value_set in value_sets['EmailFormat']: + output_emailformat(value_set) def output_secretquestion(value_set): output_status_message("Values in {0}".format(value_set.Type)) diff --git a/examples/v13/dynamic_search_ads.py b/examples/v13/dynamic_search_ads.py index c7c36229..20aabd3f 100644 --- a/examples/v13/dynamic_search_ads.py +++ b/examples/v13/dynamic_search_ads.py @@ -98,9 +98,8 @@ def get_campaign_webpage_negative_url_example(campaign_id): def main(authorization_data): try: - # To get started with dynamic search ads, first you'll need to add a new Campaign - # with its type set to DynamicSearchAds. When you create the campaign, you'll need to - # include a DynamicSearchAdsSetting that specifies the target web site domain and language. + # To get started with dynamic search ads, first you'll need to add a new Search campaign + # Include a DynamicSearchAdsSetting that specifies the target website domain and language. campaigns=campaign_service.factory.create('ArrayOfCampaign') campaign=set_elements_to_none(campaign_service.factory.create('Campaign')) @@ -133,10 +132,11 @@ def main(authorization_data): output_status_message("PartialErrors:") output_array_of_batcherror(add_campaigns_response.PartialErrors) - # Create a new ad group within the dynamic search ads campaign. + # Create a new ad group with type set to "SearchDynamic" ad_groups=campaign_service.factory.create('ArrayOfAdGroup') ad_group=set_elements_to_none(campaign_service.factory.create('AdGroup')) + ad_group.AdGroupType='SearchDynamic' ad_group.Name="Women's Red Shoe Sale" end_date=campaign_service.factory.create('Date') end_date.Day=31 diff --git a/examples/v13/reporting_example_helper.py b/examples/v13/reporting_example_helper.py index 84140486..1bd85f0f 100644 --- a/examples/v13/reporting_example_helper.py +++ b/examples/v13/reporting_example_helper.py @@ -1310,6 +1310,7 @@ def output_reportrequest(data_object): output_status_message("ExcludeReportFooter: {0}".format(data_object.ExcludeReportFooter)) output_status_message("ExcludeReportHeader: {0}".format(data_object.ExcludeReportHeader)) output_status_message("Format: {0}".format(data_object.Format)) + output_status_message("FormatVersion: {0}".format(data_object.FormatVersion)) output_status_message("ReportName: {0}".format(data_object.ReportName)) output_status_message("ReturnOnlyCompleteData: {0}".format(data_object.ReturnOnlyCompleteData)) if data_object.Type == 'AccountPerformanceReportRequest': From ba4f0f06111e52944eba4e50a43adf561d2ad2a8 Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Fri, 20 Aug 2021 10:47:41 +0800 Subject: [PATCH 05/55] v13.0.11 --- HISTORY.rst | 7 + bingads/manifest.py | 2 +- .../bulk/entities/ad_extensions/__init__.py | 3 +- .../bulk_disclaimer_ad_extensions.py | 136 +++++++ bingads/v13/bulk/entities/bulk_campaign.py | 56 ++- .../v13/internal/bulk/bulk_object_factory.py | 2 + bingads/v13/internal/bulk/csv_headers.py | 10 + bingads/v13/internal/bulk/string_table.py | 14 + .../proxies/production/adinsight_service.xml | 2 +- .../v13/proxies/production/bulk_service.xml | 14 + .../production/campaignmanagement_service.xml | 330 ++++++++++------- .../v13/proxies/sandbox/adinsight_service.xml | 2 +- bingads/v13/proxies/sandbox/bulk_service.xml | 14 + .../sandbox/campaignmanagement_service.xml | 332 +++++++++++------- generate_proxies.ps1 | 5 +- setup.py | 2 +- 16 files changed, 671 insertions(+), 260 deletions(-) create mode 100644 bingads/v13/bulk/entities/ad_extensions/bulk_disclaimer_ad_extensions.py diff --git a/HISTORY.rst b/HISTORY.rst index 50b207a2..f12f39ad 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,13 @@ .. :changelog: Release History + +13.0.11(2021-08-20) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add mapping for new DynamicDescriptionEnabled and DisclaimerSetting fields in BulkCampaign. +* Add BulkDisclaimerAdExtension and BulkCampaignDisclaimerAdExtension mapping for disclaimer ads support. + 13.0.10(2021-06-20) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index b45b42c8..2833eaea 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.10' +VERSION = '13.0.11' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/ad_extensions/__init__.py b/bingads/v13/bulk/entities/ad_extensions/__init__.py index dbab11bb..130d764a 100644 --- a/bingads/v13/bulk/entities/ad_extensions/__init__.py +++ b/bingads/v13/bulk/entities/ad_extensions/__init__.py @@ -13,4 +13,5 @@ from .bulk_promotion_ad_extensions import * from .bulk_filterlink_ad_extensions import * from .bulk_flyer_ad_extensions import * -from .bulk_video_ad_extensions import * \ No newline at end of file +from .bulk_video_ad_extensions import * +from .bulk_disclaimer_ad_extensions import * \ No newline at end of file diff --git a/bingads/v13/bulk/entities/ad_extensions/bulk_disclaimer_ad_extensions.py b/bingads/v13/bulk/entities/ad_extensions/bulk_disclaimer_ad_extensions.py new file mode 100644 index 00000000..64001885 --- /dev/null +++ b/bingads/v13/bulk/entities/ad_extensions/bulk_disclaimer_ad_extensions.py @@ -0,0 +1,136 @@ +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from .common import _BulkAdExtensionBase +from .common import _BulkAdGroupAdExtensionAssociation +from .common import _BulkCampaignAdExtensionAssociation +from .common import _BulkAccountAdExtensionAssociation + +from bingads.v13.internal.extensions import * + + +_DisclaimerAdExtension = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DisclaimerAdExtension')) + + +class BulkDisclaimerAdExtension(_BulkAdExtensionBase): + """ Represents a disclaimer ad extension. + + This class exposes the :attr:`disclaimer_ad_extension` property that can be read and written + as fields of the Disclaimer Ad Extension record in a bulk file. + + For more information, see Disclaimer Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, account_id=None, ad_extension=None): + if ad_extension and not isinstance(ad_extension, _DisclaimerAdExtension): + raise ValueError('The type of ad_extension is: {0}, should be: {1}'.format( + type(ad_extension), + 'DisclaimerAdExtension' + )) + super(BulkDisclaimerAdExtension, self).__init__( + account_id=account_id, + ad_extension=ad_extension + ) + + @property + def disclaimer_ad_extension(self): + """ The disclaimer ad extension. + + see Disclaimer Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + """ + + return self._ad_extension + + @disclaimer_ad_extension.setter + def disclaimer_ad_extension(self, value): + self._ad_extension = value + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.DisclaimerName, + field_to_csv=lambda c: bulk_str(c.disclaimer_ad_extension.Name), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.DisclaimerTitle, + field_to_csv=lambda c: bulk_str(c.disclaimer_ad_extension.Title), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'Title', v) + ), + _SimpleBulkMapping( + header=_StringTable.DisclaimerPopupText, + field_to_csv=lambda c: bulk_str(c.disclaimer_ad_extension.PopupText), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'PopupText', v) + ), + _SimpleBulkMapping( + header=_StringTable.DisclaimerLineText, + field_to_csv=lambda c: bulk_str(c.disclaimer_ad_extension.LineText), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'LineText', v) + ), + _SimpleBulkMapping( + header=_StringTable.DisclaimerLayout, + field_to_csv=lambda c: bulk_str(c.disclaimer_ad_extension.DisclaimerLayout), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'DisclaimerLayout', v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.disclaimer_ad_extension.FinalUrls, c.disclaimer_ad_extension.Id), + csv_to_field=lambda c, v: csv_to_field_Urls(c.disclaimer_ad_extension.FinalUrls, v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalMobileUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.disclaimer_ad_extension.FinalMobileUrls, c.disclaimer_ad_extension.Id), + csv_to_field=lambda c, v: csv_to_field_Urls(c.disclaimer_ad_extension.FinalMobileUrls, v) + ), + _SimpleBulkMapping( + header=_StringTable.TrackingTemplate, + field_to_csv=lambda c: bulk_optional_str(c.disclaimer_ad_extension.TrackingUrlTemplate, c.disclaimer_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'TrackingUrlTemplate', v if v else '') + ), + _SimpleBulkMapping( + header=_StringTable.CustomParameter, + field_to_csv=lambda c: field_to_csv_UrlCustomParameters(c.disclaimer_ad_extension), + csv_to_field=lambda c, v: csv_to_field_UrlCustomParameters(c.disclaimer_ad_extension, v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrlSuffix, + field_to_csv=lambda c: bulk_optional_str(c.disclaimer_ad_extension.FinalUrlSuffix, c.disclaimer_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.disclaimer_ad_extension, 'FinalUrlSuffix', v) + ) + ] + + def process_mappings_from_row_values(self, row_values): + self.disclaimer_ad_extension = _CAMPAIGN_OBJECT_FACTORY_V13.create('DisclaimerAdExtension') + self.disclaimer_ad_extension.Type = 'DisclaimerAdExtension' + super(BulkDisclaimerAdExtension, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkDisclaimerAdExtension._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.disclaimer_ad_extension, 'disclaimer_ad_extension') + super(BulkDisclaimerAdExtension, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkDisclaimerAdExtension._MAPPINGS) + +class BulkCampaignDisclaimerAdExtension(_BulkCampaignAdExtensionAssociation): + """ Represents a campaign level disclaimer ad extension. + + This class exposes properties that can be read and written + as fields of the Campaign Disclaimer Ad Extension record in a bulk file. + + For more information, see Campaign Disclaimer Ad Extension at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + pass diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index f2631d8a..226b403b 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -9,6 +9,7 @@ _TargetSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetSetting')) _ShoppingSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ShoppingSetting')) _DsaSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DynamicSearchAdsSetting')) +_DisclaimerSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DisclaimerSetting')) class BulkCampaign(_SingleRecordBulkEntity): """ Represents a campaign that can be read or written in a bulk file. @@ -109,10 +110,13 @@ def _get_shopping_setting(self): def _get_target_setting(self): return self._get_setting(_TargetSetting, 'TargetSetting') - + def _get_dsa_setting(self): return self._get_setting(_DsaSetting, 'DynamicSearchAdsSetting') - + + def _get_disclaimer_setting(self): + return self._get_setting(_DisclaimerSetting, 'DisclaimerSetting') + def _get_setting(self, setting_type, setting_name): if not self.campaign.Settings.Setting: return None @@ -144,8 +148,10 @@ def _read_campaign_type(c, v): if campaign_type.lower() == 'audience': BulkCampaign._create_campaign_setting(c.campaign, 'DynamicFeedSetting') BulkCampaign._create_campaign_setting(c.campaign, 'ShoppingSetting') + BulkCampaign._create_campaign_setting(c.campaign, 'VerifiedTrackingSetting') if campaign_type.lower() == 'dynamicsearchads' or campaign_type.lower() == 'search': BulkCampaign._create_campaign_setting(c.campaign, 'DynamicSearchAdsSetting') + BulkCampaign._create_campaign_setting(c.campaign, 'DisclaimerSetting') @staticmethod def _create_campaign_setting(campaign, setting_type): @@ -306,6 +312,42 @@ def _write_domain_language(c): return None return bulk_str(dsa_setting.Language) + @staticmethod + def _read_DisclaimerAdsEnabled(c, v): + if not c.campaign.CampaignType: + return None + disclaimer_setting = c._get_disclaimer_setting() + if not disclaimer_setting: + return None + disclaimer_setting.DisclaimerAdsEnabled = parse_bool(v) + + @staticmethod + def _write_DisclaimerAdsEnabled(c): + if not c.campaign.CampaignType: + return None + disclaimer_setting = c._get_disclaimer_setting() + if not disclaimer_setting: + return None + return bulk_str(disclaimer_setting.DisclaimerAdsEnabled) + + @staticmethod + def _read_DynamicDescriptionEnabled(c, v): + if not c.campaign.CampaignType: + return None + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + dsa_setting.DynamicDescriptionEnabled = parse_bool(v) + + @staticmethod + def _write_DynamicDescriptionEnabled(c): + if not c.campaign.CampaignType: + return None + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + return bulk_str(dsa_setting.DynamicDescriptionEnabled) + @staticmethod def _read_page_feed_ids(c, v): if not c.campaign.CampaignType: @@ -516,6 +558,16 @@ def _write_website(c): int(v) if v else None ) ), + _SimpleBulkMapping( + header=_StringTable.DisclaimerAdsEnabled, + field_to_csv=lambda c: BulkCampaign._write_DisclaimerAdsEnabled(c), + csv_to_field=lambda c, v: BulkCampaign._read_DisclaimerAdsEnabled(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.DynamicDescriptionEnabled, + field_to_csv=lambda c: BulkCampaign._write_DynamicDescriptionEnabled(c), + csv_to_field=lambda c, v: BulkCampaign._read_DynamicDescriptionEnabled(c, v) + ) ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 98c71c39..86820412 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -26,6 +26,8 @@ class _BulkObjectFactory(): _StringTable.AccountFlyerAdExtension: _EntityInfo(lambda: BulkAccountFlyerAdExtension()), _StringTable.CampaignFlyerAdExtension: _EntityInfo(lambda: BulkCampaignFlyerAdExtension()), _StringTable.AdGroupFlyerAdExtension: _EntityInfo(lambda: BulkAdGroupFlyerAdExtension()), + _StringTable.DisclaimerAdExtension: _EntityInfo(lambda: BulkDisclaimerAdExtension()), + _StringTable.CampaignDisclaimerAdExtension: _EntityInfo(lambda: BulkCampaignDisclaimerAdExtension()), _StringTable.ImageAdExtension: _EntityInfo(lambda: BulkImageAdExtension()), _StringTable.AccountImageAdExtension: _EntityInfo(lambda: BulkAccountImageAdExtension()), _StringTable.CampaignImageAdExtension: _EntityInfo(lambda: BulkCampaignImageAdExtension()), diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index e5bf581d..79c65efe 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -16,6 +16,8 @@ class _CsvHeaders: _StringTable.ClientId, _StringTable.LastModifiedTime, _StringTable.MultiMediaAdBidAdjustment, + _StringTable.DynamicDescriptionEnabled, + # Campaign _StringTable.TimeZone, @@ -84,6 +86,14 @@ class _CsvHeaders: # AdExtensions common _StringTable.Version, + + #Disclaimer Ad Extension + _StringTable.DisclaimerAdsEnabled, + _StringTable.DisclaimerName, + _StringTable.DisclaimerTitle, + _StringTable.DisclaimerLayout, + _StringTable.DisclaimerPopupText, + _StringTable.DisclaimerLineText, # SiteLink Ad Extensions _StringTable.SiteLinkExtensionOrder, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index ffd1f89c..3bc26814 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -46,6 +46,7 @@ class _StringTable: Param2 = "Param2" Param3 = "Param3" DevicePreference = "Device Preference" + VerifiedTrackingData = "Verified Tracking Setting" CampaignNegativeKeyword = "Campaign Negative Keyword" CampaignNegativeSite = "Campaign Negative Site" AdGroupNegativeKeyword = "Ad Group Negative Keyword" @@ -91,6 +92,7 @@ class _StringTable: AutoApplyRecommendations = "Auto Apply Recommendations" AllowImageAutoRetrieve = "Allow Image Auto Retrieve" MultiMediaAdBidAdjustment = "Multi Media Ad Bid Adjustment" + BusinessAttributes = "Business Attributes" # Entity Types SemanticVersion = "Format Version" @@ -111,6 +113,17 @@ class _StringTable: SocialNetworkAdExtension = "Social Network Ad Extension" Version = "Version" + # Disclaimer Ads + DisclaimerAdsEnabled = "Disclaimer Ads Enabled" + DisclaimerName = "Disclaimer Name" + DisclaimerTitle = "Disclaimer Title" + DisclaimerLayout = "Disclaimer Layout" + DisclaimerPopupText = "Disclaimer Popup Text" + DisclaimerLineText = "Disclaimer Line Text" + + DisclaimerAdExtension = "Disclaimer Ad Extension" + CampaignDisclaimerAdExtension = "Campaign Disclaimer Ad Extension" + # Image Ad Extension AltText = "Alternative Text" MediaIds = "Media Ids" @@ -294,6 +307,7 @@ class _StringTable: CampaignType = "Campaign Type" CampaignPriority = "Priority" LocalInventoryAdsEnabled = "LocalInventoryAdsEnabled" + DynamicDescriptionEnabled = "Dynamic Description Enabled" CampaignNegativeStoreCriterion = "Campaign Negative Store Criterion" diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index 86fd16c3..975c02d1 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3049,7 +3049,7 @@ - + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 59a142a8..c6c2cc24 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1030,6 +1030,20 @@ + + + + 138 + + + + + + + 139 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 88896a36..33615aea 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1019,6 +1019,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1029,7 +1049,7 @@ - + @@ -1046,7 +1066,7 @@ - + @@ -1070,7 +1090,7 @@ - + @@ -1117,6 +1137,7 @@ + @@ -1133,7 +1154,7 @@ - + @@ -1151,7 +1172,7 @@ - + @@ -1181,7 +1202,7 @@ - + @@ -1202,7 +1223,7 @@ - + @@ -1243,7 +1264,7 @@ - + @@ -1270,7 +1291,7 @@ - + @@ -1372,8 +1393,8 @@ - - + + @@ -1382,7 +1403,7 @@ - + @@ -1397,7 +1418,7 @@ - + @@ -1452,7 +1473,7 @@ - + @@ -1461,7 +1482,7 @@ - + @@ -1482,7 +1503,7 @@ - + @@ -1535,14 +1556,14 @@ - + - + @@ -1562,7 +1583,7 @@ - + @@ -1612,7 +1633,7 @@ - + @@ -1679,10 +1700,10 @@ - + - - + + @@ -1729,8 +1750,8 @@ - - + + @@ -1739,7 +1760,7 @@ - + @@ -1769,7 +1790,7 @@ - + @@ -1807,7 +1828,7 @@ - + @@ -1941,7 +1962,7 @@ - + @@ -1950,7 +1971,7 @@ - + @@ -2065,6 +2086,34 @@ + + + + 256 + + + + + + + 512 + + + + + + + 1024 + + + + + + + 2048 + + + @@ -2111,7 +2160,7 @@ - + @@ -2249,10 +2298,10 @@ - + - - + + @@ -2260,7 +2309,7 @@ - + @@ -2283,9 +2332,9 @@ - + - + @@ -2325,9 +2374,9 @@ - + - + @@ -2340,9 +2389,9 @@ - + - + @@ -2442,7 +2491,7 @@ - + @@ -2488,8 +2537,8 @@ - - + + @@ -2529,9 +2578,9 @@ - + - + @@ -2605,11 +2654,11 @@ - + - + - + @@ -2665,12 +2714,12 @@ - + - + - - + + @@ -2687,9 +2736,9 @@ - + - + @@ -2701,6 +2750,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -2735,7 +2804,7 @@ - + @@ -2760,7 +2829,7 @@ - + @@ -2784,6 +2853,7 @@ + @@ -2830,7 +2900,7 @@ - + @@ -2919,7 +2989,7 @@ - + @@ -2947,7 +3017,7 @@ - + @@ -3024,7 +3094,7 @@ - + @@ -3063,7 +3133,7 @@ - + @@ -3071,7 +3141,7 @@ - + @@ -3158,7 +3228,7 @@ - + @@ -3174,7 +3244,7 @@ - + @@ -3209,7 +3279,7 @@ - + @@ -3594,7 +3664,7 @@ - + @@ -3718,9 +3788,9 @@ - + - + @@ -3805,7 +3875,7 @@ - + @@ -3828,7 +3898,7 @@ - + @@ -3890,7 +3960,7 @@ - + @@ -3996,7 +4066,7 @@ - + @@ -4028,14 +4098,14 @@ - + - + @@ -4086,7 +4156,7 @@ - + @@ -4159,7 +4229,7 @@ - + @@ -4192,7 +4262,7 @@ - + @@ -4215,7 +4285,7 @@ - + @@ -4284,7 +4354,7 @@ - + @@ -4301,7 +4371,7 @@ - + @@ -4335,7 +4405,7 @@ - + @@ -4377,7 +4447,7 @@ - + @@ -4570,7 +4640,7 @@ - + @@ -4593,7 +4663,7 @@ - + @@ -4609,7 +4679,7 @@ - + @@ -4650,7 +4720,7 @@ - + @@ -4672,7 +4742,7 @@ - + @@ -4686,7 +4756,7 @@ - + @@ -4701,7 +4771,7 @@ - + @@ -4739,7 +4809,7 @@ - + @@ -4761,7 +4831,7 @@ - + @@ -4775,7 +4845,7 @@ - + @@ -4790,7 +4860,7 @@ - + @@ -4820,14 +4890,14 @@ - + - + @@ -5088,7 +5158,7 @@ - + @@ -5122,7 +5192,7 @@ - + @@ -5144,7 +5214,7 @@ - + @@ -5158,7 +5228,7 @@ - + @@ -5185,7 +5255,7 @@ - + @@ -5255,7 +5325,7 @@ - + @@ -5499,7 +5569,7 @@ - + @@ -5523,7 +5593,7 @@ - + @@ -5631,7 +5701,7 @@ - + @@ -5639,7 +5709,7 @@ - + @@ -5667,7 +5737,7 @@ - + @@ -5726,7 +5796,7 @@ - + @@ -5743,7 +5813,7 @@ - + @@ -5786,7 +5856,7 @@ - + @@ -5794,7 +5864,7 @@ - + @@ -5822,7 +5892,7 @@ - + @@ -5940,7 +6010,7 @@ - + @@ -6094,7 +6164,7 @@ - + @@ -6113,7 +6183,7 @@ - + @@ -6123,7 +6193,7 @@ - + @@ -6189,7 +6259,7 @@ - + @@ -6217,7 +6287,7 @@ - + @@ -6234,7 +6304,7 @@ - + @@ -6250,8 +6320,9 @@ - + + @@ -6259,13 +6330,16 @@ + + + - + @@ -6280,7 +6354,7 @@ - + @@ -6317,7 +6391,7 @@ - + @@ -6325,7 +6399,7 @@ - + @@ -6339,7 +6413,7 @@ - + @@ -6423,6 +6497,12 @@ + + + + + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index c945fa27..511a254e 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3049,7 +3049,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 4dd80fc2..fcc5e726 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1030,6 +1030,20 @@ + + + + 138 + + + + + + + 139 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index cbfa48b5..658bf7de 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1019,6 +1019,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1029,7 +1049,7 @@ - + @@ -1046,7 +1066,7 @@ - + @@ -1070,7 +1090,7 @@ - + @@ -1117,6 +1137,7 @@ + @@ -1133,7 +1154,7 @@ - + @@ -1151,7 +1172,7 @@ - + @@ -1181,7 +1202,7 @@ - + @@ -1202,7 +1223,7 @@ - + @@ -1243,7 +1264,7 @@ - + @@ -1270,7 +1291,7 @@ - + @@ -1372,8 +1393,8 @@ - - + + @@ -1382,7 +1403,7 @@ - + @@ -1397,7 +1418,7 @@ - + @@ -1452,7 +1473,7 @@ - + @@ -1461,7 +1482,7 @@ - + @@ -1482,7 +1503,7 @@ - + @@ -1535,14 +1556,14 @@ - + - + @@ -1562,7 +1583,7 @@ - + @@ -1612,7 +1633,7 @@ - + @@ -1679,10 +1700,10 @@ - + - - + + @@ -1729,8 +1750,8 @@ - - + + @@ -1739,7 +1760,7 @@ - + @@ -1769,7 +1790,7 @@ - + @@ -1807,7 +1828,7 @@ - + @@ -1941,7 +1962,7 @@ - + @@ -1950,7 +1971,7 @@ - + @@ -2065,6 +2086,34 @@ + + + + 256 + + + + + + + 512 + + + + + + + 1024 + + + + + + + 2048 + + + @@ -2111,7 +2160,7 @@ - + @@ -2249,10 +2298,10 @@ - + - - + + @@ -2260,7 +2309,7 @@ - + @@ -2283,9 +2332,9 @@ - + - + @@ -2325,9 +2374,9 @@ - + - + @@ -2340,9 +2389,9 @@ - + - + @@ -2442,7 +2491,7 @@ - + @@ -2488,8 +2537,8 @@ - - + + @@ -2529,9 +2578,9 @@ - + - + @@ -2605,11 +2654,11 @@ - + - + - + @@ -2665,12 +2714,12 @@ - + - + - - + + @@ -2687,9 +2736,9 @@ - + - + @@ -2701,6 +2750,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -2735,7 +2804,7 @@ - + @@ -2760,7 +2829,7 @@ - + @@ -2784,6 +2853,7 @@ + @@ -2830,7 +2900,7 @@ - + @@ -2919,7 +2989,7 @@ - + @@ -2947,7 +3017,7 @@ - + @@ -3024,7 +3094,7 @@ - + @@ -3063,7 +3133,7 @@ - + @@ -3071,7 +3141,7 @@ - + @@ -3158,7 +3228,7 @@ - + @@ -3174,7 +3244,7 @@ - + @@ -3209,7 +3279,7 @@ - + @@ -3594,7 +3664,7 @@ - + @@ -3718,9 +3788,9 @@ - + - + @@ -3805,7 +3875,7 @@ - + @@ -3828,7 +3898,7 @@ - + @@ -3890,7 +3960,7 @@ - + @@ -3996,7 +4066,7 @@ - + @@ -4028,14 +4098,14 @@ - + - + @@ -4086,7 +4156,7 @@ - + @@ -4159,7 +4229,7 @@ - + @@ -4192,7 +4262,7 @@ - + @@ -4215,7 +4285,7 @@ - + @@ -4284,7 +4354,7 @@ - + @@ -4301,7 +4371,7 @@ - + @@ -4335,7 +4405,7 @@ - + @@ -4377,7 +4447,7 @@ - + @@ -4570,7 +4640,7 @@ - + @@ -4593,7 +4663,7 @@ - + @@ -4609,7 +4679,7 @@ - + @@ -4650,7 +4720,7 @@ - + @@ -4672,7 +4742,7 @@ - + @@ -4686,7 +4756,7 @@ - + @@ -4701,7 +4771,7 @@ - + @@ -4739,7 +4809,7 @@ - + @@ -4761,7 +4831,7 @@ - + @@ -4775,7 +4845,7 @@ - + @@ -4790,7 +4860,7 @@ - + @@ -4820,14 +4890,14 @@ - + - + @@ -5088,7 +5158,7 @@ - + @@ -5122,7 +5192,7 @@ - + @@ -5144,7 +5214,7 @@ - + @@ -5158,7 +5228,7 @@ - + @@ -5185,7 +5255,7 @@ - + @@ -5255,7 +5325,7 @@ - + @@ -5499,7 +5569,7 @@ - + @@ -5523,7 +5593,7 @@ - + @@ -5631,7 +5701,7 @@ - + @@ -5639,7 +5709,7 @@ - + @@ -5667,7 +5737,7 @@ - + @@ -5726,7 +5796,7 @@ - + @@ -5743,7 +5813,7 @@ - + @@ -5786,7 +5856,7 @@ - + @@ -5794,7 +5864,7 @@ - + @@ -5822,7 +5892,7 @@ - + @@ -5940,7 +6010,7 @@ - + @@ -6094,7 +6164,7 @@ - + @@ -6113,7 +6183,7 @@ - + @@ -6123,7 +6193,7 @@ - + @@ -6189,7 +6259,7 @@ - + @@ -6217,7 +6287,7 @@ - + @@ -6234,7 +6304,7 @@ - + @@ -6250,8 +6320,9 @@ - + + @@ -6259,13 +6330,16 @@ + + + - + @@ -6280,7 +6354,7 @@ - + @@ -6317,7 +6391,7 @@ - + @@ -6325,7 +6399,7 @@ - + @@ -6339,7 +6413,7 @@ - + @@ -6423,6 +6497,12 @@ + + + + + + @@ -12962,7 +13042,7 @@ - + diff --git a/generate_proxies.ps1 b/generate_proxies.ps1 index 3dc9ae88..12371e6b 100644 --- a/generate_proxies.ps1 +++ b/generate_proxies.ps1 @@ -14,6 +14,7 @@ function Format-XML([xml]$xml, $indent=3) $StringWriter.Flush() Write-Output $StringWriter.ToString() } - -wget $svcWsdl -OutFile $path +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$WebClient = New-Object System.Net.WebClient +$WebClient.DownloadFile($svcWsdl,$path) Format-XML ([xml](cat $path)) | Set-Content -Path $path \ No newline at end of file diff --git a/setup.py b/setup.py index 94629b19..6f6af51d 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.10' +VERSION = '13.0.11' with open('README.rst', 'r') as f: readme = f.read() From 8d1a51595f9f4776d2b719be7f3fc1378cee4f4f Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Wed, 13 Oct 2021 13:30:01 +0800 Subject: [PATCH 06/55] update to version 13.0.11.1 to move to suds-sommunity from suds-jurko --- HISTORY.rst | 4 ++ README.rst | 4 +- bingads/manifest.py | 2 +- bingads/service_client.py | 56 ++++++++++++++++++- bingads/v13/internal/bulk/string_table.py | 34 +++++------ .../production/campaignmanagement_service.xml | 9 +++ bingads/v13/proxies/sandbox/bulk_service.xml | 2 +- .../sandbox/campaignmanagement_service.xml | 9 +++ requirements.txt | 2 +- setup.py | 4 +- 10 files changed, 101 insertions(+), 25 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f12f39ad..a70888f9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ Release History +13.0.11.1(2021-10-13) ++++++++++++++++++++++++++ +* Update suds lib from suds-jurko to suds-community to support latest setuptools. + 13.0.11(2021-08-20) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. diff --git a/README.rst b/README.rst index ec98c61f..85b855fb 100644 --- a/README.rst +++ b/README.rst @@ -23,7 +23,7 @@ For more information, see `Getting Started Using Python with Bing Ads Services`_ External Dependencies --------------------- - - `suds-jurko`_ + - `suds-community`_ - `requests`_ - `future`_ - `six`_ @@ -33,7 +33,7 @@ External Dependencies .. _examples: https://github.com/BingAds/BingAds-Python-SDK/tree/master/examples .. _Getting Started Using Python with Bing Ads Services: https://docs.microsoft.com/en-us/bingads/guides/get-started-python -.. _suds-jurko: http://pypi.python.org/pypi/suds-jurko +.. _suds-community: https://pypi.org/pypi/suds-community/ .. _requests: http://pypi.python.org/pypi/requests .. _chardet: http://pypi.python.org/pypi/chardet .. _future: http://pypi.python.org/pypi/future diff --git a/bingads/manifest.py b/bingads/manifest.py index 2833eaea..dd47afbb 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.11' +VERSION = '13.0.11.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/service_client.py b/bingads/service_client.py index 48718334..8cdf693a 100644 --- a/bingads/service_client.py +++ b/bingads/service_client.py @@ -1,4 +1,4 @@ -from suds.client import Client, Factory, WebFault +from suds.client import Client, Factory, WebFault, Builder from suds.cache import ObjectCache from .headerplugin import HeaderPlugin from .authorization import * @@ -8,6 +8,56 @@ from tempfile import gettempdir from os import path from datetime import datetime +from suds.sudsobject import Factory as SFactory + +class BingAdsBuilder (Builder): + # copy from https://github.com/suds-community/suds/blob/master/suds/builder.py. Change line + # setattr(data, type.name, value if not type.optional() or type.multi_occurrence() else None) + # to + # setattr(data, type.name, value) + # to not breaking our customer and bulk mapping. + + def __init__(self, resolver): + """ + @param resolver: A schema object name resolver. + @type resolver: L{resolver.Resolver} + """ + self.resolver = resolver + + + def process(self, data, type, history): + """ process the specified type then process its children """ + if type in history: + return + if type.enum(): + return + history.append(type) + resolved = type.resolve() + value = None + + if type.multi_occurrence(): + value = [] + else: + if len(resolved) > 0: + if resolved.mixed(): + value = SFactory.property(resolved.name) + md = value.__metadata__ + md.sxtype = resolved + else: + value = SFactory.object(resolved.name) + md = value.__metadata__ + md.sxtype = resolved + md.ordering = self.ordering(resolved) + + setattr(data, type.name, value) + if value is not None: + data = value + if not isinstance(data, list): + self.add_attributes(data, resolved) + for child, ancestry in resolved.children(): + if self.skip_child(child, ancestry): + continue + self.process(data, child, history[:]) class ServiceClient: @@ -48,6 +98,7 @@ def __init__(self, service, version, authorization_data=None, environment='produ self.hp=HeaderPlugin() suds_options['plugins'] = [self.hp] self._soap_client = Client(self.service_url, **suds_options) + self._soap_client.factory.builder = BingAdsBuilder(self._soap_client.factory.builder.resolver) def __getattr__(self, name): # Set authorization data and options before every service call. @@ -299,10 +350,13 @@ def name(self): _CAMPAIGN_MANAGEMENT_SERVICE_V13 = Client( 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/sandbox/campaignmanagement_service.xml')) _CAMPAIGN_OBJECT_FACTORY_V13 = _CAMPAIGN_MANAGEMENT_SERVICE_V13.factory +_CAMPAIGN_OBJECT_FACTORY_V13.builder = BingAdsBuilder(_CAMPAIGN_OBJECT_FACTORY_V13.builder.resolver) + _CAMPAIGN_OBJECT_FACTORY_V13.object_cache = {} _CAMPAIGN_OBJECT_FACTORY_V13.create_without_cache = _CAMPAIGN_OBJECT_FACTORY_V13.create + def _suds_objects_deepcopy(origin): if origin is None: return None diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 3bc26814..6c7d1ea0 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -61,8 +61,8 @@ class _StringTable: FeedName = "Feed Name" TargetAdGroupId = 'Target Ad Group Id' TargetCampaignId = 'Target Campaign Id' - CustomAttributes = "Custom Attributes"; - PageFeedIds = "Page Feed Ids"; + CustomAttributes = "Custom Attributes" + PageFeedIds = "Page Feed Ids" PhysicalIntent = "Physical Intent" Bid = "Bid" Profile = "Profile" @@ -184,20 +184,20 @@ class _StringTable: AdGroupVideoAdExtension = "Ad Group Video Ad Extension" #Promotion AdExtension - PromotionAdExtension = "Promotion Ad Extension"; - AccountPromotionAdExtension = "Account Promotion Ad Extension"; - CampaignPromotionAdExtension = "Campaign Promotion Ad Extension"; - AdGroupPromotionAdExtension = "Ad Group Promotion Ad Extension"; - PromotionTarget = "Promotion Target"; - DiscountModifier = "Discount Modifier"; - PercentOff = "Percent Off"; - MoneyAmountOff = "Money Amount Off"; - PromotionCode = "Promotion Code"; - OrdersOverAmount = "Orders Over Amount"; - Occasion = "Occasion"; - PromotionStart = "Promotion Start"; - PromotionEnd = "Promotion End"; - CurrencyCode = "Currency Code"; + PromotionAdExtension = "Promotion Ad Extension" + AccountPromotionAdExtension = "Account Promotion Ad Extension" + CampaignPromotionAdExtension = "Campaign Promotion Ad Extension" + AdGroupPromotionAdExtension = "Ad Group Promotion Ad Extension" + PromotionTarget = "Promotion Target" + DiscountModifier = "Discount Modifier" + PercentOff = "Percent Off" + MoneyAmountOff = "Money Amount Off" + PromotionCode = "Promotion Code" + OrdersOverAmount = "Orders Over Amount" + Occasion = "Occasion" + PromotionStart = "Promotion Start" + PromotionEnd = "Promotion End" + CurrencyCode = "Currency Code" # Structured Snippet Ad Extension StructuredSnippetAdExtension = "Structured Snippet Ad Extension" @@ -456,7 +456,7 @@ class _StringTable: AdGroupNegativeRemarketingListAssociation = 'Ad Group Negative Remarketing List Association' CampaignRemarketingListAssociation = 'Campaign Remarketing List Association' CampaignNegativeRemarketingListAssociation = 'Campaign Negative Remarketing List Association' - CustomAudience = "Custom Audience"; + CustomAudience = "Custom Audience" AdGroupCustomAudienceAssociation = "Ad Group Custom Audience Association" AdGroupNegativeCustomAudienceAssociation = "Ad Group Negative Custom Audience Association" CampaignCustomAudienceAssociation = "Campaign Custom Audience Association" diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 33615aea..0c6dd2e7 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -3440,6 +3440,7 @@ + @@ -6020,6 +6021,13 @@ + + + + + + + @@ -6064,6 +6072,7 @@ + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index fcc5e726..32b6bed9 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1698,7 +1698,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 658bf7de..fa90d44f 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -3440,6 +3440,7 @@ + @@ -6020,6 +6021,13 @@ + + + + + + + @@ -6064,6 +6072,7 @@ + diff --git a/requirements.txt b/requirements.txt index fe57e372..0759c725 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -suds-jurko==0.6.0 +suds-community>=1.0.0b1 requests>=2.0.0 future six diff --git a/setup.py b/setup.py index 6f6af51d..1640c5ce 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.11' +VERSION = '13.0.11.1' with open('README.rst', 'r') as f: readme = f.read() @@ -11,7 +11,7 @@ history = f.read().replace('.. :changelog:', '') requirements = [ - 'suds-jurko==0.6.0', + 'suds-community>=1.0.0b1', 'future', 'six', 'requests', From 36858d532f17aa1fdc22a5d7f06159667363b8e3 Mon Sep 17 00:00:00 2001 From: xinyuwen Date: Fri, 29 Oct 2021 20:25:55 +0800 Subject: [PATCH 07/55] update python SDK to version 13.0.12 --- HISTORY.rst | 6 + bingads/manifest.py | 2 +- bingads/v13/bulk/entities/bulk_account.py | 65 +++++---- bingads/v13/bulk/entities/bulk_campaign.py | 48 +++++-- bingads/v13/internal/bulk/csv_headers.py | 28 ++-- bingads/v13/internal/bulk/string_table.py | 36 ++--- bingads/v13/internal/extensions.py | 123 ++++++++++++------ .../proxies/production/reporting_service.xml | 83 ++++++++++++ .../v13/proxies/sandbox/adinsight_service.xml | 2 +- bingads/v13/proxies/sandbox/bulk_service.xml | 2 +- .../v13/proxies/sandbox/reporting_service.xml | 83 ++++++++++++ setup.py | 2 +- 12 files changed, 372 insertions(+), 108 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a70888f9..cf518cad 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,12 @@ .. :changelog: Release History +13.0.12(2021-10-29) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add VerifiedTrackingSetting mapping in the BulkCampaign. +* Add BusinessAttributes mapping in the BulkCampaign. + 13.0.11.1(2021-10-13) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index dd47afbb..3e5aeb13 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.11.1' +VERSION = '13.0.12' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/bulk_account.py b/bingads/v13/bulk/entities/bulk_account.py index 8a48b493..8d80bf7d 100644 --- a/bingads/v13/bulk/entities/bulk_account.py +++ b/bingads/v13/bulk/entities/bulk_account.py @@ -31,6 +31,7 @@ def __init__(self, account_id=None, customer_id=None, sync_time=None): self._ad_click_parallel_tracking=None self._auto_apply_recommendations = None self._allow_image_auto_retrieve = None + self._business_attributes = None @property def id(self): @@ -75,84 +76,97 @@ def msclkid_auto_tagging_enabled(self): :return: The msclkid autotag setting of the account :rtype: bool """ - return self._msclkid_auto_tagging_enabled - + return self._msclkid_auto_tagging_enabled + @property def include_view_through_conversions(self): """ :return: The 'Include View Through Conversions' field of the account :rtype: bool """ - return self._include_view_through_conversions - + return self._include_view_through_conversions + @property def profile_expansion_enabled(self): """ :return: The 'Profile Expansion Enabled' field of the account :rtype: bool """ - return self._profile_expansion_enabled - + return self._profile_expansion_enabled + @property def tracking_url_template(self): """ The tracking template to use as a default for all URLs in your account. - + :return: The tracking template of the account :rtype: str """ - return self._tracking_url_template - + return self._tracking_url_template + @property def final_url_suffix(self): """ The final url suffix to use as a default for all URLs in your account. - + :return: The tracking template of the account :rtype: str """ return self._final_url_suffix - + @final_url_suffix.setter def final_url_suffix(self, v): self._final_url_suffix = v - + @property def ad_click_parallel_tracking(self): """ The setting of parallel tracking in the account. - + :return: The setting of parallel tracking of the account :rtype: bool """ return self._ad_click_parallel_tracking - + @ad_click_parallel_tracking.setter def ad_click_parallel_tracking(self, v): self._ad_click_parallel_tracking = v - + @property def allow_image_auto_retrieve(self): """ The setting of allowing image auto retrieve in the account. - + :return: The setting of allowing image auto retrieve of the account :rtype: bool """ return self._allow_image_auto_retrieve - + @allow_image_auto_retrieve.setter def allow_image_auto_retrieve(self, v): - self._allow_image_auto_retrieve = v - + self._allow_image_auto_retrieve = v + @property def auto_apply_recommendations(self): """ The setting of allowing image auto retrieve in the account. - + :return: The setting of allowing image auto retrieve of the account :rtype: dict """ return self._auto_apply_recommendations - + @auto_apply_recommendations.setter def auto_apply_recommendations(self, v): - self._auto_apply_recommendations = v + self._auto_apply_recommendations = v + + @property + def business_attributes(self): + """ The setting of business attributes in the account. + + :return: The setting of business attributes of the account + :rtype: dict + """ + return self._business_attributes + + @business_attributes.setter + def business_attributes(self, v): + self._business_attributes = v _MAPPINGS = [ _SimpleBulkMapping( @@ -204,11 +218,16 @@ def auto_apply_recommendations(self, v): header=_StringTable.AllowImageAutoRetrieve, field_to_csv=lambda c: bulk_str(c.allow_image_auto_retrieve), csv_to_field=lambda c, v: setattr(c, 'allow_image_auto_retrieve', parse_bool(v)) - ), + ), _SimpleBulkMapping( header=_StringTable.AutoApplyRecommendations, field_to_csv=lambda c: dict_bulk_str(c.auto_apply_recommendations, ';'), csv_to_field=lambda c, v: setattr(c, 'auto_apply_recommendations', parse_dict(v)) + ), + _SimpleBulkMapping( + header=_StringTable.BusinessAttributes, + field_to_csv=lambda c: multi_bulk_str(c.business_attributes, ';'), + csv_to_field=lambda c, v: setattr(c, 'business_attributes', parse_multi(v)) ) ] diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index 226b403b..f55c36b8 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -10,6 +10,7 @@ _ShoppingSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ShoppingSetting')) _DsaSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DynamicSearchAdsSetting')) _DisclaimerSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DisclaimerSetting')) +_VerifiedTrackingSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VerifiedTrackingSetting')) class BulkCampaign(_SingleRecordBulkEntity): """ Represents a campaign that can be read or written in a bulk file. @@ -36,6 +37,7 @@ def __init__(self, account_id=None, campaign=None): self._performance_data = None self._budget_name = None self._bid_strategy_name = None + self._verified_tracking_data = None @property def account_id(self): @@ -51,7 +53,7 @@ def account_id(self): @account_id.setter def account_id(self, account_id): self._account_id = account_id - + @property def bid_strategy_name(self): """ @@ -66,6 +68,20 @@ def bid_strategy_name(self): def bid_strategy_name(self, value): self._bid_strategy_name = value + @property + def verified_tracking_data(self): + """ + The verified tracking data that the campaign associated, only for audience campaigns + + Corresponds to 'Verified Tracking Setting' field in bulk file. + :rtype: ArrayOfArrayOfKeyValuePairOfstringstring + """ + return self._verified_tracking_data + + @verified_tracking_data.setter + def verified_tracking_data(self, value): + self._verified_tracking_data = value + @property def budget_name(self): """ @@ -107,7 +123,7 @@ def _get_dynamic_feed_setting(self): def _get_shopping_setting(self): return self._get_setting(_ShoppingSetting, 'ShoppingSetting') - + def _get_target_setting(self): return self._get_setting(_TargetSetting, 'TargetSetting') @@ -117,6 +133,9 @@ def _get_dsa_setting(self): def _get_disclaimer_setting(self): return self._get_setting(_DisclaimerSetting, 'DisclaimerSetting') + def _get_verified_tracking_setting(self): + return self._get_setting(_VerifiedTrackingSetting, 'VerifiedTrackingSetting') + def _get_setting(self, setting_type, setting_name): if not self.campaign.Settings.Setting: return None @@ -142,7 +161,7 @@ def _read_campaign_type(c, v): return [] campaign_type = v c.campaign.CampaignType = [campaign_type] - + if campaign_type.lower() == 'shopping': BulkCampaign._create_campaign_setting(c.campaign, 'ShoppingSetting') if campaign_type.lower() == 'audience': @@ -157,7 +176,7 @@ def _read_campaign_type(c, v): def _create_campaign_setting(campaign, setting_type): if not campaign.Settings: campaign.Settings = _CAMPAIGN_OBJECT_FACTORY_V13.create('ArrayOfSetting') - + setting = _CAMPAIGN_OBJECT_FACTORY_V13.create(setting_type) setting.Type = setting_type campaign.Settings.Setting.append(setting) @@ -249,7 +268,7 @@ def _read_local_inventory_ads_enabled(c, v): if not shopping_setting: return None shopping_setting.LocalInventoryAdsEnabled = v.lower() == 'true' if v else None - + @staticmethod def _write_feed_id(c): if not c.campaign.CampaignType: @@ -260,7 +279,7 @@ def _write_feed_id(c): if not dynamic_feed_setting: return None return bulk_str(dynamic_feed_setting.FeedId) - + @staticmethod def _read_feed_id(c, v): if not c.campaign.CampaignType: @@ -271,7 +290,7 @@ def _read_feed_id(c, v): if not dynamic_feed_setting: return None dynamic_feed_setting.FeedId = int(v) if v else None - + @staticmethod def _read_source(c, v): if not c.campaign.CampaignType: @@ -357,7 +376,7 @@ def _read_page_feed_ids(c, v): if not dsa_setting: return None dsa_setting.PageFeedIds.long = csv_to_field_PageFeedIds(v) - + @staticmethod def _write_page_feed_ids(c): if not c.campaign.CampaignType: @@ -366,7 +385,7 @@ def _write_page_feed_ids(c): dsa_setting = c._get_dsa_setting() if not dsa_setting: return None - return field_to_csv_Ids(dsa_setting.PageFeedIds, c.campaign.Id) + return field_to_csv_Ids(dsa_setting.PageFeedIds, c.campaign.Id) @staticmethod def _read_website(c, v): @@ -387,7 +406,7 @@ def _write_website(c): if not dsa_setting: return None return bulk_str(dsa_setting.DomainName) - + _MAPPINGS = [ _SimpleBulkMapping( header=_StringTable.CampaignType, @@ -502,7 +521,7 @@ def _write_website(c): header=_StringTable.Website, field_to_csv=lambda c: BulkCampaign._write_website(c), csv_to_field=lambda c, v: BulkCampaign._read_website(c, v) - + ), _SimpleBulkMapping( header=_StringTable.DomainLanguage, @@ -543,7 +562,7 @@ def _write_website(c): header=_StringTable.PageFeedIds, field_to_csv=lambda c: BulkCampaign._write_page_feed_ids(c), csv_to_field=lambda c, v: BulkCampaign._read_page_feed_ids(c, v) - ), + ), _SimpleBulkMapping( header=_StringTable.AdScheduleUseSearcherTimeZone, field_to_csv=lambda c: field_to_csv_UseSearcherTimeZone(c.campaign.AdScheduleUseSearcherTimeZone, None), @@ -567,6 +586,11 @@ def _write_website(c): header=_StringTable.DynamicDescriptionEnabled, field_to_csv=lambda c: BulkCampaign._write_DynamicDescriptionEnabled(c), csv_to_field=lambda c, v: BulkCampaign._read_DynamicDescriptionEnabled(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.Details, + field_to_csv=lambda c: to_verified_tracking_setting_string(c.verified_tracking_data), + csv_to_field=lambda c, v: setattr(c, 'verified_tracking_data', parse_verified_tracking_setting(v) if v else None) ) ] diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 79c65efe..d3228bdb 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -17,6 +17,7 @@ class _CsvHeaders: _StringTable.LastModifiedTime, _StringTable.MultiMediaAdBidAdjustment, _StringTable.DynamicDescriptionEnabled, + _StringTable.Details, # Campaign @@ -79,14 +80,14 @@ class _CsvHeaders: _StringTable.FromMinute, _StringTable.ToHour, _StringTable.ToMinute, - + # Profile Criterion _StringTable.Profile, _StringTable.ProfileId, # AdExtensions common _StringTable.Version, - + #Disclaimer Ad Extension _StringTable.DisclaimerAdsEnabled, _StringTable.DisclaimerName, @@ -130,7 +131,7 @@ class _CsvHeaders: _StringTable.PublisherCountries, _StringTable.Layouts, _StringTable.DisplayText, - + # Filter link ad extension _StringTable.AdExtensionHeaderType, _StringTable.Texts, @@ -138,7 +139,7 @@ class _CsvHeaders: # Image _StringTable.Height, _StringTable.Width, - + # Video _StringTable.SourceUrl, _StringTable.AspectRatio, @@ -146,15 +147,15 @@ class _CsvHeaders: # Callout Ad Extension _StringTable.CalloutText, - - #Flyer Ad Extension + + #Flyer Ad Extension _StringTable.FlyerAdExtension, _StringTable.AccountFlyerAdExtension, _StringTable.CampaignFlyerAdExtension, _StringTable.AdGroupFlyerAdExtension, _StringTable.FlyerName, _StringTable.MediaUrls, - + #Video Ad Extension _StringTable.ThumbnailUrl, _StringTable.ThumbnailId, @@ -341,7 +342,7 @@ class _CsvHeaders: _StringTable.Path1, _StringTable.Path2, _StringTable.Domain, - + # Responsive Ad _StringTable.CallToAction, _StringTable.Headline, @@ -360,7 +361,7 @@ class _CsvHeaders: # Ad Scheduling _StringTable.AdSchedule, - + #UseSearcherTimeZone _StringTable.UseSearcherTimeZone, _StringTable.AdScheduleUseSearcherTimeZone, @@ -368,7 +369,7 @@ class _CsvHeaders: # Action ad extension _StringTable.ActionType, _StringTable.ActionText, - + # Promotion Ad Extension _StringTable.PromotionTarget, _StringTable.DiscountModifier, @@ -379,7 +380,7 @@ class _CsvHeaders: _StringTable.Occasion, _StringTable.PromotionStart, _StringTable.PromotionEnd, - _StringTable.CurrencyCode, + _StringTable.CurrencyCode, # Dynamic Search Ads _StringTable.DomainLanguage, @@ -408,7 +409,7 @@ class _CsvHeaders: _StringTable.AdjustmentType, _StringTable.ExternalAttributionCredit, _StringTable.ExternalAttributionModel, - + # Account _StringTable.MSCLKIDAutoTaggingEnabled, _StringTable.IncludeViewThroughConversions, @@ -416,8 +417,9 @@ class _CsvHeaders: _StringTable.AdClickParallelTracking, _StringTable.AutoApplyRecommendations, _StringTable.AllowImageAutoRetrieve, + _StringTable.BusinessAttributes, _StringTable.FinalUrlSuffix, - + # Feeds _StringTable.CustomAttributes, _StringTable.FeedName, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 6c7d1ea0..e7843104 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -46,7 +46,7 @@ class _StringTable: Param2 = "Param2" Param3 = "Param3" DevicePreference = "Device Preference" - VerifiedTrackingData = "Verified Tracking Setting" + Details = "Verified Tracking Setting" CampaignNegativeKeyword = "Campaign Negative Keyword" CampaignNegativeSite = "Campaign Negative Site" AdGroupNegativeKeyword = "Ad Group Negative Keyword" @@ -113,7 +113,7 @@ class _StringTable: SocialNetworkAdExtension = "Social Network Ad Extension" Version = "Version" - # Disclaimer Ads + # Disclaimer Ads DisclaimerAdsEnabled = "Disclaimer Ads Enabled" DisclaimerName = "Disclaimer Name" DisclaimerTitle = "Disclaimer Title" @@ -132,7 +132,7 @@ class _StringTable: AdGroupImageAdExtension = "Ad Group Image Ad Extension" Layouts = "Layouts" DisplayText = "Display Text" - + # Filter Link ad extension FilterLinkAdExtension = "Filter Link Ad Extension" AccountFilterLinkAdExtension = "Account Filter Link Ad Extension" @@ -165,7 +165,7 @@ class _StringTable: CampaignCallAdExtension = "Campaign Call Ad Extension" IsCallTrackingEnabled = "Call Tracking Enabled" RequireTollFreeTrackingNumber = "Toll Free" - + #Action Ad Extension ActionAdExtension = "Action Ad Extension" AccountActionAdExtension = "Account Action Ad Extension" @@ -173,7 +173,7 @@ class _StringTable: AdGroupActionAdExtension = "Ad Group Action Ad Extension" ActionType = "Action Type" ActionText = "Action Text" - + #Video Ad Extension VideoAdExtension = "Video Ad Extension" ThumbnailUrl = "Thumbnail Url" @@ -182,7 +182,7 @@ class _StringTable: AccountVideoAdExtension = "Account Video Ad Extension" CampaignVideoAdExtension = "Campaign Video Ad Extension" AdGroupVideoAdExtension = "Ad Group Video Ad Extension" - + #Promotion AdExtension PromotionAdExtension = "Promotion Ad Extension" AccountPromotionAdExtension = "Account Promotion Ad Extension" @@ -212,8 +212,8 @@ class _StringTable: AdGroupSitelinkAdExtension = "Ad Group Sitelink Ad Extension" CampaignSitelinkAdExtension = "Campaign Sitelink Ad Extension" AccountSitelinkAdExtension = "Account Sitelink Ad Extension" - - + + # Flyer Ad Extension FlyerAdExtension = "Flyer Ad Extension" AccountFlyerAdExtension = "Account Flyer Ad Extension" @@ -308,10 +308,10 @@ class _StringTable: CampaignPriority = "Priority" LocalInventoryAdsEnabled = "LocalInventoryAdsEnabled" DynamicDescriptionEnabled = "Dynamic Description Enabled" - + CampaignNegativeStoreCriterion = "Campaign Negative Store Criterion" - + # CoOp BidOption = "Bid Option" BidBoostValue = "Bid Boost Value" @@ -342,7 +342,7 @@ class _StringTable: AdGroupPriceAdExtension = "Ad Group Price Ad Extension" PriceExtensionType = "Price Extension Type" Header1 = "Header 1" - Header2 = "Header 2" + Header2 = "Header 2" Header3 = "Header 3" Header4 = "Header 4" Header5 = "Header 5" @@ -373,7 +373,7 @@ class _StringTable: FinalMobileUrl6 = "Final Mobile Url 6" FinalMobileUrl7 = "Final Mobile Url 7" FinalMobileUrl8 = "Final Mobile Url 8" - Price1 = "Price 1" + Price1 = "Price 1" Price2 = "Price 2" Price3 = "Price 3" Price4 = "Price 4" @@ -439,7 +439,7 @@ class _StringTable: AudienceNetworkSize = "Audience Network Size" SupportedCampaignTypes = "Supported Campaign Types" ProductAudienceType = "Product Audience Type" - CombinationRule = "Combination Rule" + CombinationRule = "Combination Rule" SourceId = "Source Id" ProductAudienceType = "Product Audience Type" AdGroupProductAudienceAssociation = "Ad Group Product Audience Association" @@ -477,7 +477,7 @@ class _StringTable: AdGroupNegativeCustomerListAssociation = "Ad Group Negative Customer List Association" CampaignCustomerListAssociation = "Campaign Customer List Association" CampaignNegativeCustomerListAssociation = "Campaign Negative Customer List Association" - + # Expanded Text Ad TitlePart1 = "Title Part 1" TitlePart2 = "Title Part 2" @@ -488,7 +488,7 @@ class _StringTable: # Ad Extension Scheduling AdSchedule = "Ad Schedule" - + #UseSearcherTimeZone UseSearcherTimeZone = "Use Searcher Time Zone" AdScheduleUseSearcherTimeZone = "Ad Schedule Use Searcher Time Zone" @@ -501,7 +501,7 @@ class _StringTable: DynamicAdTargetValue2 = "Dynamic Ad Target Value 2" DynamicAdTargetCondition3 = "Dynamic Ad Target Condition 3" DynamicAdTargetValue3 = "Dynamic Ad Target Value 3" - + AdGroupAgeCriterion = "Ad Group Age Criterion" AdGroupDayTimeCriterion = "Ad Group DayTime Criterion" AdGroupDeviceCriterion = "Ad Group DeviceOS Criterion" @@ -536,12 +536,12 @@ class _StringTable: Descriptions = "Descriptions" Headlines = "Headlines" Videos = "Videos" - + #Image Image = "Image" Height = "Height" Width = "Width" - + # Video Video = "Video" SourceUrl = "Source Url" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 93762b93..00a66192 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -48,6 +48,9 @@ TextAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TextAsset')) ImageAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset')) VideoAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAsset')) +KeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:KeyValuePairOfstringstring')) +ArrayOfKeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:ArrayOfKeyValuePairOfstringstring')) +ArrayOfArrayOfKeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:ArrayOfArrayOfKeyValuePairOfstringstring')) def bulk_str(value): if value is None or (hasattr(value, 'value') and value.value is None): @@ -66,6 +69,40 @@ def bulk_upper_str(value): return None return s.upper() +def to_verified_tracking_setting_string(value): + if value is None: + return None + + result = [] + for s in value: + contracts = [] + for setting in s: + if setting is not None and setting.__contains__('key') and setting.__contains__('value'): + contract = {} + contract['key'] = setting['key'] + contract['value'] = setting['value'] + contracts.append(contract) + result.append(contracts) + + return json.dumps(result) + +def parse_verified_tracking_setting(str): + if str is None or str == '': + return + + two_dims_array = [] + results = json.loads(str) + for result in results: + array = [] + for res in result: + if res is not None and res.__contains__('key') and res.__contains__('value'): + kv = KeyValuePairOfstringstring() + kv['key'] = res['key'] + kv['value'] = res['value'] + array.append(kv) + two_dims_array.append(array) + + return two_dims_array def bulk_date_str(value): if value is None or (value.Day is None and value.Month is None and value.Year is None): @@ -116,9 +153,9 @@ def csv_to_bid_strategy_biddingscheme(row_values, bulk_bid_strategy): def csv_to_campaign_biddingscheme(row_values, bulk_campaign): entity_csv_to_biddingscheme(row_values, bulk_campaign.campaign) - + def entity_csv_to_biddingscheme(row_values, entity): - + success, bid_strategy_type = row_values.try_get_value(_StringTable.BidStrategyType) if not success or not bid_strategy_type: return @@ -130,16 +167,16 @@ def entity_csv_to_biddingscheme(row_values, entity): success, target_cpa_row_value = row_values.try_get_value(_StringTable.BidStrategyTargetCpa) target_cpa_value = float(target_cpa_row_value) if target_cpa_row_value else None - - + + success, target_roas_row_value = row_values.try_get_value(_StringTable.BidStrategyTargetRoas) target_roas_value = float(target_roas_row_value) if target_roas_row_value else None - - + + success, target_impression_share_row_value = row_values.try_get_value(_StringTable.BidStrategyTargetImpressionShare) target_impression_share_value = float(target_impression_share_row_value) if target_impression_share_row_value else None - - + + success, target_ad_position_value = row_values.try_get_value(_StringTable.BidStrategyTargetAdPosition) if bid_strategy_type == 'MaxConversions': @@ -164,17 +201,17 @@ def entity_csv_to_biddingscheme(row_values, entity): entity.BiddingScheme.MaxCpc = maxCpcValue entity.BiddingScheme.TargetImpressionShare = target_impression_share_value entity.BiddingScheme.TargetAdPosition = target_ad_position_value - + def bid_strategy_biddingscheme_to_csv(bulk_bid_strategy, row_values): - entity_biddingscheme_to_csv(bulk_bid_strategy.bid_strategy, row_values) + entity_biddingscheme_to_csv(bulk_bid_strategy.bid_strategy, row_values) def campaign_biddingscheme_to_csv(bulk_campaign, row_values): entity_biddingscheme_to_csv(bulk_campaign.campaign, row_values) - + def entity_biddingscheme_to_csv(entity, row_values): if not entity: return - + bid_strategy_type = field_to_csv_BidStrategyType(entity) if not bid_strategy_type: @@ -198,7 +235,7 @@ def entity_biddingscheme_to_csv(entity, row_values): row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) row_values[_StringTable.BidStrategyTargetAdPosition] = bulk_optional_str(entity.BiddingScheme.TargetAdPosition, entity.Id) row_values[_StringTable.TargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) - + def bulk_optional_str(value, id): if value is None: @@ -322,14 +359,24 @@ def dict_bulk_str(parameters, separator): if parameters is None or len(parameters) == 0: return None return separator.join(["{0}={1}".format(key, parameters[key]) for key in parameters]) - + def parse_dict(value): if value is None or value.strip() == '': return - + return dict([s.split('=') for s in value.split(';') if len(s) > 0]) - pass + pass +def multi_bulk_str(parameters, separator): + if parameters is None or len(parameters) == 0: + return None + return separator.join(parameters) + +def parse_multi(value): + if value is None or value.strip() == '': + return + + return value.split(';') def csv_to_field_UrlCustomParameters(entity, value): if value is None or value.strip() == '': @@ -490,9 +537,9 @@ def field_to_csv_VideoAssetLinks(assetLinks): assetLinkContracts = [] for assetLink in assetLinks.AssetLink: if assetLink.Asset is not None and isinstance(assetLink.Asset, VideoAsset_Type): - contract = {} - contract['assetPerformanceLabel'] = assetLink.AssetPerformanceLabel if hasattr(assetLink, 'AssetPerformanceLabel') else None - contract['editorialStatus'] = assetLink.EditorialStatus if hasattr(assetLink, 'EditorialStatus') else None + contract = {} + contract['assetPerformanceLabel'] = assetLink.AssetPerformanceLabel if hasattr(assetLink, 'AssetPerformanceLabel') else None + contract['editorialStatus'] = assetLink.EditorialStatus if hasattr(assetLink, 'EditorialStatus') else None contract['id'] = assetLink.Asset.Id if hasattr(assetLink.Asset, 'Id') else None contract['name'] = assetLink.Asset.Name if hasattr(assetLink.Asset, 'Name') else None contract['pinnedField'] = assetLink.PinnedField if hasattr(assetLink, 'PinnedField') else None @@ -512,9 +559,9 @@ def field_to_csv_VideoAssetLinks(assetLinks): if len(assetLinkContracts) > 0: return json.dumps(assetLinkContracts, sort_keys = True) return None - + pass - + def csv_to_field_VideoAssetLinks(assetLinks, value): if value is None or value == '': return @@ -533,7 +580,7 @@ def csv_to_field_VideoAssetLinks(assetLinks, value): if thumbnailImageContract != None : asset_link.Asset.ThumbnailImage = _CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset') - asset_link.Asset.ThumbnailImage.Type = 'ImageAsset' + asset_link.Asset.ThumbnailImage.Type = 'ImageAsset' asset_link.Asset.ThumbnailImage.Id = thumbnailImageContract.get('id') asset_link.Asset.ThumbnailImage.Name = thumbnailImageContract.get('name') asset_link.Asset.ThumbnailImage.SubType = thumbnailImageContract.get('subType') @@ -543,14 +590,14 @@ def csv_to_field_VideoAssetLinks(assetLinks, value): asset_link.Asset.ThumbnailImage.CropHeight = thumbnailImageContract.get('cropHeight') assetLinks.AssetLink.append(asset_link) - + def csv_to_field_TextAssetLinks(assetLinks, value): if value is None or value == '': return assetLinkContracts = json.loads(value) - + for assetLinkContract in assetLinkContracts: asset_link = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetLink') asset_link.Asset = _CAMPAIGN_OBJECT_FACTORY_V13.create('TextAsset') @@ -569,7 +616,7 @@ def field_to_csv_ImageAssetLinks(entity): assetLinkContracts = [] for assetLink in entity.AssetLink: if assetLink.Asset is not None and isinstance(assetLink.Asset, ImageAsset_Type): - contract = {} + contract = {} contract['cropHeight'] = assetLink.Asset.CropHeight if hasattr(assetLink.Asset, 'CropHeight') else None contract['cropWidth'] = assetLink.Asset.CropWidth if hasattr(assetLink.Asset, 'CropWidth') else None contract['cropX'] = assetLink.Asset.CropX if hasattr(assetLink.Asset, 'CropX') else None @@ -588,7 +635,7 @@ def csv_to_field_ImageAssetLinks(assetLinks, value): if value is None or value == '': return assetLinkContracts = json.loads(value) - + for assetLinkContract in assetLinkContracts: asset_link = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetLink') asset_link.Asset = _CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset') @@ -890,7 +937,7 @@ def field_to_csv_UseSearcherTimeZone(bool_value, id): return DELETE_VALUE if id and id > 0 else None else: return str(bool_value) - + def csv_to_field_BudgetType(entity, value, version=13): if value is None or value == '': entity.BudgetType = None @@ -1435,7 +1482,7 @@ def csv_to_target_setting(entity, value): pass def match_target_setting(token): - + pattern = re.compile(target_setting_detail_pattern) m = pattern.match(token) if m: @@ -1469,13 +1516,13 @@ def parse_rule_PageVisitors(rule_str): expressions = rule_str.split(patternAnd) if len(expressions) == 1: parse_rule_items(rule_str) - else: + else: rule.NormalForm = NormalForm.Disjunctive else: rule.NormalForm = NormalForm.Conjunctive else: rule.NormalForm = NormalForm.Conjunctive - + pattern = patternAnd if rule.NormalForm == NormalForm.Conjunctive: pattern = patternOr @@ -1491,7 +1538,7 @@ def parse_rule_PageVisitors(rule_str): rule_item_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('RuleItemGroup') for expression in expressions: item = parse_string_rule_item(expression) - rule_item_group.Items.RuleItem.append(item) + rule_item_group.Items.RuleItem.append(item) rule.RuleItemGroups.RuleItemGroup.append(rule_item_group) @@ -1684,11 +1731,11 @@ def csv_to_field_CustomAttributes(feed, value): if value is None or value == '': return feed.custom_attributes = json.loads(value) - + def field_to_csv_Ids(ids, entity_id): if ids is None and entity_id is not None and entity_id > 0: return DELETE_VALUE - + if ids is None or len(ids.long) == 0: return None return ';'.join(str(id) for id in ids.long) @@ -1698,18 +1745,18 @@ def csv_to_field_PageFeedIds(value): return None if len(value) == 0: return [] - return [int(i) for i in value.split(';')] - + return [int(i) for i in value.split(';')] + def combination_rules_to_bulkstring(combination_rules): if len(combination_rules.CombinationRule) == 0: return None - + return '&'.join([r.Operator + '(' + ','.join([str(id) for id in r.AudienceIds.long]) + ')' for r in combination_rules.CombinationRule]) def parse_combination_rules(combination_list, value): if value is None or len(value) == 0: return None - + rules = value.split('&') pattern = re.compile(combine_rule_pattern, re.IGNORECASE) for rule in rules: @@ -1723,4 +1770,4 @@ def to_operation(op): if op.lower() == 'and': return 'And' if op.lower() == 'or': return 'Or' if op.lower() == 'not': return 'Not' - return none \ No newline at end of file + return none diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index cb1dd442..ff844cd4 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -160,6 +160,10 @@ + + + + @@ -913,6 +917,10 @@ + + + + @@ -1057,6 +1065,9 @@ + + + @@ -1342,6 +1353,9 @@ + + + @@ -1453,6 +1467,9 @@ + + + @@ -1568,6 +1585,9 @@ + + + @@ -1735,6 +1755,9 @@ + + + @@ -1835,6 +1858,9 @@ + + + @@ -1900,6 +1926,9 @@ + + + @@ -1995,6 +2024,9 @@ + + + @@ -2076,6 +2108,9 @@ + + + @@ -2167,6 +2202,8 @@ + + @@ -2244,6 +2281,9 @@ + + + @@ -2304,6 +2344,8 @@ + + @@ -2525,6 +2567,8 @@ + + @@ -2609,6 +2653,8 @@ + + @@ -2689,6 +2735,9 @@ + + + @@ -2769,6 +2818,8 @@ + + @@ -2862,6 +2913,9 @@ + + + @@ -2984,6 +3038,13 @@ + + + + + + + @@ -3090,6 +3151,10 @@ + + + + @@ -3182,6 +3247,10 @@ + + + + @@ -3268,6 +3337,9 @@ + + + @@ -3502,6 +3574,9 @@ + + + @@ -3593,6 +3668,8 @@ + + @@ -3682,6 +3759,9 @@ + + + @@ -3779,6 +3859,9 @@ + + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 511a254e..c945fa27 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3049,7 +3049,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 32b6bed9..fcc5e726 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1698,7 +1698,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index ecf47b09..1a3f2219 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -160,6 +160,10 @@ + + + + @@ -913,6 +917,10 @@ + + + + @@ -1057,6 +1065,9 @@ + + + @@ -1342,6 +1353,9 @@ + + + @@ -1453,6 +1467,9 @@ + + + @@ -1568,6 +1585,9 @@ + + + @@ -1735,6 +1755,9 @@ + + + @@ -1835,6 +1858,9 @@ + + + @@ -1900,6 +1926,9 @@ + + + @@ -1995,6 +2024,9 @@ + + + @@ -2076,6 +2108,9 @@ + + + @@ -2167,6 +2202,8 @@ + + @@ -2244,6 +2281,9 @@ + + + @@ -2304,6 +2344,8 @@ + + @@ -2525,6 +2567,8 @@ + + @@ -2609,6 +2653,8 @@ + + @@ -2689,6 +2735,9 @@ + + + @@ -2769,6 +2818,8 @@ + + @@ -2862,6 +2913,9 @@ + + + @@ -2984,6 +3038,13 @@ + + + + + + + @@ -3090,6 +3151,10 @@ + + + + @@ -3182,6 +3247,10 @@ + + + + @@ -3268,6 +3337,9 @@ + + + @@ -3502,6 +3574,9 @@ + + + @@ -3593,6 +3668,8 @@ + + @@ -3682,6 +3759,9 @@ + + + @@ -3779,6 +3859,9 @@ + + + diff --git a/setup.py b/setup.py index 1640c5ce..3e43a923 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.11.1' +VERSION = '13.0.12' with open('README.rst', 'r') as f: readme = f.read() From d07f763e7c9175c74d3c80d353b8f7e08f529893 Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Wed, 5 Jan 2022 10:03:20 +0800 Subject: [PATCH 08/55] update example to use base64.b64encode --- examples/v13/image_media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/v13/image_media.py b/examples/v13/image_media.py index 9c7fc327..1431def4 100644 --- a/examples/v13/image_media.py +++ b/examples/v13/image_media.py @@ -91,7 +91,7 @@ def get_image_media( def get_bmp_base64_string(image_file_name): image = open(image_file_name, 'rb') image_bytes = image.read() - base64_string = base64.encodestring(image_bytes) + base64_string = base64.b64encode(image_bytes) return base64_string # Main execution From 2958f4d469c9df503fee3f2703258c6bdc9bb582 Mon Sep 17 00:00:00 2001 From: xinyuwen Date: Thu, 13 Jan 2022 13:21:20 +0800 Subject: [PATCH 09/55] Version 13.0.13 --- HISTORY.rst | 7 ++ bingads/manifest.py | 2 +- bingads/v13/internal/bulk/csv_headers.py | 3 + bingads/v13/internal/bulk/string_table.py | 3 + bingads/v13/internal/extensions.py | 37 ++++-- .../production/campaignmanagement_service.xml | 109 ++++++++++++++++-- .../proxies/production/reporting_service.xml | 3 + .../v13/proxies/sandbox/adinsight_service.xml | 2 +- bingads/v13/proxies/sandbox/bulk_service.xml | 2 +- .../sandbox/campaignmanagement_service.xml | 109 ++++++++++++++++-- .../v13/proxies/sandbox/reporting_service.xml | 3 + setup.py | 2 +- 12 files changed, 244 insertions(+), 38 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index cf518cad..2031b47d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,13 @@ .. :changelog: Release History + +13.0.13(2022-01-14) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add new fields Operator mapping in WebCondition for BulkAdGroupDynamicSearchAdTarget, BulkAdGroupNegativeDynamicSearchAdTarget and BulkCampaignNegativeDynamicSearchAdTarget. +* Add NumberRuleItem mapping to BulkRemarketingList. + 13.0.12(2021-10-29) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. diff --git a/bingads/manifest.py b/bingads/manifest.py index 3e5aeb13..6d4683af 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.12' +VERSION = '13.0.13' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index d3228bdb..0365c478 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -390,6 +390,9 @@ class _CsvHeaders: _StringTable.DynamicAdTargetValue2, _StringTable.DynamicAdTargetCondition3, _StringTable.DynamicAdTargetValue3, + _StringTable.DynamicAdTargetConditionOperator1, + _StringTable.DynamicAdTargetConditionOperator2, + _StringTable.DynamicAdTargetConditionOperator3, _StringTable.PageFeedIds, _StringTable.FeedId, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index e7843104..cf861efd 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -501,6 +501,9 @@ class _StringTable: DynamicAdTargetValue2 = "Dynamic Ad Target Value 2" DynamicAdTargetCondition3 = "Dynamic Ad Target Condition 3" DynamicAdTargetValue3 = "Dynamic Ad Target Value 3" + DynamicAdTargetConditionOperator1 = "Dynamic Ad Target Condition Operator 1" + DynamicAdTargetConditionOperator2 = "Dynamic Ad Target Condition Operator 2" + DynamicAdTargetConditionOperator3 = "Dynamic Ad Target Condition Operator 3" AdGroupAgeCriterion = "Ad Group Age Criterion" AdGroupDayTimeCriterion = "Ad Group DayTime Criterion" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 00a66192..88fa13b5 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -980,11 +980,13 @@ def entity_to_csv_DSAWebpageParameter(entity, row_values): entity.Criterion.Parameter.Conditions.WebpageCondition is not None: condition_prefix = _StringTable.DynamicAdTargetCondition1[:-1] value_prefix = _StringTable.DynamicAdTargetValue1[:-1] + condition_operator_prefix = _StringTable.DynamicAdTargetConditionOperator1[:-1] conditions = entity.Criterion.Parameter.Conditions.WebpageCondition for i in range(0, len(conditions)): row_values[condition_prefix + str(i + 1)] = conditions[i].Operand row_values[value_prefix + str(i + 1)] = conditions[i].Argument + row_values[condition_operator_prefix + str(i + 1)] = conditions[i].Operator def csv_to_entity_DSAWebpageParameter(row_values, entity): @@ -996,11 +998,13 @@ def csv_to_entity_DSAWebpageParameter(row_values, entity): MAX_NUMBER_OF_CONDITIONS = 3 condition_prefix = _StringTable.DynamicAdTargetCondition1[:-1] value_prefix = _StringTable.DynamicAdTargetValue1[:-1] + condition_operator_prefix = _StringTable.DynamicAdTargetConditionOperator1[:-1] conditions = [] for i in range(0, MAX_NUMBER_OF_CONDITIONS): condition_success, webpage_condition = row_values.try_get_value(condition_prefix + str(i + 1)) value_success, webpage_value = row_values.try_get_value(value_prefix + str(i + 1)) + condition_operator_success, webpage_condition_operator = row_values.try_get_value(condition_operator_prefix + str(i + 1)) if condition_success and value_success and webpage_condition is not None and webpage_condition != '': condition = _CAMPAIGN_OBJECT_FACTORY_V13.create('WebpageCondition') if webpage_condition.lower() == 'url': @@ -1020,6 +1024,8 @@ def csv_to_entity_DSAWebpageParameter(row_values, entity): if webpage_condition.lower() == 'none': continue raise ValueError("Unknown WebpageConditionOperand value: {0}".format(webpage_condition)) + if condition_operator_success: + condition.Operator = webpage_condition_operator condition.Argument = webpage_value conditions.append(condition) @@ -1651,19 +1657,28 @@ def parse_rule_items(items_str): def parse_string_rule_item(item_str): item_str = item_str.strip('(').strip(')') - pattern_str = r'^(Url|ReferrerUrl|None) (Equals|Contains|BeginsWith|EndsWith|NotEquals|DoesNotContain|DoesNotBeginWith|DoesNotEndWith) ([^()]*)$' + pattern_str = r'^(Url|ReferrerUrl|EcommPageType|EcommCategory|EcommProdId|Action|None) (Equals|Contains|BeginsWith|EndsWith|NotEquals|DoesNotContain|DoesNotBeginWith|DoesNotEndWith) ([^()]*)$' + number_pattern_str = r'^(EcommTotalValue) (Equals|GreaterThan|LessThan|GreaterThanEqualTo|LessThanEqualTo|NotEquals) ([^()]*)$' pattern = re.compile(pattern_str) + number_pattern = re.compile(number_pattern_str) match = pattern.match(item_str) - - if not match: - ValueError('Invalid Rule Item:{0}'.format(item_str)) - - item = _CAMPAIGN_OBJECT_FACTORY_V13.create('StringRuleItem') - item.Type = 'String' - item.Operand = match.group(1) - item.Operator = parse_string_operator(match.group(2)) - item.Value = match.group(3) + if match: + item = _CAMPAIGN_OBJECT_FACTORY_V13.create('StringRuleItem') + item.Type = 'String' + item.Operand = match.group(1) + item.Operator = parse_string_operator(match.group(2)) + item.Value = match.group(3) + else: + match = number_pattern.match(item_str) + if match: + item = _CAMPAIGN_OBJECT_FACTORY_V13.create('NumberRuleItem') + item.Type = 'Number' + item.Operand = match.group(1) + item.Operator = parse_number_operator(match.group(2)) + item.Value = match.group(3) + else: + ValueError('Invalid Rule Item:{0}'.format(item_str)) return item @@ -1680,6 +1695,8 @@ def parse_number_operator(operator): return NumberOperator.GreaterThanEqualTo if oper == 'lessthanequalto': return NumberOperator.LessThanEqualTo + if oper == 'notequals': + return NumberOperator.NotEquals raise ValueError('Invalid Number Rule Item operator:{0}'.format(operator)) diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 0c6dd2e7..d12de77e 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -342,6 +342,13 @@ + + + + 100 + + + @@ -1527,9 +1534,17 @@ + + + + + + + + @@ -3556,6 +3571,13 @@ + + + + + + + @@ -3570,6 +3592,14 @@ + + + + + + + + @@ -5040,6 +5070,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -5079,17 +5133,6 @@ - - - - - - - - - - - @@ -5240,6 +5283,7 @@ + @@ -6054,6 +6098,13 @@ + + + + + + + @@ -6072,7 +6123,13 @@ - + + + + + + + @@ -6107,6 +6164,13 @@ + + + + + + + @@ -6246,6 +6310,27 @@ + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index ff844cd4..e0421c11 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -2027,6 +2027,8 @@ + + @@ -3577,6 +3579,7 @@ + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index c945fa27..511a254e 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3049,7 +3049,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index fcc5e726..32b6bed9 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1698,7 +1698,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index fa90d44f..4df32339 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -342,6 +342,13 @@ + + + + 100 + + + @@ -1527,9 +1534,17 @@ + + + + + + + + @@ -3556,6 +3571,13 @@ + + + + + + + @@ -3570,6 +3592,14 @@ + + + + + + + + @@ -5040,6 +5070,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -5079,17 +5133,6 @@ - - - - - - - - - - - @@ -5240,6 +5283,7 @@ + @@ -6054,6 +6098,13 @@ + + + + + + + @@ -6072,7 +6123,13 @@ - + + + + + + + @@ -6107,6 +6164,13 @@ + + + + + + + @@ -6246,6 +6310,27 @@ + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 1a3f2219..d3e07461 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -2027,6 +2027,8 @@ + + @@ -3577,6 +3579,7 @@ + diff --git a/setup.py b/setup.py index 3e43a923..04af2384 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.12' +VERSION = '13.0.13' with open('README.rst', 'r') as f: readme = f.read() From d899b04bfdf5f40bdf385f726ef407940651beac Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Sat, 19 Feb 2022 21:36:14 +0800 Subject: [PATCH 10/55] fix deserialize issue in the example --- examples/v13/report_requests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/v13/report_requests.py b/examples/v13/report_requests.py index 6347468f..08c39899 100644 --- a/examples/v13/report_requests.py +++ b/examples/v13/report_requests.py @@ -216,6 +216,8 @@ def get_report_request(account_id): # You can either use a custom date range or predefined time. time.PredefinedTime='Yesterday' time.ReportTimeZone='PacificTimeUSCanadaTijuana' + time.CustomDateRangeStart = None + time.CustomDateRangeEnd = None return_only_complete_data=False #BudgetSummaryReportRequest does not contain a definition for Aggregation. From 13ae4fde11df8317083038a998ede49f4f9af1f2 Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Thu, 30 Jun 2022 14:18:00 +0800 Subject: [PATCH 11/55] v13.0.14 --- HISTORY.rst | 10 + bingads/manifest.py | 2 +- bingads/service_client.py | 53 +- bingads/util.py | 11 + bingads/v13/bulk/entities/__init__.py | 6 + .../entities/bulk_ad_customizer_attribute.py | 150 ++ .../bulk_ad_customizer_attribute_ad_group.py | 36 + .../bulk_ad_customizer_attribute_campaign.py | 37 + ...ulk_ad_customizer_attribute_entity_base.py | 128 ++ .../bulk_ad_customizer_attribute_keyword.py | 36 + .../entities/bulk_campaign_conversion_goal.py | 61 + bingads/v13/bulk/entities/feeds/bulk_feed.py | 23 +- .../v13/internal/bulk/bulk_object_factory.py | 7 +- bingads/v13/internal/bulk/csv_headers.py | 10 +- bingads/v13/internal/bulk/string_table.py | 13 + bingads/v13/internal/extensions.py | 2 +- .../proxies/production/adinsight_service.xml | 1333 ++++++++++++++++ .../v13/proxies/production/bulk_service.xml | 35 + .../production/campaignmanagement_service.xml | 526 +++++-- .../proxies/production/reporting_service.xml | 23 + .../v13/proxies/sandbox/adinsight_service.xml | 1335 ++++++++++++++++- bingads/v13/proxies/sandbox/bulk_service.xml | 35 + .../sandbox/campaignmanagement_service.xml | 526 +++++-- .../v13/proxies/sandbox/reporting_service.xml | 23 + requirements.txt | 2 +- setup.py | 11 +- 26 files changed, 4066 insertions(+), 368 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_ad_customizer_attribute.py create mode 100644 bingads/v13/bulk/entities/bulk_ad_customizer_attribute_ad_group.py create mode 100644 bingads/v13/bulk/entities/bulk_ad_customizer_attribute_campaign.py create mode 100644 bingads/v13/bulk/entities/bulk_ad_customizer_attribute_entity_base.py create mode 100644 bingads/v13/bulk/entities/bulk_ad_customizer_attribute_keyword.py create mode 100644 bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py diff --git a/HISTORY.rst b/HISTORY.rst index 2031b47d..63ade453 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,16 @@ Release History +13.0.14(2022-06-30) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Get rid of the default ObjectCache,and use a in memory cache for ServiceClient. https://github.com/BingAds/BingAds-Python-SDK/pull/108. +* Add bulk mappings for BulkCampaignConversionGoal. +* Add bulk mappings for ad customer attribute i.e., BulkAdCustomizerAttribute, BulkCampaignAdCustomizerAttribute, BulkAdGroupAdCustomizerAttribute, BulkKeywordAdCustomizerAttribute. +* Add mappings for new fields in BulkFeed: Schedule. +* Fix issue of invalid variable: maxCpcValue. https://github.com/BingAds/BingAds-Python-SDK/pull/200#issuecomment-1085432417. +* Update suds-community version to 1.1.0. + 13.0.13(2022-01-14) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. diff --git a/bingads/manifest.py b/bingads/manifest.py index 6d4683af..e28a4f4b 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.13' +VERSION = '13.0.14' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/service_client.py b/bingads/service_client.py index 8cdf693a..1fe91dc8 100644 --- a/bingads/service_client.py +++ b/bingads/service_client.py @@ -1,9 +1,9 @@ from suds.client import Client, Factory, WebFault, Builder -from suds.cache import ObjectCache from .headerplugin import HeaderPlugin from .authorization import * from .service_info import SERVICE_INFO_DICT from .manifest import USER_AGENT +from .util import DictCache from getpass import getuser from tempfile import gettempdir from os import path @@ -11,53 +11,17 @@ from suds.sudsobject import Factory as SFactory class BingAdsBuilder (Builder): - # copy from https://github.com/suds-community/suds/blob/master/suds/builder.py. Change line - # setattr(data, type.name, value if not type.optional() or type.multi_occurrence() else None) - # to - # setattr(data, type.name, value) - # to not breaking our customer and bulk mapping. - + # See https://github.com/suds-community/suds/issues/67 and https://github.com/suds-community/suds/commit/366f7f1616595b9e4163a3f90fc6e84ac0ae23f5 def __init__(self, resolver): """ @param resolver: A schema object name resolver. @type resolver: L{resolver.Resolver} """ self.resolver = resolver - - def process(self, data, type, history): - """ process the specified type then process its children """ - if type in history: - return - if type.enum(): - return - history.append(type) - resolved = type.resolve() - value = None - - if type.multi_occurrence(): - value = [] - else: - if len(resolved) > 0: - if resolved.mixed(): - value = SFactory.property(resolved.name) - md = value.__metadata__ - md.sxtype = resolved - else: - value = SFactory.object(resolved.name) - md = value.__metadata__ - md.sxtype = resolved - md.ordering = self.ordering(resolved) - - setattr(data, type.name, value) - if value is not None: - data = value - if not isinstance(data, list): - self.add_attributes(data, resolved) - for child, ancestry in resolved.children(): - if self.skip_child(child, ancestry): - continue - self.process(data, child, history[:]) + def skip_value(self, type): + """ whether or not to skip setting the value """ + return False class ServiceClient: @@ -83,10 +47,9 @@ def __init__(self, service, version, authorization_data=None, environment='produ self._version = ServiceClient._format_version(version) - # TODO This is a temp fix for set default suds temp folder with user info, suds development branch has already fixed it. + # Use in-memory cache by default. if 'cache' not in suds_options: - location = path.join(gettempdir(), 'suds', getuser()) - suds_options['cache'] = ObjectCache(location, days=1) + suds_options['cache'] = DictCache() # set cachingpolicy to 1 to reuse WSDL cache files, otherwise will only reuse XML files if 'cachingpolicy' not in suds_options: suds_options['cachingpolicy'] = 1 @@ -348,7 +311,7 @@ def name(self): # this is used to create entity only. Given the sandbox should have the same contract, we are good to use sandbox wsdl. _CAMPAIGN_MANAGEMENT_SERVICE_V13 = Client( - 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/sandbox/campaignmanagement_service.xml')) + 'file:///' + pkg_resources.resource_filename('bingads', 'v13/proxies/sandbox/campaignmanagement_service.xml'), cache=DictCache()) _CAMPAIGN_OBJECT_FACTORY_V13 = _CAMPAIGN_MANAGEMENT_SERVICE_V13.factory _CAMPAIGN_OBJECT_FACTORY_V13.builder = BingAdsBuilder(_CAMPAIGN_OBJECT_FACTORY_V13.builder.resolver) diff --git a/bingads/util.py b/bingads/util.py index d03e5233..12ae6f37 100644 --- a/bingads/util.py +++ b/bingads/util.py @@ -1,6 +1,17 @@ import time from bingads.exceptions import TimeoutException from suds.client import WebFault +from suds.cache import Cache + + +class DictCache(dict, Cache): + # .get and .clear work as intended + purge = dict.__delitem__ + + def put(self, id_, obj): + self[id_] = obj + return obj + class _TimeHelper(object): """ diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index 74a460b5..74469e48 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -32,3 +32,9 @@ from .bulk_image import * from .bulk_video import * from .feeds import * +from .bulk_campaign_conversion_goal import * +from .bulk_ad_customizer_attribute import * +from .bulk_ad_customizer_attribute_entity_base import * +from .bulk_ad_customizer_attribute_campaign import * +from .bulk_ad_customizer_attribute_ad_group import * +from .bulk_ad_customizer_attribute_keyword import * \ No newline at end of file diff --git a/bingads/v13/bulk/entities/bulk_ad_customizer_attribute.py b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute.py new file mode 100644 index 00000000..99ec2199 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute.py @@ -0,0 +1,150 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + + +class BulkAdCustomizerAttribute(_SingleRecordBulkEntity): + """ Represents an AdCustomizerAttribute. + + Properties of this class and of classes that it is derived from, correspond to fields of the AdCustomizerAttribute record in a bulk file. + For more information, see AdCustomizerAttribute at https://go.microsoft.com/fwlink/?linkid=846127 + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id = None, name=None, account_value=None, data_type=None, editorial_status = None, status=None): + super(BulkAdCustomizerAttribute, self).__init__() + self._id = id + self._name = name + self._account_value = account_value + self._data_type = data_type + self._editorial_status = editorial_status + self._status = status + + + @property + def id(self): + """ the id of bulk record + Corresponds to the 'Id' field in the bulk file. + + :rtype: str + """ + return self._id + + @id.setter + def id(self, value): + self._id = value + + @property + def name(self): + """ the name of the ad customizer attribute + Corresponds to the 'Name' field in the bulk file. + + :rtype: str + """ + return self._name + + @name.setter + def name(self, value): + self._name = value + + @property + def account_value(self): + """ the value of the account of ad customizer attribute + Corresponds to the 'AdCustomizer AttributeValue' field in the bulk file. + + :rtype: str + """ + return self._account_value + + @account_value.setter + def account_value(self, value): + self._account_value = value + + @property + def data_type(self): + """ the data type of ad customizer attribute + Corresponds to the 'AdCustomizer DataType' field in the bulk file. + + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, value): + self._data_type = value + + @property + def editorial_status(self): + """ the editorial status of ad customizer attribute + Corresponds to the 'Editorial Status' field in the bulk file. + + :rtype: str + """ + return self._editorial_status + + @editorial_status.setter + def editorial_status(self, value): + self._editorial_status = value + + @property + def status(self): + """ the status of ad customizer attribute + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + return self._status + + @status.setter + def status(self, value): + self._status = value + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.id), + csv_to_field=lambda c, v: setattr(c, 'id', v) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.name), + csv_to_field=lambda c, v: setattr(c, 'name', v) + ), + _SimpleBulkMapping( + header=_StringTable.AdCustomizerAttributeValue, + field_to_csv=lambda c: bulk_str(c.account_value), + csv_to_field=lambda c, v: setattr(c, 'account_value', v) + ), + _SimpleBulkMapping( + header=_StringTable.AdCustomizerDataType, + field_to_csv=lambda c: bulk_str(c.data_type), + csv_to_field=lambda c, v: setattr(c, 'data_type', v) + ), + _SimpleBulkMapping( + header=_StringTable.EditorialStatus, + field_to_csv=lambda c: bulk_str(c.editorial_status), + csv_to_field=lambda c, v: setattr(c, 'editorial_status', v) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: c.status, + csv_to_field=lambda c, v: setattr(c, 'status', v) + ), + ] + + def process_mappings_from_row_values(self, row_values): + row_values.convert_to_entity(self, BulkAdCustomizerAttribute._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkAdCustomizerAttribute._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdCustomizerAttribute, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_ad_group.py b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_ad_group.py new file mode 100644 index 00000000..f56ddd13 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_ad_group.py @@ -0,0 +1,36 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +from. import BulkAdCustomizerAttributeEntityBase + +class BulkAdGroupAdCustomizerAttribute(BulkAdCustomizerAttributeEntityBase): + """ Represents an AdGroupAdCustomizerAttribute. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id = None, name=None, parent_id=None, attribute_value=None, editorial_status = None): + super(BulkAdGroupAdCustomizerAttribute, self).__init__(id, name, parent_id, attribute_value, editorial_status) + + + @property + def ad_group_id(self): + """ the ad group id of bulk record + Corresponds to the 'ParentId' field in the bulk file. + + :rtype: str + """ + return self._parent_id + + @ad_group_id.setter + def ad_group_id(self, value): + self._parent_id = value + diff --git a/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_campaign.py b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_campaign.py new file mode 100644 index 00000000..cc3e2e1b --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_campaign.py @@ -0,0 +1,37 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +from. import BulkAdCustomizerAttributeEntityBase + + +class BulkCampaignAdCustomizerAttribute(BulkAdCustomizerAttributeEntityBase): + """ Represents a CampaignAdCustomizerAttribute. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id = None, name=None, parent_id=None, attribute_value=None, editorial_status = None): + super(BulkCampaignAdCustomizerAttribute, self).__init__(id, name, parent_id, attribute_value, editorial_status) + + + @property + def campaign_id(self): + """ the campaign id of bulk record + Corresponds to the 'ParentId' field in the bulk file. + + :rtype: str + """ + return self._parent_id + + @campaign_id.setter + def campaign_id(self, value): + self._parent_id = value + diff --git a/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_entity_base.py b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_entity_base.py new file mode 100644 index 00000000..dd8b3f81 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_entity_base.py @@ -0,0 +1,128 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + + +class BulkAdCustomizerAttributeEntityBase(_SingleRecordBulkEntity): + """ Represents an AdCustomizerAttributeEntity. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id = None, name=None, parent_id=None, attribute_value=None, editorial_status = None): + super(BulkAdCustomizerAttributeEntityBase, self).__init__() + self._id = id + self._name = name + self._attribute_value = attribute_value + self._parent_id = parent_id + self._editorial_status = editorial_status + + + @property + def id(self): + """ the id of bulk record + Corresponds to the 'Id' field in the bulk file. + + :rtype: str + """ + return self._id + + @id.setter + def id(self, value): + self._id = value + + @property + def name(self): + """ the name of the ad customizer attribute entity + Corresponds to the 'Name' field in the bulk file. + + :rtype: str + """ + return self._name + + @name.setter + def name(self, value): + self._name = value + + @property + def attribute_value(self): + """ the value of ad customizer attribute + Corresponds to the 'AdCustomizer AttributeValue' field in the bulk file. + + :rtype: str + """ + return self._attribute_value + + @attribute_value.setter + def attribute_value(self, value): + self._attribute_value = value + + @property + def parent_id(self): + """ the parent id of bulk record + Corresponds to the 'ParentId' field in the bulk file. + + :rtype: long + """ + return self._parent_id + + @parent_id.setter + def parent_id(self, value): + self._parent_id = value + + @property + def editorial_status(self): + """ the editorial status of ad customizer attribute + Corresponds to the 'Editorial Status' field in the bulk file. + + :rtype: str + """ + return self._editorial_status + + @editorial_status.setter + def editorial_status(self, value): + self._editorial_status = value + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.id), + csv_to_field=lambda c, v: setattr(c, 'id', v) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.name), + csv_to_field=lambda c, v: setattr(c, 'name', v) + ), + _SimpleBulkMapping( + header=_StringTable.AdCustomizerAttributeValue, + field_to_csv=lambda c: bulk_str(c.attribute_value), + csv_to_field=lambda c, v: setattr(c, 'attribute_value', v) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.parent_id), + csv_to_field=lambda c, v: setattr(c, 'parent_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.EditorialStatus, + field_to_csv=lambda c: bulk_str(c.editorial_status), + csv_to_field=lambda c, v: setattr(c, 'editorial_status', v) + ), + ] + + def process_mappings_from_row_values(self, row_values): + row_values.convert_to_entity(self, BulkAdCustomizerAttributeEntityBase._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkAdCustomizerAttributeEntityBase._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdCustomizerAttributeEntityBase, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_keyword.py b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_keyword.py new file mode 100644 index 00000000..003974c2 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_customizer_attribute_keyword.py @@ -0,0 +1,36 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +from. import BulkAdCustomizerAttributeEntityBase + +class BulkKeywordAdCustomizerAttribute(BulkAdCustomizerAttributeEntityBase): + """ Represents a KeywordAdCustomizerAttribute. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id = None, name=None, parent_id=None, attribute_value=None, editorial_status = None): + super(BulkKeywordAdCustomizerAttribute, self).__init__(id, name, parent_id, attribute_value, editorial_status) + + + @property + def keyword_id(self): + """ the keyword id of bulk record + Corresponds to the 'ParentId' field in the bulk file. + + :rtype: str + """ + return self._parent_id + + @keyword_id.setter + def keyword_id(self, value): + self._parent_id = value + diff --git a/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py b/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py new file mode 100644 index 00000000..7900c52c --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py @@ -0,0 +1,61 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + + +class BulkCampaignConversionGoal(_SingleRecordBulkEntity): + """ Represents a CampaignConversionGoal. + + Properties of this class and of classes that it is derived from, correspond to fields of the CampaignConversionGoal record in a bulk file. + For more information, see CampaignConversionGoal at https://go.microsoft.com/fwlink/?linkid=846127 + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, campaign_conversion_goal = None): + super(BulkCampaignConversionGoal, self).__init__() + self._campaign_conversion_goal = campaign_conversion_goal + + + @property + def campaign_conversion_goal(self): + """ define a campaign conversion goal association + + :rtype: CampaignConversionGoal + """ + return self._campaign_conversion_goal + + @campaign_conversion_goal.setter + def campaign_conversion_goal(self, value): + self._campaign_conversion_goal = value + + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.campaign_conversion_goal.CampaignId), + csv_to_field=lambda c, v: setattr(c.campaign_conversion_goal, 'CampaignId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.GoalId, + field_to_csv=lambda c: bulk_str(c.campaign_conversion_goal.GoalId), + csv_to_field=lambda c, v: setattr(c.campaign_conversion_goal, 'GoalId', int(v) if v else None) + ), + ] + + def process_mappings_from_row_values(self, row_values): + self._campaign_conversion_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('CampaignConversionGoal') + row_values.convert_to_entity(self, BulkCampaignConversionGoal._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkCampaignConversionGoal._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkCampaignConversionGoal, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/feeds/bulk_feed.py b/bingads/v13/bulk/entities/feeds/bulk_feed.py index eee51551..aecb4292 100644 --- a/bingads/v13/bulk/entities/feeds/bulk_feed.py +++ b/bingads/v13/bulk/entities/feeds/bulk_feed.py @@ -19,7 +19,7 @@ class BulkFeed(_SingleRecordBulkEntity): * :class:`.BulkFileWriter` """ - def __init__(self, id = None, status=None, account_id=None, sub_type=None, feed_name = None, custom_attr=None): + def __init__(self, id = None, status=None, account_id=None, sub_type=None, feed_name = None, custom_attr=None, schedule=None): super(BulkFeed, self).__init__() self._status = status self._account_id = account_id @@ -27,6 +27,7 @@ def __init__(self, id = None, status=None, account_id=None, sub_type=None, feed_ self._sub_type = sub_type self._name = feed_name self._custom_attributes = custom_attr + self._schedule = schedule @property @@ -102,11 +103,24 @@ def custom_attributes(self): :rtype: long """ return self._custom_attributes - + @custom_attributes.setter def custom_attributes(self, value): self._custom_attributes = value + @property + def schedule(self): + """ the schedule of the feed + Corresponds to the 'Schedule' field in the bulk file. + + :rtype: string + """ + return self._schedule + + @schedule.setter + def schedule(self, value): + self._schedule = value + _MAPPINGS = [ _SimpleBulkMapping( header=_StringTable.Id, @@ -138,6 +152,11 @@ def custom_attributes(self, value): field_to_csv=lambda c: field_to_csv_CustomAttributes(c.custom_attributes), csv_to_field=lambda c, v: csv_to_field_CustomAttributes(c, v) ), + _SimpleBulkMapping( + header=_StringTable.Schedule, + field_to_csv=lambda c: c.schedule, + csv_to_field=lambda c, v: setattr(c, 'schedule', v) + ), ] def process_mappings_from_row_values(self, row_values): diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 86820412..04f5516b 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -176,7 +176,12 @@ class _BulkObjectFactory(): _StringTable.CampaignActionAdExtension: _EntityInfo(lambda: BulkCampaignActionAdExtension()), _StringTable.Experiment: _EntityInfo(lambda: BulkExperiment()), _StringTable.Feed: _EntityInfo(lambda: BulkFeed()), - _StringTable.FeedItem: _EntityInfo(lambda: BulkFeedItem()) + _StringTable.FeedItem: _EntityInfo(lambda: BulkFeedItem()), + _StringTable.CampaignConversionGoal: _EntityInfo(lambda: BulkCampaignConversionGoal()), + _StringTable.AdCustomizerAttribute: _EntityInfo(lambda: BulkAdCustomizerAttribute()), + _StringTable.AdCustomizerCampaign: _EntityInfo(lambda: BulkCampaignAdCustomizerAttribute()), + _StringTable.AdCustomizerAdGroup: _EntityInfo(lambda: BulkAdGroupAdCustomizerAttribute()), + _StringTable.AdCustomizerKeyword: _EntityInfo(lambda: BulkKeywordAdCustomizerAttribute()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 0365c478..0860c0a6 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -428,7 +428,15 @@ class _CsvHeaders: _StringTable.FeedName, _StringTable.PhysicalIntent, _StringTable.TargetAdGroupId, - _StringTable.TargetCampaignId + _StringTable.TargetCampaignId, + _StringTable.Schedule, + + # Campaign Conversion Goal + _StringTable.GoalId, + + # RSA AdCustomizer + _StringTable.AdCustomizerDataType, + _StringTable.AdCustomizerAttributeValue, ] @staticmethod diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index cf861efd..da296a4c 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -93,6 +93,7 @@ class _StringTable: AllowImageAutoRetrieve = "Allow Image Auto Retrieve" MultiMediaAdBidAdjustment = "Multi Media Ad Bid Adjustment" BusinessAttributes = "Business Attributes" + Schedule = "Schedule"; # Entity Types SemanticVersion = "Format Version" @@ -597,3 +598,15 @@ class _StringTable: CampaignIndustryCriterion = 'Campaign Industry Criterion' FinalUrlSuffix = "Final Url Suffix" + + # AdCustomizerAttribute + AdCustomizerAttribute = "Adcustomizer Attribute" + AdCustomizerCampaign = "Campaign Adcustomizer Attribute" + AdCustomizerAdGroup = "Adgroup Adcustomizer Attribute" + AdCustomizerKeyword = "Keyword Adcustomizer Attribute" + AdCustomizerDataType = "AdCustomizer DataType" + AdCustomizerAttributeValue = "AdCustomizer AttributeValue" + + # Campaign Conversion Goal + CampaignConversionGoal = "Campaign Conversion Goal" + GoalId = "Goal Id" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 88fa13b5..e2930385 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -198,7 +198,7 @@ def entity_csv_to_biddingscheme(row_values, entity): entity.BiddingScheme.TargetRoas = target_roas_value elif bid_strategy_type == 'TargetImpressionShare': entity.BiddingScheme.Type = "TargetImpressionShare" - entity.BiddingScheme.MaxCpc = maxCpcValue + entity.BiddingScheme.MaxCpc = max_cpc_value entity.BiddingScheme.TargetImpressionShare = target_impression_share_value entity.BiddingScheme.TargetAdPosition = target_ad_position_value diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index 975c02d1..ed110bc5 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -1785,6 +1785,1180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + 18 + + + + + + + 19 + + + + + + + 20 + + + + + + + 21 + + + + + + + 22 + + + + + + + 23 + + + + + + + 24 + + + + + + + 25 + + + + + + + 26 + + + + + + + 27 + + + + + + + 28 + + + + + + + 29 + + + + + + + 30 + + + + + + + 31 + + + + + + + 32 + + + + + + + 33 + + + + + + + 34 + + + + + + + 35 + + + + + + + 36 + + + + + + + 37 + + + + + + + 38 + + + + + + + 39 + + + + + + + 40 + + + + + + + 41 + + + + + + + 42 + + + + + + + 43 + + + + + + + 44 + + + + + + + 45 + + + + + + + 46 + + + + + + + 47 + + + + + + + 48 + + + + + + + 49 + + + + + + + 50 + + + + + + + 51 + + + + + + + 52 + + + + + + + 53 + + + + + + + 54 + + + + + + + 55 + + + + + + + 56 + + + + + + + 57 + + + + + + + 58 + + + + + + + 59 + + + + + + + 60 + + + + + + + 61 + + + + + + + 62 + + + + + + + 63 + + + + + + + 64 + + + + + + + 65 + + + + + + + 66 + + + + + + + 67 + + + + + + + 68 + + + + + + + 69 + + + + + + + 70 + + + + + + + 71 + + + + + + + 72 + + + + + + + 73 + + + + + + + 74 + + + + + + + 75 + + + + + + + 76 + + + + + + + 77 + + + + + + + 78 + + + + + + + 79 + + + + + + + 80 + + + + + + + 81 + + + + + + + 82 + + + + + + + 83 + + + + + + + 84 + + + + + + + 85 + + + + + + + 86 + + + + + + + 87 + + + + + + + 88 + + + + + + + 89 + + + + + + + 90 + + + + + + + 91 + + + + + + + 92 + + + + + + + 93 + + + + + + + 94 + + + + + + + 95 + + + + + + + 96 + + + + + + + 97 + + + + + + + 98 + + + + + + + 99 + + + + + + + 100 + + + + + + + 101 + + + + + + + 102 + + + + + + + 103 + + + + + + + 104 + + + + + + + 105 + + + + + + + 106 + + + + + + + 107 + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + + + + + + @@ -2403,6 +3577,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2536,6 +3782,24 @@ + + + + + + + + + + + + + + + + + + @@ -3046,6 +4310,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index c6c2cc24..83f2d167 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1044,6 +1044,41 @@ + + + + 140 + + + + + + + 141 + + + + + + + 142 + + + + + + + 143 + + + + + + + 144 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index d12de77e..2318d501 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -342,6 +342,15 @@ + + + + + + + + + @@ -593,6 +602,20 @@ + + + + 46 + + + + + + + 93 + + + @@ -708,6 +731,13 @@ + + + + + + + @@ -725,7 +755,7 @@ - + @@ -956,7 +986,7 @@ - + @@ -1030,7 +1060,7 @@ - + @@ -1056,7 +1086,7 @@ - + @@ -1073,7 +1103,7 @@ - + @@ -1097,7 +1127,7 @@ - + @@ -1145,6 +1175,7 @@ + @@ -1161,7 +1192,7 @@ - + @@ -1179,7 +1210,7 @@ - + @@ -1209,7 +1240,7 @@ - + @@ -1230,7 +1261,7 @@ - + @@ -1271,7 +1302,7 @@ - + @@ -1298,7 +1329,7 @@ - + @@ -1362,6 +1393,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1400,8 +1457,8 @@ - - + + @@ -1410,7 +1467,7 @@ - + @@ -1425,7 +1482,7 @@ - + @@ -1480,7 +1537,7 @@ - + @@ -1489,7 +1546,7 @@ - + @@ -1510,7 +1567,7 @@ - + @@ -1571,14 +1628,14 @@ - + - + @@ -1598,7 +1655,7 @@ - + @@ -1648,7 +1705,7 @@ - + @@ -1715,10 +1772,10 @@ - + - - + + @@ -1765,8 +1822,8 @@ - - + + @@ -1775,7 +1832,7 @@ - + @@ -1805,7 +1862,7 @@ - + @@ -1843,7 +1900,7 @@ - + @@ -1977,7 +2034,7 @@ - + @@ -1986,7 +2043,7 @@ - + @@ -2129,6 +2186,13 @@ + + + + 4096 + + + @@ -2175,7 +2239,7 @@ - + @@ -2313,10 +2377,10 @@ - + - - + + @@ -2324,7 +2388,7 @@ - + @@ -2347,9 +2411,9 @@ - + - + @@ -2389,9 +2453,9 @@ - + - + @@ -2404,9 +2468,9 @@ - + - + @@ -2506,7 +2570,7 @@ - + @@ -2552,8 +2616,8 @@ - - + + @@ -2593,9 +2657,9 @@ - + - + @@ -2669,11 +2733,11 @@ - + - + - + @@ -2729,12 +2793,12 @@ - + - + - - + + @@ -2751,9 +2815,9 @@ - + - + @@ -2771,9 +2835,9 @@ - + - + @@ -2819,7 +2883,7 @@ - + @@ -2844,7 +2908,7 @@ - + @@ -2915,7 +2979,7 @@ - + @@ -3004,7 +3068,7 @@ - + @@ -3032,7 +3096,7 @@ - + @@ -3109,7 +3173,7 @@ - + @@ -3148,7 +3212,7 @@ - + @@ -3156,7 +3220,7 @@ - + @@ -3243,7 +3307,7 @@ - + @@ -3259,7 +3323,7 @@ - + @@ -3294,7 +3358,7 @@ - + @@ -3695,7 +3759,7 @@ - + @@ -3819,9 +3883,9 @@ - + - + @@ -3836,32 +3900,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3906,7 +3944,7 @@ - + @@ -3929,7 +3967,7 @@ - + @@ -3991,7 +4029,7 @@ - + @@ -4097,7 +4135,7 @@ - + @@ -4129,14 +4167,14 @@ - + - + @@ -4187,7 +4225,7 @@ - + @@ -4260,7 +4298,7 @@ - + @@ -4293,7 +4331,7 @@ - + @@ -4316,7 +4354,7 @@ - + @@ -4385,7 +4423,7 @@ - + @@ -4402,7 +4440,7 @@ - + @@ -4436,7 +4474,7 @@ - + @@ -4478,7 +4516,7 @@ - + @@ -4671,7 +4709,7 @@ - + @@ -4694,7 +4732,7 @@ - + @@ -4710,7 +4748,7 @@ - + @@ -4751,7 +4789,7 @@ - + @@ -4773,7 +4811,7 @@ - + @@ -4787,7 +4825,7 @@ - + @@ -4802,7 +4840,7 @@ - + @@ -4840,7 +4878,7 @@ - + @@ -4862,7 +4900,7 @@ - + @@ -4876,7 +4914,7 @@ - + @@ -4891,7 +4929,7 @@ - + @@ -4921,14 +4959,14 @@ - + - + @@ -5202,7 +5240,7 @@ - + @@ -5236,7 +5274,7 @@ - + @@ -5258,7 +5296,7 @@ - + @@ -5272,7 +5310,7 @@ - + @@ -5300,7 +5338,7 @@ - + @@ -5370,7 +5408,7 @@ - + @@ -5400,6 +5438,7 @@ + @@ -5421,6 +5460,13 @@ + + + + + + + @@ -5449,6 +5495,13 @@ + + + + + + + @@ -5614,7 +5667,7 @@ - + @@ -5638,7 +5691,7 @@ - + @@ -5746,7 +5799,7 @@ - + @@ -5754,7 +5807,7 @@ - + @@ -5782,7 +5835,7 @@ - + @@ -5841,7 +5894,7 @@ - + @@ -5858,7 +5911,7 @@ - + @@ -5901,7 +5954,7 @@ - + @@ -5909,7 +5962,7 @@ - + @@ -5937,7 +5990,7 @@ - + @@ -6055,7 +6108,7 @@ - + @@ -6144,6 +6197,13 @@ + + + + + + + @@ -6237,7 +6297,7 @@ - + @@ -6256,7 +6316,7 @@ - + @@ -6266,7 +6326,7 @@ - + @@ -6331,6 +6391,13 @@ + + + + 128 + + + @@ -6353,7 +6420,7 @@ - + @@ -6381,7 +6448,7 @@ - + @@ -6398,7 +6465,7 @@ - + @@ -6414,7 +6481,7 @@ - + @@ -6433,7 +6500,7 @@ - + @@ -6448,7 +6515,7 @@ - + @@ -6485,7 +6552,7 @@ - + @@ -6493,7 +6560,7 @@ - + @@ -6507,7 +6574,7 @@ - + @@ -6534,6 +6601,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9590,6 +9698,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10323,6 +10479,18 @@ + + + + + + + + + + + + @@ -13133,6 +13301,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index e0421c11..843d0b5c 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -164,6 +164,7 @@ + @@ -921,6 +922,7 @@ + @@ -1068,6 +1070,7 @@ + @@ -1356,6 +1359,7 @@ + @@ -1470,6 +1474,7 @@ + @@ -1588,6 +1593,7 @@ + @@ -1758,6 +1764,7 @@ + @@ -1861,6 +1868,7 @@ + @@ -1929,6 +1937,7 @@ + @@ -2029,6 +2038,7 @@ + @@ -2113,6 +2123,7 @@ + @@ -2286,6 +2297,7 @@ + @@ -2348,6 +2360,7 @@ + @@ -2740,6 +2753,7 @@ + @@ -2918,6 +2932,7 @@ + @@ -3047,6 +3062,7 @@ + @@ -3157,6 +3173,7 @@ + @@ -3253,6 +3270,7 @@ + @@ -3580,6 +3598,7 @@ + @@ -3673,6 +3692,7 @@ + @@ -3765,6 +3785,8 @@ + + @@ -3865,6 +3887,7 @@ + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 511a254e..241e8142 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -1785,6 +1785,1180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + 18 + + + + + + + 19 + + + + + + + 20 + + + + + + + 21 + + + + + + + 22 + + + + + + + 23 + + + + + + + 24 + + + + + + + 25 + + + + + + + 26 + + + + + + + 27 + + + + + + + 28 + + + + + + + 29 + + + + + + + 30 + + + + + + + 31 + + + + + + + 32 + + + + + + + 33 + + + + + + + 34 + + + + + + + 35 + + + + + + + 36 + + + + + + + 37 + + + + + + + 38 + + + + + + + 39 + + + + + + + 40 + + + + + + + 41 + + + + + + + 42 + + + + + + + 43 + + + + + + + 44 + + + + + + + 45 + + + + + + + 46 + + + + + + + 47 + + + + + + + 48 + + + + + + + 49 + + + + + + + 50 + + + + + + + 51 + + + + + + + 52 + + + + + + + 53 + + + + + + + 54 + + + + + + + 55 + + + + + + + 56 + + + + + + + 57 + + + + + + + 58 + + + + + + + 59 + + + + + + + 60 + + + + + + + 61 + + + + + + + 62 + + + + + + + 63 + + + + + + + 64 + + + + + + + 65 + + + + + + + 66 + + + + + + + 67 + + + + + + + 68 + + + + + + + 69 + + + + + + + 70 + + + + + + + 71 + + + + + + + 72 + + + + + + + 73 + + + + + + + 74 + + + + + + + 75 + + + + + + + 76 + + + + + + + 77 + + + + + + + 78 + + + + + + + 79 + + + + + + + 80 + + + + + + + 81 + + + + + + + 82 + + + + + + + 83 + + + + + + + 84 + + + + + + + 85 + + + + + + + 86 + + + + + + + 87 + + + + + + + 88 + + + + + + + 89 + + + + + + + 90 + + + + + + + 91 + + + + + + + 92 + + + + + + + 93 + + + + + + + 94 + + + + + + + 95 + + + + + + + 96 + + + + + + + 97 + + + + + + + 98 + + + + + + + 99 + + + + + + + 100 + + + + + + + 101 + + + + + + + 102 + + + + + + + 103 + + + + + + + 104 + + + + + + + 105 + + + + + + + 106 + + + + + + + 107 + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + 11 + + + + + + + 12 + + + + + + + 13 + + + + + + + 14 + + + + + + + 15 + + + + + + + 16 + + + + + + + 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + + + + + 7 + + + + + + + + + + + + @@ -2403,6 +3577,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2536,6 +3782,24 @@ + + + + + + + + + + + + + + + + + + @@ -3046,10 +4310,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 32b6bed9..0438ae5e 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1044,6 +1044,41 @@ + + + + 140 + + + + + + + 141 + + + + + + + 142 + + + + + + + 143 + + + + + + + 144 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 4df32339..d6d55356 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -342,6 +342,15 @@ + + + + + + + + + @@ -593,6 +602,20 @@ + + + + 46 + + + + + + + 93 + + + @@ -708,6 +731,13 @@ + + + + + + + @@ -725,7 +755,7 @@ - + @@ -956,7 +986,7 @@ - + @@ -1030,7 +1060,7 @@ - + @@ -1056,7 +1086,7 @@ - + @@ -1073,7 +1103,7 @@ - + @@ -1097,7 +1127,7 @@ - + @@ -1145,6 +1175,7 @@ + @@ -1161,7 +1192,7 @@ - + @@ -1179,7 +1210,7 @@ - + @@ -1209,7 +1240,7 @@ - + @@ -1230,7 +1261,7 @@ - + @@ -1271,7 +1302,7 @@ - + @@ -1298,7 +1329,7 @@ - + @@ -1362,6 +1393,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1400,8 +1457,8 @@ - - + + @@ -1410,7 +1467,7 @@ - + @@ -1425,7 +1482,7 @@ - + @@ -1480,7 +1537,7 @@ - + @@ -1489,7 +1546,7 @@ - + @@ -1510,7 +1567,7 @@ - + @@ -1571,14 +1628,14 @@ - + - + @@ -1598,7 +1655,7 @@ - + @@ -1648,7 +1705,7 @@ - + @@ -1715,10 +1772,10 @@ - + - - + + @@ -1765,8 +1822,8 @@ - - + + @@ -1775,7 +1832,7 @@ - + @@ -1805,7 +1862,7 @@ - + @@ -1843,7 +1900,7 @@ - + @@ -1977,7 +2034,7 @@ - + @@ -1986,7 +2043,7 @@ - + @@ -2129,6 +2186,13 @@ + + + + 4096 + + + @@ -2175,7 +2239,7 @@ - + @@ -2313,10 +2377,10 @@ - + - - + + @@ -2324,7 +2388,7 @@ - + @@ -2347,9 +2411,9 @@ - + - + @@ -2389,9 +2453,9 @@ - + - + @@ -2404,9 +2468,9 @@ - + - + @@ -2506,7 +2570,7 @@ - + @@ -2552,8 +2616,8 @@ - - + + @@ -2593,9 +2657,9 @@ - + - + @@ -2669,11 +2733,11 @@ - + - + - + @@ -2729,12 +2793,12 @@ - + - + - - + + @@ -2751,9 +2815,9 @@ - + - + @@ -2771,9 +2835,9 @@ - + - + @@ -2819,7 +2883,7 @@ - + @@ -2844,7 +2908,7 @@ - + @@ -2915,7 +2979,7 @@ - + @@ -3004,7 +3068,7 @@ - + @@ -3032,7 +3096,7 @@ - + @@ -3109,7 +3173,7 @@ - + @@ -3148,7 +3212,7 @@ - + @@ -3156,7 +3220,7 @@ - + @@ -3243,7 +3307,7 @@ - + @@ -3259,7 +3323,7 @@ - + @@ -3294,7 +3358,7 @@ - + @@ -3695,7 +3759,7 @@ - + @@ -3819,9 +3883,9 @@ - + - + @@ -3836,32 +3900,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3906,7 +3944,7 @@ - + @@ -3929,7 +3967,7 @@ - + @@ -3991,7 +4029,7 @@ - + @@ -4097,7 +4135,7 @@ - + @@ -4129,14 +4167,14 @@ - + - + @@ -4187,7 +4225,7 @@ - + @@ -4260,7 +4298,7 @@ - + @@ -4293,7 +4331,7 @@ - + @@ -4316,7 +4354,7 @@ - + @@ -4385,7 +4423,7 @@ - + @@ -4402,7 +4440,7 @@ - + @@ -4436,7 +4474,7 @@ - + @@ -4478,7 +4516,7 @@ - + @@ -4671,7 +4709,7 @@ - + @@ -4694,7 +4732,7 @@ - + @@ -4710,7 +4748,7 @@ - + @@ -4751,7 +4789,7 @@ - + @@ -4773,7 +4811,7 @@ - + @@ -4787,7 +4825,7 @@ - + @@ -4802,7 +4840,7 @@ - + @@ -4840,7 +4878,7 @@ - + @@ -4862,7 +4900,7 @@ - + @@ -4876,7 +4914,7 @@ - + @@ -4891,7 +4929,7 @@ - + @@ -4921,14 +4959,14 @@ - + - + @@ -5202,7 +5240,7 @@ - + @@ -5236,7 +5274,7 @@ - + @@ -5258,7 +5296,7 @@ - + @@ -5272,7 +5310,7 @@ - + @@ -5300,7 +5338,7 @@ - + @@ -5370,7 +5408,7 @@ - + @@ -5400,6 +5438,7 @@ + @@ -5421,6 +5460,13 @@ + + + + + + + @@ -5449,6 +5495,13 @@ + + + + + + + @@ -5614,7 +5667,7 @@ - + @@ -5638,7 +5691,7 @@ - + @@ -5746,7 +5799,7 @@ - + @@ -5754,7 +5807,7 @@ - + @@ -5782,7 +5835,7 @@ - + @@ -5841,7 +5894,7 @@ - + @@ -5858,7 +5911,7 @@ - + @@ -5901,7 +5954,7 @@ - + @@ -5909,7 +5962,7 @@ - + @@ -5937,7 +5990,7 @@ - + @@ -6055,7 +6108,7 @@ - + @@ -6144,6 +6197,13 @@ + + + + + + + @@ -6237,7 +6297,7 @@ - + @@ -6256,7 +6316,7 @@ - + @@ -6266,7 +6326,7 @@ - + @@ -6331,6 +6391,13 @@ + + + + 128 + + + @@ -6353,7 +6420,7 @@ - + @@ -6381,7 +6448,7 @@ - + @@ -6398,7 +6465,7 @@ - + @@ -6414,7 +6481,7 @@ - + @@ -6433,7 +6500,7 @@ - + @@ -6448,7 +6515,7 @@ - + @@ -6485,7 +6552,7 @@ - + @@ -6493,7 +6560,7 @@ - + @@ -6507,7 +6574,7 @@ - + @@ -6534,6 +6601,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9590,6 +9698,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10323,6 +10479,18 @@ + + + + + + + + + + + + @@ -13133,6 +13301,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index d3e07461..635f2787 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -164,6 +164,7 @@ + @@ -921,6 +922,7 @@ + @@ -1068,6 +1070,7 @@ + @@ -1356,6 +1359,7 @@ + @@ -1470,6 +1474,7 @@ + @@ -1588,6 +1593,7 @@ + @@ -1758,6 +1764,7 @@ + @@ -1861,6 +1868,7 @@ + @@ -1929,6 +1937,7 @@ + @@ -2029,6 +2038,7 @@ + @@ -2113,6 +2123,7 @@ + @@ -2286,6 +2297,7 @@ + @@ -2348,6 +2360,7 @@ + @@ -2740,6 +2753,7 @@ + @@ -2918,6 +2932,7 @@ + @@ -3047,6 +3062,7 @@ + @@ -3157,6 +3173,7 @@ + @@ -3253,6 +3270,7 @@ + @@ -3580,6 +3598,7 @@ + @@ -3673,6 +3692,7 @@ + @@ -3765,6 +3785,8 @@ + + @@ -3865,6 +3887,7 @@ + diff --git a/requirements.txt b/requirements.txt index 0759c725..f1601d1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -suds-community>=1.0.0b1 +suds-community>=1.1.0 requests>=2.0.0 future six diff --git a/setup.py b/setup.py index 04af2384..dbe58fb5 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.13' +VERSION = '13.0.14' with open('README.rst', 'r') as f: readme = f.read() @@ -11,11 +11,11 @@ history = f.read().replace('.. :changelog:', '') requirements = [ - 'suds-community>=1.0.0b1', + 'suds-community>=1.1.0', 'future', 'six', 'requests', - 'enum34;python_version<"3.4"', + 'enum34;python_version<"3.9"', ] setup( @@ -61,5 +61,10 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9' ], ) From c4b88aa06161d77858a2f324645d646a9a814293 Mon Sep 17 00:00:00 2001 From: Pere Turegano Date: Fri, 5 Aug 2022 15:41:42 +0200 Subject: [PATCH 12/55] Removed parameter IncludeLinkedAccountIds from GetUser call --- examples/v13/customer_signup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/v13/customer_signup.py b/examples/v13/customer_signup.py index 368b8238..cdfb3428 100644 --- a/examples/v13/customer_signup.py +++ b/examples/v13/customer_signup.py @@ -8,8 +8,7 @@ def main(authorization_data): try: output_status_message("-----\nGetUser:") get_user_response=customer_service.GetUser( - UserId=None, - IncludeLinkedAccountIds=True + UserId=None ) user = get_user_response.User customer_roles=get_user_response.CustomerRoles From 491fbcb8f2acf28468817b8bc3b93818ca3ba8bc Mon Sep 17 00:00:00 2001 From: Pere Turegano Date: Fri, 5 Aug 2022 16:14:29 +0200 Subject: [PATCH 13/55] Removed parameter IncludeLinkedAccountIds from GetUser call --- examples/v13/invite_user.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/v13/invite_user.py b/examples/v13/invite_user.py index 15fdb30a..ad4b2586 100644 --- a/examples/v13/invite_user.py +++ b/examples/v13/invite_user.py @@ -101,8 +101,7 @@ def main(authorization_data): for info in users_info['UserInfo']: output_status_message("-----\nGetUser:") get_user_response=customer_service.GetUser( - UserId=info.Id, - IncludeLinkedAccountIds=True) + UserId=info.Id) user = get_user_response.User customer_roles=get_user_response.CustomerRoles output_status_message("User:") From 6f22c1ed0dfa10a20be8152ee3cd5020d1b1e202 Mon Sep 17 00:00:00 2001 From: Pere Turegano Date: Fri, 5 Aug 2022 16:46:41 +0200 Subject: [PATCH 14/55] Updated to supported version urllib3 --- examples/v13/geographical_locations.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/v13/geographical_locations.py b/examples/v13/geographical_locations.py index 45f78249..d165b521 100644 --- a/examples/v13/geographical_locations.py +++ b/examples/v13/geographical_locations.py @@ -1,4 +1,6 @@ -import urllib2 +import urllib3 as urllib +from urllib.error import URLError +from urllib.request import urlopen, Request from auth_helper import * from campaignmanagement_example_helper import * @@ -29,14 +31,14 @@ def main(authorization_data): output_status_message("FileUrlExpiryTimeUtc: {0}".format(get_geo_locations_file_url_response.FileUrlExpiryTimeUtc)) output_status_message("LastModifiedTimeUtc: {0}".format(get_geo_locations_file_url_response.LastModifiedTimeUtc)) - request=urllib2.Request(get_geo_locations_file_url_response.FileUrl) - response=urllib2.urlopen(request) + request=Request(get_geo_locations_file_url_response.FileUrl) + response=urlopen(request) if response.getcode() == 200: download_file(response) output_status_message("Downloaded the geographical locations to {0}.".format(LOCAL_FILE)) - except urllib2.URLError as ex: + except URLError as ex: if hasattr(ex, 'code'): output_status_message("Error code: {0}".format(ex.code)) elif hasattr(ex, 'reason'): From eae386006f597f9dff070c333e496225547a5917 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Thu, 22 Dec 2022 10:27:42 +0800 Subject: [PATCH 15/55] v13.0.15 --- HISTORY.rst | 130 ++-- bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 5 +- bingads/v13/bulk/entities/bulk_ad_group.py | 30 +- .../bulk/entities/bulk_ad_group_criterion.py | 207 ++++++ .../bulk_ad_group_hotel_listing_group.py | 103 +++ .../bulk_ad_group_product_partition.py | 219 +----- .../bulk_online_conversion_adjustment.py | 106 +++ .../entities/target_criterions/__init__.py | 5 + ..._hotel_advance_booking_window_criterion.py | 57 ++ ..._ad_group_hotel_check_in_date_criterion.py | 57 ++ ...k_ad_group_hotel_check_in_day_criterion.py | 52 ++ ...oup_hotel_date_selection_type_criterion.py | 52 ++ ...ad_group_hotel_length_of_stay_criterion.py | 57 ++ .../v13/internal/bulk/bulk_object_factory.py | 28 +- bingads/v13/internal/bulk/csv_headers.py | 21 +- bingads/v13/internal/bulk/string_table.py | 26 +- bingads/v13/internal/extensions.py | 169 +++++ .../proxies/production/adinsight_service.xml | 290 ++++++++ .../v13/proxies/production/bulk_service.xml | 7 + .../production/campaignmanagement_service.xml | 673 +++++++++++++---- .../production/customerbilling_service.xml | 70 +- .../production/customermanagement_service.xml | 268 +++---- .../proxies/production/reporting_service.xml | 223 ++++++ .../v13/proxies/sandbox/adinsight_service.xml | 290 ++++++++ bingads/v13/proxies/sandbox/bulk_service.xml | 7 + .../sandbox/campaignmanagement_service.xml | 684 ++++++++++++++---- .../sandbox/customerbilling_service.xml | 70 +- .../sandbox/customermanagement_service.xml | 268 +++---- .../v13/proxies/sandbox/reporting_service.xml | 223 ++++++ setup.py | 5 +- tox.ini | 2 +- 32 files changed, 3549 insertions(+), 857 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_ad_group_criterion.py create mode 100644 bingads/v13/bulk/entities/bulk_ad_group_hotel_listing_group.py create mode 100644 bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_advance_booking_window_criterion.py create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_date_criterion.py create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_day_criterion.py create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_date_selection_type_criterion.py create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_length_of_stay_criterion.py diff --git a/HISTORY.rst b/HISTORY.rst index 63ade453..701ae506 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,14 @@ .. :changelog: Release History +13.0.15(2022-12-23) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add bulk mappings for OnlineConversionAdjustment. +* Add bulk mappings for Adgroup Hotel Ads Criterions i.e., BulkAdGroupHotelAdvanceBookingWindowCriterion, BulkAdGroupHotelCheckInDateCriterion, BulkAdGroupHotelCheckInDayCriterion, BulkAdGroupHotelDateSelectionTypeCriterion and BulkAdGroupHotelLengthOfStayCriterion. +* Add bulk mappings for AdGroupHotelListingGroup. +* Add mappings for new fields in BulkAdgroup: UseOptimizedTargeting, HotelSetting, CommissionRate and PercentCpcBid. +* Support new bidding scheme: percentCpcBiddingScheme and commissionBiddingScheme. 13.0.14(2022-06-30) +++++++++++++++++++++++++ @@ -40,15 +48,15 @@ Release History * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes * Add new msads.manage scope for multi-factor authentication requirement. Eventually msads.manage will be required. Learn more here: https://go.microsoft.com/fwlink/?linkid=2155062 -* Default OAuth scope is set to the new msads.manage scope. Can be overridden temporarily with new oAuthScope parameter (replaces requireLiveConnect). -* Sandbox auth support via login.live-int.com is replaced with login.windows-ppe.net. +* Default OAuth scope is set to the new msads.manage scope. Can be overridden temporarily with new oAuthScope parameter (replaces requireLiveConnect). +* Sandbox auth support via login.live-int.com is replaced with login.windows-ppe.net. * Add BulkVideo for video ads support * Add mappings for new fields in BulkResponsiveAd: CallToActionLanguage, Videos, Headlines, Descriptions * Add mappings for new fields in BulkAdGroup: CpvBid, CpmBid * Update ToBiddingSchemeBulkString(this BiddingScheme biddingScheme) to support MaxRoas, ManualCpv and ManualCpm * Add mappings for new fields in BulkAccount: AdClickParallelTracking, AutoApplyRecommendations, AllowImageAutoRetrieve * Conjunctive normal form (CNF) support is added to PageVisitorsRule and mapped in the BulkRemarketingList remarketing rule. Previously Microsoft Advertising only supported disjunctive normal form (DNF). You must ensure that your application can appropriately read and distinguish between CNF and DNF. Your application should no longer assume that the rule is disjunctive. -* Add mapping for new MultimediaAdsBidAdjustment field in BulkCampaign and BulkAdGroup +* Add mapping for new MultimediaAdsBidAdjustment field in BulkCampaign and BulkAdGroup * Fix issue of DSA setting not being exported for Search Campaign 13.0.9.1(2021-04-29) @@ -57,77 +65,77 @@ Release History 13.0.9(2021-04-29) +++++++++++++++++++++++++ -* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* Add bulk mappings for video ad extensions i.e., BulkVideoAdExtension, BulkAccountVideoAdExtension, BulkAdGroupVideoAdExtension, and BulkCampaignVideoAdExtension. -* Add CashbackAdjustment mapping in the BulkAdGroupBiddableCriterion and BulkCampaignBiddableCriterion. -* Cache SDK snapshot of the singleWsdl proxies for all Bing Ads API Version 13 services. +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add bulk mappings for video ad extensions i.e., BulkVideoAdExtension, BulkAccountVideoAdExtension, BulkAdGroupVideoAdExtension, and BulkCampaignVideoAdExtension. +* Add CashbackAdjustment mapping in the BulkAdGroupBiddableCriterion and BulkCampaignBiddableCriterion. +* Cache SDK snapshot of the singleWsdl proxies for all Bing Ads API Version 13 services. 13.0.8(2021-03-10) +++++++++++++++++++++++++ -* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. * Added BulkPromotionAdExtension to the object factory * Added BulkAdGroupBiddableCriterion, BulkAdGroupBiddableCriterion, BulkCampaignBiddableCriterion, and BulkCampaignNegativeCriterion base classes for criterion. -* Added DynamicFeedSetting to BulkCampaign for an upcoming pilot feature. +* Added DynamicFeedSetting to BulkCampaign for an upcoming pilot feature. * Added BulkBidStrategy for an upcoming pilot feature. * Added BidStrategyId to BulkCampaign for an upcoming pilot feature. 13.0.7(2020-12-16) +++++++++++++++++++++++++ -* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* Add bulk mappings for flyer ad extensions i.e., BulkFlyerAdExtension, BulkAccountFlyerAdExtension, BulkAdGroupFlyerAdExtension, and BulkCampaignFlyerAdExtension. -* Add ImpressionTrackingUrls mapping in the BulkResponsiveAd. +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add bulk mappings for flyer ad extensions i.e., BulkFlyerAdExtension, BulkAccountFlyerAdExtension, BulkAdGroupFlyerAdExtension, and BulkCampaignFlyerAdExtension. +* Add ImpressionTrackingUrls mapping in the BulkResponsiveAd. * Update the pattern matching to resolve EntityReadException with BulkCombinedList download. 13.0.6(2020-10-14) +++++++++++++++++++++++++ -* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* Add FinalUrlSuffix mapping in the BulkFilterLinkAdExtension. -* Add AdGroupType mapping in the BulkAdGroup. -* Allow DynamicSearchAdsSetting in BulkCampaign for search campaigns. -* Remove delete_value write to file for AdScheduleUseSearcherTimeZone in BulkAdGroup and BulkCampaign. +* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add FinalUrlSuffix mapping in the BulkFilterLinkAdExtension. +* Add AdGroupType mapping in the BulkAdGroup. +* Allow DynamicSearchAdsSetting in BulkCampaign for search campaigns. +* Remove delete_value write to file for AdScheduleUseSearcherTimeZone in BulkAdGroup and BulkCampaign. 13.0.5(2020-08-14) +++++++++++++++++++++++++ -* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* Add BulkImage for bulk image upload. -* Add Multi-Image field mappings for BulkImageAdExtension. -* Add offline conversion adjustment field mappings for BulkOfflineConversion. -* Add bulk mappings for filter link ad extensions i.e., BulkFilterLinkAdExtension, BulkAccountFilterLinkAdExtension, BulkAdGroupFilterLinkAdExtension, and BulkCampaignFilterLinkAdExtension. +* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add BulkImage for bulk image upload. +* Add Multi-Image field mappings for BulkImageAdExtension. +* Add offline conversion adjustment field mappings for BulkOfflineConversion. +* Add bulk mappings for filter link ad extensions i.e., BulkFilterLinkAdExtension, BulkAccountFilterLinkAdExtension, BulkAdGroupFilterLinkAdExtension, and BulkCampaignFilterLinkAdExtension. 13.0.4.1(2020-07-23) +++++++++++++++++++++++++ -* Fix issue https://github.com/BingAds/BingAds-Python-SDK/issues/160. +* Fix issue https://github.com/BingAds/BingAds-Python-SDK/issues/160. 13.0.4(2020-07-10) +++++++++++++++++++++++++ -* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes:https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* Add mappings for TargetImpressionShareBiddingScheme in BulkCampaign. -* Add bulk mappings for combined list i.e., BulkCombinedList, BulkAdGroupCombinedListAssociation, BulkAdGroupNegativeCombinedListAssociation, BulkCampaignCombinedListAssociation, and BulkCampaignNegativeCombinedListAssociation. +* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes:https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add mappings for TargetImpressionShareBiddingScheme in BulkCampaign. +* Add bulk mappings for combined list i.e., BulkCombinedList, BulkAdGroupCombinedListAssociation, BulkAdGroupNegativeCombinedListAssociation, BulkCampaignCombinedListAssociation, and BulkCampaignNegativeCombinedListAssociation. * Add bulk entities for customer list i.e., BulkCustomerList, BulkCustomerListItem, BulkAdGroupCustomerListAssociation, BulkAdGroupNegativeCustomerListAssociation, BulkCampaignCustomerListAssociation, and BulkCampaignNegativeCustomerListAssociation. -* Add OAuth support for AAD tenant. +* Add OAuth support for AAD tenant. * Add OAuth support for PKCE e.g., code_verifier. 13.0.3(2020-05-26) +++++++++++++++++++++++++ -* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* Add mappings for MaxConversionValueBiddingScheme and TargetRoasBiddingScheme in BulkCampaign. -* Add mapping for the 'Use Searcher Time Zone' field in BulkCampaign and BulkAdGroup. -* Add bulk mappings for promotion ad extensions i.e., BulkPromotionAdExtension, BulkAccountPromotionAdExtension, BulkAdGroupPromotionAdExtension, and BulkCampaignPromotionAdExtension. -* Add support for delete_value of EndDate in the BulkExperiment. -* Add BulkCampaignNegativeStoreCriterion for future use. +* Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add mappings for MaxConversionValueBiddingScheme and TargetRoasBiddingScheme in BulkCampaign. +* Add mapping for the 'Use Searcher Time Zone' field in BulkCampaign and BulkAdGroup. +* Add bulk mappings for promotion ad extensions i.e., BulkPromotionAdExtension, BulkAccountPromotionAdExtension, BulkAdGroupPromotionAdExtension, and BulkCampaignPromotionAdExtension. +* Add support for delete_value of EndDate in the BulkExperiment. +* Add BulkCampaignNegativeStoreCriterion for future use. 13.0.2(2019-12-08) +++++++++++++++++++++++++ -* Attempt internal sync upload for up to 1,000 bulk entities via BulkServiceManager and upload_entities. -* Added the mapping for FinalUrlSuffix in BulkAdGroupDynamicSearchAdTarget. +* Attempt internal sync upload for up to 1,000 bulk entities via BulkServiceManager and upload_entities. +* Added the mapping for FinalUrlSuffix in BulkAdGroupDynamicSearchAdTarget. 13.0.1(2019-11-08) +++++++++++++++++++++++++ @@ -140,13 +148,13 @@ Release History 12.13.6(2019-10-12) +++++++++++++++++++++++++ -* Mapped the Experiment Type column to ExperimentType via BulkExperiment. +* Mapped the Experiment Type column to ExperimentType via BulkExperiment. * Updated Bing Ads API version 12 and 13 service proxies to reflect recent interface changes. For more information please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/advertising/guides/release-notes. 12.13.5(2019-09-12) +++++++++++++++++++++++++ -* Map the Bid Adjustment column to a BidMultiplier via BulkAdGroupProductPartition. +* Map the Bid Adjustment column to a BidMultiplier via BulkAdGroupProductPartition. * Updated Bing Ads API version 12 and 13 service proxies to reflect recent interface changes. For more information please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/advertising/guides/release-notes. @@ -181,14 +189,14 @@ Release History 12.13.2(2019-05-15) +++++++++++++++++++++++++ -* IMPORTANT: The default OAuth endpoint is updated from "Live Connect": https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth-live-connect endpoint to the "Microsoft Identity endpoint for developers": https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth-identity-platform. The "Microsoft Identity endpoint" supports both Microsoft Account (MSA) personal credentials and Azure Active Directory (AAD) work credentials. For more information, see "Upgrade to the Microsoft identity platform endpoint FAQ": https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth#upgrade-identity-platform-faq. +* IMPORTANT: The default OAuth endpoint is updated from "Live Connect": https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth-live-connect endpoint to the "Microsoft Identity endpoint for developers": https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth-identity-platform. The "Microsoft Identity endpoint" supports both Microsoft Account (MSA) personal credentials and Azure Active Directory (AAD) work credentials. For more information, see "Upgrade to the Microsoft identity platform endpoint FAQ": https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth#upgrade-identity-platform-faq. * Updated Bing Ads API version 12 and 13 service proxies to reflect recent interface changes. For details please see the "Bing Ads API Release Notes": https://docs.microsoft.com/en-us/bingads/guides/release-notes. -* For Bing Ads API version 12 and 13, added a new Bulk property for Final Url Suffix phase 2 entities i.e., added FinalUrlSuffix to the existing BulkActionAdExtension, BulkAppAdExtension, BulkImageAdExtension, BulkPriceAdExtension, BulkSitelinkAdExtension, BulkAdGroupProductPartition, and BulkAd. For details see "Final Url Suffix": https://docs.microsoft.com/en-us/advertising/guides/url-tracking-upgraded-urls#finalurlsuffixvalidation. +* For Bing Ads API version 12 and 13, added a new Bulk property for Final Url Suffix phase 2 entities i.e., added FinalUrlSuffix to the existing BulkActionAdExtension, BulkAppAdExtension, BulkImageAdExtension, BulkPriceAdExtension, BulkSitelinkAdExtension, BulkAdGroupProductPartition, and BulkAd. For details see "Final Url Suffix": https://docs.microsoft.com/en-us/advertising/guides/url-tracking-upgraded-urls#finalurlsuffixvalidation. 12.13.1(2019-04-15) +++++++++++++++++++++++++ -* Added support for Bing Ads API Version 13. For more information, see Migrating to Bing Ads API Version 13: https://docs.microsoft.com/en-us/bingads/guides/migration-guide?view=bingads-13. +* Added support for Bing Ads API Version 13. For more information, see Migrating to Bing Ads API Version 13: https://docs.microsoft.com/en-us/bingads/guides/migration-guide?view=bingads-13. * Updated version 12 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes?view=bingads-12. * For both version 12 and 13, added a new Bulk property for Final Url Suffix i.e., added FinalUrlSuffix to the existing BulkAccount, BulkAdGroup, BulkCampaign, and BulkKeyword. For details about Final Url Suffix in the Bulk file, see the Release Notes:https://docs.microsoft.com/en-us/bingads/guides/release-notes?view=bingads-12#finalurlsuffix-march2019. @@ -197,9 +205,9 @@ Release History * Updated service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. * Added a new Bulk property for Action Text i.e., added ActionText to the existing BulkActionAdExtension. -* Removed the is_expired property from BulkAdGroup. Use the Status property of the BulkAdGroup instead. -* For optional fields, the Bulk file schema mapping is updated such that "delete_value" will only be written to the file for update operations. Update intent is assumed when the Bulk entity ID is greater than zero. -* Updated the Status mapping for BulkExperiment i.e., map the string value directly instead of via bulk_optional_str. +* Removed the is_expired property from BulkAdGroup. Use the Status property of the BulkAdGroup instead. +* For optional fields, the Bulk file schema mapping is updated such that "delete_value" will only be written to the file for update operations. Update intent is assumed when the Bulk entity ID is greater than zero. +* Updated the Status mapping for BulkExperiment i.e., map the string value directly instead of via bulk_optional_str. 12.0.3.1(2019-02-01) +++++++++++++++++++++++++ @@ -209,24 +217,24 @@ Release History 12.0.3(2019-01-10) +++++++++++++++++++++++++ -* BREAKING CHANGE for BulkAdGroupCustomAudienceAssociation, BulkAdGroupInMarketAudienceAssociation, BulkAdGroupNegativeCustomAudienceAssociation, BulkAdGroupNegativeInMarketAudienceAssociation, BulkAdGroupNegativeProductAudienceAssociation, BulkAdGroupNegativeRemarketingListAssociation, BulkAdGroupNegativeSimilarRemarketingListAssociation, BulkAdGroupProductAudienceAssociation, BulkAdGroupRemarketingListAssociation, and BulkAdGroupSimilarRemarketingListAssociation: Replaced custom_audience_name, in_market_audience_name, product_audience_name, remarketing_list_name, and similar_remarketing_list_name with audience_name. The audience_name property is now used to map from the 'Audience Name' field of a Bulk file via all audience association SDK objects. +* BREAKING CHANGE for BulkAdGroupCustomAudienceAssociation, BulkAdGroupInMarketAudienceAssociation, BulkAdGroupNegativeCustomAudienceAssociation, BulkAdGroupNegativeInMarketAudienceAssociation, BulkAdGroupNegativeProductAudienceAssociation, BulkAdGroupNegativeRemarketingListAssociation, BulkAdGroupNegativeSimilarRemarketingListAssociation, BulkAdGroupProductAudienceAssociation, BulkAdGroupRemarketingListAssociation, and BulkAdGroupSimilarRemarketingListAssociation: Replaced custom_audience_name, in_market_audience_name, product_audience_name, remarketing_list_name, and similar_remarketing_list_name with audience_name. The audience_name property is now used to map from the 'Audience Name' field of a Bulk file via all audience association SDK objects. * Updated service proxies to reflect recent interface changes. For details please see the release notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. * Added Bulk mapping for responsive ad images i.e., added Images to the existing BulkResponsiveAd. * Added Bulk mapping for campaign target setting i.e., added TargetSetting to the existing BulkCampaign. -* Added Bulk mapping for campaign level audience associations i.e.,BulkCampaignCustomAudienceAssociation, BulkCampaignInMarketAudienceAssociation, BulkCampaignNegativeCustomAudienceAssociation, BulkCampaignNegativeInMarketAudienceAssociation, BulkCampaignNegativeProductAudienceAssociation, BulkCampaignNegativeRemarketingListAssociation, BulkCampaignNegativeSimilarRemarketingListAssociation, BulkCampaignProductAudienceAssociation, BulkCampaignRemarketingListAssociation, and BulkCampaignSimilarRemarketingListAssociation. -* Added the get_response_header method in class ServiceClient, to access the service TrackingId, etc per GitHub issue https://github.com/BingAds/BingAds-Python-SDK/issues/106. +* Added Bulk mapping for campaign level audience associations i.e.,BulkCampaignCustomAudienceAssociation, BulkCampaignInMarketAudienceAssociation, BulkCampaignNegativeCustomAudienceAssociation, BulkCampaignNegativeInMarketAudienceAssociation, BulkCampaignNegativeProductAudienceAssociation, BulkCampaignNegativeRemarketingListAssociation, BulkCampaignNegativeSimilarRemarketingListAssociation, BulkCampaignProductAudienceAssociation, BulkCampaignRemarketingListAssociation, and BulkCampaignSimilarRemarketingListAssociation. +* Added the get_response_header method in class ServiceClient, to access the service TrackingId, etc per GitHub issue https://github.com/BingAds/BingAds-Python-SDK/issues/106. 12.0.2(2018-12-10) +++++++++++++++++++++++++ * Updated service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. * Added Bulk mapping for campaign experiments i.e., BulkExperiment and BulkCampaign. -* Added Bulk mapping for action ad extensions i.e., BulkActionAdExtension, BulkAccountActionAdExtension, BulkAdGroupActionAdExtension, and BulkCampaignActionAdExtension. +* Added Bulk mapping for action ad extensions i.e., BulkActionAdExtension, BulkAccountActionAdExtension, BulkAdGroupActionAdExtension, and BulkCampaignActionAdExtension. 12.0.1(2018-11-10) +++++++++++++++++++++++++ -* Removed support for Bing Ads API Version 11, per the October 31, 2018 sunset. +* Removed support for Bing Ads API Version 11, per the October 31, 2018 sunset. * Added Bulk mapping for responsive search ads i.e., BulkResponsiveSearchAd and BulkResponsiveSearchAdLabel. * Added all fragments returned via the tokens request as a new property in the OAuthTokens SDK class. @@ -239,57 +247,57 @@ Release History 11.12.6(2018-09-10) +++++++++++++++++++++++++ -* Updated service proxies to reflect recent Bulk, Campaign Management, Customer Management, and Reporting API changes. +* Updated service proxies to reflect recent Bulk, Campaign Management, Customer Management, and Reporting API changes. * Added Bulk mapping for similar remarketing lists i.e., BulkSimilarRemarketingList, BulkAdGroupSimilarRemarketingListAssociation, and BulkAdGroupNegativeSimilarRemarketingListAssociation. 11.12.5(2018-08-10) +++++++++++++++++++++++++ -* Updated service proxies to support customer address, campaign level profile criteria, similar audiences for remarketing lists, and new change history report columns. For details see the service release notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes?view=bingads-12#august2018. -* Added BulkEntity mappings for campaign level profile criteria i.e., added BulkCampaignCompanyNameCriterion, BulkCampaignJobFunctionCriterion, and BulkCampaignIndustryCriterion. +* Updated service proxies to support customer address, campaign level profile criteria, similar audiences for remarketing lists, and new change history report columns. For details see the service release notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes?view=bingads-12#august2018. +* Added BulkEntity mappings for campaign level profile criteria i.e., added BulkCampaignCompanyNameCriterion, BulkCampaignJobFunctionCriterion, and BulkCampaignIndustryCriterion. 11.12.4(2018-07-10) +++++++++++++++++++++++++ * Added a mapping for the Domain column in the Bulk file to the BulkExpandedTextAd object. -* Limited the scope to bingads.manage for access token requests. Previously the default scope was used, which can vary if a user granted your app permissions to multiple scopes. The Bing Ads SDKs only support the bingads.manage scope. -* Updated the Customer Management proxies to support LinkedAccountIds for agencies. For agency users the customer role can contain a list of linked accounts that the user can access as an agency on behalf of another customer. +* Limited the scope to bingads.manage for access token requests. Previously the default scope was used, which can vary if a user granted your app permissions to multiple scopes. The Bing Ads SDKs only support the bingads.manage scope. +* Updated the Customer Management proxies to support LinkedAccountIds for agencies. For agency users the customer role can contain a list of linked accounts that the user can access as an agency on behalf of another customer. 11.12.3(2018-06-10) +++++++++++++++++++++++++ -* Added support for Cooperative bidding e.g., added mappings for "Bid Boost Value", "Bid Option" and "Maximum Bid" fields via the BulkAdGroup. +* Added support for Cooperative bidding e.g., added mappings for "Bid Boost Value", "Bid Option" and "Maximum Bid" fields via the BulkAdGroup. * Added mappings for the 'MSCLKID Auto Tagging Enabled" and "Tracking Tempalte" fields via the BulkAccount. 11.12.2(2018-05-15) +++++++++++++++++++++++++ -* To extend support for Microsoft Audience Ads, new bulk objects are added to the SDK for reading and writing Bulk file records e.g., BulkResponsiveAd and BulkResponsiveAdLabel. -* dAdded retries for the 117 throttling error if encountered while polling for the status of a bulk or reporting operation. +* To extend support for Microsoft Audience Ads, new bulk objects are added to the SDK for reading and writing Bulk file records e.g., BulkResponsiveAd and BulkResponsiveAdLabel. +* dAdded retries for the 117 throttling error if encountered while polling for the status of a bulk or reporting operation. 11.12.1(2018-04-12) +++++++++++++++++++++++++ * Added support for Bing Ads API Version 12. For more information, see Migrating to Bing Ads API Version 12. -* The version parameter is now required when creating each ServiceClient. Previously the version was optional and defaulted to version 11. The version parameter is moved to the second position between the service client name and the authorization data. -* The file_type parameter now defaults to 'Csv' as an *str* datatype instead of the DownloadFileType for BulkFileReader, BulkServiceManager, DownloadParameters and SubmitDownloadParameters. You can set 'Tsv' if you prefer the tab separated file format type. +* The version parameter is now required when creating each ServiceClient. Previously the version was optional and defaulted to version 11. The version parameter is moved to the second position between the service client name and the authorization data. +* The file_type parameter now defaults to 'Csv' as an *str* datatype instead of the DownloadFileType for BulkFileReader, BulkServiceManager, DownloadParameters and SubmitDownloadParameters. You can set 'Tsv' if you prefer the tab separated file format type. 11.5.9(2018-03-12) +++++++++++++++++++++++++ -* Updated to support Microsoft Account authentication in sandbox. +* Updated to support Microsoft Account authentication in sandbox. 11.5.8(2018-01-12) +++++++++++++++++++++++++ * The Bulk and Campaign Management proxies are updated to support audience search size. In addition the SDK supports audience search size via the BulkCustomAudience, BulkInMarketAudience, and BulkRemarketingList classes. - + * Allow the Parent Id to be empty when deleting Bulk entities. Previously the Parent Id was required by the SDK although the Bulk service does not always require it. 11.5.7(2017-12-12) +++++++++++++++++++++++++ -* The Version 11 Reporting service proxies are updated to support new columns for Estimated Bids. +* The Version 11 Reporting service proxies are updated to support new columns for Estimated Bids. 11.5.6(2017-11-01) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index e28a4f4b..831a59ac 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.14' +VERSION = '13.0.15' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index 74469e48..099aad4b 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -19,6 +19,8 @@ from .bulk_ad_group_dynamic_search_ad_target import * from .bulk_ad_group_negative_dynamic_search_ad_target import * from .bulk_bid_strategy import * +from .bulk_ad_group_criterion import * +from .bulk_ad_group_hotel_listing_group import * from .ad_extensions import * from .bulk_ads import * @@ -28,6 +30,7 @@ from .target_criterions import * from .labels import * from .bulk_offline_conversion import * +from .bulk_online_conversion_adjustment import * from .bulk_experiment import * from .bulk_image import * from .bulk_video import * @@ -37,4 +40,4 @@ from .bulk_ad_customizer_attribute_entity_base import * from .bulk_ad_customizer_attribute_campaign import * from .bulk_ad_customizer_attribute_ad_group import * -from .bulk_ad_customizer_attribute_keyword import * \ No newline at end of file +from .bulk_ad_customizer_attribute_keyword import * diff --git a/bingads/v13/bulk/entities/bulk_ad_group.py b/bingads/v13/bulk/entities/bulk_ad_group.py index 1d995322..758c1bec 100644 --- a/bingads/v13/bulk/entities/bulk_ad_group.py +++ b/bingads/v13/bulk/entities/bulk_ad_group.py @@ -14,7 +14,7 @@ def coop_setting_to_csv(bulk_ad_group, row_values): return if len(settings) != 1: raise ValueError('Can only have 1 CoOpSetting in AdGroup Settings.') - + row_values[_StringTable.MaximumBid] = settings[0].BidMaxValue row_values[_StringTable.BidBoostValue] = settings[0].BidBoostValue row_values[_StringTable.BidOption] = settings[0].BidOption @@ -24,7 +24,7 @@ def csv_to_coop_setting(row_values, bulk_ad_group): maximum_bid_success, maximum_bid = row_values.try_get_value(_StringTable.MaximumBid) bid_boost_value_success, bid_boost_value = row_values.try_get_value(_StringTable.BidBoostValue) bid_option_success, bid_option = row_values.try_get_value(_StringTable.BidOption) - + if maximum_bid_success or bid_boost_value_success or bid_option_success: coop_setting = _CAMPAIGN_OBJECT_FACTORY_V13.create('CoOpSetting') coop_setting.Type = 'CoOpSetting' @@ -242,7 +242,7 @@ def quality_score_data(self): field_to_csv=lambda c: bulk_optional_str(c.ad_group.FinalUrlSuffix, c.ad_group.Id), csv_to_field=lambda c, v: setattr(c.ad_group, 'FinalUrlSuffix', v) ), - + _SimpleBulkMapping( header=_StringTable.AdScheduleUseSearcherTimeZone, field_to_csv=lambda c: field_to_csv_UseSearcherTimeZone(c.ad_group.AdScheduleUseSearcherTimeZone, None), @@ -262,9 +262,29 @@ def quality_score_data(self): int(v) if v else None ) ), + _SimpleBulkMapping( + header=_StringTable.UseOptimizedTargeting, + field_to_csv=lambda c: field_to_csv_bool(c.ad_group.UseOptimizedTargeting), + csv_to_field=lambda c, v: setattr(c.ad_group, 'UseOptimizedTargeting', parse_bool(v)) + ), + _SimpleBulkMapping( + header=_StringTable.HotelAdGroupType, + field_to_csv=lambda c: hotel_setting_to_csv(c.ad_group), + csv_to_field=lambda c, v: csv_to_hotel_setting(c.ad_group, v) + ), + _SimpleBulkMapping( + header=_StringTable.CommissionRate, + field_to_csv=lambda c: bulk_str(c.ad_group.CommissionRate.RateAmount.Amount), + csv_to_field=lambda c, v: csv_to_commission_rate(c.ad_group, v) + ), + _SimpleBulkMapping( + header=_StringTable.PercentCpcBid, + field_to_csv=lambda c: bulk_str(c.ad_group.PercentCpcBid.RateAmount.Amount), + csv_to_field=lambda c, v: csv_to_percent_cpc_bid(c.ad_group, v) + ) ] - - + + def process_mappings_from_row_values(self, row_values): self.ad_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('AdGroup') diff --git a/bingads/v13/bulk/entities/bulk_ad_group_criterion.py b/bingads/v13/bulk/entities/bulk_ad_group_criterion.py new file mode 100644 index 00000000..35efc668 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_group_criterion.py @@ -0,0 +1,207 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from abc import abstractmethod + +_AdGroupCriterion = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('AdGroupCriterion')) +_NegativeAdGroupCriterion = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('NegativeAdGroupCriterion')) +_FixedBid = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('FixedBid')) +_BiddableAdGroupCriterion = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('BiddableAdGroupCriterion')) + + +def csv_to_bidding(row_values, entity): + success, exclude = row_values.try_get_value(_StringTable.IsExcluded) + if exclude is None: + exclude = '' + exclude = exclude.lower() + if exclude == 'yes' or exclude == 'true': + is_excluded = True + elif exclude == 'no' or exclude == 'false': + is_excluded = False + else: + raise ValueError('IsExcluded can only be set to TRUE|FALSE in Ad Group Criterion row') + if is_excluded: + negative_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('NegativeAdGroupCriterion') + negative_ad_group_criterion.Criterion = entity.create_criterion() + negative_ad_group_criterion.Type = 'NegativeAdGroupCriterion' + + entity.ad_group_criterion = negative_ad_group_criterion + else: + bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('FixedBid') + bid.Type = 'FixedBid' + + biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('BiddableAdGroupCriterion') + biddable_ad_group_criterion.Criterion = entity.create_criterion() + + success, bid_value = row_values.try_get_value(_StringTable.Bid) + if success and bid_value is not None and bid_value != '': + bid.Amount = float(bid_value) + else: + success, bid_value = row_values.try_get_value(_StringTable.BidAdjustment) + if success and bid_value is not None and bid_value != '': + bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') + bid.Type = 'BidMultiplier' + bid.Multiplier = float(bid_value) + + biddable_ad_group_criterion.CriterionBid = bid + biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion' + + entity.ad_group_criterion = biddable_ad_group_criterion + + +def bidding_to_csv(entity, row_values): + if isinstance(entity.ad_group_criterion, _NegativeAdGroupCriterion): + row_values[_StringTable.IsExcluded] = 'True' + else: + row_values[_StringTable.IsExcluded] = 'False' + bid = entity.ad_group_criterion.CriterionBid + if bid is None: + return + if isinstance(bid, _FixedBid): + row_values[_StringTable.Bid] = fixed_bid_bulk_str(bid) + else: + row_values[_StringTable.BidAdjustment] = bid_multiplier_bulk_str(bid) + +class BulkAdGroupCriterion(_SingleRecordBulkEntity): + """ Represents a Ad Group Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`ad_group_criterion` property that can be read and written as fields of the + Ad Group Criterion record in a bulk file. + + For more information, see Ad Group Criterion at https://go.microsoft.com/fwlink/?linkid=836837. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + campaign_name=None, + ad_group_name=None, + ad_group_criterion=None): + super(BulkAdGroupCriterion, self).__init__() + + self._campaign_name = campaign_name + self._ad_group_name = ad_group_name + self._ad_group_criterion = ad_group_criterion + self._performance_data = None + + _MAPPINGS = [ + _ComplexBulkMapping(bidding_to_csv, csv_to_bidding), + + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: c.ad_group_criterion.Status, + csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'Status', v) + ), + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.ad_group_criterion.Id), + csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.ad_group_criterion.AdGroupId), + csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'AdGroupId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Campaign, + field_to_csv=lambda c: c.campaign_name, + csv_to_field=lambda c, v: setattr(c, 'campaign_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.AdGroup, + field_to_csv=lambda c: c.ad_group_name, + csv_to_field=lambda c, v: setattr(c, 'ad_group_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.ad_group_criterion.FinalUrls, c.ad_group_criterion.Id) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, + csv_to_field=lambda c, v: csv_to_field_Urls(c.ad_group_criterion.FinalUrls, v) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None + ), + _SimpleBulkMapping( + header=_StringTable.FinalMobileUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.ad_group_criterion.FinalMobileUrls, c.ad_group_criterion.Id) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, + csv_to_field=lambda c, v: csv_to_field_Urls(c.ad_group_criterion.FinalMobileUrls, v) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None + ), + _SimpleBulkMapping( + header=_StringTable.TrackingTemplate, + field_to_csv=lambda c: bulk_optional_str(c.ad_group_criterion.TrackingUrlTemplate, c.ad_group_criterion.Id) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, + csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'TrackingUrlTemplate', v if v else None) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None + ), + _SimpleBulkMapping( + header=_StringTable.CustomParameter, + field_to_csv=lambda c: field_to_csv_UrlCustomParameters(c.ad_group_criterion) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, + csv_to_field=lambda c, v: csv_to_field_UrlCustomParameters(c.ad_group_criterion, v) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrlSuffix, + field_to_csv=lambda c: bulk_optional_str(c.ad_group_criterion.FinalUrlSuffix,c.ad_group_criterion.Id) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, + csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'FinalUrlSuffix', v) + if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None + ) + ] + + @property + def ad_group_criterion(self): + """ Defines an Ad Group Criterion """ + + return self._ad_group_criterion + + @ad_group_criterion.setter + def ad_group_criterion(self, ad_group_criterion): + self._ad_group_criterion = ad_group_criterion + + @property + def campaign_name(self): + """ Defines the name of the Campaign. + + :rtype: str + """ + + return self._campaign_name + + @campaign_name.setter + def campaign_name(self, campaign_name): + self._campaign_name = campaign_name + + @property + def ad_group_name(self): + """ Defines the name of the Ad Group + + :rtype: str + """ + + return self._ad_group_name + + @ad_group_name.setter + def ad_group_name(self, ad_group_name): + self._ad_group_name = ad_group_name + + def process_mappings_from_row_values(self, row_values): + row_values.convert_to_entity(self, BulkAdGroupCriterion._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.ad_group_criterion, 'ad_group_criterion') + self.convert_to_values(row_values, BulkAdGroupCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupCriterion, self).read_additional_data(stream_reader) + + @abstractmethod + def create_criterion(self): + return None diff --git a/bingads/v13/bulk/entities/bulk_ad_group_hotel_listing_group.py b/bingads/v13/bulk/entities/bulk_ad_group_hotel_listing_group.py new file mode 100644 index 00000000..01abef17 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_ad_group_hotel_listing_group.py @@ -0,0 +1,103 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.bulk_ad_group_criterion import BulkAdGroupCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable + +_HotelGroup = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('HotelGroup')) + +class BulkAdGroupHotelListingGroup(BulkAdGroupCriterion): + """ Represents an Ad Group Hotel Group that can be read or written in a bulk file. + + This class exposes the :attr:`ad_group_criterion` property that can be read and written as fields of the + Ad Group Hotel Group record in a bulk file. + + For more information, see Ad Group Product Scope at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + campaign_name=None, + ad_group_name=None, + ad_group_criterion=None + ): + super(BulkAdGroupHotelListingGroup, self).__init__(campaign_name, ad_group_name, ad_group_criterion) + + @classmethod + def _get_listing_type(cls, entity): + if entity.ad_group_criterion.Criterion is not None and \ + hasattr(entity.ad_group_criterion.Criterion, 'ListingType'): + return entity.ad_group_criterion.Criterion.ListingType + return None + + @classmethod + def _get_parent_criterion_id(cls, entity): + if entity.ad_group_criterion.Criterion is not None and \ + hasattr(entity.ad_group_criterion.Criterion, 'ParentCriterionId'): + return bulk_str(entity.ad_group_criterion.Criterion.ParentCriterionId) + return None + + @classmethod + def _get_listing_operand(cls, entity): + if entity.ad_group_criterion.Criterion is not None and \ + hasattr(entity.ad_group_criterion.Criterion, 'Listing') and \ + entity.ad_group_criterion.Criterion.Listing is not None and \ + hasattr(entity.ad_group_criterion.Criterion.Listing, 'Operand'): + return entity.ad_group_criterion.Criterion.Listing.Operand + return None + + @classmethod + def _get_listing_attribute(cls, entity): + if entity.ad_group_criterion.Criterion is not None and \ + hasattr(entity.ad_group_criterion.Criterion, 'Listing') and \ + entity.ad_group_criterion.Criterion.Listing is not None and \ + hasattr(entity.ad_group_criterion.Criterion.Listing, 'Attribute'): + return entity.ad_group_criterion.Criterion.Listing.Attribute + return None + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.SubType, + field_to_csv=lambda c: BulkAdGroupHotelListingGroup._get_listing_type(c), + csv_to_field=lambda c, v: setattr(c.ad_group_criterion.Criterion, 'ListingType', v) + ), + _SimpleBulkMapping( + _StringTable.ParentAdGroupCriterionId, + field_to_csv=lambda c: BulkAdGroupHotelListingGroup._get_parent_criterion_id(c), + csv_to_field=lambda c, v: setattr(c.ad_group_criterion.Criterion, 'ParentCriterionId', + int(v) if v else None) + ), + _SimpleBulkMapping( + _StringTable.HotelAttribute, + field_to_csv=lambda c: BulkAdGroupHotelListingGroup._get_listing_operand(c), + csv_to_field=lambda c, v: setattr(c.ad_group_criterion.Criterion.Listing, 'Operand', v) + ), + _SimpleBulkMapping( + _StringTable.HotelAttributeValue, + field_to_csv=lambda c: BulkAdGroupHotelListingGroup._get_listing_attribute(c), + csv_to_field=lambda c, v: setattr(c.ad_group_criterion.Criterion.Listing, 'Attribute', v) + ), + ] + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupHotelListingGroup, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupHotelListingGroup._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupHotelListingGroup, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupHotelListingGroup._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupHotelListingGroup, self).read_additional_data(stream_reader) + + def create_criterion(self): + hotel_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelGroup') + hotel_group.Listing = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelListing') + hotel_group.Type = 'HotelGroup' + return hotel_group diff --git a/bingads/v13/bulk/entities/bulk_ad_group_product_partition.py b/bingads/v13/bulk/entities/bulk_ad_group_product_partition.py index 80490aa9..f05fd215 100644 --- a/bingads/v13/bulk/entities/bulk_ad_group_product_partition.py +++ b/bingads/v13/bulk/entities/bulk_ad_group_product_partition.py @@ -1,76 +1,14 @@ from bingads.v13.bulk.entities import * from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 -from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.bulk.entities.bulk_ad_group_criterion import BulkAdGroupCriterion from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping from bingads.v13.internal.bulk.string_table import _StringTable # from bingads.v13.internal.extensions import bulk_str from bingads.v13.internal.extensions import * _BiddableAdGroupCriterion = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('BiddableAdGroupCriterion')) -_NegativeAdGroupCriterion = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('NegativeAdGroupCriterion')) -_FixedBid = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('FixedBid')) -def csv_to_bidding(row_values, entity): - success, exclude = row_values.try_get_value(_StringTable.IsExcluded) - if exclude is None: - exclude = '' - exclude = exclude.lower() - if exclude == 'yes' or exclude == 'true': - is_excluded = True - elif exclude == 'no' or exclude == 'false': - is_excluded = False - else: - raise ValueError('IsExcluded can only be set to TRUE|FALSE in Ad Group Product Partition row') - if is_excluded: - product_partition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductPartition') - product_partition.Condition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductCondition') - product_partition.Type = 'ProductPartition' - - negative_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('NegativeAdGroupCriterion') - negative_ad_group_criterion.Criterion = product_partition - negative_ad_group_criterion.Type = 'NegativeAdGroupCriterion' - - entity.ad_group_criterion = negative_ad_group_criterion - else: - product_partition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductPartition') - product_partition.Condition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductCondition') - product_partition.Type = 'ProductPartition' - - bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('FixedBid') - bid.Type = 'FixedBid' - - biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('BiddableAdGroupCriterion') - biddable_ad_group_criterion.Criterion = product_partition - - success, bid_value = row_values.try_get_value(_StringTable.Bid) - if success and bid_value is not None and bid_value != '': - bid.Amount = float(bid_value) - else: - success, bid_value = row_values.try_get_value(_StringTable.BidAdjustment) - if success and bid_value is not None and bid_value != '': - bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidMultiplier') - bid.Type = 'BidMultiplier' - bid.Multiplier = float(bid_value) - - biddable_ad_group_criterion.CriterionBid = bid - biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion' - - entity.ad_group_criterion = biddable_ad_group_criterion - -def bidding_to_csv(entity, row_values): - if isinstance(entity.ad_group_criterion, _NegativeAdGroupCriterion): - row_values[_StringTable.IsExcluded] = 'True' - else: - row_values[_StringTable.IsExcluded] = 'False' - bid = entity.ad_group_criterion.CriterionBid - if bid is None: - return - if isinstance(bid, _FixedBid): - row_values[_StringTable.Bid] = fixed_bid_bulk_str(bid) - else: - row_values[_StringTable.BidAdjustment] = bid_multiplier_bulk_str(bid) - -class BulkAdGroupProductPartition(_SingleRecordBulkEntity): +class BulkAdGroupProductPartition(BulkAdGroupCriterion): """ Represents an Ad Group Criterion that can be read or written in a bulk file. This class exposes the :attr:`ad_group_criterion` property that can be read and written as fields of the @@ -87,51 +25,11 @@ class BulkAdGroupProductPartition(_SingleRecordBulkEntity): """ def __init__(self, - ad_group_criterion=None, campaign_name=None, - ad_group_name=None): - super(BulkAdGroupProductPartition, self).__init__() - - self._ad_group_criterion = ad_group_criterion - self._campaign_name = campaign_name - self._ad_group_name = ad_group_name - self._performance_data = None - - @classmethod - def _read_is_excluded(cls, entity, row_value): - if row_value is None: - row_value = '' - row_value = row_value.lower() - if row_value == 'yes' or row_value == 'true': - is_excluded = True - elif row_value == 'no' or row_value == 'false': - is_excluded = False - else: - raise ValueError('IsExcluded can only be set to TRUE|FALSE in Ad Group Product Partition row') - if is_excluded: - product_partition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductPartition') - product_partition.Condition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductCondition') - product_partition.Type = 'ProductPartition' - - negative_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('NegativeAdGroupCriterion') - negative_ad_group_criterion.Criterion = product_partition - negative_ad_group_criterion.Type = 'NegativeAdGroupCriterion' - - entity.ad_group_criterion = negative_ad_group_criterion - else: - product_partition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductPartition') - product_partition.Condition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductCondition') - product_partition.Type = 'ProductPartition' - - fixed_bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('FixedBid') - fixed_bid.Type = 'FixedBid' - - biddable_ad_group_criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('BiddableAdGroupCriterion') - biddable_ad_group_criterion.Criterion = product_partition - biddable_ad_group_criterion.CriterionBid = fixed_bid - biddable_ad_group_criterion.Type = 'BiddableAdGroupCriterion' - - entity.ad_group_criterion = biddable_ad_group_criterion + ad_group_name=None, + ad_group_criterion=None + ): + super(BulkAdGroupProductPartition, self).__init__(campaign_name, ad_group_name, ad_group_criterion) @classmethod def _write_bid(cls, entity): @@ -194,33 +92,6 @@ def _read_destination_url(cls, entity, row_value): pass _MAPPINGS = [ - _ComplexBulkMapping(bidding_to_csv, csv_to_bidding), - - _SimpleBulkMapping( - _StringTable.Status, - field_to_csv=lambda c: c.ad_group_criterion.Status, - csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'Status', v) - ), - _SimpleBulkMapping( - _StringTable.Id, - field_to_csv=lambda c: bulk_str(c.ad_group_criterion.Id), - csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'Id', int(v) if v else None) - ), - _SimpleBulkMapping( - _StringTable.ParentId, - field_to_csv=lambda c: bulk_str(c.ad_group_criterion.AdGroupId), - csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'AdGroupId', int(v) if v else None) - ), - _SimpleBulkMapping( - _StringTable.Campaign, - field_to_csv=lambda c: c.campaign_name, - csv_to_field=lambda c, v: setattr(c, 'campaign_name', v) - ), - _SimpleBulkMapping( - _StringTable.AdGroup, - field_to_csv=lambda c: c.ad_group_name, - csv_to_field=lambda c, v: setattr(c, 'ad_group_name', v) - ), _SimpleBulkMapping( _StringTable.SubType, field_to_csv=lambda c: BulkAdGroupProductPartition._get_partition_type(c), @@ -246,84 +117,22 @@ def _read_destination_url(cls, entity, row_value): _StringTable.DestinationUrl, field_to_csv=lambda c: BulkAdGroupProductPartition._write_destination_url(c), csv_to_field=lambda c, v: BulkAdGroupProductPartition._read_destination_url(c, v) - ), - _SimpleBulkMapping( - header=_StringTable.FinalUrl, - field_to_csv=lambda c: field_to_csv_Urls(c.ad_group_criterion.FinalUrls, c.ad_group_criterion.Id) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, - csv_to_field=lambda c, v: csv_to_field_Urls(c.ad_group_criterion.FinalUrls, v) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None - ), - _SimpleBulkMapping( - header=_StringTable.FinalMobileUrl, - field_to_csv=lambda c: field_to_csv_Urls(c.ad_group_criterion.FinalMobileUrls, c.ad_group_criterion.Id) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, - csv_to_field=lambda c, v: csv_to_field_Urls(c.ad_group_criterion.FinalMobileUrls, v) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None - ), - _SimpleBulkMapping( - header=_StringTable.TrackingTemplate, - field_to_csv=lambda c: bulk_optional_str(c.ad_group_criterion.TrackingUrlTemplate, c.ad_group_criterion.Id) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, - csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'TrackingUrlTemplate', v if v else None) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None - ), - _SimpleBulkMapping( - header=_StringTable.CustomParameter, - field_to_csv=lambda c: field_to_csv_UrlCustomParameters(c.ad_group_criterion) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None, - csv_to_field=lambda c, v: csv_to_field_UrlCustomParameters(c.ad_group_criterion, v) - if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None - ), - _SimpleBulkMapping( - header=_StringTable.FinalUrlSuffix, - field_to_csv=lambda c: bulk_optional_str(c.ad_group_criterion.FinalUrlSuffix, c.ad_group_criterion.Id) if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None , - csv_to_field=lambda c, v: setattr(c.ad_group_criterion, 'FinalUrlSuffix', v) if isinstance(c.ad_group_criterion, _BiddableAdGroupCriterion) else None ) ] - @property - def ad_group_criterion(self): - """ Defines an Ad Group Criterion """ - - return self._ad_group_criterion - - @ad_group_criterion.setter - def ad_group_criterion(self, ad_group_criterion): - self._ad_group_criterion = ad_group_criterion - - @property - def campaign_name(self): - """ Defines the name of the Campaign. - - :rtype: str - """ - - return self._campaign_name - - @campaign_name.setter - def campaign_name(self, campaign_name): - self._campaign_name = campaign_name - - @property - def ad_group_name(self): - """ Defines the name of the Ad Group - - :rtype: str - """ - - return self._ad_group_name - - @ad_group_name.setter - def ad_group_name(self, ad_group_name): - self._ad_group_name = ad_group_name - def process_mappings_to_row_values(self, row_values, exclude_readonly_data): - self._validate_property_not_null(self.ad_group_criterion, 'ad_group_criterion') + super(BulkAdGroupProductPartition, self).process_mappings_to_row_values(row_values, exclude_readonly_data) self.convert_to_values(row_values, BulkAdGroupProductPartition._MAPPINGS) def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupProductPartition, self).process_mappings_from_row_values(row_values) row_values.convert_to_entity(self, BulkAdGroupProductPartition._MAPPINGS) def read_additional_data(self, stream_reader): super(BulkAdGroupProductPartition, self).read_additional_data(stream_reader) + + def create_criterion(self): + product_partition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductPartition') + product_partition.Condition = _CAMPAIGN_OBJECT_FACTORY_V13.create('ProductCondition') + product_partition.Type = 'ProductPartition' + return product_partition diff --git a/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py b/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py new file mode 100644 index 00000000..7161a172 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py @@ -0,0 +1,106 @@ +from __future__ import print_function +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + + +class BulkOnlineConversionAdjustment(_SingleRecordBulkEntity): + """ Represents an online conversion adjustment that can be read or written in a bulk file. + + This class exposes the :attr:`online_conversion_adjustment` property that can be read and written as fields of the Keyword record in a bulk file. + Properties of this class and of classes that it is derived from, correspond to fields of the Keyword record in a bulk file. + For more information, see Keyword at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, online_conversion_adjustment=None): + super(BulkOnlineConversionAdjustment, self).__init__() + self._online_conversion_adjustment = online_conversion_adjustment + + @property + def online_conversion_adjustment(self): + """ The online conversion adjustment Data Object of the Campaign Management Service. + + """ + + return self._online_conversion_adjustment + + @online_conversion_adjustment.setter + def online_conversion_adjustment(self, value): + self._online_conversion_adjustment = value + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.TransactionId, + field_to_csv=lambda c: c.online_conversion_adjustment.TransactionId, + csv_to_field=lambda c, v: setattr( + c.online_conversion_adjustment, + 'TransactionId', + v + ) + ), + _SimpleBulkMapping( + header=_StringTable.ConversionName, + field_to_csv=lambda c: c.online_conversion_adjustment.ConversionName, + csv_to_field=lambda c, v: setattr( + c.online_conversion_adjustment, + 'ConversionName', + v + ) + ), + _SimpleBulkMapping( + header=_StringTable.AdjustmentType, + field_to_csv=lambda c: c.online_conversion_adjustment.AdjustmentType, + csv_to_field=lambda c, v: setattr( + c.online_conversion_adjustment, + 'AdjustmentType', + v + ) + ), + _SimpleBulkMapping( + header=_StringTable.AdjustmentValue, + field_to_csv=lambda c: c.online_conversion_adjustment.AdjustmentValue, + csv_to_field=lambda c, v: setattr( + c.online_conversion_adjustment, + 'AdjustmentValue', + float(v) if v else None + ) + ), + _SimpleBulkMapping( + header=_StringTable.AdjustmentTime, + field_to_csv=lambda c: bulk_datetime_str(c.online_conversion_adjustment.AdjustmentTime), + csv_to_field=lambda c, v: setattr( + c.online_conversion_adjustment, + 'AdjustmentTime', + parse_datetime(v) if v else None + ) + ), + _SimpleBulkMapping( + header=_StringTable.AdjustmentCurrencyCode, + field_to_csv=lambda c: c.online_conversion_adjustment.AdjustmentCurrencyCode, + csv_to_field=lambda c, v: setattr( + c.online_conversion_adjustment, + 'AdjustmentCurrencyCode', + v + ) + ), + ] + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._online_conversion_adjustment, 'online_conversion_adjustment') + self.convert_to_values(row_values, BulkOnlineConversionAdjustment._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self._online_conversion_adjustment = _CAMPAIGN_OBJECT_FACTORY_V13.create('OnlineConversionAdjustment') + row_values.convert_to_entity(self, BulkOnlineConversionAdjustment._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkOnlineConversionAdjustment, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/__init__.py b/bingads/v13/bulk/entities/target_criterions/__init__.py index 708a21f6..5bea6dff 100644 --- a/bingads/v13/bulk/entities/target_criterions/__init__.py +++ b/bingads/v13/bulk/entities/target_criterions/__init__.py @@ -26,3 +26,8 @@ from .bulk_campaign_radius_criterion import * from .bulk_campaign_profile_criterion import * from .bulk_campaign_negative_criterion import * +from .bulk_ad_group_hotel_advance_booking_window_criterion import * +from .bulk_ad_group_hotel_check_in_date_criterion import * +from .bulk_ad_group_hotel_check_in_day_criterion import * +from .bulk_ad_group_hotel_date_selection_type_criterion import * +from .bulk_ad_group_hotel_length_of_stay_criterion import * diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_advance_booking_window_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_advance_booking_window_criterion.py new file mode 100644 index 00000000..5e5487a0 --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_advance_booking_window_criterion.py @@ -0,0 +1,57 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupHotelAdvanceBookingWindowCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Hotel Advance Booking Window Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Hotel Advance Booking Window Criterion record in a bulk file. + + For more information, see Ad Group Hotel Advance Booking Window Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupHotelAdvanceBookingWindowCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.MaxTargetValue, + field_to_csv=lambda c: field_to_csv_MaxDays(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_MaxDays(c.biddable_ad_group_criterion, v) + ), + _SimpleBulkMapping( + _StringTable.MinTargetValue, + field_to_csv=lambda c: field_to_csv_MinDays(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_MinDays(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelAdvanceBookingWindowCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'HotelAdvanceBookingWindowCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupHotelAdvanceBookingWindowCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupHotelAdvanceBookingWindowCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupHotelAdvanceBookingWindowCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupHotelAdvanceBookingWindowCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupHotelAdvanceBookingWindowCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_date_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_date_criterion.py new file mode 100644 index 00000000..2783d457 --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_date_criterion.py @@ -0,0 +1,57 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupHotelCheckInDateCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Hotel Check In Date Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Hotel Check In Date Criterion record in a bulk file. + + For more information, see Ad Group Hotel Check In Date Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupHotelCheckInDateCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.MaxTargetValue, + field_to_csv=lambda c: field_to_csv_EndDate(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_EndDate(c.biddable_ad_group_criterion, v) + ), + _SimpleBulkMapping( + _StringTable.MinTargetValue, + field_to_csv=lambda c: field_to_csv_StartDate(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_StartDate(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDateCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'HotelCheckInDateCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupHotelCheckInDateCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupHotelCheckInDateCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupHotelCheckInDateCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupHotelCheckInDateCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupHotelCheckInDateCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_day_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_day_criterion.py new file mode 100644 index 00000000..11683866 --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_check_in_day_criterion.py @@ -0,0 +1,52 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupHotelCheckInDayCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Hotel Check In Day Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Hotel Check In Day Criterion record in a bulk file. + + For more information, see Ad Group Hotel Check In Day Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupHotelCheckInDayCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.Target, + field_to_csv=lambda c: field_to_csv_CheckInDay(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_CheckInDay(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDayCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'HotelCheckInDayCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupHotelCheckInDayCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupHotelCheckInDayCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupHotelCheckInDayCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupHotelCheckInDayCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupHotelCheckInDayCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_date_selection_type_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_date_selection_type_criterion.py new file mode 100644 index 00000000..aaef75ff --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_date_selection_type_criterion.py @@ -0,0 +1,52 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupHotelDateSelectionTypeCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Hotel Date Selection Type Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Hotel Date Selection Type Criterion record in a bulk file. + + For more information, see Ad Group Hotel Date Selection Type Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupHotelDateSelectionTypeCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.Target, + field_to_csv=lambda c: field_to_csv_HotelDateSelectionType(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_HotelDateSelectionType(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelDateSelectionTypeCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'HotelDateSelectionTypeCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupHotelDateSelectionTypeCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupHotelDateSelectionTypeCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupHotelDateSelectionTypeCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupHotelDateSelectionTypeCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupHotelDateSelectionTypeCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_length_of_stay_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_length_of_stay_criterion.py new file mode 100644 index 00000000..fb659b35 --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_hotel_length_of_stay_criterion.py @@ -0,0 +1,57 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupHotelLengthOfStayCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Hotel Length Of Stay Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Hotel Length Of Stay Criterion record in a bulk file. + + For more information, see Ad Group Hotel Length Of Stay Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupHotelLengthOfStayCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.MaxTargetValue, + field_to_csv=lambda c: field_to_csv_MaxNights(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_MaxNights(c.biddable_ad_group_criterion, v) + ), + _SimpleBulkMapping( + _StringTable.MinTargetValue, + field_to_csv=lambda c: field_to_csv_MinNights(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_MinNights(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelLengthOfStayCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'HotelLengthOfStayCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupHotelLengthOfStayCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupHotelLengthOfStayCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupHotelLengthOfStayCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupHotelLengthOfStayCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupHotelLengthOfStayCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 04f5516b..a0bc8df1 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -1,4 +1,16 @@ from bingads.v13.bulk.entities import * +from bingads.v13.bulk.entities.bulk_ad_group_hotel_listing_group import BulkAdGroupHotelListingGroup +from bingads.v13.bulk.entities.bulk_online_conversion_adjustment import BulkOnlineConversionAdjustment +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_hotel_advance_booking_window_criterion import \ + BulkAdGroupHotelAdvanceBookingWindowCriterion +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_hotel_check_in_date_criterion import \ + BulkAdGroupHotelCheckInDateCriterion +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_hotel_check_in_day_criterion import \ + BulkAdGroupHotelCheckInDayCriterion +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_hotel_date_selection_type_criterion import \ + BulkAdGroupHotelDateSelectionTypeCriterion +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_hotel_length_of_stay_criterion import \ + BulkAdGroupHotelLengthOfStayCriterion from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.entity_info import _EntityInfo from bingads.v13.bulk.entities.bulk_negative_sites import _BulkAdGroupNegativeSitesIdentifier, \ @@ -19,7 +31,7 @@ class _BulkObjectFactory(): _StringTable.VideoAdExtension: _EntityInfo(lambda: BulkVideoAdExtension()), _StringTable.AccountVideoAdExtension: _EntityInfo(lambda: BulkAccountVideoAdExtension()), _StringTable.CampaignVideoAdExtension: _EntityInfo(lambda: BulkCampaignVideoAdExtension()), - _StringTable.AdGroupVideoAdExtension: _EntityInfo(lambda: BulkAdGroupVideoAdExtension()), + _StringTable.AdGroupVideoAdExtension: _EntityInfo(lambda: BulkAdGroupVideoAdExtension()), _StringTable.CallAdExtension: _EntityInfo(lambda: BulkCallAdExtension()), _StringTable.CampaignCallAdExtension: _EntityInfo(lambda: BulkCampaignCallAdExtension()), _StringTable.FlyerAdExtension: _EntityInfo(lambda: BulkFlyerAdExtension()), @@ -92,6 +104,7 @@ class _BulkObjectFactory(): _StringTable.AdGroupNegativeKeyword: _EntityInfo(lambda: BulkAdGroupNegativeKeyword()), 'Campaign Product Scope': _EntityInfo(lambda : BulkCampaignProductScope()), 'Ad Group Product Partition': _EntityInfo(lambda : BulkAdGroupProductPartition()), + 'Ad Group Hotel Listing Group': _EntityInfo(lambda : BulkAdGroupHotelListingGroup()), _StringTable.RemarketingList: _EntityInfo(lambda : BulkRemarketingList()), _StringTable.AdGroupRemarketingListAssociation: _EntityInfo(lambda : BulkAdGroupRemarketingListAssociation()), _StringTable.AdGroupNegativeRemarketingListAssociation: _EntityInfo(lambda : BulkAdGroupNegativeRemarketingListAssociation()), @@ -119,6 +132,12 @@ class _BulkObjectFactory(): 'Ad Group Location Intent Criterion': _EntityInfo(lambda: BulkAdGroupLocationIntentCriterion()), 'Ad Group Negative Location Criterion': _EntityInfo(lambda: BulkAdGroupNegativeLocationCriterion()), 'Ad Group Radius Criterion': _EntityInfo(lambda: BulkAdGroupRadiusCriterion()), + + _StringTable.AdGroupAdvanceBookingWindowCriterion: _EntityInfo(lambda: BulkAdGroupHotelAdvanceBookingWindowCriterion()), + _StringTable.AdGroupCheckInDateCriterion: _EntityInfo(lambda: BulkAdGroupHotelCheckInDateCriterion()), + _StringTable.AdGroupCheckInDayCriterion: _EntityInfo(lambda: BulkAdGroupHotelCheckInDayCriterion()), + _StringTable.AdGroupHotelDateSelectionTypeCriterion: _EntityInfo(lambda: BulkAdGroupHotelDateSelectionTypeCriterion()), + _StringTable.AdGroupLengthOfStayCriterion: _EntityInfo(lambda: BulkAdGroupHotelLengthOfStayCriterion()), _StringTable.CampaignAgeCriterion: _EntityInfo(lambda: BulkCampaignAgeCriterion()), _StringTable.CampaignDayTimeCriterion: _EntityInfo(lambda: BulkCampaignDayTimeCriterion()), _StringTable.CampaignDeviceOSCriterion: _EntityInfo(lambda: BulkCampaignDeviceCriterion()), @@ -129,9 +148,9 @@ class _BulkObjectFactory(): _StringTable.CampaignRadiusCriterion: _EntityInfo(lambda: BulkCampaignRadiusCriterion()), _StringTable.CampaignCompanyNameCriterion: _EntityInfo(lambda: BulkCampaignCompanyNameCriterion()), _StringTable.CampaignJobFunctionCriterion: _EntityInfo(lambda: BulkCampaignJobFunctionCriterion()), - _StringTable.CampaignIndustryCriterion: _EntityInfo(lambda: BulkCampaignIndustryCriterion()), - _StringTable.CombinedList: _EntityInfo(lambda: BulkCombinedList()), - _StringTable.CustomerList: _EntityInfo(lambda: BulkCustomerList()), + _StringTable.CampaignIndustryCriterion: _EntityInfo(lambda: BulkCampaignIndustryCriterion()), + _StringTable.CombinedList: _EntityInfo(lambda: BulkCombinedList()), + _StringTable.CustomerList: _EntityInfo(lambda: BulkCustomerList()), _StringTable.CustomerListItem: _EntityInfo(lambda: BulkCustomerListItem()), _StringTable.ProductAudience: _EntityInfo(lambda: BulkProductAudience()), _StringTable.AdGroupProductAudienceAssociation: _EntityInfo(lambda: BulkAdGroupProductAudienceAssociation()), @@ -165,6 +184,7 @@ class _BulkObjectFactory(): _StringTable.ResponsiveAdLabel: _EntityInfo(lambda: BulkResponsiveAdLabel()), _StringTable.ResponsiveSearchAdLabel: _EntityInfo(lambda: BulkResponsiveSearchAdLabel()), _StringTable.OfflineConversion: _EntityInfo(lambda: BulkOfflineConversion()), + _StringTable.OnlineConversionAdjustment: _EntityInfo(lambda: BulkOnlineConversionAdjustment()), _StringTable.SimilarRemarketingList: _EntityInfo(lambda: BulkSimilarRemarketingList()), _StringTable.AdGroupSimilarRemarketingListAssociation: _EntityInfo(lambda: BulkAdGroupSimilarRemarketingListAssociation()), _StringTable.AdGroupNegativeSimilarRemarketingListAssociation: _EntityInfo(lambda: BulkAdGroupNegativeSimilarRemarketingListAssociation()), diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 0860c0a6..172ae379 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -16,6 +16,7 @@ class _CsvHeaders: _StringTable.ClientId, _StringTable.LastModifiedTime, _StringTable.MultiMediaAdBidAdjustment, + _StringTable.UseOptimizedTargeting, _StringTable.DynamicDescriptionEnabled, _StringTable.Details, @@ -38,7 +39,15 @@ class _CsvHeaders: _StringTable.Language, _StringTable.PrivacyStatus, _StringTable.AdGroupType, - + _StringTable.HotelAdGroupType, + _StringTable.CommissionRate, + _StringTable.PercentCpcBid, + _StringTable.HotelListingGroupType, + _StringTable.HotelAttribute, + _StringTable.HotelAttributeValue, + + # OnlineConversionAdjustment + _StringTable.TransactionId, # Ads _StringTable.Title, _StringTable.Text, @@ -314,6 +323,8 @@ class _CsvHeaders: _StringTable.InheritedBidStrategyType, _StringTable.BidStrategyTargetAdPosition, _StringTable.BidStrategyTargetImpressionShare, + _StringTable.BidStrategyCommissionRate, + _StringTable.BidStrategyPercentMaxCpc, # Ad Format Preference _StringTable.AdFormatPreference, @@ -430,13 +441,17 @@ class _CsvHeaders: _StringTable.TargetAdGroupId, _StringTable.TargetCampaignId, _StringTable.Schedule, - + # Campaign Conversion Goal _StringTable.GoalId, - + # RSA AdCustomizer _StringTable.AdCustomizerDataType, _StringTable.AdCustomizerAttributeValue, + + # Hotel Ad + _StringTable.MinTargetValue, + _StringTable.MaxTargetValue, ] @staticmethod diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index da296a4c..d42ecd58 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -21,6 +21,12 @@ class _StringTable: BudgetId = "Budget Id" AdGroup = "Ad Group" AdGroupType = "Ad Group Type" + HotelAdGroupType = "Hotel Ad Group Type" + CommissionRate = "Commission Rate" + PercentCpcBid = "Percent Cpc Bid" + HotelListingGroupType = "Ad Group Hotel Listing Group" + HotelAttribute = "Hotel Attribute" + HotelAttributeValue = "Hotel Attribute Value" Keyword = "Keyword" TextAd = "Text Ad" ProductAd = "Product Ad" @@ -92,6 +98,7 @@ class _StringTable: AutoApplyRecommendations = "Auto Apply Recommendations" AllowImageAutoRetrieve = "Allow Image Auto Retrieve" MultiMediaAdBidAdjustment = "Multi Media Ad Bid Adjustment" + UseOptimizedTargeting = "Use Optimized Targeting" BusinessAttributes = "Business Attributes" Schedule = "Schedule"; @@ -425,6 +432,8 @@ class _StringTable: InheritedBidStrategyType = "Inherited Bid Strategy Type" BidStrategyTargetAdPosition = "Bid Strategy TargetAdPosition" BidStrategyTargetImpressionShare = "Bid Strategy TargetImpressionShare" + BidStrategyPercentMaxCpc = "Bid Strategy PercentMaxCpc" + BidStrategyCommissionRate = "Bid Strategy CommissionRate" # Remarketing Audience = "Audience" @@ -597,8 +606,21 @@ class _StringTable: CampaignJobFunctionCriterion = 'Campaign Job Function Criterion' CampaignIndustryCriterion = 'Campaign Industry Criterion' + # Online Conversion + OnlineConversionAdjustment = "Online Conversion Adjustment" + TransactionId = "Transaction Id" + + # Hotel Ad + AdGroupAdvanceBookingWindowCriterion = "Ad Group Advance Booking Window Criterion" + AdGroupCheckInDayCriterion = "Ad Group Check In Day Criterion" + AdGroupLengthOfStayCriterion = "Ad Group Length of Stay Criterion" + AdGroupHotelDateSelectionTypeCriterion = "Ad Group Hotel Date Selection Type Criterion" + AdGroupCheckInDateCriterion = "Ad Group Check In Date Criterion" + MinTargetValue = "Min Target Value" + MaxTargetValue = "Max Target Value" + FinalUrlSuffix = "Final Url Suffix" - + # AdCustomizerAttribute AdCustomizerAttribute = "Adcustomizer Attribute" AdCustomizerCampaign = "Campaign Adcustomizer Attribute" @@ -606,7 +628,7 @@ class _StringTable: AdCustomizerKeyword = "Keyword Adcustomizer Attribute" AdCustomizerDataType = "AdCustomizer DataType" AdCustomizerAttributeValue = "AdCustomizer AttributeValue" - + # Campaign Conversion Goal CampaignConversionGoal = "Campaign Conversion Goal" GoalId = "Goal Id" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index e2930385..3ae19a23 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -40,10 +40,16 @@ DayTimeCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DayTimeCriterion') DeviceCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DeviceCriterion') GenderCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenderCriterion') +HotelAdvanceBookingWindowCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelAdvanceBookingWindowCriterion') +HotelCheckInDateCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDateCriterion') +HotelCheckInDayCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDayCriterion') +HotelDateSelectionTypeCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelDateSelectionTypeCriterion') +HotelLengthOfStayCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelLengthOfStayCriterion') LocationCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('LocationCriterion') LocationIntentCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('LocationIntentCriterion') RadiusCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('RadiusCriterion') TargetSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetSetting')) +HotelSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('HotelSetting')) CoOpSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CoOpSetting')) TextAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TextAsset')) ImageAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset')) @@ -176,11 +182,17 @@ def entity_csv_to_biddingscheme(row_values, entity): success, target_impression_share_row_value = row_values.try_get_value(_StringTable.BidStrategyTargetImpressionShare) target_impression_share_value = float(target_impression_share_row_value) if target_impression_share_row_value else None + success, commission_rate_row_value = row_values.try_get_value(_StringTable.BidStrategyCommissionRate) + commission_rate_value = float(commission_rate_row_value) if commission_rate_row_value else None + + success, max_percent_cpc_row_value = row_values.try_get_value(_StringTable.BidStrategyPercentMaxCpc) + max_percent_cpc_value = float(max_percent_cpc_row_value) if max_percent_cpc_row_value else None success, target_ad_position_value = row_values.try_get_value(_StringTable.BidStrategyTargetAdPosition) if bid_strategy_type == 'MaxConversions': entity.BiddingScheme.MaxCpc = max_cpc_value + entity.BiddingScheme.TargetCpa = target_cpa_value entity.BiddingScheme.Type = "MaxConversions" elif bid_strategy_type == 'MaxClicks': entity.BiddingScheme.MaxCpc = max_cpc_value @@ -201,6 +213,12 @@ def entity_csv_to_biddingscheme(row_values, entity): entity.BiddingScheme.MaxCpc = max_cpc_value entity.BiddingScheme.TargetImpressionShare = target_impression_share_value entity.BiddingScheme.TargetAdPosition = target_ad_position_value + elif bid_strategy_type == "PercentCpc": + entity.BiddingScheme.MaxPercentCpc = max_percent_cpc_value + entity.BiddingScheme.Type = "PercentCpc" + elif bid_strategy_type == "Commission": + entity.BiddingScheme.MaxPercentCpc = commission_rate_value + entity.BiddingScheme.Type = "Commission" def bid_strategy_biddingscheme_to_csv(bulk_bid_strategy, row_values): entity_biddingscheme_to_csv(bulk_bid_strategy.bid_strategy, row_values) @@ -221,6 +239,7 @@ def entity_biddingscheme_to_csv(entity, row_values): if bid_strategy_type == 'MaxConversions': row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) + row_values[_StringTable.BidStrategyTargetCpa] = bulk_str(entity.BiddingScheme.TargetCpa) elif bid_strategy_type == 'MaxClicks': row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) elif bid_strategy_type == 'TargetCpa': @@ -235,6 +254,10 @@ def entity_biddingscheme_to_csv(entity, row_values): row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) row_values[_StringTable.BidStrategyTargetAdPosition] = bulk_optional_str(entity.BiddingScheme.TargetAdPosition, entity.Id) row_values[_StringTable.TargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) + elif bid_strategy_type == 'PercentCpc': + row_values[_StringTable.BidStrategyPercentMaxCpc] = bulk_str(entity.BiddingScheme.MaxPercentCpc) + elif bid_strategy_type == 'Commission': + row_values[_StringTable.BidStrategyCommissionRate] = bulk_str(entity.BiddingScheme.CommissionRate) def bulk_optional_str(value, id): @@ -480,6 +503,10 @@ def field_to_csv_BidStrategyType(entity): return 'TargetImpressionShare' elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('MaxRoasBiddingScheme')): return 'MaxRoas' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('PercentCpcBiddingScheme')): + return 'PercentCpc' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CommissionBiddingScheme')): + return 'Commission' else: raise TypeError('Unsupported Bid Strategy Type') @@ -517,6 +544,10 @@ def csv_to_field_BidStrategyType(entity, value): entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('TargetImpressionShareBiddingScheme') elif value == 'MaxRoas': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('MaxRoasBiddingScheme') + elif value == 'PercentCpc': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('PercentCpcBiddingScheme') + elif value == 'Commission': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('CommissionBiddingScheme') else: raise ValueError('Unknown Bid Strategy Type') entity.BiddingScheme.Type = value @@ -938,6 +969,12 @@ def field_to_csv_UseSearcherTimeZone(bool_value, id): else: return str(bool_value) +def field_to_csv_bool(bool_value): + if bool_value is None: + return None + else: + return str(bool_value) + def csv_to_field_BudgetType(entity, value, version=13): if value is None or value == '': entity.BudgetType = None @@ -1357,6 +1394,94 @@ def csv_to_field_GenderTarget(entity, value): if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(GenderCriterion)): setattr(entity.Criterion, "GenderType", value) +def field_to_csv_MaxDays(entity): + if entity is None or entity.Criterion is None or entity.Criterion.MaxDays is None: + return None + return bulk_str(entity.Criterion.MaxDays) + +def csv_to_field_MaxDays(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelAdvanceBookingWindowCriterion)): + setattr(entity.Criterion, "MaxDays", int(value)) + +def field_to_csv_MinDays(entity): + if entity is None or entity.Criterion is None or entity.Criterion.MinDays is None: + return None + return bulk_str(entity.Criterion.MinDays) + +def csv_to_field_MinDays(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelAdvanceBookingWindowCriterion)): + setattr(entity.Criterion, "MinDays", int(value)) + +def field_to_csv_StartDate(entity): + if entity is None or entity.Criterion is None or entity.Criterion.StartDate is None: + return None + return bulk_datetime_str(entity.Criterion.StartDate) + +def csv_to_field_StartDate(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelCheckInDateCriterion)): + setattr(entity.Criterion, "StartDate", parse_datetime(value)) + +def field_to_csv_EndDate(entity): + if entity is None or entity.Criterion is None or entity.Criterion.EndDate is None: + return None + return bulk_datetime_str(entity.Criterion.EndDate) + +def csv_to_field_EndDate(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelCheckInDateCriterion)): + setattr(entity.Criterion, "EndDate", parse_datetime(value)) + +def field_to_csv_CheckInDay(entity): + if entity is None or entity.Criterion is None or entity.Criterion.CheckInDay is None: + return None + return entity.Criterion.CheckInDay + +def csv_to_field_CheckInDay(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelCheckInDayCriterion)): + setattr(entity.Criterion, "CheckInDay", value) + +def field_to_csv_HotelDateSelectionType(entity): + if entity is None or entity.Criterion is None or entity.Criterion.HotelDateSelectionType is None: + return None + return entity.Criterion.HotelDateSelectionType + +def csv_to_field_HotelDateSelectionType(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelDateSelectionTypeCriterion)): + setattr(entity.Criterion, "HotelDateSelectionType", value) + +def field_to_csv_MaxNights(entity): + if entity is None or entity.Criterion is None or entity.Criterion.MaxNights is None: + return None + return bulk_str(entity.Criterion.MaxNights) + +def csv_to_field_MaxNights(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelLengthOfStayCriterion)): + setattr(entity.Criterion, "MaxNights", int(value)) + +def field_to_csv_MinNights(entity): + if entity is None or entity.Criterion is None or entity.Criterion.MinNights is None: + return None + return bulk_str(entity.Criterion.MinNights) + +def csv_to_field_MinNights(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelLengthOfStayCriterion)): + setattr(entity.Criterion, "MinNights", int(value)) + def field_to_csv_LocationTarget(entity): if entity is None or entity.Criterion is None or entity.Criterion.LocationId is None: return None @@ -1470,6 +1595,19 @@ def target_setting_to_csv(entity): return ";".join([s.CriterionTypeGroup for s in target_setting.Details.TargetSettingDetail]) pass +def hotel_setting_to_csv(entity): + if not entity.Settings or not entity.Settings.Setting: + return None + settings = [setting for setting in entity.Settings.Setting if isinstance(setting, HotelSetting_Type)] + if len(settings) == 0: + return None + if len(settings) != 1: + raise ValueError('Can only have 1 HotelSetting in Settings.') + hotel_setting = settings[0] + if not hotel_setting.HotelAdGroupType: + return DELETE_VALUE if entity.Id and entity.Id > 0 else None + else: + return bulk_str(hotel_setting.HotelAdGroupType).replace('|', ',') def csv_to_target_setting(entity, value): target_setting = _CAMPAIGN_OBJECT_FACTORY_V13.create('TargetSetting') @@ -1487,6 +1625,37 @@ def csv_to_target_setting(entity, value): entity.Settings.Setting.append(target_setting) pass +def csv_to_hotel_setting(entity, value): + hotel_setting = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelSetting') + hotel_setting.Type = 'HotelSetting' + if value is None: + hotel_adgroup_type = None + else: + hotel_adgroup_type = value + hotel_setting.HotelAdGroupType = hotel_adgroup_type + entity.Settings.Setting.append(hotel_setting) + pass + +def csv_to_commission_rate(entity, value): + if value is None: + return + rate_amount = _CAMPAIGN_OBJECT_FACTORY_V13.create('RateAmount') + rate_bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('RateBid') + rate_amount.Amount = float(value) if value else None + rate_bid.RateAmount = rate_amount + entity.CommissionRate = rate_bid + pass + +def csv_to_percent_cpc_bid(entity, value): + if value is None: + return + rate_amount = _CAMPAIGN_OBJECT_FACTORY_V13.create('RateAmount') + rate_bid = _CAMPAIGN_OBJECT_FACTORY_V13.create('RateBid') + rate_amount.Amount = float(value) if value else None + rate_bid.RateAmount = rate_amount + entity.PercentCpcBid = rate_bid + pass + def match_target_setting(token): pattern = re.compile(target_setting_detail_pattern) diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index ed110bc5..df8d7c2f 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -2959,6 +2959,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3048,6 +3166,19 @@ + + + + + + + + + + + + + @@ -3649,6 +3780,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3800,6 +4003,24 @@ + + + + + + + + + + + + + + + + + + @@ -4379,6 +4600,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 83f2d167..2f7e4838 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1079,6 +1079,13 @@ + + + + 145 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 2318d501..19818905 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -145,6 +145,7 @@ + @@ -177,6 +178,14 @@ + + + + + + + + @@ -800,6 +809,13 @@ + + + + + + + @@ -907,6 +923,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -933,6 +969,13 @@ + + + + 32 + + + @@ -1076,6 +1119,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -1176,6 +1240,7 @@ + @@ -1326,6 +1391,13 @@ + + + + + + + @@ -1341,12 +1413,26 @@ + + + + + + + + + + + + + + @@ -1393,6 +1479,16 @@ + + + + + + + + + + @@ -1419,6 +1515,12 @@ + + + + + + @@ -1496,6 +1598,10 @@ + + + + @@ -2193,6 +2299,13 @@ + + + + 8192 + + + @@ -2784,6 +2897,10 @@ + + + + @@ -2947,6 +3064,7 @@ + @@ -3509,6 +3627,48 @@ + + + + 2097152 + + + + + + + 4194304 + + + + + + + 8388608 + + + + + + + 16777216 + + + + + + + 33554432 + + + + + + + 67108864 + + + @@ -3592,6 +3752,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4034,6 +4293,21 @@ + + + + + + + + + + + + + + + @@ -4135,7 +4409,7 @@ - + @@ -4167,14 +4441,14 @@ - + - + @@ -4225,7 +4499,7 @@ - + @@ -4298,7 +4572,7 @@ - + @@ -4331,7 +4605,7 @@ - + @@ -4354,7 +4628,7 @@ - + @@ -4423,7 +4697,7 @@ - + @@ -4440,7 +4714,7 @@ - + @@ -4474,7 +4748,7 @@ - + @@ -4516,7 +4790,7 @@ - + @@ -4709,7 +4983,7 @@ - + @@ -4732,7 +5006,7 @@ - + @@ -4748,7 +5022,7 @@ - + @@ -4789,7 +5063,7 @@ - + @@ -4811,7 +5085,7 @@ - + @@ -4825,7 +5099,7 @@ - + @@ -4840,7 +5114,7 @@ - + @@ -4878,7 +5152,7 @@ - + @@ -4900,7 +5174,7 @@ - + @@ -4914,7 +5188,7 @@ - + @@ -4929,7 +5203,7 @@ - + @@ -4959,14 +5233,14 @@ - + - + @@ -5240,7 +5514,7 @@ - + @@ -5274,7 +5548,7 @@ - + @@ -5296,7 +5570,7 @@ - + @@ -5310,7 +5584,7 @@ - + @@ -5338,7 +5612,7 @@ - + @@ -5408,7 +5682,7 @@ - + @@ -5667,7 +5941,7 @@ - + @@ -5691,7 +5965,7 @@ - + @@ -5774,6 +6048,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5799,7 +6104,7 @@ - + @@ -5807,7 +6112,7 @@ - + @@ -5835,7 +6140,7 @@ - + @@ -5894,7 +6199,7 @@ - + @@ -5911,7 +6216,7 @@ - + @@ -5954,7 +6259,7 @@ - + @@ -5962,7 +6267,7 @@ - + @@ -5990,7 +6295,7 @@ - + @@ -6108,7 +6413,7 @@ - + @@ -6188,6 +6493,13 @@ + + + + + + + @@ -6297,7 +6609,7 @@ - + @@ -6316,7 +6628,7 @@ - + @@ -6326,7 +6638,7 @@ - + @@ -6398,6 +6710,13 @@ + + + + 256 + + + @@ -6420,7 +6739,7 @@ - + @@ -6448,7 +6767,7 @@ - + @@ -6465,7 +6784,7 @@ - + @@ -6481,7 +6800,7 @@ - + @@ -6500,7 +6819,7 @@ - + @@ -6515,7 +6834,7 @@ - + @@ -6552,7 +6871,7 @@ - + @@ -6560,7 +6879,7 @@ - + @@ -6574,7 +6893,7 @@ - + @@ -8042,6 +8361,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -8061,7 +8404,7 @@ - + @@ -8085,7 +8428,7 @@ - + @@ -8109,7 +8452,7 @@ - + @@ -8133,7 +8476,7 @@ - + @@ -8157,7 +8500,7 @@ - + @@ -8181,7 +8524,7 @@ - + @@ -8205,7 +8548,7 @@ - + @@ -8229,7 +8572,7 @@ - + @@ -8253,7 +8596,7 @@ - + @@ -8277,7 +8620,7 @@ - + @@ -8301,7 +8644,7 @@ - + @@ -8325,7 +8668,7 @@ - + @@ -8349,7 +8692,7 @@ - + @@ -8373,7 +8716,7 @@ - + @@ -8397,7 +8740,7 @@ - + @@ -8421,7 +8764,7 @@ - + @@ -8445,7 +8788,7 @@ - + @@ -8469,7 +8812,7 @@ - + @@ -8493,7 +8836,7 @@ - + @@ -8517,7 +8860,7 @@ - + @@ -8541,7 +8884,7 @@ - + @@ -8565,7 +8908,7 @@ - + @@ -8589,7 +8932,7 @@ - + @@ -8613,7 +8956,7 @@ - + @@ -8637,7 +8980,7 @@ - + @@ -8661,7 +9004,7 @@ - + @@ -8685,7 +9028,7 @@ - + @@ -8709,7 +9052,7 @@ - + @@ -8733,7 +9076,7 @@ - + @@ -8757,7 +9100,7 @@ - + @@ -8781,7 +9124,7 @@ - + @@ -8805,7 +9148,7 @@ - + @@ -8829,7 +9172,7 @@ - + @@ -8853,7 +9196,7 @@ - + @@ -8877,7 +9220,7 @@ - + @@ -8901,7 +9244,7 @@ - + @@ -8925,7 +9268,7 @@ - + @@ -8949,7 +9292,7 @@ - + @@ -8973,7 +9316,7 @@ - + @@ -8997,7 +9340,7 @@ - + @@ -9021,7 +9364,7 @@ - + @@ -9045,7 +9388,7 @@ - + @@ -9069,7 +9412,7 @@ - + @@ -9093,11 +9436,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9117,7 +9484,7 @@ - + @@ -9141,7 +9508,7 @@ - + @@ -9165,7 +9532,7 @@ - + @@ -9189,7 +9556,7 @@ - + @@ -9213,7 +9580,7 @@ - + @@ -9237,7 +9604,7 @@ - + @@ -9261,7 +9628,7 @@ - + @@ -9285,7 +9652,7 @@ - + @@ -9309,7 +9676,7 @@ - + @@ -9333,7 +9700,7 @@ - + @@ -9357,7 +9724,7 @@ - + @@ -9381,7 +9748,7 @@ - + @@ -9405,7 +9772,7 @@ - + @@ -9429,7 +9796,7 @@ - + @@ -9453,7 +9820,7 @@ - + @@ -9477,7 +9844,7 @@ - + @@ -9501,7 +9868,7 @@ - + @@ -9525,7 +9892,7 @@ - + @@ -9549,7 +9916,7 @@ - + @@ -9573,7 +9940,7 @@ - + @@ -9597,7 +9964,7 @@ - + @@ -9621,7 +9988,7 @@ - + @@ -9645,7 +10012,7 @@ - + @@ -9669,7 +10036,7 @@ - + @@ -9693,7 +10060,7 @@ - + @@ -9717,7 +10084,7 @@ - + @@ -9741,7 +10108,7 @@ - + @@ -10065,6 +10432,12 @@ + + + + + + @@ -10329,6 +10702,12 @@ + + + + + + @@ -11714,6 +12093,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -12726,6 +13128,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 23443acc..978767b6 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ - + @@ -47,32 +47,32 @@ - + - - + + - - + + - + - + @@ -87,7 +87,7 @@ - + @@ -101,16 +101,16 @@ - - - + + + - + @@ -132,7 +132,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -163,21 +163,21 @@ - - - + + + - + - + @@ -218,7 +218,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -535,7 +535,7 @@ - + @@ -568,7 +568,7 @@ - + @@ -582,7 +582,7 @@ - + @@ -638,7 +638,7 @@ - + @@ -663,7 +663,7 @@ - + @@ -688,7 +688,7 @@ - + @@ -710,7 +710,7 @@ - + @@ -732,7 +732,7 @@ - + @@ -754,7 +754,7 @@ - + @@ -776,7 +776,7 @@ - + @@ -798,7 +798,7 @@ - + @@ -820,7 +820,7 @@ - + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 8bbc3636..49947f1e 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -1,5 +1,5 @@ - + @@ -46,12 +46,12 @@ - + - + @@ -64,14 +64,14 @@ - + - + @@ -87,7 +87,7 @@ - + @@ -108,14 +108,14 @@ - + - + @@ -129,11 +129,12 @@ - - + + - + + @@ -152,14 +153,14 @@ - + - + @@ -174,7 +175,7 @@ - + @@ -207,7 +208,7 @@ - + @@ -224,11 +225,11 @@ - - + + - - + + @@ -249,8 +250,8 @@ - - + + @@ -262,7 +263,7 @@ - + @@ -283,14 +284,14 @@ - + - + @@ -304,7 +305,7 @@ - + @@ -318,7 +319,7 @@ - + @@ -330,7 +331,7 @@ - + @@ -344,7 +345,7 @@ - + @@ -354,14 +355,14 @@ - + - + @@ -380,7 +381,7 @@ - + @@ -396,7 +397,7 @@ - + @@ -424,7 +425,7 @@ - + @@ -436,87 +437,87 @@ - - - - + + + + - + - + - - + + - + - - + + - - - + + + - + - - - - + + + + - + - + @@ -530,30 +531,30 @@ - + - + - + - + - + @@ -568,8 +569,8 @@ - - + + @@ -586,7 +587,7 @@ - + @@ -627,7 +628,7 @@ - + @@ -677,10 +678,10 @@ - + - + @@ -797,6 +798,7 @@ + @@ -1469,7 +1471,7 @@ - + @@ -1508,7 +1510,7 @@ - + @@ -1581,7 +1583,7 @@ - + @@ -1757,6 +1759,13 @@ + + + + 1041 + + + @@ -1956,17 +1965,6 @@ - - - - - - - - - - - @@ -1983,7 +1981,14 @@ - + + + + + + + + @@ -2054,6 +2059,17 @@ + + + + + + + + + + + @@ -2064,8 +2080,8 @@ - - + + @@ -2097,7 +2113,7 @@ - + @@ -2231,7 +2247,7 @@ - + @@ -2279,7 +2295,7 @@ - + @@ -2312,11 +2328,11 @@ - + - + @@ -2345,7 +2361,7 @@ - + @@ -2392,7 +2408,7 @@ - + @@ -2430,7 +2446,7 @@ - + @@ -2452,7 +2468,7 @@ - + @@ -2474,7 +2490,7 @@ - + @@ -2496,7 +2512,7 @@ - + @@ -2518,7 +2534,7 @@ - + @@ -2540,7 +2556,7 @@ - + @@ -2562,7 +2578,7 @@ - + @@ -2584,7 +2600,7 @@ - + @@ -2606,7 +2622,7 @@ - + @@ -2628,7 +2644,7 @@ - + @@ -2650,7 +2666,7 @@ - + @@ -2672,7 +2688,7 @@ - + @@ -2694,7 +2710,7 @@ - + @@ -2716,7 +2732,7 @@ - + @@ -2738,7 +2754,7 @@ - + @@ -2760,7 +2776,7 @@ - + @@ -2782,7 +2798,7 @@ - + @@ -2804,7 +2820,7 @@ - + @@ -2826,7 +2842,7 @@ - + @@ -2848,7 +2864,7 @@ - + @@ -2870,7 +2886,7 @@ - + @@ -2892,7 +2908,7 @@ - + @@ -2914,7 +2930,7 @@ - + @@ -2936,7 +2952,7 @@ - + @@ -2958,7 +2974,7 @@ - + @@ -2980,7 +2996,7 @@ - + @@ -3002,7 +3018,7 @@ - + @@ -3024,7 +3040,7 @@ - + @@ -3046,7 +3062,7 @@ - + @@ -3068,7 +3084,7 @@ - + @@ -3090,7 +3106,7 @@ - + @@ -3112,7 +3128,7 @@ - + @@ -3134,7 +3150,7 @@ - + @@ -3156,7 +3172,7 @@ - + @@ -3178,7 +3194,7 @@ - + @@ -3200,7 +3216,7 @@ - + @@ -3222,7 +3238,7 @@ - + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 843d0b5c..9121b9d3 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -165,6 +165,17 @@ + + + + + + + + + + + @@ -923,6 +934,17 @@ + + + + + + + + + + + @@ -1360,6 +1382,17 @@ + + + + + + + + + + + @@ -1475,6 +1508,17 @@ + + + + + + + + + + + @@ -2298,6 +2342,7 @@ + @@ -3063,6 +3108,7 @@ + @@ -3901,6 +3947,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 241e8142..fb63f1bc 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -2959,6 +2959,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3048,6 +3166,19 @@ + + + + + + + + + + + + + @@ -3649,6 +3780,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3800,6 +4003,24 @@ + + + + + + + + + + + + + + + + + + @@ -4379,6 +4600,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 0438ae5e..ef10d5d5 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1079,6 +1079,13 @@ + + + + 145 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index d6d55356..995068e7 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -145,6 +145,7 @@ + @@ -177,6 +178,14 @@ + + + + + + + + @@ -800,6 +809,13 @@ + + + + + + + @@ -907,6 +923,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -933,6 +969,13 @@ + + + + 32 + + + @@ -1076,6 +1119,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1176,6 +1250,8 @@ + + @@ -1326,6 +1402,13 @@ + + + + + + + @@ -1341,12 +1424,26 @@ + + + + + + + + + + + + + + @@ -1393,6 +1490,16 @@ + + + + + + + + + + @@ -1419,6 +1526,12 @@ + + + + + + @@ -1496,6 +1609,10 @@ + + + + @@ -2193,6 +2310,13 @@ + + + + 8192 + + + @@ -2784,6 +2908,10 @@ + + + + @@ -2947,6 +3075,7 @@ + @@ -3509,6 +3638,48 @@ + + + + 2097152 + + + + + + + 4194304 + + + + + + + 8388608 + + + + + + + 16777216 + + + + + + + 33554432 + + + + + + + 67108864 + + + @@ -3592,6 +3763,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4034,6 +4304,21 @@ + + + + + + + + + + + + + + + @@ -4135,7 +4420,7 @@ - + @@ -4167,14 +4452,14 @@ - + - + @@ -4225,7 +4510,7 @@ - + @@ -4298,7 +4583,7 @@ - + @@ -4331,7 +4616,7 @@ - + @@ -4354,7 +4639,7 @@ - + @@ -4423,7 +4708,7 @@ - + @@ -4440,7 +4725,7 @@ - + @@ -4474,7 +4759,7 @@ - + @@ -4516,7 +4801,7 @@ - + @@ -4709,7 +4994,7 @@ - + @@ -4732,7 +5017,7 @@ - + @@ -4748,7 +5033,7 @@ - + @@ -4789,7 +5074,7 @@ - + @@ -4811,7 +5096,7 @@ - + @@ -4825,7 +5110,7 @@ - + @@ -4840,7 +5125,7 @@ - + @@ -4878,7 +5163,7 @@ - + @@ -4900,7 +5185,7 @@ - + @@ -4914,7 +5199,7 @@ - + @@ -4929,7 +5214,7 @@ - + @@ -4959,14 +5244,14 @@ - + - + @@ -5240,7 +5525,7 @@ - + @@ -5274,7 +5559,7 @@ - + @@ -5296,7 +5581,7 @@ - + @@ -5310,7 +5595,7 @@ - + @@ -5338,7 +5623,7 @@ - + @@ -5408,7 +5693,7 @@ - + @@ -5667,7 +5952,7 @@ - + @@ -5691,7 +5976,7 @@ - + @@ -5774,6 +6059,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5799,7 +6115,7 @@ - + @@ -5807,7 +6123,7 @@ - + @@ -5835,7 +6151,7 @@ - + @@ -5894,7 +6210,7 @@ - + @@ -5911,7 +6227,7 @@ - + @@ -5954,7 +6270,7 @@ - + @@ -5962,7 +6278,7 @@ - + @@ -5990,7 +6306,7 @@ - + @@ -6108,7 +6424,7 @@ - + @@ -6188,6 +6504,13 @@ + + + + + + + @@ -6297,7 +6620,7 @@ - + @@ -6316,7 +6639,7 @@ - + @@ -6326,7 +6649,7 @@ - + @@ -6398,6 +6721,13 @@ + + + + 256 + + + @@ -6420,7 +6750,7 @@ - + @@ -6448,7 +6778,7 @@ - + @@ -6465,7 +6795,7 @@ - + @@ -6481,7 +6811,7 @@ - + @@ -6500,7 +6830,7 @@ - + @@ -6515,7 +6845,7 @@ - + @@ -6552,7 +6882,7 @@ - + @@ -6560,7 +6890,7 @@ - + @@ -6574,7 +6904,7 @@ - + @@ -8042,6 +8372,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -8061,7 +8415,7 @@ - + @@ -8085,7 +8439,7 @@ - + @@ -8109,7 +8463,7 @@ - + @@ -8133,7 +8487,7 @@ - + @@ -8157,7 +8511,7 @@ - + @@ -8181,7 +8535,7 @@ - + @@ -8205,7 +8559,7 @@ - + @@ -8229,7 +8583,7 @@ - + @@ -8253,7 +8607,7 @@ - + @@ -8277,7 +8631,7 @@ - + @@ -8301,7 +8655,7 @@ - + @@ -8325,7 +8679,7 @@ - + @@ -8349,7 +8703,7 @@ - + @@ -8373,7 +8727,7 @@ - + @@ -8397,7 +8751,7 @@ - + @@ -8421,7 +8775,7 @@ - + @@ -8445,7 +8799,7 @@ - + @@ -8469,7 +8823,7 @@ - + @@ -8493,7 +8847,7 @@ - + @@ -8517,7 +8871,7 @@ - + @@ -8541,7 +8895,7 @@ - + @@ -8565,7 +8919,7 @@ - + @@ -8589,7 +8943,7 @@ - + @@ -8613,7 +8967,7 @@ - + @@ -8637,7 +8991,7 @@ - + @@ -8661,7 +9015,7 @@ - + @@ -8685,7 +9039,7 @@ - + @@ -8709,7 +9063,7 @@ - + @@ -8733,7 +9087,7 @@ - + @@ -8757,7 +9111,7 @@ - + @@ -8781,7 +9135,7 @@ - + @@ -8805,7 +9159,7 @@ - + @@ -8829,7 +9183,7 @@ - + @@ -8853,7 +9207,7 @@ - + @@ -8877,7 +9231,7 @@ - + @@ -8901,7 +9255,7 @@ - + @@ -8925,7 +9279,7 @@ - + @@ -8949,7 +9303,7 @@ - + @@ -8973,7 +9327,7 @@ - + @@ -8997,7 +9351,7 @@ - + @@ -9021,7 +9375,7 @@ - + @@ -9045,7 +9399,7 @@ - + @@ -9069,7 +9423,7 @@ - + @@ -9093,11 +9447,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9117,7 +9495,7 @@ - + @@ -9141,7 +9519,7 @@ - + @@ -9165,7 +9543,7 @@ - + @@ -9189,7 +9567,7 @@ - + @@ -9213,7 +9591,7 @@ - + @@ -9237,7 +9615,7 @@ - + @@ -9261,7 +9639,7 @@ - + @@ -9285,7 +9663,7 @@ - + @@ -9309,7 +9687,7 @@ - + @@ -9333,7 +9711,7 @@ - + @@ -9357,7 +9735,7 @@ - + @@ -9381,7 +9759,7 @@ - + @@ -9405,7 +9783,7 @@ - + @@ -9429,7 +9807,7 @@ - + @@ -9453,7 +9831,7 @@ - + @@ -9477,7 +9855,7 @@ - + @@ -9501,7 +9879,7 @@ - + @@ -9525,7 +9903,7 @@ - + @@ -9549,7 +9927,7 @@ - + @@ -9573,7 +9951,7 @@ - + @@ -9597,7 +9975,7 @@ - + @@ -9621,7 +9999,7 @@ - + @@ -9645,7 +10023,7 @@ - + @@ -9669,7 +10047,7 @@ - + @@ -9693,7 +10071,7 @@ - + @@ -9717,7 +10095,7 @@ - + @@ -9741,7 +10119,7 @@ - + @@ -10065,6 +10443,12 @@ + + + + + + @@ -10329,6 +10713,12 @@ + + + + + + @@ -11714,6 +12104,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -12726,6 +13139,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 29261642..4b60b9e3 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ - + @@ -47,32 +47,32 @@ - + - - + + - - + + - + - + @@ -87,7 +87,7 @@ - + @@ -101,16 +101,16 @@ - - - + + + - + @@ -132,7 +132,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -163,21 +163,21 @@ - - - + + + - + - + @@ -218,7 +218,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -535,7 +535,7 @@ - + @@ -568,7 +568,7 @@ - + @@ -582,7 +582,7 @@ - + @@ -638,7 +638,7 @@ - + @@ -663,7 +663,7 @@ - + @@ -688,7 +688,7 @@ - + @@ -710,7 +710,7 @@ - + @@ -732,7 +732,7 @@ - + @@ -754,7 +754,7 @@ - + @@ -776,7 +776,7 @@ - + @@ -798,7 +798,7 @@ - + @@ -820,7 +820,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index 0eae44e5..4a81b945 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -1,5 +1,5 @@ - + @@ -46,12 +46,12 @@ - + - + @@ -64,14 +64,14 @@ - + - + @@ -87,7 +87,7 @@ - + @@ -108,14 +108,14 @@ - + - + @@ -129,11 +129,12 @@ - - + + - + + @@ -152,14 +153,14 @@ - + - + @@ -174,7 +175,7 @@ - + @@ -207,7 +208,7 @@ - + @@ -224,11 +225,11 @@ - - + + - - + + @@ -249,8 +250,8 @@ - - + + @@ -262,7 +263,7 @@ - + @@ -283,14 +284,14 @@ - + - + @@ -304,7 +305,7 @@ - + @@ -318,7 +319,7 @@ - + @@ -330,7 +331,7 @@ - + @@ -344,7 +345,7 @@ - + @@ -354,14 +355,14 @@ - + - + @@ -380,7 +381,7 @@ - + @@ -396,7 +397,7 @@ - + @@ -424,7 +425,7 @@ - + @@ -436,87 +437,87 @@ - - - - + + + + - + - + - - + + - + - - + + - - - + + + - + - - - - + + + + - + - + @@ -530,30 +531,30 @@ - + - + - + - + - + @@ -568,8 +569,8 @@ - - + + @@ -586,7 +587,7 @@ - + @@ -627,7 +628,7 @@ - + @@ -677,10 +678,10 @@ - + - + @@ -797,6 +798,7 @@ + @@ -1469,7 +1471,7 @@ - + @@ -1508,7 +1510,7 @@ - + @@ -1581,7 +1583,7 @@ - + @@ -1757,6 +1759,13 @@ + + + + 1041 + + + @@ -1956,17 +1965,6 @@ - - - - - - - - - - - @@ -1983,7 +1981,14 @@ - + + + + + + + + @@ -2054,6 +2059,17 @@ + + + + + + + + + + + @@ -2064,8 +2080,8 @@ - - + + @@ -2097,7 +2113,7 @@ - + @@ -2231,7 +2247,7 @@ - + @@ -2279,7 +2295,7 @@ - + @@ -2312,11 +2328,11 @@ - + - + @@ -2345,7 +2361,7 @@ - + @@ -2392,7 +2408,7 @@ - + @@ -2430,7 +2446,7 @@ - + @@ -2452,7 +2468,7 @@ - + @@ -2474,7 +2490,7 @@ - + @@ -2496,7 +2512,7 @@ - + @@ -2518,7 +2534,7 @@ - + @@ -2540,7 +2556,7 @@ - + @@ -2562,7 +2578,7 @@ - + @@ -2584,7 +2600,7 @@ - + @@ -2606,7 +2622,7 @@ - + @@ -2628,7 +2644,7 @@ - + @@ -2650,7 +2666,7 @@ - + @@ -2672,7 +2688,7 @@ - + @@ -2694,7 +2710,7 @@ - + @@ -2716,7 +2732,7 @@ - + @@ -2738,7 +2754,7 @@ - + @@ -2760,7 +2776,7 @@ - + @@ -2782,7 +2798,7 @@ - + @@ -2804,7 +2820,7 @@ - + @@ -2826,7 +2842,7 @@ - + @@ -2848,7 +2864,7 @@ - + @@ -2870,7 +2886,7 @@ - + @@ -2892,7 +2908,7 @@ - + @@ -2914,7 +2930,7 @@ - + @@ -2936,7 +2952,7 @@ - + @@ -2958,7 +2974,7 @@ - + @@ -2980,7 +2996,7 @@ - + @@ -3002,7 +3018,7 @@ - + @@ -3024,7 +3040,7 @@ - + @@ -3046,7 +3062,7 @@ - + @@ -3068,7 +3084,7 @@ - + @@ -3090,7 +3106,7 @@ - + @@ -3112,7 +3128,7 @@ - + @@ -3134,7 +3150,7 @@ - + @@ -3156,7 +3172,7 @@ - + @@ -3178,7 +3194,7 @@ - + @@ -3200,7 +3216,7 @@ - + @@ -3222,7 +3238,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 635f2787..836af773 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -165,6 +165,17 @@ + + + + + + + + + + + @@ -923,6 +934,17 @@ + + + + + + + + + + + @@ -1360,6 +1382,17 @@ + + + + + + + + + + + @@ -1475,6 +1508,17 @@ + + + + + + + + + + + @@ -2298,6 +2342,7 @@ + @@ -3063,6 +3108,7 @@ + @@ -3901,6 +3947,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index dbe58fb5..bd36ac86 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.14' +VERSION = '13.0.15' with open('README.rst', 'r') as f: readme = f.read() @@ -55,9 +55,6 @@ 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', diff --git a/tox.ini b/tox.ini index 08b9eb94..7b0224aa 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26, py27, py33, py34 +envlist = py33, py34 [testenv] setenv = From 3411801036aaf180d39827ef55cf5fa7c3ae08d0 Mon Sep 17 00:00:00 2001 From: qitia Date: Thu, 11 May 2023 14:08:10 +0800 Subject: [PATCH 16/55] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..a6a94948 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,36 @@ +# Python package +# Create and test a Python package on multiple Python versions. +# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/python + +trigger: +- main + +pool: + vmImage: ubuntu-latest +strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' From b9aef561092566b9d2b6c2647e1a6a1f038344f1 Mon Sep 17 00:00:00 2001 From: qitia Date: Thu, 11 May 2023 14:15:54 +0800 Subject: [PATCH 17/55] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a6a94948..606cec4d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,12 +10,6 @@ pool: vmImage: ubuntu-latest strategy: matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' Python37: python.version: '3.7' @@ -24,13 +18,7 @@ steps: inputs: versionSpec: '$(python.version)' displayName: 'Use Python $(python.version)' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' - + - script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' + python setup.py sdist + displayName: 'Package' \ No newline at end of file From eab2b0a029bec22f53005319d956342c70df754f Mon Sep 17 00:00:00 2001 From: qitia Date: Thu, 11 May 2023 14:23:09 +0800 Subject: [PATCH 18/55] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 606cec4d..ec933e2e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,4 +21,9 @@ steps: - script: | python setup.py sdist - displayName: 'Package' \ No newline at end of file + displayName: 'Package' + +- task: PublishBuildArtifacts@1 + inputs: + TargetPath: dist + ArtifactName: 'pypi_artifacts' \ No newline at end of file From 658a4f8a209e9bcbaac7c1ade1a4503f9245df08 Mon Sep 17 00:00:00 2001 From: qitia Date: Thu, 11 May 2023 14:34:10 +0800 Subject: [PATCH 19/55] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec933e2e..d022b360 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,6 +24,6 @@ steps: displayName: 'Package' - task: PublishBuildArtifacts@1 - inputs: - TargetPath: dist + inputs: + PathtoPublish: dist ArtifactName: 'pypi_artifacts' \ No newline at end of file From 59ffb9cc4804a0a25fa85b66a1f53c2607d7c228 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 7 Jun 2023 10:48:25 +0800 Subject: [PATCH 20/55] v13.0.16 --- HISTORY.rst | 7 + README.rst | 5 - bingads/manifest.py | 2 +- bingads/v13/bulk/bulk_operation.py | 7 +- bingads/v13/bulk/bulk_service_manager.py | 7 +- bingads/v13/bulk/entities/__init__.py | 6 + bingads/v13/bulk/entities/bulk_asset_group.py | 179 ++++++++++++++++++ .../bulk_asset_group_listing_group.py | 151 +++++++++++++++ .../v13/bulk/entities/bulk_audience_group.py | 148 +++++++++++++++ ..._audience_group_asset_group_association.py | 108 +++++++++++ bingads/v13/bulk/entities/bulk_campaign.py | 34 ++++ .../bulk_campaign_negative_webpage.py | 14 ++ bingads/v13/bulk/entities/bulk_entity.py | 3 +- .../bulk/entities/bulk_offline_conversion.py | 1 - .../bulk_online_conversion_adjustment.py | 1 - .../v13/bulk/entities/labels/bulk_label.py | 1 - .../labels/bulk_label_associations.py | 1 - bingads/v13/internal/bulk/bulk_object.py | 3 +- .../v13/internal/bulk/bulk_object_factory.py | 5 + bingads/v13/internal/bulk/csv_headers.py | 13 ++ bingads/v13/internal/bulk/csv_reader.py | 17 +- bingads/v13/internal/bulk/csv_writer.py | 16 +- .../bulk/entities/bulk_entity_identifier.py | 5 +- .../bulk/entities/multi_record_bulk_entity.py | 3 +- .../entities/single_record_bulk_entity.py | 4 +- bingads/v13/internal/bulk/mappings.py | 5 +- bingads/v13/internal/bulk/object_reader.py | 7 +- bingads/v13/internal/bulk/row_values.py | 3 - bingads/v13/internal/bulk/string_table.py | 13 ++ bingads/v13/internal/extensions.py | 60 ++++-- bingads/v13/internal/reporting/csv_reader.py | 13 +- bingads/v13/reporting/reporting_operation.py | 6 +- requirements.txt | 3 - setup.py | 4 +- 34 files changed, 749 insertions(+), 106 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_asset_group.py create mode 100644 bingads/v13/bulk/entities/bulk_asset_group_listing_group.py create mode 100644 bingads/v13/bulk/entities/bulk_audience_group.py create mode 100644 bingads/v13/bulk/entities/bulk_audience_group_asset_group_association.py create mode 100644 bingads/v13/bulk/entities/bulk_campaign_negative_webpage.py diff --git a/HISTORY.rst b/HISTORY.rst index 701ae506..a769dd13 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,13 @@ .. :changelog: Release History +13.0.16(2023-06-02) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. +* Add bulk mappings for performance max campaign i.e., BulkAssetGroup, BulkAssetGroupListingGroup, BulkAudienceGroup, BulkAudienceGroupAssetGroupAssociation, BulkCampaignNegativeWebPage. +* Add mappings for new fields in BulkCampaign: UrlExpansionOptOut. +* Support new bidding scheme: ManualCpaScheme and CostPerSaleBiddingScheme. + 13.0.15(2022-12-23) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. diff --git a/README.rst b/README.rst index 85b855fb..3ca06a4a 100644 --- a/README.rst +++ b/README.rst @@ -25,8 +25,6 @@ External Dependencies - `suds-community`_ - `requests`_ - - `future`_ - - `six`_ - `enum34`_ .. _Bing Ads Client Libraries: https://docs.microsoft.com/en-us/bingads/guides/client-libraries @@ -35,7 +33,4 @@ External Dependencies .. _suds-community: https://pypi.org/pypi/suds-community/ .. _requests: http://pypi.python.org/pypi/requests -.. _chardet: http://pypi.python.org/pypi/chardet -.. _future: http://pypi.python.org/pypi/future -.. _six: http://pypi.python.org/pypi/six .. _enum34: http://pypi.python.org/pypi/enum34 diff --git a/bingads/manifest.py b/bingads/manifest.py index 831a59ac..0790b948 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.15' +VERSION = '13.0.16' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/bulk_operation.py b/bingads/v13/bulk/bulk_operation.py index 66fee5b6..dec25288 100644 --- a/bingads/v13/bulk/bulk_operation.py +++ b/bingads/v13/bulk/bulk_operation.py @@ -4,7 +4,6 @@ import requests import zipfile import os -import six import sys import shutil @@ -94,10 +93,8 @@ def download_result_file(self, result_file_directory, result_file_name, decompre zip_file_path = result_file_path if os.path.exists(result_file_path) and overwrite is False: - if six.PY3: - raise FileExistsError('Result file: {0} exists'.format(result_file_path)) - else: - raise OSError('Result file: {0} exists'.format(result_file_path)) + raise FileExistsError('Result file: {0} exists'.format(result_file_path)) + headers = { 'User-Agent': USER_AGENT, } diff --git a/bingads/v13/bulk/bulk_service_manager.py b/bingads/v13/bulk/bulk_service_manager.py index dd5fce38..1f9b33b4 100644 --- a/bingads/v13/bulk/bulk_service_manager.py +++ b/bingads/v13/bulk/bulk_service_manager.py @@ -13,8 +13,6 @@ from bingads.authorization import * from bingads.util import _TimeHelper from bingads.exceptions import TimeoutException -from six import PY2, PY3 - class BulkServiceManager: SYNC_THRESHOLD = 1000 @@ -186,10 +184,7 @@ def bulkupload_entitie_records(self, entity_upload_parameters, tmp_file, progres records = self.service_client.factory.create("ns2:ArrayOfstring") tmp_csv_file = io.open(tmp_file, encoding='utf-8-sig') - if PY3: - records.string = [x.strip() for x in tmp_csv_file.readlines()] - elif PY2: - records.string = [line.encode('utf-8').strip() for line in tmp_csv_file] + records.string = [x.strip() for x in tmp_csv_file.readlines()] try: #print(self.service_client) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index 099aad4b..e466cd25 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -41,3 +41,9 @@ from .bulk_ad_customizer_attribute_campaign import * from .bulk_ad_customizer_attribute_ad_group import * from .bulk_ad_customizer_attribute_keyword import * + +from .bulk_asset_group import * +from .bulk_audience_group import * +from .bulk_asset_group_listing_group import * +from .bulk_audience_group_asset_group_association import * +from .bulk_campaign_negative_webpage import * diff --git a/bingads/v13/bulk/entities/bulk_asset_group.py b/bingads/v13/bulk/entities/bulk_asset_group.py new file mode 100644 index 00000000..bc056b2f --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_asset_group.py @@ -0,0 +1,179 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAssetGroup(_SingleRecordBulkEntity): + """ Represents an asset group. + + This class exposes the property :attr:`asset_group` that can be read and written as fields of the Asset Group record + in a bulk file. + + For more information, see Asset Group at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, campaign_id=None, campaign_name=None, asset_group=None): + super(BulkAssetGroup, self).__init__() + + self._campaign_id = campaign_id + self._campaign_name = campaign_name + self._asset_group = asset_group + + + @property + def campaign_id(self): + """ The identifier of the campaign that contains the asset group. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._campaign_id + + @campaign_id.setter + def campaign_id(self, campaign_id): + self._campaign_id = campaign_id + + @property + def campaign_name(self): + """ The name of the campaign that contains the asset group. + + Corresponds to the 'Campaign' field in the bulk file. + + :rtype: str + """ + + return self._campaign_name + + @campaign_name.setter + def campaign_name(self, campaign_name): + self._campaign_name = campaign_name + + @property + def asset_group(self): + """ The AssetGroup Data Object of the Campaign Management Service. + + A subset of AssetGroup properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._asset_group + + @asset_group.setter + def asset_group(self, asset_group): + self._asset_group = asset_group + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.asset_group.Id), + csv_to_field=lambda c, v: setattr(c.asset_group, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.asset_group.Status), + csv_to_field=lambda c, v: setattr(c.asset_group, 'Status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.campaign_id), + csv_to_field=lambda c, v: setattr(c, 'campaign_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Campaign, + field_to_csv=lambda c: c.campaign_name, + csv_to_field=lambda c, v: setattr(c, 'campaign_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroup, + field_to_csv=lambda c: bulk_str(c.asset_group.Name), + csv_to_field=lambda c, v: setattr(c.asset_group, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.StartDate, + field_to_csv=lambda c: bulk_date_str(c.asset_group.StartDate), + csv_to_field=lambda c, v: setattr(c.asset_group, 'StartDate', parse_date(v)) + ), + _SimpleBulkMapping( + header=_StringTable.EndDate, + field_to_csv=lambda c: bulk_date_str(c.asset_group.EndDate), + csv_to_field=lambda c, v: setattr(c.asset_group, 'EndDate', parse_date(v)) + ), + _SimpleBulkMapping( + header=_StringTable.BusinessName, + field_to_csv=lambda c: c.asset_group.BusinessName, + csv_to_field=lambda c, v: setattr(c.asset_group, 'BusinessName', v) + ), + _SimpleBulkMapping( + header=_StringTable.CallToAction, + field_to_csv=lambda c: c.asset_group.CallToAction, + csv_to_field=lambda c, v: setattr(c.asset_group, 'CallToAction', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Descriptions, + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.asset_group.Descriptions), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.asset_group.Descriptions ,v) + ), + _SimpleBulkMapping( + header=_StringTable.EditorialStatus, + field_to_csv=lambda c: c.asset_group.EditorialStatus, + csv_to_field=lambda c, v: setattr(c.asset_group, 'EditorialStatus', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.FinalMobileUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.asset_group.FinalMobileUrls, c.asset_group.Id), + csv_to_field=lambda c, v: csv_to_field_Urls(c.asset_group.FinalMobileUrls, v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrl, + field_to_csv=lambda c: field_to_csv_Urls(c.asset_group.FinalUrls, c.asset_group.Id), + csv_to_field=lambda c, v: csv_to_field_Urls(c.asset_group.FinalUrls, v) + ), + _SimpleBulkMapping( + header=_StringTable.Headlines, + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.asset_group.Headlines), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.asset_group.Headlines, v) + ), + _SimpleBulkMapping( + header=_StringTable.Images, + field_to_csv=lambda c: field_to_csv_ImageAssetLinks(c.asset_group.Images), + csv_to_field=lambda c, v: csv_to_field_ImageAssetLinks(c.asset_group.Images, v) + ), + _SimpleBulkMapping( + header=_StringTable.LongHeadlines, + field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.asset_group.LongHeadlines), + csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.asset_group.LongHeadlines ,v) + ), + _SimpleBulkMapping( + header=_StringTable.Path1, + field_to_csv=lambda c: bulk_optional_str(c.asset_group.Path1, c.asset_group.Id), + csv_to_field=lambda c, v: setattr(c.asset_group, 'Path1', v) + ), + _SimpleBulkMapping( + header=_StringTable.Path2, + field_to_csv=lambda c: bulk_optional_str(c.asset_group.Path2, c.asset_group.Id), + csv_to_field=lambda c, v: setattr(c.asset_group, 'Path2', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.asset_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetGroup') + + row_values.convert_to_entity(self, BulkAssetGroup._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._asset_group, 'AssetGroup') + self.convert_to_values(row_values, BulkAssetGroup._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAssetGroup, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_asset_group_listing_group.py b/bingads/v13/bulk/entities/bulk_asset_group_listing_group.py new file mode 100644 index 00000000..7aa9af71 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_asset_group_listing_group.py @@ -0,0 +1,151 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAssetGroupListingGroup(_SingleRecordBulkEntity): + """ Represents an asset group listing group. + + This class exposes the property :attr:`asset_group_listing_group` that can be read and written as fields of the Asset Group Listing Group record + in a bulk file. + + For more information, see Asset Group at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, asset_group_listing_group=None): + super(BulkAssetGroupListingGroup, self).__init__() + + self._status = status + self._asset_group_listing_group = asset_group_listing_group + self._asset_group_name = None + self._campaign_name = None + + @property + def status(self): + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def asset_group_name(self): + return self._asset_group_name + + @asset_group_name.setter + def asset_group_name(self, asset_group_name): + self._asset_group_name = asset_group_name + + @property + def campaign_name(self): + return self._campaign_name + + @campaign_name.setter + def campaign_name(self, campaign_name): + self._campaign_name = campaign_name + + @property + def asset_group_listing_group(self): + """ The AssetGroupListingGroup Data Object of the Campaign Management Service. + + A subset of AssetGroupListingGroup properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._asset_group_listing_group + + @asset_group_listing_group.setter + def asset_group_listing_group(self, asset_group_listing_group): + self._asset_group_listing_group = asset_group_listing_group + + @classmethod + def _get_condition_operand(cls, entity): + if entity.asset_group_listing_group is not None and \ + hasattr(entity.asset_group_listing_group, 'Dimension') and \ + entity.asset_group_listing_group.Dimension is not None and \ + hasattr(entity.asset_group_listing_group.Dimension, 'Operand'): + return entity.asset_group_listing_group.Dimension.Operand + return None + + @classmethod + def _get_condition_attribute(cls, entity): + if entity.asset_group_listing_group is not None and \ + hasattr(entity.asset_group_listing_group, 'Dimension') and \ + entity.asset_group_listing_group.Dimension is not None and \ + hasattr(entity.asset_group_listing_group.Dimension, 'Attribute'): + return entity.asset_group_listing_group.Dimension.Attribute + return None + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.asset_group_listing_group.Id), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.asset_group_listing_group.AssetGroupId), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group, 'AssetGroupId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroup, + field_to_csv=lambda c: c.asset_group_name, + csv_to_field=lambda c, v: setattr(c, 'asset_group_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.Campaign, + field_to_csv=lambda c: c.campaign_name, + csv_to_field=lambda c, v: setattr(c, 'campaign_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.IsExcluded, + field_to_csv=lambda c: bulk_str(c.asset_group_listing_group.IsExcluded), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group, 'IsExcluded', parse_bool(v)) + ), + _SimpleBulkMapping( + header=_StringTable.ParentListingGroupId, + field_to_csv=lambda c: bulk_str(c.asset_group_listing_group.ParentListingGroupId), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group, 'ParentListingGroupId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.SubType, + field_to_csv=lambda c: bulk_str(c.asset_group_listing_group.AssetGroupListingType), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group, 'AssetGroupListingType', v if v else None) + ), + _SimpleBulkMapping( + _StringTable.ProductCondition1, + field_to_csv=lambda c: BulkAssetGroupListingGroup._get_condition_operand(c), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group.Dimension, 'Operand', v) + ), + _SimpleBulkMapping( + _StringTable.ProductValue1, + field_to_csv=lambda c: BulkAssetGroupListingGroup._get_condition_attribute(c), + csv_to_field=lambda c, v: setattr(c.asset_group_listing_group.Dimension, 'Attribute', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.asset_group_listing_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetGroupListingGroup') + + row_values.convert_to_entity(self, BulkAssetGroupListingGroup._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._asset_group_listing_group, 'AssetGroupListingGroup') + self.convert_to_values(row_values, BulkAssetGroupListingGroup._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAssetGroupListingGroup, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_audience_group.py b/bingads/v13/bulk/entities/bulk_audience_group.py new file mode 100644 index 00000000..dcdd9b4c --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_audience_group.py @@ -0,0 +1,148 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAudienceGroup(_SingleRecordBulkEntity): + """ Represents an audience group. + + This class exposes the property :attr:`audience_group` that can be read and written as fields of the Audience Group record + in a bulk file. + + For more information, see Audience Group at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, account_id=None, status=None, audience_group=None, audience_ids=None): + super(BulkAudienceGroup, self).__init__() + + self._account_id = account_id + self._audience_group = audience_group + self._status = status + self._audience_ids = audience_ids + self._age_ranges = None + self._gender_types = None + + @property + def status(self): + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def audience_ids(self): + return self._audience_ids + + @audience_ids.setter + def audience_ids(self, audience_ids): + self._audience_ids = audience_ids + + @property + def age_ranges(self): + return self._age_ranges + + @age_ranges.setter + def age_ranges(self, age_ranges): + self._age_ranges = age_ranges + + @property + def gender_types(self): + return self._gender_types + + @gender_types.setter + def gender_types(self, gender_types): + self._gender_types = gender_types + + @property + def account_id(self): + """ The identifier of the account that contains the audience group. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._account_id + + @account_id.setter + def account_id(self, account_id): + self._account_id = account_id + + @property + def audience_group(self): + """ The AudienceGroup Data Object of the Campaign Management Service. + + A subset of AudienceGroup properties are available in the Audience Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._audience_group + + @audience_group.setter + def audience_group(self, audience_group): + self._audience_group = audience_group + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.audience_group.Id), + csv_to_field=lambda c, v: setattr(c.audience_group, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.account_id), + csv_to_field=lambda c, v: setattr(c, 'account_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.AudienceGroupName, + field_to_csv=lambda c: c.audience_group.Name, + csv_to_field=lambda c, v: setattr(c.audience_group, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.Audiences, + field_to_csv=lambda c: field_to_csv_AudienceIds(c), + csv_to_field=lambda c, v: csv_to_field_AudienceIds(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.AgeRanges, + field_to_csv=lambda c: field_to_csv_AgeRanges(c), + csv_to_field=lambda c, v: csv_to_field_AgeRanges(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.GenderTypes, + field_to_csv=lambda c: field_to_csv_GenderTypes(c), + csv_to_field=lambda c, v: csv_to_field_GenderTypes(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.Description, + field_to_csv=lambda c: bulk_str(c.audience_group.Description), + csv_to_field=lambda c, v: setattr(c.audience_group, 'Description', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.audience_group = _CAMPAIGN_OBJECT_FACTORY_V13.create('AudienceGroup') + + row_values.convert_to_entity(self, BulkAudienceGroup._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._audience_group, 'AudienceGroup') + self.convert_to_values(row_values, BulkAudienceGroup._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAudienceGroup, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_audience_group_asset_group_association.py b/bingads/v13/bulk/entities/bulk_audience_group_asset_group_association.py new file mode 100644 index 00000000..95e5af7c --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_audience_group_asset_group_association.py @@ -0,0 +1,108 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAudienceGroupAssetGroupAssociation(_SingleRecordBulkEntity): + """ Represents an audience group asset group association. + + This class exposes the property :attr:`audience_group_asset_group_association` that can be read and written as fields of the audience group asset group association record + in a bulk file. + + For more information, see audience group asset group association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, audience_group_asset_group_association=None): + super(BulkAudienceGroupAssetGroupAssociation, self).__init__() + + self._status = status + self._audience_group_asset_group_association = audience_group_asset_group_association + self._asset_group_name = None + self._campaign_name = None + + @property + def status(self): + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def asset_group_name(self): + return self._asset_group_name + + @asset_group_name.setter + def asset_group_name(self, asset_group_name): + self._asset_group_name = asset_group_name + + @property + def campaign_name(self): + return self._campaign_name + + @campaign_name.setter + def campaign_name(self, campaign_name): + self._campaign_name = campaign_name + + @property + def audience_group_asset_group_association(self): + """ The AudienceGroupAssetGroupAssociation Data Object of the Campaign Management Service. + + A subset of AudienceGroupAssetGroupAssociation properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._audience_group_asset_group_association + + @audience_group_asset_group_association.setter + def audience_group_asset_group_association(self, audience_group_asset_group_association): + self._audience_group_asset_group_association = audience_group_asset_group_association + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.audience_group_asset_group_association.AudienceGroupId), + csv_to_field=lambda c, v: setattr(c.audience_group_asset_group_association, 'AudienceGroupId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.audience_group_asset_group_association.AssetGroupId), + csv_to_field=lambda c, v: setattr(c.audience_group_asset_group_association, 'AssetGroupId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroup, + field_to_csv=lambda c: c.asset_group_name, + csv_to_field=lambda c, v: setattr(c, 'asset_group_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.Campaign, + field_to_csv=lambda c: c.campaign_name, + csv_to_field=lambda c, v: setattr(c, 'campaign_name', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.audience_group_asset_group_association = _CAMPAIGN_OBJECT_FACTORY_V13.create('AudienceGroupAssetGroupAssociation') + + row_values.convert_to_entity(self, BulkAudienceGroupAssetGroupAssociation._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._audience_group_asset_group_association, 'AudienceGroupAssetGroupAssociation') + self.convert_to_values(row_values, BulkAudienceGroupAssetGroupAssociation._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAudienceGroupAssetGroupAssociation, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index f55c36b8..c5e3ef3c 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -11,6 +11,7 @@ _DsaSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DynamicSearchAdsSetting')) _DisclaimerSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DisclaimerSetting')) _VerifiedTrackingSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VerifiedTrackingSetting')) +_PerformanceMaxSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('PerformanceMaxSetting')) class BulkCampaign(_SingleRecordBulkEntity): """ Represents a campaign that can be read or written in a bulk file. @@ -136,6 +137,9 @@ def _get_disclaimer_setting(self): def _get_verified_tracking_setting(self): return self._get_setting(_VerifiedTrackingSetting, 'VerifiedTrackingSetting') + def _get_performance_max_setting(self): + return self._get_setting(_PerformanceMaxSetting, 'PerformanceMaxSetting') + def _get_setting(self, setting_type, setting_name): if not self.campaign.Settings.Setting: return None @@ -171,6 +175,9 @@ def _read_campaign_type(c, v): if campaign_type.lower() == 'dynamicsearchads' or campaign_type.lower() == 'search': BulkCampaign._create_campaign_setting(c.campaign, 'DynamicSearchAdsSetting') BulkCampaign._create_campaign_setting(c.campaign, 'DisclaimerSetting') + if campaign_type.lower() == 'performancemax': + BulkCampaign._create_campaign_setting(c.campaign, 'PerformanceMaxSetting') + BulkCampaign._create_campaign_setting(c.campaign, 'ShoppingSetting') @staticmethod def _create_campaign_setting(campaign, setting_type): @@ -181,6 +188,28 @@ def _create_campaign_setting(campaign, setting_type): setting.Type = setting_type campaign.Settings.Setting.append(setting) + @staticmethod + def _write_final_url_expansion_opt_out(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + return bulk_str(performance_max_setting.FinalUrlExpansionOptOut) + + @staticmethod + def _read_final_url_expansion_opt_out(c, v): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + performance_max_setting.FinalUrlExpansionOptOut = parse_bool(v) + @staticmethod def _write_store_id(c): if not c.campaign.CampaignType: @@ -461,6 +490,11 @@ def _write_website(c): int(v) if v else None ) ), + _SimpleBulkMapping( + header=_StringTable.FinalUrlExpansionOptOut, + field_to_csv=lambda c: BulkCampaign._write_final_url_expansion_opt_out(c), + csv_to_field=lambda c, v: BulkCampaign._read_final_url_expansion_opt_out(c, v) + ), _SimpleBulkMapping( header=_StringTable.MerchantCenterId, field_to_csv=lambda c: BulkCampaign._write_store_id(c), diff --git a/bingads/v13/bulk/entities/bulk_campaign_negative_webpage.py b/bingads/v13/bulk/entities/bulk_campaign_negative_webpage.py new file mode 100644 index 00000000..10e5e0c9 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_campaign_negative_webpage.py @@ -0,0 +1,14 @@ +from bingads.v13.bulk.entities.bulk_campaign_negative_dynamic_search_ad_target import BulkCampaignNegativeDynamicSearchAdTarget + +class BulkCampaignNegativeWebpage(BulkCampaignNegativeDynamicSearchAdTarget): + """ Represents an Campaign Negative Webpage that can be read or written in a bulk file. + + For more information, see Campaign Negative Webpage at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ diff --git a/bingads/v13/bulk/entities/bulk_entity.py b/bingads/v13/bulk/entities/bulk_entity.py index 3554257c..c6935c1c 100644 --- a/bingads/v13/bulk/entities/bulk_entity.py +++ b/bingads/v13/bulk/entities/bulk_entity.py @@ -1,12 +1,11 @@ from abc import ABCMeta, abstractproperty -from future.utils import with_metaclass from bingads.internal.error_messages import _ErrorMessages from bingads.v13.internal.bulk.bulk_object import _BulkObject -class BulkEntity(with_metaclass(ABCMeta, _BulkObject)): +class BulkEntity(_BulkObject, metaclass=ABCMeta): """ The abstract base class for all bulk entities that can be read or written in a bulk file. For more information, see Bulk File Schema at https://go.microsoft.com/fwlink/?linkid=846127. diff --git a/bingads/v13/bulk/entities/bulk_offline_conversion.py b/bingads/v13/bulk/entities/bulk_offline_conversion.py index f8c7ce0b..93a74789 100644 --- a/bingads/v13/bulk/entities/bulk_offline_conversion.py +++ b/bingads/v13/bulk/entities/bulk_offline_conversion.py @@ -1,4 +1,3 @@ -from __future__ import print_function from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity diff --git a/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py b/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py index 7161a172..bbe59a85 100644 --- a/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py +++ b/bingads/v13/bulk/entities/bulk_online_conversion_adjustment.py @@ -1,4 +1,3 @@ -from __future__ import print_function from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity diff --git a/bingads/v13/bulk/entities/labels/bulk_label.py b/bingads/v13/bulk/entities/labels/bulk_label.py index 9779af3d..81a8c0eb 100644 --- a/bingads/v13/bulk/entities/labels/bulk_label.py +++ b/bingads/v13/bulk/entities/labels/bulk_label.py @@ -1,4 +1,3 @@ -from __future__ import print_function from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity diff --git a/bingads/v13/bulk/entities/labels/bulk_label_associations.py b/bingads/v13/bulk/entities/labels/bulk_label_associations.py index 71594215..709e93f6 100644 --- a/bingads/v13/bulk/entities/labels/bulk_label_associations.py +++ b/bingads/v13/bulk/entities/labels/bulk_label_associations.py @@ -1,4 +1,3 @@ -from __future__ import print_function from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity diff --git a/bingads/v13/internal/bulk/bulk_object.py b/bingads/v13/internal/bulk/bulk_object.py index 222d8afb..701c08ab 100644 --- a/bingads/v13/internal/bulk/bulk_object.py +++ b/bingads/v13/internal/bulk/bulk_object.py @@ -1,11 +1,10 @@ from abc import ABCMeta, abstractmethod, abstractproperty -from future.utils import with_metaclass from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping from bingads.v13.bulk import EntityWriteException -class _BulkObject(with_metaclass(ABCMeta)): +class _BulkObject(metaclass=ABCMeta): """ The abstract base class for all bulk objects that can be read and written in a file that conforms to the Bing Ad Bulk File Schema. For more information about the Bulk File Schema, see https://go.microsoft.com/fwlink/?linkid=846127. diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index a0bc8df1..94b42ba9 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -202,6 +202,11 @@ class _BulkObjectFactory(): _StringTable.AdCustomizerCampaign: _EntityInfo(lambda: BulkCampaignAdCustomizerAttribute()), _StringTable.AdCustomizerAdGroup: _EntityInfo(lambda: BulkAdGroupAdCustomizerAttribute()), _StringTable.AdCustomizerKeyword: _EntityInfo(lambda: BulkKeywordAdCustomizerAttribute()), + _StringTable.AssetGroup: _EntityInfo(lambda: BulkAssetGroup()), + _StringTable.AudienceGroup: _EntityInfo(lambda: BulkAudienceGroup()), + _StringTable.CampaignNegativeWebpage: _EntityInfo(lambda: BulkCampaignNegativeWebpage()), + _StringTable.AssetGroupListingGroup: _EntityInfo(lambda: BulkAssetGroupListingGroup()), + _StringTable.AudienceGroupAssetGroupAssociation: _EntityInfo(lambda: BulkAudienceGroupAssetGroupAssociation()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 172ae379..30ec085a 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -42,6 +42,7 @@ class _CsvHeaders: _StringTable.HotelAdGroupType, _StringTable.CommissionRate, _StringTable.PercentCpcBid, + _StringTable.FinalUrlExpansionOptOut, _StringTable.HotelListingGroupType, _StringTable.HotelAttribute, _StringTable.HotelAttributeValue, @@ -452,6 +453,18 @@ class _CsvHeaders: # Hotel Ad _StringTable.MinTargetValue, _StringTable.MaxTargetValue, + + # PMax + _StringTable.Audiences, + _StringTable.AssetGroup, + _StringTable.AudienceGroup, + _StringTable.AgeRanges, + _StringTable.GenderTypes, + _StringTable.ParentListingGroupId, + _StringTable.AudienceGroupName, + _StringTable.CampaignNegativeWebpage, + _StringTable.AssetGroupListingGroup, + _StringTable.AudienceGroupAssetGroupAssociation, ] @staticmethod diff --git a/bingads/v13/internal/bulk/csv_reader.py b/bingads/v13/internal/bulk/csv_reader.py index 83a05302..e6218ec8 100644 --- a/bingads/v13/internal/bulk/csv_reader.py +++ b/bingads/v13/internal/bulk/csv_reader.py @@ -1,6 +1,5 @@ import csv import io -from six import PY2, PY3 class _CsvReader: @@ -18,12 +17,8 @@ def __init__(self, filename, delimiter, encoding='utf-8-sig'): self._csv_file = io.open(self.filename, encoding=self.encoding) - if PY3: - self._csv_reader = csv.reader(self._csv_file, dialect=self._dialect) - elif PY2: - byte_lines = [line.encode('utf-8') for line in self._csv_file] - self._csv_reader = csv.reader(byte_lines, dialect=self._dialect) - + self._csv_reader = csv.reader(self._csv_file, dialect=self._dialect) + def __enter__(self): return self @@ -40,12 +35,8 @@ def close(self): self.__exit__(None, None, None) def next(self): - if PY3: - return next(self._csv_reader) - elif PY2: - row = next(self._csv_reader) - return [unicode(cell, encoding='utf-8') for cell in row] - + return next(self._csv_reader) + @property def filename(self): return self._filename diff --git a/bingads/v13/internal/bulk/csv_writer.py b/bingads/v13/internal/bulk/csv_writer.py index 5d8c4ff4..ce4c5df8 100644 --- a/bingads/v13/internal/bulk/csv_writer.py +++ b/bingads/v13/internal/bulk/csv_writer.py @@ -1,6 +1,5 @@ import csv import codecs -from six import PY2, PY3 class _CsvWriter: @@ -16,11 +15,7 @@ def __init__(self, filename, delimiter): else: raise ValueError('Do not support delimiter: {0}', delimiter) - if PY3: - self._csv_file = codecs.open(filename, mode='w', encoding=self._encoding) - elif PY2: - self._csv_file = open(filename, mode='wb') - self._csv_file.write(codecs.BOM_UTF8) + self._csv_file = codecs.open(filename, mode='w', encoding=self._encoding) self._csv_writer = csv.writer(self._csv_file, dialect=self._dialect) def __enter__(self): @@ -34,14 +29,7 @@ def close(self): self.__exit__(None, None, None) def writerow(self, row): - if PY3: - self._csv_writer.writerow(row) - elif PY2: - def unicode_to_str(value): - if not isinstance(value, unicode): - return value - return value.encode('utf-8') - self._csv_writer.writerow([unicode_to_str(cell) for cell in row]) + self._csv_writer.writerow(row) def writerows(self, rows): for row in rows: diff --git a/bingads/v13/internal/bulk/entities/bulk_entity_identifier.py b/bingads/v13/internal/bulk/entities/bulk_entity_identifier.py index 32d9d975..df086930 100644 --- a/bingads/v13/internal/bulk/entities/bulk_entity_identifier.py +++ b/bingads/v13/internal/bulk/entities/bulk_entity_identifier.py @@ -1,13 +1,10 @@ -from __future__ import absolute_import, division, print_function from abc import ABCMeta, abstractproperty, abstractmethod -from future.utils import with_metaclass - from bingads.v13.bulk.entities import BulkError from bingads.v13.internal.bulk.bulk_object import _BulkObject -class _BulkEntityIdentifier(with_metaclass(ABCMeta, _BulkObject)): +class _BulkEntityIdentifier(_BulkObject, metaclass=ABCMeta): @abstractproperty def is_delete_row(self): diff --git a/bingads/v13/internal/bulk/entities/multi_record_bulk_entity.py b/bingads/v13/internal/bulk/entities/multi_record_bulk_entity.py index f5ea7495..57ac25c7 100644 --- a/bingads/v13/internal/bulk/entities/multi_record_bulk_entity.py +++ b/bingads/v13/internal/bulk/entities/multi_record_bulk_entity.py @@ -1,9 +1,8 @@ from abc import ABCMeta, abstractproperty -from future.utils import with_metaclass from bingads.v13.bulk.entities.bulk_entity import BulkEntity -class _MultiRecordBulkEntity(with_metaclass(ABCMeta, BulkEntity)): +class _MultiRecordBulkEntity(BulkEntity, metaclass=ABCMeta): """ Bulk entity that has its data in multiple records within the bulk file. For more information, see Bulk File Schema at https://go.microsoft.com/fwlink/?linkid=846127. diff --git a/bingads/v13/internal/bulk/entities/single_record_bulk_entity.py b/bingads/v13/internal/bulk/entities/single_record_bulk_entity.py index 7069f1fd..e96c0bb4 100644 --- a/bingads/v13/internal/bulk/entities/single_record_bulk_entity.py +++ b/bingads/v13/internal/bulk/entities/single_record_bulk_entity.py @@ -1,7 +1,5 @@ from abc import ABCMeta, abstractmethod -from future.utils import with_metaclass - from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping from bingads.v13.bulk.entities.bulk_entity import BulkEntity @@ -9,7 +7,7 @@ from bingads.v13.internal.extensions import * -class _SingleRecordBulkEntity(with_metaclass(ABCMeta, BulkEntity)): +class _SingleRecordBulkEntity(BulkEntity,metaclass=ABCMeta): def __init__(self): self._client_id = None self._last_modified_time = None diff --git a/bingads/v13/internal/bulk/mappings.py b/bingads/v13/internal/bulk/mappings.py index 24b4cdc3..5a5cc048 100644 --- a/bingads/v13/internal/bulk/mappings.py +++ b/bingads/v13/internal/bulk/mappings.py @@ -1,8 +1,7 @@ -from future.utils import with_metaclass from abc import ABCMeta, abstractmethod -class _BulkMapping(with_metaclass(ABCMeta)): +class _BulkMapping(metaclass=ABCMeta): @abstractmethod def convert_to_csv(self, entity, row_values): raise NotImplementedError() @@ -12,7 +11,7 @@ def convert_to_entity(self, row_values, entity): raise NotImplementedError() -class _SingleFieldBulkMapping(with_metaclass(ABCMeta, _BulkMapping)): +class _SingleFieldBulkMapping(_BulkMapping, metaclass=ABCMeta): def __init__(self, csv_to_field, filed_to_csv): self._csv_to_field = csv_to_field self._field_to_csv = filed_to_csv diff --git a/bingads/v13/internal/bulk/object_reader.py b/bingads/v13/internal/bulk/object_reader.py index fa3c8b03..59abdcee 100644 --- a/bingads/v13/internal/bulk/object_reader.py +++ b/bingads/v13/internal/bulk/object_reader.py @@ -1,5 +1,4 @@ import csv -from six import PY2, PY3 from .bulk_object_factory import _BulkObjectFactory from .row_values import _RowValues from .csv_reader import _CsvReader @@ -84,11 +83,7 @@ def encoding(self): class _CsvRowsReader: def __init__(self, csv_rows): - if PY3: - self._csv_reader = csv.reader(csv_rows, dialect=csv.excel) - elif PY2: - byte_lines = [line.encode('utf-8') for line in csv_rows] - self._csv_reader = csv.reader(byte_lines, dialect=csv.excel) + self._csv_reader = csv.reader(csv_rows, dialect=csv.excel) def __enter__(self): return self diff --git a/bingads/v13/internal/bulk/row_values.py b/bingads/v13/internal/bulk/row_values.py index 9492926b..52b98701 100644 --- a/bingads/v13/internal/bulk/row_values.py +++ b/bingads/v13/internal/bulk/row_values.py @@ -1,7 +1,6 @@ from .csv_headers import _CsvHeaders from .mappings import _SimpleBulkMapping from bingads.v13.bulk import EntityReadException -import six class _RowValues: @@ -47,8 +46,6 @@ def _create_entity_read_exception(self, entity, mapping, ex): else: message = "Couldn't parse {0} entity: {1}".format(entity_type, str(ex)) message += " See ColumnValues for detailed row information and InnerException for error details." - if six.PY2: - message = message.decode('ascii') message += u' row values: {0}'.format(self) return EntityReadException(message=message, row_values=str(self), inner_exception=ex) diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index d42ecd58..a3d824ae 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -24,6 +24,7 @@ class _StringTable: HotelAdGroupType = "Hotel Ad Group Type" CommissionRate = "Commission Rate" PercentCpcBid = "Percent Cpc Bid" + FinalUrlExpansionOptOut = "Url Expansion Opt Out" HotelListingGroupType = "Ad Group Hotel Listing Group" HotelAttribute = "Hotel Attribute" HotelAttributeValue = "Hotel Attribute Value" @@ -632,3 +633,15 @@ class _StringTable: # Campaign Conversion Goal CampaignConversionGoal = "Campaign Conversion Goal" GoalId = "Goal Id" + + # PMax + AssetGroup = "Asset Group" + AudienceGroup = "Audience Group" + CampaignNegativeWebpage = "Campaign Negative Webpage" + AssetGroupListingGroup = "Asset Group Listing Group" + AudienceGroupAssetGroupAssociation = "Audience Group Asset Group Association" + Audiences = "Audiences" + AudienceGroupName = "Audience Group Name" + AgeRanges = "Age Ranges" + GenderTypes = "Gender Types" + ParentListingGroupId = "Parent Listing Group Id" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 3ae19a23..341969c8 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -1,7 +1,6 @@ from datetime import datetime from bingads.v13.internal.bulk.string_table import _StringTable -from six import PY2 import re import json from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13, _CAMPAIGN_MANAGEMENT_SERVICE_V13 @@ -63,9 +62,6 @@ def bulk_str(value): return None if isinstance(value, str): return value - if PY2: - if isinstance(value, unicode): - return value return str(value) @@ -325,7 +321,40 @@ def parse_device_preference(value): elif value.lower() == "mobile": return 30001 else: - raise ValueError("Unknown device preference") + return None + +def field_to_csv_AudienceIds(entity): + audience_ids = entity.audience_ids + if audience_ids is None or len(audience_ids) == 0: + return None + return ';'.join(str(audience_id) for audience_id in audience_ids) + +def csv_to_field_AudienceIds(entity, value): + if value is None or value.strip() == '': + return + entity.audience_ids = [None if i == 'None' else int(i) for i in value.split(';')] + +def field_to_csv_AgeRanges(entity): + age_ranges = entity.age_ranges + if age_ranges is None or len(age_ranges) == 0: + return None + return ';'.join(age_range for age_range in age_ranges) + +def csv_to_field_AgeRanges(entity, value): + if value is None or value.strip() == '': + return + entity.age_ranges = [None if i == 'None' else i for i in value.split(';')] + +def field_to_csv_GenderTypes(entity): + gender_types = entity.gender_types + if gender_types is None or len(gender_types) == 0: + return None + return ';'.join(gender_type for gender_type in gender_types) + +def csv_to_field_GenderTypes(entity, value): + if value is None or value.strip() == '': + return + entity.gender_types = [None if i == 'None' else i for i in value.split(';')] def field_to_csv_MediaIds(entity): """ @@ -507,6 +536,10 @@ def field_to_csv_BidStrategyType(entity): return 'PercentCpc' elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CommissionBiddingScheme')): return 'Commission' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpaBiddingScheme')): + return 'ManualCpa' + elif type(entity.BiddingScheme) == type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CostPerSaleBiddingScheme')): + return 'CostPerSale' else: raise TypeError('Unsupported Bid Strategy Type') @@ -548,8 +581,12 @@ def csv_to_field_BidStrategyType(entity, value): entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('PercentCpcBiddingScheme') elif value == 'Commission': entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('CommissionBiddingScheme') + elif value == 'ManualCpa': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('ManualCpaBiddingScheme') + elif value == 'CostPerSale': + entity.BiddingScheme = _CAMPAIGN_OBJECT_FACTORY_V13.create('CostPerSaleBiddingScheme') else: - raise ValueError('Unknown Bid Strategy Type') + return None entity.BiddingScheme.Type = value @@ -985,7 +1022,7 @@ def csv_to_field_BudgetType(entity, value, version=13): elif value == 'DailyBudgetStandard': entity.BudgetType = BudgetLimitType.DailyBudgetStandard else: - raise ValueError('Unable to parse BudgetType: {0}'.format(value)) + entity.BudgetType = None def field_to_csv_WebpageParameter_CriterionName(entity): if entity.Criterion is None or entity.Criterion.Parameter is None or entity.Criterion.Parameter.CriterionName is None: @@ -1060,7 +1097,7 @@ def csv_to_entity_DSAWebpageParameter(row_values, entity): # TODO wait bug 54825 to be fixed if webpage_condition.lower() == 'none': continue - raise ValueError("Unknown WebpageConditionOperand value: {0}".format(webpage_condition)) + return None if condition_operator_success: condition.Operator = webpage_condition_operator @@ -1254,7 +1291,7 @@ def csv_to_field_RemarketingRule(entity, value): elif rule_type.lower() == 'customevents': entity.Rule = parse_rule_CustomEvents(rule) else: - raise ValueError('Invalid Remarketing Rule Type: {0}'.format(rule_type)) + entity.Rule = None def field_to_csv_CriterionAudienceId(entity): @@ -1866,7 +1903,8 @@ def parse_number_operator(operator): return NumberOperator.LessThanEqualTo if oper == 'notequals': return NumberOperator.NotEquals - raise ValueError('Invalid Number Rule Item operator:{0}'.format(operator)) + + return None def parse_string_operator(operator): @@ -1888,7 +1926,7 @@ def parse_string_operator(operator): if oper == 'doesnotendwith': return StringOperator.DoesNotEndWith - raise ValueError('Invalid String Rule Item operator:{0}'.format(operator)) + return None def csv_to_field_SupportedCampaignTypes(entity, value): diff --git a/bingads/v13/internal/reporting/csv_reader.py b/bingads/v13/internal/reporting/csv_reader.py index 49a55088..2684ae6b 100644 --- a/bingads/v13/internal/reporting/csv_reader.py +++ b/bingads/v13/internal/reporting/csv_reader.py @@ -1,6 +1,5 @@ import csv import io -from six import PY2, PY3 class _CsvReader: @@ -17,11 +16,7 @@ def __init__(self, filename, delimiter, encoding='utf-8-sig'): self._csv_file = io.open(self.filename, encoding=encoding) - if PY3: - self._csv_reader = csv.reader(self._csv_file, dialect=self._dialect) - elif PY2: - byte_lines = [line.encode('utf-8') for line in self._csv_file] - self._csv_reader = csv.reader(byte_lines, dialect=self._dialect) + self._csv_reader = csv.reader(self._csv_file, dialect=self._dialect) def __enter__(self): return self @@ -39,11 +34,7 @@ def close(self): self.__exit__(None, None, None) def next(self): - if PY3: - return next(self._csv_reader) - elif PY2: - row = next(self._csv_reader) - return [unicode(cell, encoding='utf-8') for cell in row] + return next(self._csv_reader) @property def filename(self): diff --git a/bingads/v13/reporting/reporting_operation.py b/bingads/v13/reporting/reporting_operation.py index de3f8b30..96c7a2d6 100644 --- a/bingads/v13/reporting/reporting_operation.py +++ b/bingads/v13/reporting/reporting_operation.py @@ -4,7 +4,6 @@ import requests import zipfile import os -import six import sys import shutil @@ -101,10 +100,7 @@ def download_result_file(self, result_file_directory, result_file_name, decompre zip_file_path = result_file_path if os.path.exists(result_file_path) and overwrite is False: - if six.PY3: - raise FileExistsError('Result file: {0} exists'.format(result_file_path)) - else: - raise OSError('Result file: {0} exists'.format(result_file_path)) + raise FileExistsError('Result file: {0} exists'.format(result_file_path)) headers = { 'User-Agent': USER_AGENT, } diff --git a/requirements.txt b/requirements.txt index f1601d1e..56cfaf5e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,8 @@ suds-community>=1.1.0 requests>=2.0.0 -future -six enum34 pytest mock -parameterizedtestcase coverage flake8 setuptools diff --git a/setup.py b/setup.py index bd36ac86..2c8a8b58 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.15' +VERSION = '13.0.16' with open('README.rst', 'r') as f: readme = f.read() @@ -12,8 +12,6 @@ requirements = [ 'suds-community>=1.1.0', - 'future', - 'six', 'requests', 'enum34;python_version<"3.9"', ] From df1f35d5691a84e2f4abbaf0b9a99000423864bb Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 7 Jun 2023 10:53:18 +0800 Subject: [PATCH 21/55] add history --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 701ae506..190826b9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,7 @@ Release History * Add bulk mappings for AdGroupHotelListingGroup. * Add mappings for new fields in BulkAdgroup: UseOptimizedTargeting, HotelSetting, CommissionRate and PercentCpcBid. * Support new bidding scheme: percentCpcBiddingScheme and commissionBiddingScheme. +* get rid of six/future as we support python3 only. Refer to https://github.com/BingAds/BingAds-Python-SDK/issues/233. 13.0.14(2022-06-30) +++++++++++++++++++++++++ From 9298f3e5481a9937e102627ff97c3486fb1d683a Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 7 Jun 2023 10:56:35 +0800 Subject: [PATCH 22/55] add history --- HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index a5b7566b..7c142e36 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ Release History * Add bulk mappings for performance max campaign i.e., BulkAssetGroup, BulkAssetGroupListingGroup, BulkAudienceGroup, BulkAudienceGroupAssetGroupAssociation, BulkCampaignNegativeWebPage. * Add mappings for new fields in BulkCampaign: UrlExpansionOptOut. * Support new bidding scheme: ManualCpaScheme and CostPerSaleBiddingScheme. +* get rid of six/future as we support python3 only. Refer to https://github.com/BingAds/BingAds-Python-SDK/issues/233. 13.0.15(2022-12-23) +++++++++++++++++++++++++ @@ -16,7 +17,6 @@ Release History * Add bulk mappings for AdGroupHotelListingGroup. * Add mappings for new fields in BulkAdgroup: UseOptimizedTargeting, HotelSetting, CommissionRate and PercentCpcBid. * Support new bidding scheme: percentCpcBiddingScheme and commissionBiddingScheme. -* get rid of six/future as we support python3 only. Refer to https://github.com/BingAds/BingAds-Python-SDK/issues/233. 13.0.14(2022-06-30) +++++++++++++++++++++++++ From 4162f4ea8fa56eced0463181f86d699fd8712f76 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 7 Jun 2023 11:00:09 +0800 Subject: [PATCH 23/55] update proxies --- .../proxies/production/adinsight_service.xml | 138 +- .../v13/proxies/production/bulk_service.xml | 73 +- .../production/campaignmanagement_service.xml | 3460 ++++++++++++----- .../proxies/production/reporting_service.xml | 48 +- .../v13/proxies/sandbox/adinsight_service.xml | 138 +- bingads/v13/proxies/sandbox/bulk_service.xml | 71 +- .../sandbox/campaignmanagement_service.xml | 3305 +++++++++++----- .../v13/proxies/sandbox/reporting_service.xml | 48 +- 8 files changed, 5038 insertions(+), 2243 deletions(-) diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index df8d7c2f..048afd96 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -1,6 +1,6 @@ - - + + @@ -98,7 +98,7 @@ - + @@ -310,7 +310,7 @@ - + @@ -481,7 +481,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -585,10 +585,10 @@ - + - + @@ -688,7 +688,7 @@ - + @@ -718,13 +718,13 @@ - + - - + + @@ -800,13 +800,13 @@ - + - + - + @@ -859,7 +859,7 @@ - + @@ -902,10 +902,10 @@ - + - + @@ -953,10 +953,10 @@ - + - + @@ -1031,9 +1031,9 @@ - + - + @@ -1067,7 +1067,7 @@ - + @@ -1120,7 +1120,7 @@ - + @@ -1488,7 +1488,7 @@ - + @@ -1640,7 +1640,7 @@ - + @@ -1788,7 +1788,7 @@ - + @@ -1815,7 +1815,7 @@ - + @@ -3012,9 +3012,9 @@ - + - + @@ -3052,7 +3052,7 @@ - + @@ -3073,12 +3073,12 @@ - + - + @@ -3119,7 +3119,7 @@ - + @@ -3152,7 +3152,7 @@ - + @@ -3166,11 +3166,11 @@ - + - + @@ -3199,7 +3199,7 @@ - + @@ -3223,7 +3223,7 @@ - + @@ -3247,7 +3247,7 @@ - + @@ -3271,7 +3271,7 @@ - + @@ -3295,7 +3295,7 @@ - + @@ -3319,7 +3319,7 @@ - + @@ -3343,7 +3343,7 @@ - + @@ -3367,7 +3367,7 @@ - + @@ -3391,7 +3391,7 @@ - + @@ -3415,7 +3415,7 @@ - + @@ -3439,7 +3439,7 @@ - + @@ -3463,7 +3463,7 @@ - + @@ -3487,7 +3487,7 @@ - + @@ -3511,7 +3511,7 @@ - + @@ -3535,7 +3535,7 @@ - + @@ -3559,7 +3559,7 @@ - + @@ -3583,7 +3583,7 @@ - + @@ -3607,7 +3607,7 @@ - + @@ -3631,7 +3631,7 @@ - + @@ -3655,7 +3655,7 @@ - + @@ -3679,7 +3679,7 @@ - + @@ -3703,7 +3703,7 @@ - + @@ -3727,7 +3727,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -3775,7 +3775,7 @@ - + @@ -3799,7 +3799,7 @@ - + @@ -3823,7 +3823,7 @@ - + @@ -3847,7 +3847,7 @@ - + @@ -4022,8 +4022,8 @@ - - + + @@ -4671,8 +4671,8 @@ - - + + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 2f7e4838..9cd8e8e7 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1,5 +1,5 @@ - + @@ -34,7 +34,7 @@ - + @@ -1086,6 +1086,41 @@ + + + + 146 + + + + + + + 147 + + + + + + + 148 + + + + + + + 149 + + + + + + + 150 + + + @@ -1113,7 +1148,7 @@ - + @@ -1134,7 +1169,7 @@ - + @@ -1214,7 +1249,7 @@ - + @@ -1255,7 +1290,7 @@ - + @@ -1265,7 +1300,7 @@ - + @@ -1274,7 +1309,7 @@ - + @@ -1282,7 +1317,7 @@ - + @@ -1323,7 +1358,7 @@ - + @@ -1355,7 +1390,7 @@ - + @@ -1388,7 +1423,7 @@ - + @@ -1433,7 +1468,7 @@ - + @@ -1457,7 +1492,7 @@ - + @@ -1481,7 +1516,7 @@ - + @@ -1505,7 +1540,7 @@ - + @@ -1529,7 +1564,7 @@ - + @@ -1553,7 +1588,7 @@ - + @@ -1740,7 +1775,7 @@ - + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 19818905..8bc21086 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1,5 +1,5 @@ - + @@ -26,7 +26,7 @@ - + @@ -92,10 +92,10 @@ - + - - + + @@ -240,7 +240,7 @@ - + @@ -739,8 +739,8 @@ - - + + @@ -764,7 +764,7 @@ - + @@ -943,6 +943,24 @@ + + + + + + + + + + + + + + + + + + @@ -976,6 +994,13 @@ + + + + 64 + + + @@ -1029,7 +1054,7 @@ - + @@ -1103,7 +1128,7 @@ - + @@ -1140,6 +1165,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1150,7 +1195,7 @@ - + @@ -1167,7 +1212,7 @@ - + @@ -1191,7 +1236,7 @@ - + @@ -1241,6 +1286,8 @@ + + @@ -1257,7 +1304,7 @@ - + @@ -1275,7 +1322,7 @@ - + @@ -1305,7 +1352,7 @@ - + @@ -1326,7 +1373,7 @@ - + @@ -1367,7 +1414,7 @@ - + @@ -1401,7 +1448,14 @@ - + + + + + + + + @@ -1461,6 +1515,13 @@ + + + + + + + @@ -1529,6 +1590,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1559,8 +1644,8 @@ - - + + @@ -1569,7 +1654,7 @@ - + @@ -1584,7 +1669,7 @@ - + @@ -1602,6 +1687,7 @@ + @@ -1643,7 +1729,7 @@ - + @@ -1652,7 +1738,7 @@ - + @@ -1673,7 +1759,7 @@ - + @@ -1734,14 +1820,14 @@ - + - + @@ -1761,7 +1847,7 @@ - + @@ -1811,7 +1897,7 @@ - + @@ -1878,10 +1964,10 @@ - + - - + + @@ -1928,8 +2014,8 @@ - - + + @@ -1938,7 +2024,7 @@ - + @@ -1968,7 +2054,7 @@ - + @@ -2006,7 +2092,7 @@ - + @@ -2140,7 +2226,7 @@ - + @@ -2149,7 +2235,7 @@ - + @@ -2352,7 +2438,7 @@ - + @@ -2490,10 +2576,10 @@ - + - - + + @@ -2501,7 +2587,7 @@ - + @@ -2524,9 +2610,9 @@ - + - + @@ -2566,9 +2652,9 @@ - + - + @@ -2581,9 +2667,9 @@ - + - + @@ -2683,7 +2769,7 @@ - + @@ -2729,8 +2815,8 @@ - - + + @@ -2770,9 +2856,9 @@ - + - + @@ -2846,11 +2932,11 @@ - + - + - + @@ -2910,12 +2996,12 @@ - + - + - - + + @@ -2932,9 +3018,9 @@ - + - + @@ -2952,9 +3038,9 @@ - + - + @@ -3000,7 +3086,7 @@ - + @@ -3025,7 +3111,7 @@ - + @@ -3097,7 +3183,7 @@ - + @@ -3186,7 +3272,7 @@ - + @@ -3214,7 +3300,7 @@ - + @@ -3291,7 +3377,7 @@ - + @@ -3330,7 +3416,7 @@ - + @@ -3338,7 +3424,7 @@ - + @@ -3425,7 +3511,7 @@ - + @@ -3441,7 +3527,7 @@ - + @@ -3476,7 +3562,7 @@ - + @@ -4018,7 +4104,7 @@ - + @@ -4070,6 +4156,7 @@ + @@ -4142,9 +4229,9 @@ - + - + @@ -4203,7 +4290,7 @@ - + @@ -4226,7 +4313,7 @@ - + @@ -4288,7 +4375,7 @@ - + @@ -4303,11 +4390,90 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4320,6 +4486,7 @@ + @@ -4345,6 +4512,13 @@ + + + + + + + @@ -4409,7 +4583,7 @@ - + @@ -4441,14 +4615,14 @@ - + - + @@ -4499,7 +4673,7 @@ - + @@ -4572,7 +4746,7 @@ - + @@ -4605,7 +4779,7 @@ - + @@ -4628,7 +4802,7 @@ - + @@ -4697,7 +4871,7 @@ - + @@ -4714,7 +4888,7 @@ - + @@ -4748,7 +4922,7 @@ - + @@ -4790,7 +4964,7 @@ - + @@ -4983,7 +5157,7 @@ - + @@ -5006,7 +5180,7 @@ - + @@ -5022,7 +5196,7 @@ - + @@ -5063,7 +5237,7 @@ - + @@ -5085,7 +5259,7 @@ - + @@ -5099,7 +5273,7 @@ - + @@ -5114,7 +5288,7 @@ - + @@ -5152,7 +5326,7 @@ - + @@ -5174,7 +5348,7 @@ - + @@ -5188,7 +5362,7 @@ - + @@ -5203,7 +5377,7 @@ - + @@ -5215,141 +5389,483 @@ - + - + - + - + - - + + - - + - + - - - - - - - - - - - - - - - + + - + - - + + - - - + - - - - - + + + + + + + + + + + + + + + + + - - + + - - + - - + + - + - - + - - + + - + - - + + - + - - - - - - - - + - - - - - - - 1 - - - - - - - 2 - - - - - - - + + - + - - + + - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + @@ -5514,7 +6030,7 @@ - + @@ -5545,10 +6061,18 @@ + + + + + + + + - + @@ -5570,7 +6094,7 @@ - + @@ -5584,7 +6108,7 @@ - + @@ -5612,7 +6136,7 @@ - + @@ -5682,7 +6206,7 @@ - + @@ -5752,6 +6276,13 @@ + + + + + + + @@ -5941,7 +6472,7 @@ - + @@ -5965,7 +6496,7 @@ - + @@ -6005,6 +6536,20 @@ + + + + + + + + + + + + + + @@ -6037,6 +6582,20 @@ + + + + + + + + + + + + + + @@ -6104,7 +6663,7 @@ - + @@ -6112,7 +6671,7 @@ - + @@ -6140,7 +6699,7 @@ - + @@ -6199,7 +6758,7 @@ - + @@ -6216,7 +6775,7 @@ - + @@ -6259,7 +6818,7 @@ - + @@ -6267,7 +6826,7 @@ - + @@ -6295,7 +6854,7 @@ - + @@ -6413,7 +6972,7 @@ - + @@ -6524,6 +7083,13 @@ + + + + + + + @@ -6609,7 +7175,7 @@ - + @@ -6628,7 +7194,7 @@ - + @@ -6638,7 +7204,7 @@ - + @@ -6717,6 +7283,13 @@ + + + + 512 + + + @@ -6739,7 +7312,7 @@ - + @@ -6767,7 +7340,7 @@ - + @@ -6784,7 +7357,7 @@ - + @@ -6800,7 +7373,7 @@ - + @@ -6819,7 +7392,7 @@ - + @@ -6834,7 +7407,7 @@ - + @@ -6871,7 +7444,7 @@ - + @@ -6879,7 +7452,7 @@ - + @@ -6893,7 +7466,7 @@ - + @@ -6962,7 +7535,7 @@ - + @@ -6994,7 +7567,7 @@ - + @@ -7047,7 +7620,7 @@ - + @@ -7055,7 +7628,7 @@ - + @@ -7092,7 +7665,271 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7101,22 +7938,22 @@ - - + + - + - - + + - + - - + + - + @@ -7125,22 +7962,22 @@ - - + + - + - - + + - + - - + + - + @@ -7149,22 +7986,22 @@ - - + + - + - - + + - + - - + + - + @@ -7173,22 +8010,22 @@ - - + + - + - - + + - + - - + + - + @@ -7197,22 +8034,22 @@ - - + + - + - - + + - + - - + + - + @@ -7221,22 +8058,22 @@ - - + + - + - - + + - + - - + + - + @@ -7245,22 +8082,46 @@ - - + + - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + @@ -7269,22 +8130,22 @@ - - + + - + - - + + - + - - + + - + @@ -7293,22 +8154,22 @@ - - + + - + - - + + - + - - + + - + @@ -7317,22 +8178,94 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - + + - + @@ -7341,22 +8274,22 @@ - - + + - + - - + + - + - - + + - + @@ -7365,22 +8298,22 @@ - - + + - + - - + + - + - - + + - + @@ -7389,22 +8322,22 @@ - - + + - + - - + + - + - - + + - + @@ -7413,22 +8346,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7437,22 +8370,22 @@ - - + + - + - - + + - + - - + + - + @@ -7461,22 +8394,22 @@ - - + + - + - - + + - + - - + + - + @@ -7485,22 +8418,22 @@ - - + + - + - - + + - + - - + + - + @@ -7509,22 +8442,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7533,22 +8466,22 @@ - - + + - + - - + + - + - - + + - + @@ -7557,22 +8490,22 @@ - - + + - + - - + + - + - - + + - + @@ -7581,22 +8514,22 @@ - - + + - + - - + + - + - - + + - + @@ -7605,22 +8538,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7629,22 +8562,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7653,22 +8586,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7677,22 +8610,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7701,22 +8634,22 @@ - - + + - + - - + + - + - - + + - + @@ -7725,22 +8658,22 @@ - - + + - + - - + + - + - - + + - + @@ -7749,22 +8682,22 @@ - - + + - + - - + + - + - - + + - + @@ -7773,22 +8706,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7797,22 +8730,22 @@ - - + + - + - - + + - + - - + + - + @@ -7821,22 +8754,22 @@ - - + + - + - - + + - + - - + + - + @@ -7845,22 +8778,22 @@ - - + + - + - - + + - + - - + + - + @@ -7869,22 +8802,22 @@ - - + + - + - - + + - + - - + + - + @@ -7893,22 +8826,22 @@ - - + + - + - - + + - + - - + + - + @@ -7917,22 +8850,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7941,22 +8874,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7965,22 +8898,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7989,22 +8922,22 @@ - - + + - + - - + + - + - - + + - + @@ -8013,22 +8946,22 @@ - - + + - + - - + + - + - - + + - + @@ -8037,22 +8970,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8061,22 +8994,22 @@ - - + + - + - - + + - + - - + + - + @@ -8085,22 +9018,22 @@ - - + + - + - - + + - + - - + + - + @@ -8109,22 +9042,22 @@ - - + + - + - - + + - + - - + + - + @@ -8133,22 +9066,22 @@ - - + + - + - - + + - + - - + + - + @@ -8157,22 +9090,22 @@ - - + + - + - - + + - + - - + + - + @@ -8181,22 +9114,22 @@ - - + + - + - - + + - + - - + + - + @@ -8205,22 +9138,22 @@ - - + + - + - - + + - + - - + + - + @@ -8229,22 +9162,22 @@ - - + + - + - - + + - + - - + + - + @@ -8253,22 +9186,22 @@ - - + + - + - - + + - + - - + + - + @@ -8277,22 +9210,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8301,22 +9234,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8325,22 +9258,22 @@ - - + + - + - - + + - + - - + + - + @@ -8349,22 +9282,22 @@ - - + + - + - - + + - + - - + + - + @@ -8373,22 +9306,22 @@ - - + + - + - - + + - + - - + + - + @@ -8397,22 +9330,22 @@ - - + + - + - - + + - + - - + + - + @@ -8421,22 +9354,22 @@ - - + + - + - - + + - + - - + + - + @@ -8445,22 +9378,22 @@ - - + + - + - - + + - + - - + + - + @@ -8469,22 +9402,22 @@ - - + + - + - - + + - + - - + + - + @@ -8493,22 +9426,22 @@ - - + + - + - - + + - + - - + + - + @@ -8517,22 +9450,22 @@ - - + + - + - - + + - + - - + + - + @@ -8541,22 +9474,22 @@ - - + + - + - - + + - + - - + + - + @@ -8565,22 +9498,22 @@ - - + + - + - - + + - + - - + + - + @@ -8589,22 +9522,22 @@ - - + + - + - - + + - + - - + + - + @@ -8613,22 +9546,22 @@ - - + + - + - - + + - + - - + + - + @@ -8637,22 +9570,22 @@ - - + + - + - - + + - + - - + + - + @@ -8661,22 +9594,22 @@ - - + + - + - - + + - + - - + + - + @@ -8685,22 +9618,22 @@ - - + + - + - - + + - + - - + + - + @@ -8709,22 +9642,22 @@ - - + + - + - - + + - + - - + + - + @@ -8733,22 +9666,22 @@ - - + + - + - - + + - + - - + + - + @@ -8757,22 +9690,22 @@ - - + + - + - - + + - + - - + + - + @@ -8781,22 +9714,22 @@ - - + + - + - - + + - + - - + + - + @@ -8805,22 +9738,22 @@ - - + + - + - - + + - + - - + + - + @@ -8829,22 +9762,22 @@ - - + + - + - - + + - + - - + + - + @@ -8853,22 +9786,22 @@ - - + + - + - - + + - + - - + + - + @@ -8877,22 +9810,22 @@ - - + + - + - - + + - + - - + + - + @@ -8901,22 +9834,22 @@ - - + + - + - - + + - + - - + + - + @@ -8925,22 +9858,22 @@ - - + + - + - - + + - + - - + + - + @@ -8949,22 +9882,22 @@ - - + + - + - - + + - + - - + + - + @@ -8973,22 +9906,22 @@ - - + + - + - - + + - + - - + + - + @@ -8997,22 +9930,22 @@ - - + + - + - - + + - + - - + + - + @@ -9021,22 +9954,22 @@ - - + + - + - - + + - + - - + + - + @@ -9045,22 +9978,22 @@ - - + + - + - - + + - + - - + + - + @@ -9069,22 +10002,22 @@ - - + + - + - - + + - + - - + + - + @@ -9093,22 +10026,22 @@ - - + + - + - - + + - + - - + + - + @@ -9117,16 +10050,16 @@ - - + + - + - - + + - + @@ -9148,7 +10081,7 @@ - + @@ -9172,7 +10105,7 @@ - + @@ -9196,7 +10129,7 @@ - + @@ -9220,7 +10153,7 @@ - + @@ -9244,7 +10177,7 @@ - + @@ -9268,7 +10201,7 @@ - + @@ -9292,7 +10225,7 @@ - + @@ -9316,7 +10249,7 @@ - + @@ -9340,7 +10273,7 @@ - + @@ -9364,7 +10297,7 @@ - + @@ -9388,7 +10321,7 @@ - + @@ -9412,7 +10345,7 @@ - + @@ -9436,7 +10369,7 @@ - + @@ -9460,7 +10393,7 @@ - + @@ -9484,7 +10417,7 @@ - + @@ -9508,7 +10441,7 @@ - + @@ -9532,7 +10465,7 @@ - + @@ -9556,7 +10489,7 @@ - + @@ -9580,7 +10513,7 @@ - + @@ -9604,7 +10537,7 @@ - + @@ -9628,7 +10561,7 @@ - + @@ -9652,7 +10585,7 @@ - + @@ -9676,7 +10609,7 @@ - + @@ -9700,7 +10633,7 @@ - + @@ -9724,7 +10657,7 @@ - + @@ -9748,7 +10681,7 @@ - + @@ -9772,7 +10705,7 @@ - + @@ -9796,7 +10729,7 @@ - + @@ -9820,7 +10753,7 @@ - + @@ -9844,7 +10777,7 @@ - + @@ -9868,7 +10801,7 @@ - + @@ -9892,7 +10825,7 @@ - + @@ -9916,7 +10849,7 @@ - + @@ -9940,7 +10873,7 @@ - + @@ -9964,7 +10897,7 @@ - + @@ -9988,7 +10921,7 @@ - + @@ -10012,7 +10945,7 @@ - + @@ -10036,7 +10969,7 @@ - + @@ -10060,7 +10993,7 @@ - + @@ -10084,7 +11017,7 @@ - + @@ -10108,7 +11041,7 @@ - + @@ -10438,6 +11371,18 @@ + + + + + + + + + + + + @@ -10624,6 +11569,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12116,6 +13139,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12829,6 +13898,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13775,7 +15143,7 @@ - + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 9121b9d3..b0e85c49 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -1,5 +1,5 @@ - + @@ -246,7 +246,7 @@ - + @@ -998,7 +998,7 @@ - + @@ -1254,7 +1254,7 @@ - + @@ -1646,19 +1646,19 @@ - + - + - - + + - + @@ -2089,7 +2089,7 @@ - + @@ -2275,7 +2275,7 @@ - + @@ -2354,7 +2354,7 @@ - + @@ -2417,7 +2417,7 @@ - + @@ -2992,7 +2992,7 @@ - + @@ -3418,7 +3418,7 @@ - + @@ -3654,7 +3654,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -4141,7 +4141,7 @@ - + @@ -4211,7 +4211,7 @@ - + @@ -4252,7 +4252,7 @@ - + @@ -4272,7 +4272,7 @@ - + @@ -4325,7 +4325,7 @@ - + @@ -4349,7 +4349,7 @@ - + @@ -4420,7 +4420,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index fb63f1bc..099ada7d 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -1,6 +1,6 @@ - - + + @@ -98,7 +98,7 @@ - + @@ -310,7 +310,7 @@ - + @@ -481,7 +481,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -585,10 +585,10 @@ - + - + @@ -688,7 +688,7 @@ - + @@ -718,13 +718,13 @@ - + - - + + @@ -800,13 +800,13 @@ - + - + - + @@ -859,7 +859,7 @@ - + @@ -902,10 +902,10 @@ - + - + @@ -953,10 +953,10 @@ - + - + @@ -1031,9 +1031,9 @@ - + - + @@ -1067,7 +1067,7 @@ - + @@ -1120,7 +1120,7 @@ - + @@ -1488,7 +1488,7 @@ - + @@ -1640,7 +1640,7 @@ - + @@ -1788,7 +1788,7 @@ - + @@ -1815,7 +1815,7 @@ - + @@ -3012,9 +3012,9 @@ - + - + @@ -3052,7 +3052,7 @@ - + @@ -3073,12 +3073,12 @@ - + - + @@ -3119,7 +3119,7 @@ - + @@ -3152,7 +3152,7 @@ - + @@ -3166,11 +3166,11 @@ - + - + @@ -3199,7 +3199,7 @@ - + @@ -3223,7 +3223,7 @@ - + @@ -3247,7 +3247,7 @@ - + @@ -3271,7 +3271,7 @@ - + @@ -3295,7 +3295,7 @@ - + @@ -3319,7 +3319,7 @@ - + @@ -3343,7 +3343,7 @@ - + @@ -3367,7 +3367,7 @@ - + @@ -3391,7 +3391,7 @@ - + @@ -3415,7 +3415,7 @@ - + @@ -3439,7 +3439,7 @@ - + @@ -3463,7 +3463,7 @@ - + @@ -3487,7 +3487,7 @@ - + @@ -3511,7 +3511,7 @@ - + @@ -3535,7 +3535,7 @@ - + @@ -3559,7 +3559,7 @@ - + @@ -3583,7 +3583,7 @@ - + @@ -3607,7 +3607,7 @@ - + @@ -3631,7 +3631,7 @@ - + @@ -3655,7 +3655,7 @@ - + @@ -3679,7 +3679,7 @@ - + @@ -3703,7 +3703,7 @@ - + @@ -3727,7 +3727,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -3775,7 +3775,7 @@ - + @@ -3799,7 +3799,7 @@ - + @@ -3823,7 +3823,7 @@ - + @@ -3847,7 +3847,7 @@ - + @@ -4022,8 +4022,8 @@ - - + + @@ -4671,8 +4671,8 @@ - - + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index ef10d5d5..2a7416ce 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1,5 +1,5 @@ - + @@ -34,7 +34,7 @@ - + @@ -1086,6 +1086,41 @@ + + + + 146 + + + + + + + 147 + + + + + + + 148 + + + + + + + 149 + + + + + + + 150 + + + @@ -1113,7 +1148,7 @@ - + @@ -1134,7 +1169,7 @@ - + @@ -1214,7 +1249,7 @@ - + @@ -1255,7 +1290,7 @@ - + @@ -1265,7 +1300,7 @@ - + @@ -1274,7 +1309,7 @@ - + @@ -1282,7 +1317,7 @@ - + @@ -1323,7 +1358,7 @@ - + @@ -1355,7 +1390,7 @@ - + @@ -1388,7 +1423,7 @@ - + @@ -1433,7 +1468,7 @@ - + @@ -1457,7 +1492,7 @@ - + @@ -1481,7 +1516,7 @@ - + @@ -1505,7 +1540,7 @@ - + @@ -1529,7 +1564,7 @@ - + @@ -1553,7 +1588,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 995068e7..6bc27d73 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1,5 +1,5 @@ - + @@ -26,7 +26,7 @@ - + @@ -92,10 +92,10 @@ - + - - + + @@ -240,7 +240,7 @@ - + @@ -739,8 +739,8 @@ - - + + @@ -764,7 +764,7 @@ - + @@ -943,6 +943,24 @@ + + + + + + + + + + + + + + + + + + @@ -976,6 +994,13 @@ + + + + 64 + + + @@ -1029,7 +1054,7 @@ - + @@ -1103,7 +1128,7 @@ - + @@ -1150,6 +1175,16 @@ + + + + + + + + + + @@ -1160,7 +1195,7 @@ - + @@ -1177,7 +1212,7 @@ - + @@ -1201,7 +1236,7 @@ - + @@ -1252,6 +1287,7 @@ + @@ -1268,7 +1304,7 @@ - + @@ -1286,7 +1322,7 @@ - + @@ -1316,7 +1352,7 @@ - + @@ -1337,7 +1373,7 @@ - + @@ -1378,7 +1414,7 @@ - + @@ -1412,7 +1448,14 @@ - + + + + + + + + @@ -1472,6 +1515,13 @@ + + + + + + + @@ -1540,6 +1590,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1570,8 +1644,8 @@ - - + + @@ -1580,7 +1654,7 @@ - + @@ -1595,7 +1669,7 @@ - + @@ -1613,6 +1687,7 @@ + @@ -1654,7 +1729,7 @@ - + @@ -1663,7 +1738,7 @@ - + @@ -1684,7 +1759,7 @@ - + @@ -1745,14 +1820,14 @@ - + - + @@ -1772,7 +1847,7 @@ - + @@ -1822,7 +1897,7 @@ - + @@ -1889,10 +1964,10 @@ - + - - + + @@ -1939,8 +2014,8 @@ - - + + @@ -1949,7 +2024,7 @@ - + @@ -1979,7 +2054,7 @@ - + @@ -2017,7 +2092,7 @@ - + @@ -2151,7 +2226,7 @@ - + @@ -2160,7 +2235,7 @@ - + @@ -2363,7 +2438,7 @@ - + @@ -2501,10 +2576,10 @@ - + - - + + @@ -2512,7 +2587,7 @@ - + @@ -2535,9 +2610,9 @@ - + - + @@ -2577,9 +2652,9 @@ - + - + @@ -2592,9 +2667,9 @@ - + - + @@ -2694,7 +2769,7 @@ - + @@ -2740,8 +2815,8 @@ - - + + @@ -2781,9 +2856,9 @@ - + - + @@ -2857,11 +2932,11 @@ - + - + - + @@ -2921,12 +2996,12 @@ - + - + - - + + @@ -2943,9 +3018,9 @@ - + - + @@ -2963,9 +3038,9 @@ - + - + @@ -3011,7 +3086,7 @@ - + @@ -3036,7 +3111,7 @@ - + @@ -3108,7 +3183,7 @@ - + @@ -3197,7 +3272,7 @@ - + @@ -3225,7 +3300,7 @@ - + @@ -3302,7 +3377,7 @@ - + @@ -3341,7 +3416,7 @@ - + @@ -3349,7 +3424,7 @@ - + @@ -3436,7 +3511,7 @@ - + @@ -3452,7 +3527,7 @@ - + @@ -3487,7 +3562,7 @@ - + @@ -4029,7 +4104,7 @@ - + @@ -4081,6 +4156,7 @@ + @@ -4153,9 +4229,9 @@ - + - + @@ -4214,7 +4290,7 @@ - + @@ -4237,7 +4313,7 @@ - + @@ -4299,7 +4375,7 @@ - + @@ -4314,11 +4390,90 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4331,6 +4486,7 @@ + @@ -4356,6 +4512,13 @@ + + + + + + + @@ -4420,7 +4583,7 @@ - + @@ -4452,14 +4615,14 @@ - + - + @@ -4510,7 +4673,7 @@ - + @@ -4583,7 +4746,7 @@ - + @@ -4616,7 +4779,7 @@ - + @@ -4639,7 +4802,7 @@ - + @@ -4708,7 +4871,7 @@ - + @@ -4725,7 +4888,7 @@ - + @@ -4759,7 +4922,7 @@ - + @@ -4801,7 +4964,7 @@ - + @@ -4994,7 +5157,7 @@ - + @@ -5017,7 +5180,7 @@ - + @@ -5033,7 +5196,7 @@ - + @@ -5074,7 +5237,7 @@ - + @@ -5096,7 +5259,7 @@ - + @@ -5110,7 +5273,7 @@ - + @@ -5125,7 +5288,7 @@ - + @@ -5163,7 +5326,7 @@ - + @@ -5185,7 +5348,7 @@ - + @@ -5199,7 +5362,7 @@ - + @@ -5214,7 +5377,7 @@ - + @@ -5226,147 +5389,489 @@ - + - + - + - + - - + + - - + - + - - - - - - - - - - - - - - - + + - + - - + + - - - + - - - - - + + + + + + + + + + + + + + + + + - - + + - - + - - + + - + - - + - - + + - + - - + + - + - - - - - - - - + - - - - - - - 1 - - - - - - - 2 - - - - - - - + + - + - - + + - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5525,7 +6030,7 @@ - + @@ -5556,10 +6061,18 @@ + + + + + + + + - + @@ -5581,7 +6094,7 @@ - + @@ -5595,7 +6108,7 @@ - + @@ -5623,7 +6136,7 @@ - + @@ -5693,7 +6206,7 @@ - + @@ -5763,6 +6276,13 @@ + + + + + + + @@ -5952,7 +6472,7 @@ - + @@ -5976,7 +6496,7 @@ - + @@ -6016,6 +6536,20 @@ + + + + + + + + + + + + + + @@ -6048,6 +6582,20 @@ + + + + + + + + + + + + + + @@ -6115,7 +6663,7 @@ - + @@ -6123,7 +6671,7 @@ - + @@ -6151,7 +6699,7 @@ - + @@ -6210,7 +6758,7 @@ - + @@ -6227,7 +6775,7 @@ - + @@ -6270,7 +6818,7 @@ - + @@ -6278,7 +6826,7 @@ - + @@ -6306,7 +6854,7 @@ - + @@ -6424,7 +6972,7 @@ - + @@ -6535,6 +7083,13 @@ + + + + + + + @@ -6620,7 +7175,7 @@ - + @@ -6639,7 +7194,7 @@ - + @@ -6649,7 +7204,7 @@ - + @@ -6728,6 +7283,13 @@ + + + + 512 + + + @@ -6750,7 +7312,7 @@ - + @@ -6778,7 +7340,7 @@ - + @@ -6795,7 +7357,7 @@ - + @@ -6811,7 +7373,7 @@ - + @@ -6830,7 +7392,7 @@ - + @@ -6845,7 +7407,7 @@ - + @@ -6882,7 +7444,7 @@ - + @@ -6890,7 +7452,7 @@ - + @@ -6904,7 +7466,7 @@ - + @@ -6973,7 +7535,7 @@ - + @@ -7005,7 +7567,7 @@ - + @@ -7058,7 +7620,7 @@ - + @@ -7066,7 +7628,7 @@ - + @@ -7119,7 +7681,7 @@ - + @@ -7143,7 +7705,7 @@ - + @@ -7167,7 +7729,7 @@ - + @@ -7191,7 +7753,7 @@ - + @@ -7215,7 +7777,7 @@ - + @@ -7239,7 +7801,7 @@ - + @@ -7263,7 +7825,7 @@ - + @@ -7287,7 +7849,7 @@ - + @@ -7311,7 +7873,7 @@ - + @@ -7331,19 +7893,379 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - + @@ -7352,22 +8274,22 @@ - - + + - + - - + + - + - - + + - + @@ -7376,22 +8298,22 @@ - - + + - + - - + + - + - - + + - + @@ -7400,22 +8322,22 @@ - - + + - + - - + + - + - - + + - + @@ -7424,22 +8346,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7448,22 +8370,22 @@ - - + + - + - - + + - + - - + + - + @@ -7472,22 +8394,22 @@ - - + + - + - - + + - + - - + + - + @@ -7496,22 +8418,22 @@ - - + + - + - - + + - + - - + + - + @@ -7520,22 +8442,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7544,22 +8466,22 @@ - - + + - + - - + + - + - - + + - + @@ -7568,22 +8490,22 @@ - - + + - + - - + + - + - - + + - + @@ -7592,22 +8514,22 @@ - - + + - + - - + + - + - - + + - + @@ -7616,22 +8538,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7640,22 +8562,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7664,22 +8586,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7688,22 +8610,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7712,22 +8634,22 @@ - - + + - + - - + + - + - - + + - + @@ -7736,22 +8658,22 @@ - - + + - + - - + + - + - - + + - + @@ -7760,22 +8682,22 @@ - - + + - + - - + + - + - - + + - + @@ -7784,22 +8706,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7808,22 +8730,22 @@ - - + + - + - - + + - + - - + + - + @@ -7832,22 +8754,22 @@ - - + + - + - - + + - + - - + + - + @@ -7856,22 +8778,22 @@ - - + + - + - - + + - + - - + + - + @@ -7880,22 +8802,22 @@ - - + + - + - - + + - + - - + + - + @@ -7904,22 +8826,22 @@ - - + + - + - - + + - + - - + + - + @@ -7928,22 +8850,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7952,22 +8874,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -7976,22 +8898,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8000,22 +8922,22 @@ - - + + - + - - + + - + - - + + - + @@ -8024,22 +8946,22 @@ - - + + - + - - + + - + - - + + - + @@ -8048,22 +8970,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8072,22 +8994,22 @@ - - + + - + - - + + - + - - + + - + @@ -8096,22 +9018,22 @@ - - + + - + - - + + - + - - + + - + @@ -8120,22 +9042,22 @@ - - + + - + - - + + - + - - + + - + @@ -8144,22 +9066,22 @@ - - + + - + - - + + - + - - + + - + @@ -8168,22 +9090,22 @@ - - + + - + - - + + - + - - + + - + @@ -8192,22 +9114,22 @@ - - + + - + - - + + - + - - + + - + @@ -8216,22 +9138,22 @@ - - + + - + - - + + - + - - + + - + @@ -8240,22 +9162,22 @@ - - + + - + - - + + - + - - + + - + @@ -8264,22 +9186,22 @@ - - + + - + - - + + - + - - + + - + @@ -8288,22 +9210,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8312,22 +9234,22 @@ - - + + - + - - + + - - + + - - + + - + @@ -8336,22 +9258,22 @@ - - + + - + - - + + - + - - + + - + @@ -8360,22 +9282,22 @@ - - + + - + - - + + - + - - + + - + @@ -8384,22 +9306,22 @@ - - + + - + - - + + - + - - + + - + @@ -8408,22 +9330,22 @@ - - + + - + - - + + - + - - + + - + @@ -8432,22 +9354,22 @@ - - + + - + - - + + - + - - + + - + @@ -8456,22 +9378,22 @@ - - + + - + - - + + - + - - + + - + @@ -8480,22 +9402,22 @@ - - + + - + - - + + - + - - + + - + @@ -8504,22 +9426,22 @@ - - + + - + - - + + - + - - + + - + @@ -8528,22 +9450,22 @@ - - + + - + - - + + - + - - + + - + @@ -8552,22 +9474,22 @@ - - + + - + - - + + - + - - + + - + @@ -8576,22 +9498,22 @@ - - + + - + - - + + - + - - + + - + @@ -8600,22 +9522,22 @@ - - + + - + - - + + - + - - + + - + @@ -8624,22 +9546,22 @@ - - + + - + - - + + - + - - + + - + @@ -8648,22 +9570,22 @@ - - + + - + - - + + - + - - + + - + @@ -8672,22 +9594,22 @@ - - + + - + - - + + - + - - + + - + @@ -8696,22 +9618,22 @@ - - + + - + - - + + - + - - + + - + @@ -8720,22 +9642,22 @@ - - + + - + - - + + - + - - + + - + @@ -8744,22 +9666,22 @@ - - + + - + - - + + - + - - + + - + @@ -8768,22 +9690,22 @@ - - + + - + - - + + - + - - + + - + @@ -8792,22 +9714,22 @@ - - + + - + - - + + - + - - + + - + @@ -8816,22 +9738,22 @@ - - + + - + - - + + - + - - + + - + @@ -8840,22 +9762,22 @@ - - + + - + - - + + - + - - + + - + @@ -8864,22 +9786,22 @@ - - + + - + - - + + - + - - + + - + @@ -8888,22 +9810,22 @@ - - + + - + - - + + - + - - + + - + @@ -8912,22 +9834,22 @@ - - + + - + - - + + - + - - + + - + @@ -8936,22 +9858,22 @@ - - + + - + - - + + - + - - + + - + @@ -8960,22 +9882,22 @@ - - + + - + - - + + - + - - + + - + @@ -8984,22 +9906,22 @@ - - + + - + - - + + - + - - + + - + @@ -9008,22 +9930,22 @@ - - + + - + - - + + - + - - + + - + @@ -9032,22 +9954,22 @@ - - + + - + - - + + - + - - + + - + @@ -9056,22 +9978,22 @@ - - + + - + - - + + - + - - + + - + @@ -9080,22 +10002,22 @@ - - + + - + - - + + - + - - + + - + @@ -9104,22 +10026,22 @@ - - + + - + - - + + - + - - + + - + @@ -9128,16 +10050,16 @@ - - + + - + - - + + - + @@ -9159,7 +10081,7 @@ - + @@ -9183,7 +10105,7 @@ - + @@ -9207,7 +10129,7 @@ - + @@ -9231,7 +10153,7 @@ - + @@ -9255,7 +10177,7 @@ - + @@ -9279,7 +10201,7 @@ - + @@ -9303,7 +10225,7 @@ - + @@ -9327,7 +10249,7 @@ - + @@ -9351,7 +10273,7 @@ - + @@ -9375,7 +10297,7 @@ - + @@ -9399,7 +10321,7 @@ - + @@ -9423,7 +10345,7 @@ - + @@ -9447,7 +10369,7 @@ - + @@ -9471,7 +10393,7 @@ - + @@ -9495,7 +10417,7 @@ - + @@ -9519,7 +10441,7 @@ - + @@ -9543,7 +10465,7 @@ - + @@ -9567,7 +10489,7 @@ - + @@ -9591,7 +10513,7 @@ - + @@ -9615,7 +10537,7 @@ - + @@ -9639,7 +10561,7 @@ - + @@ -9663,7 +10585,7 @@ - + @@ -9687,7 +10609,7 @@ - + @@ -9711,7 +10633,7 @@ - + @@ -9735,7 +10657,7 @@ - + @@ -9759,7 +10681,7 @@ - + @@ -9783,7 +10705,7 @@ - + @@ -9807,7 +10729,7 @@ - + @@ -9831,7 +10753,7 @@ - + @@ -9855,7 +10777,7 @@ - + @@ -9879,7 +10801,7 @@ - + @@ -9903,7 +10825,7 @@ - + @@ -9927,7 +10849,7 @@ - + @@ -9951,7 +10873,7 @@ - + @@ -9975,7 +10897,7 @@ - + @@ -9999,7 +10921,7 @@ - + @@ -10023,7 +10945,7 @@ - + @@ -10047,7 +10969,7 @@ - + @@ -10071,7 +10993,7 @@ - + @@ -10095,7 +11017,7 @@ - + @@ -10119,7 +11041,7 @@ - + @@ -10449,6 +11371,18 @@ + + + + + + + + + + + + @@ -10635,6 +11569,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12127,6 +13139,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12840,6 +13898,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13786,7 +15143,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 836af773..f5596187 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -1,5 +1,5 @@ - + @@ -246,7 +246,7 @@ - + @@ -998,7 +998,7 @@ - + @@ -1254,7 +1254,7 @@ - + @@ -1646,19 +1646,19 @@ - + - + - - + + - + @@ -2089,7 +2089,7 @@ - + @@ -2275,7 +2275,7 @@ - + @@ -2354,7 +2354,7 @@ - + @@ -2417,7 +2417,7 @@ - + @@ -2992,7 +2992,7 @@ - + @@ -3418,7 +3418,7 @@ - + @@ -3654,7 +3654,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -4141,7 +4141,7 @@ - + @@ -4211,7 +4211,7 @@ - + @@ -4252,7 +4252,7 @@ - + @@ -4272,7 +4272,7 @@ - + @@ -4325,7 +4325,7 @@ - + @@ -4349,7 +4349,7 @@ - + @@ -4420,7 +4420,7 @@ - + From 28dc054a9f8f08d2f83746113f7a83ed1a8ccc2c Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Mon, 4 Sep 2023 14:43:24 +0800 Subject: [PATCH 24/55] v13.0.17 --- HISTORY.rst | 10 +- bingads/manifest.py | 2 +- bingads/v13/bulk/entities/bulk_ads.py | 42 +- bingads/v13/bulk/entities/bulk_campaign.py | 30 +- .../entities/target_criterions/__init__.py | 2 + .../bulk_ad_group_genre_criterion.py | 52 ++ .../bulk_campaign_deal_criterion.py | 50 + .../v13/internal/bulk/bulk_object_factory.py | 2 + bingads/v13/internal/bulk/csv_headers.py | 2 + bingads/v13/internal/bulk/string_table.py | 10 +- bingads/v13/internal/extensions.py | 34 +- .../internal/reporting/row_report_header.py | 2 +- .../proxies/production/adinsight_service.xml | 23 +- .../v13/proxies/production/bulk_service.xml | 28 + .../production/campaignmanagement_service.xml | 860 ++++++++++++------ .../production/customerbilling_service.xml | 186 ++++ .../production/customermanagement_service.xml | 7 + .../proxies/production/reporting_service.xml | 80 ++ .../v13/proxies/sandbox/adinsight_service.xml | 23 +- bingads/v13/proxies/sandbox/bulk_service.xml | 28 + .../sandbox/campaignmanagement_service.xml | 860 ++++++++++++------ .../sandbox/customerbilling_service.xml | 186 ++++ .../sandbox/customermanagement_service.xml | 7 + .../v13/proxies/sandbox/reporting_service.xml | 80 ++ bingads/v13/reporting/reporting_operation.py | 49 +- setup.py | 2 +- 26 files changed, 2067 insertions(+), 590 deletions(-) create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py create mode 100644 bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py diff --git a/HISTORY.rst b/HISTORY.rst index 7c142e36..d773bafc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,13 +1,21 @@ .. :changelog: Release History +13.0.17(2023-08-18) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. +* Added bulk mapping for new Criterion i.e., BulkCampaignDealCriterion, BulkAdGroupGenreCriterion. +* Added mappings for new fields in BulkCampaign: DestinationChannel and IsMultiChannelCampaign. +* Added mappings for new fields in BulkResponsiveAd: VerifiedTrackingDatas. +* Added mappings for new fields in ImageAsset: TargetWidth and TargetHeight. +* Fixed issue: https://github.com/BingAds/BingAds-Python-SDK/issues/250. + 13.0.16(2023-06-02) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://docs.microsoft.com/en-us/bingads/guides/release-notes. * Add bulk mappings for performance max campaign i.e., BulkAssetGroup, BulkAssetGroupListingGroup, BulkAudienceGroup, BulkAudienceGroupAssetGroupAssociation, BulkCampaignNegativeWebPage. * Add mappings for new fields in BulkCampaign: UrlExpansionOptOut. * Support new bidding scheme: ManualCpaScheme and CostPerSaleBiddingScheme. -* get rid of six/future as we support python3 only. Refer to https://github.com/BingAds/BingAds-Python-SDK/issues/233. 13.0.15(2022-12-23) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index 0790b948..199ce303 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.16' +VERSION = '13.0.17' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/bulk_ads.py b/bingads/v13/bulk/entities/bulk_ads.py index 51aee7e9..bb222667 100644 --- a/bingads/v13/bulk/entities/bulk_ads.py +++ b/bingads/v13/bulk/entities/bulk_ads.py @@ -13,7 +13,6 @@ ResponsiveSearchAd = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ResponsiveSearchAd')) ResponsiveAd = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ResponsiveAd')) - class _BulkAd(_SingleRecordBulkEntity): """ This abstract base class provides properties that are shared by all bulk ad classes. @@ -40,7 +39,21 @@ def __init__(self, self._ad_group_name = ad_group_name self._ad = ad self._performance_data = None + self._editorial_appeal_status = None + + @property + def editorial_appeal_status(self): + """ The editorial appeal status of the ad. + + :rtype: str + """ + return self._editorial_appeal_status + + @editorial_appeal_status.setter + def editorial_appeal_status(self, editorial_appeal_status): + self._editorial_appeal_status = editorial_appeal_status + @property def ad_group_id(self): """ The identifier of the ad group that contains the ad. @@ -164,6 +177,11 @@ def ad(self, ad): header=_StringTable.FinalUrlSuffix, field_to_csv=lambda c: bulk_optional_str(c.ad.FinalUrlSuffix, c.ad.Id), csv_to_field=lambda c, v: setattr(c.ad, 'FinalUrlSuffix', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.EditorialAppealStatus, + field_to_csv=lambda c: c.editorial_appeal_status, + csv_to_field=lambda c, v: setattr(c, '_editorial_appeal_status', v) ) ] @@ -599,6 +617,7 @@ def __init__(self, ad, ) self._ad = ad + self._verified_tracking_data = None @property def responsive_ad(self): @@ -613,7 +632,21 @@ def responsive_ad(self): def responsive_ad(self, responsive_ad): if responsive_ad is not None and not isinstance(responsive_ad, ResponsiveAd): raise ValueError('Not an instance of ResponsiveAd') - self._ad = responsive_ad + self._ad = responsive_ad + + @property + def verified_tracking_data(self): + """ + The verified tracking data that the ad associated + + Corresponds to 'Verified Tracking Setting' field in bulk file. + :rtype: ArrayOfArrayOfKeyValuePairOfstringstring + """ + return self._verified_tracking_data + + @verified_tracking_data.setter + def verified_tracking_data(self, value): + self._verified_tracking_data = value _MAPPINGS = [ _SimpleBulkMapping( @@ -676,6 +709,11 @@ def responsive_ad(self, responsive_ad): field_to_csv=lambda c: field_to_csv_TextAssetLinks(c.responsive_ad.LongHeadlines), csv_to_field=lambda c, v: csv_to_field_TextAssetLinks(c.responsive_ad.LongHeadlines ,v) ), + _SimpleBulkMapping( + header=_StringTable.Details, + field_to_csv=lambda c: to_verified_tracking_setting_string(c.verified_tracking_data), + csv_to_field=lambda c, v: setattr(c, 'verified_tracking_data', parse_verified_tracking_setting(v) if v else None) + ), ] def process_mappings_from_row_values(self, row_values): diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index c5e3ef3c..3ddc712a 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -39,6 +39,8 @@ def __init__(self, account_id=None, campaign=None): self._budget_name = None self._bid_strategy_name = None self._verified_tracking_data = None + self._destination_channel = None + self._is_multi_channel_campaign = None @property def account_id(self): @@ -119,6 +121,22 @@ def quality_score_data(self): return self._quality_score_data + @property + def destination_channel(self): + return self._destination_channel + + @destination_channel.setter + def destination_channel(self, value): + self._destination_channel = value + + @property + def is_multi_channel_campaign(self): + return self._is_multi_channel_campaign + + @is_multi_channel_campaign.setter + def is_multi_channel_campaign(self, value): + self._is_multi_channel_campaign = value + def _get_dynamic_feed_setting(self): return self._get_setting(_DynamicFeedSetting, 'DynamicFeedSetting') @@ -625,7 +643,17 @@ def _write_website(c): header=_StringTable.Details, field_to_csv=lambda c: to_verified_tracking_setting_string(c.verified_tracking_data), csv_to_field=lambda c, v: setattr(c, 'verified_tracking_data', parse_verified_tracking_setting(v) if v else None) - ) + ), + _SimpleBulkMapping( + header=_StringTable.DestinationChannel, + field_to_csv=lambda c: c.destination_channel, + csv_to_field=lambda c, v: setattr(c, 'destination_channel', v) + ), + _SimpleBulkMapping( + header=_StringTable.IsMultiChannelCampaign, + field_to_csv=lambda c: field_to_csv_bool(c.is_multi_channel_campaign), + csv_to_field=lambda c, v: setattr(c, 'is_multi_channel_campaign', parse_bool(v)) + ), ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/bulk/entities/target_criterions/__init__.py b/bingads/v13/bulk/entities/target_criterions/__init__.py index 5bea6dff..dafefb08 100644 --- a/bingads/v13/bulk/entities/target_criterions/__init__.py +++ b/bingads/v13/bulk/entities/target_criterions/__init__.py @@ -18,6 +18,7 @@ from .bulk_campaign_age_criterion import * from .bulk_campaign_biddable_criterion import * from .bulk_campaign_day_time_criterion import * +from .bulk_campaign_deal_criterion import * from .bulk_campaign_device_criterion import * from .bulk_campaign_gender_criterion import * from .bulk_campaign_location_criterion import * @@ -31,3 +32,4 @@ from .bulk_ad_group_hotel_check_in_day_criterion import * from .bulk_ad_group_hotel_date_selection_type_criterion import * from .bulk_ad_group_hotel_length_of_stay_criterion import * +from .bulk_ad_group_genre_criterion import * diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py new file mode 100644 index 00000000..0d4fd59c --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.py @@ -0,0 +1,52 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + + +class BulkAdGroupGenreCriterion(BulkAdGroupBiddableCriterion): + """ Represents an Ad Group Genre Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the + Ad Group Genre Criterion record in a bulk file. + + For more information, see Ad Group Genre Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_ad_group_criterion=None, + campaign_name=None, + ad_group_name=None, ): + super(BulkAdGroupGenreCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.Target, + field_to_csv=lambda c: field_to_csv_GenreId(c.biddable_ad_group_criterion), + csv_to_field=lambda c, v: csv_to_field_GenreId(c.biddable_ad_group_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenreCriterion') + self._biddable_ad_group_criterion.Criterion.Type = 'GenreCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkAdGroupGenreCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAdGroupGenreCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkAdGroupGenreCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAdGroupGenreCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAdGroupGenreCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py new file mode 100644 index 00000000..585e827d --- /dev/null +++ b/bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.py @@ -0,0 +1,50 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.bulk.entities.target_criterions.bulk_campaign_biddable_criterion import BulkCampaignBiddableCriterion +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * + +class BulkCampaignDealCriterion(BulkCampaignBiddableCriterion): + """ Represents an Campaign Deal Criterion that can be read or written in a bulk file. + + This class exposes the :attr:`biddable_campaign_criterion` property that can be read and written as fields of the + Campaign Deal Criterion record in a bulk file. + + For more information, see Campaign Deal Criterion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + biddable_campaign_criterion=None, + campaign_name=None, ): + super(BulkCampaignDealCriterion, self).__init__(biddable_campaign_criterion, campaign_name) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.Target, + field_to_csv=lambda c: field_to_csv_DealTarget(c.biddable_campaign_criterion), + csv_to_field=lambda c, v: csv_to_field_DealTarget(c.biddable_campaign_criterion, v) + ) + ] + + def create_criterion(self): + self._biddable_campaign_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DealCriterion') + self._biddable_campaign_criterion.Criterion.Type = 'DealCriterion' + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + super(BulkCampaignDealCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkCampaignDealCriterion._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + super(BulkCampaignDealCriterion, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkCampaignDealCriterion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkCampaignDealCriterion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 94b42ba9..837804ae 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -149,6 +149,7 @@ class _BulkObjectFactory(): _StringTable.CampaignCompanyNameCriterion: _EntityInfo(lambda: BulkCampaignCompanyNameCriterion()), _StringTable.CampaignJobFunctionCriterion: _EntityInfo(lambda: BulkCampaignJobFunctionCriterion()), _StringTable.CampaignIndustryCriterion: _EntityInfo(lambda: BulkCampaignIndustryCriterion()), + _StringTable.CampaignDealCriterion: _EntityInfo(lambda: BulkCampaignDealCriterion()), _StringTable.CombinedList: _EntityInfo(lambda: BulkCombinedList()), _StringTable.CustomerList: _EntityInfo(lambda: BulkCustomerList()), _StringTable.CustomerListItem: _EntityInfo(lambda: BulkCustomerListItem()), @@ -173,6 +174,7 @@ class _BulkObjectFactory(): _StringTable.AdGroupNegativeGenderCriterion: _EntityInfo(lambda: BulkAdGroupNegativeGenderCriterion()), _StringTable.AdGroupNegativeIndustryCriterion: _EntityInfo(lambda: BulkAdGroupNegativeIndustryCriterion()), _StringTable.AdGroupNegativeJobFunctionCriterion: _EntityInfo(lambda: BulkAdGroupNegativeJobFunctionCriterion()), + _StringTable.AdGroupGenreCriterion: _EntityInfo(lambda: BulkAdGroupGenreCriterion()), _StringTable.Label: _EntityInfo(lambda: BulkLabel()), _StringTable.CampaignLabel: _EntityInfo(lambda: BulkCampaignLabel()), _StringTable.AdGroupLabel: _EntityInfo(lambda: BulkAdGroupLabel()), diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 30ec085a..27266d2c 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -27,6 +27,8 @@ class _CsvHeaders: _StringTable.BudgetType, _StringTable.BudgetName, _StringTable.BudgetId, + _StringTable.DestinationChannel, + _StringTable.IsMultiChannelCampaign, # AdGroup _StringTable.StartDate, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index a3d824ae..4307976d 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -532,7 +532,7 @@ class _StringTable: AdGroupNegativeGenderCriterion = "Ad Group Negative Gender Criterion" AdGroupNegativeIndustryCriterion = "Ad Group Negative Industry Criterion" AdGroupNegativeJobFunctionCriterion = "Ad Group Negative Job Function Criterion" - + AdGroupGenreCriterion = "Ad Group Genre Criterion" # Responsive Ad ResponsiveAd = "Responsive Ad" @@ -606,6 +606,7 @@ class _StringTable: CampaignCompanyNameCriterion = 'Campaign Company Name Criterion' CampaignJobFunctionCriterion = 'Campaign Job Function Criterion' CampaignIndustryCriterion = 'Campaign Industry Criterion' + CampaignDealCriterion = 'Campaign Deal Criterion' # Online Conversion OnlineConversionAdjustment = "Online Conversion Adjustment" @@ -633,7 +634,7 @@ class _StringTable: # Campaign Conversion Goal CampaignConversionGoal = "Campaign Conversion Goal" GoalId = "Goal Id" - + # PMax AssetGroup = "Asset Group" AudienceGroup = "Audience Group" @@ -645,3 +646,8 @@ class _StringTable: AgeRanges = "Age Ranges" GenderTypes = "Gender Types" ParentListingGroupId = "Parent Listing Group Id" + + # MultiChannel Campaign + DestinationChannel = "Destination Channel" + IsMultiChannelCampaign = "Is Multi Channel Campaign" + diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 341969c8..82f95bfc 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -41,12 +41,14 @@ GenderCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenderCriterion') HotelAdvanceBookingWindowCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelAdvanceBookingWindowCriterion') HotelCheckInDateCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDateCriterion') +GenreCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenreCriterion') HotelCheckInDayCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelCheckInDayCriterion') HotelDateSelectionTypeCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelDateSelectionTypeCriterion') HotelLengthOfStayCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('HotelLengthOfStayCriterion') LocationCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('LocationCriterion') LocationIntentCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('LocationIntentCriterion') RadiusCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('RadiusCriterion') +DealCriterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DealCriterion') TargetSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetSetting')) HotelSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('HotelSetting')) CoOpSetting_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CoOpSetting')) @@ -249,7 +251,7 @@ def entity_biddingscheme_to_csv(entity, row_values): elif bid_strategy_type == 'TargetImpressionShare': row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) row_values[_StringTable.BidStrategyTargetAdPosition] = bulk_optional_str(entity.BiddingScheme.TargetAdPosition, entity.Id) - row_values[_StringTable.TargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) + row_values[_StringTable.BidStrategyTargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) elif bid_strategy_type == 'PercentCpc': row_values[_StringTable.BidStrategyPercentMaxCpc] = bulk_str(entity.BiddingScheme.MaxPercentCpc) elif bid_strategy_type == 'Commission': @@ -623,6 +625,8 @@ def field_to_csv_VideoAssetLinks(assetLinks): contract['thumbnailImage']['cropY'] = thumbnailImage.CropY contract['thumbnailImage']['cropWidth'] = thumbnailImage.CropWidth contract['thumbnailImage']['cropHeight'] = thumbnailImage.CropHeight + contract['thumbnailImage']['targetWidth'] = thumbnailImage.TargetWidth + contract['thumbnailImage']['targetHeight'] = thumbnailImage.TargetHeight assetLinkContracts.append(contract) if len(assetLinkContracts) > 0: return json.dumps(assetLinkContracts, sort_keys = True) @@ -656,6 +660,8 @@ def csv_to_field_VideoAssetLinks(assetLinks, value): asset_link.Asset.ThumbnailImage.CropY = thumbnailImageContract.get('cropY') asset_link.Asset.ThumbnailImage.CropWidth = thumbnailImageContract.get('cropWidth') asset_link.Asset.ThumbnailImage.CropHeight = thumbnailImageContract.get('cropHeight') + asset_link.Asset.ThumbnailImage.TargetWidth = thumbnailImageContract.get('targetWidth') + asset_link.Asset.ThumbnailImage.TargetHeight = thumbnailImageContract.get('targetHeight') assetLinks.AssetLink.append(asset_link) @@ -694,6 +700,8 @@ def field_to_csv_ImageAssetLinks(entity): contract['assetPerformanceLabel'] = assetLink.AssetPerformanceLabel if hasattr(assetLink, 'AssetPerformanceLabel') else None contract['editorialStatus'] = assetLink.EditorialStatus if hasattr(assetLink, 'EditorialStatus') else None contract['pinnedField'] = assetLink.PinnedField if hasattr(assetLink, 'PinnedField') else None + contract['targetWidth'] = assetLink.TargetWidth if hasattr(assetLink, 'TargetWidth') else None + contract['targetHeight'] = assetLink.TargetHeight if hasattr(assetLink, 'TargetHeight') else None assetLinkContracts.append(contract) if len(assetLinkContracts) > 0: return json.dumps(assetLinkContracts) @@ -717,6 +725,8 @@ def csv_to_field_ImageAssetLinks(assetLinks, value): asset_link.AssetPerformanceLabel = assetLinkContract.get('assetPerformanceLabel') asset_link.PinnedField = assetLinkContract.get('pinnedField') asset_link.EditorialStatus = assetLinkContract.get('editorialStatus') + asset_link.TargetWidth = assetLinkContract.get('targetWidth') + asset_link.TargetHeight = assetLinkContract.get('targetHeight') assetLinks.AssetLink.append(asset_link) def field_to_csv_TextAssetLinks(entity): @@ -1464,6 +1474,17 @@ def csv_to_field_StartDate(entity, value): if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(HotelCheckInDateCriterion)): setattr(entity.Criterion, "StartDate", parse_datetime(value)) +def field_to_csv_GenreId(entity): + if entity is None or entity.Criterion is None or entity.Criterion.GenreId is None: + return None + return bulk_str(entity.Criterion.GenreId) + +def csv_to_field_GenreId(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(GenreCriterion)): + setattr(entity.Criterion, "GenreId", int(value) if value else None) + def field_to_csv_EndDate(entity): if entity is None or entity.Criterion is None or entity.Criterion.EndDate is None: return None @@ -1585,6 +1606,17 @@ def csv_to_field_Radius(entity, value): if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(RadiusCriterion)): setattr(entity.Criterion, "Radius", value) +def field_to_csv_DealTarget(entity): + if entity is None or entity.Criterion is None or entity.Criterion.DealId is None: + return None + return str(entity.Criterion.DealId) + +def csv_to_field_DealTarget(entity, value): + if value is None or value == '': + return + if entity is not None and entity.Criterion is not None and isinstance(entity.Criterion,type(DealCriterion)): + setattr(entity.Criterion, "DealId", int(value)) + def field_to_csv_RadiusUnit(entity): if entity is None or entity.Criterion is None or entity.Criterion.RadiusUnit is None: return None diff --git a/bingads/v13/internal/reporting/row_report_header.py b/bingads/v13/internal/reporting/row_report_header.py index 4cf2e996..3acd6da2 100644 --- a/bingads/v13/internal/reporting/row_report_header.py +++ b/bingads/v13/internal/reporting/row_report_header.py @@ -64,7 +64,7 @@ def set_report_time(self, report_time): self._report_time_end = datetime.strptime(time_array[0], '%m/%d/%Y') if time_array[0] else None elif len(time_array) == 2: self._report_time_start = datetime.strptime(time_array[0], '%m/%d/%Y') if time_array[0] else None - self._report_time_end = datetime.strptime(time_array[0], '%m/%d/%Y') if time_array[1] else None + self._report_time_end = datetime.strptime(time_array[1], '%m/%d/%Y') if time_array[1] else None @property def last_completed_available_date(self): diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index 048afd96..9d29651b 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3042,6 +3042,16 @@ + + + + + + + + + + @@ -3166,19 +3176,6 @@ - - - - - - - - - - - - - diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 9cd8e8e7..c1140430 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1121,6 +1121,34 @@ + + + + 151 + + + + + + + 152 + + + + + + + 153 + + + + + + + 154 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 8bc21086..ad4229b8 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -257,6 +257,13 @@ + + + + + + + @@ -677,6 +684,20 @@ + + + + + + + + + + + + + + @@ -703,6 +724,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -739,8 +957,8 @@ - - + + @@ -764,7 +982,7 @@ - + @@ -1012,179 +1230,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1288,6 +1333,9 @@ + + + @@ -1881,6 +1929,7 @@ + @@ -2149,6 +2198,13 @@ + + + + 5 + + + @@ -3755,6 +3811,13 @@ + + + + 134217728 + + + @@ -3816,6 +3879,13 @@ + + + + + + + @@ -4213,6 +4283,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -5588,6 +5678,7 @@ + @@ -5645,21 +5736,67 @@ - + + + + + + + + + + + + + + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5704,7 +5841,7 @@ - + @@ -5719,7 +5856,7 @@ - + @@ -5749,14 +5886,14 @@ - + - + @@ -6030,7 +6167,7 @@ - + @@ -6064,15 +6201,59 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6094,7 +6275,7 @@ - + @@ -6108,7 +6289,7 @@ - + @@ -6133,10 +6314,24 @@ + + + + + + + + + + + + + + - + @@ -6206,7 +6401,7 @@ - + @@ -6237,6 +6432,7 @@ + @@ -6472,7 +6668,7 @@ - + @@ -6496,7 +6692,7 @@ - + @@ -6663,7 +6859,7 @@ - + @@ -6671,7 +6867,7 @@ - + @@ -6699,7 +6895,7 @@ - + @@ -6758,7 +6954,7 @@ - + @@ -6775,7 +6971,7 @@ - + @@ -6818,7 +7014,7 @@ - + @@ -6826,7 +7022,7 @@ - + @@ -6854,7 +7050,7 @@ - + @@ -6972,7 +7168,7 @@ - + @@ -7027,6 +7223,13 @@ + + + + + + + @@ -7113,6 +7316,13 @@ + + + + + + + @@ -7175,7 +7385,7 @@ - + @@ -7194,7 +7404,7 @@ - + @@ -7204,7 +7414,7 @@ - + @@ -7290,6 +7500,20 @@ + + + + 1024 + + + + + + + 2048 + + + @@ -7312,7 +7536,7 @@ - + @@ -7340,7 +7564,7 @@ - + @@ -7357,7 +7581,7 @@ - + @@ -7373,7 +7597,7 @@ - + @@ -7392,7 +7616,7 @@ - + @@ -7407,7 +7631,7 @@ - + @@ -7444,7 +7668,7 @@ - + @@ -7452,7 +7676,7 @@ - + @@ -7466,7 +7690,7 @@ - + @@ -7542,6 +7766,12 @@ + + + + + + @@ -7560,12 +7790,6 @@ - - - - - - @@ -9966,6 +10190,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -9985,7 +10233,7 @@ - + @@ -10009,7 +10257,7 @@ - + @@ -10033,7 +10281,7 @@ - + @@ -10057,7 +10305,7 @@ - + @@ -10081,7 +10329,7 @@ - + @@ -10105,7 +10353,7 @@ - + @@ -10129,7 +10377,7 @@ - + @@ -10153,11 +10401,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10177,7 +10449,7 @@ - + @@ -10201,7 +10473,7 @@ - + @@ -10225,7 +10497,7 @@ - + @@ -10249,7 +10521,7 @@ - + @@ -10273,7 +10545,7 @@ - + @@ -10297,7 +10569,7 @@ - + @@ -10321,7 +10593,7 @@ - + @@ -10345,7 +10617,7 @@ - + @@ -10369,7 +10641,7 @@ - + @@ -10393,7 +10665,7 @@ - + @@ -10417,7 +10689,7 @@ - + @@ -10441,7 +10713,7 @@ - + @@ -10465,7 +10737,7 @@ - + @@ -10489,7 +10761,7 @@ - + @@ -10513,7 +10785,7 @@ - + @@ -10537,7 +10809,7 @@ - + @@ -10561,7 +10833,7 @@ - + @@ -10585,7 +10857,7 @@ - + @@ -10609,7 +10881,7 @@ - + @@ -10633,7 +10905,7 @@ - + @@ -10657,7 +10929,7 @@ - + @@ -10681,7 +10953,7 @@ - + @@ -10705,7 +10977,7 @@ - + @@ -10729,7 +11001,7 @@ - + @@ -10753,7 +11025,7 @@ - + @@ -10777,7 +11049,7 @@ - + @@ -10801,7 +11073,7 @@ - + @@ -10825,7 +11097,7 @@ - + @@ -10849,7 +11121,7 @@ - + @@ -10873,7 +11145,7 @@ - + @@ -10897,7 +11169,7 @@ - + @@ -10921,7 +11193,7 @@ - + @@ -10945,7 +11217,7 @@ - + @@ -10969,7 +11241,7 @@ - + @@ -10993,7 +11265,7 @@ - + @@ -11017,7 +11289,7 @@ - + @@ -11041,7 +11313,7 @@ - + @@ -11623,6 +11895,12 @@ + + + + + + @@ -11671,6 +11949,12 @@ + + + + + + @@ -14105,6 +14389,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -14289,6 +14596,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 978767b6..dae875c5 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -176,6 +176,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -518,6 +549,7 @@ + @@ -534,6 +566,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -619,6 +701,12 @@ + + + + + + @@ -825,6 +913,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -882,6 +1014,18 @@ + + + + + + + + + + + + @@ -1081,6 +1225,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 49947f1e..73db11b7 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -1829,6 +1829,13 @@ + + + + 2052 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index b0e85c49..6df095a0 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -176,6 +176,12 @@ + + + + + + @@ -945,6 +951,12 @@ + + + + + + @@ -1393,6 +1405,12 @@ + + + + + + @@ -2083,6 +2101,9 @@ + + + @@ -2168,6 +2189,10 @@ + + + + @@ -2176,11 +2201,24 @@ + + + + + + + + + + + + + @@ -3109,6 +3147,16 @@ + + + + + + + + + + @@ -3117,6 +3165,7 @@ + @@ -3220,6 +3269,10 @@ + + + + @@ -3228,6 +3281,7 @@ + @@ -3317,6 +3371,10 @@ + + + + @@ -3325,6 +3383,7 @@ + @@ -3406,6 +3465,9 @@ + + + @@ -3415,6 +3477,7 @@ + @@ -3458,6 +3521,9 @@ + + + @@ -3500,6 +3566,10 @@ + + + + @@ -3507,6 +3577,7 @@ + @@ -3645,6 +3716,10 @@ + + + + @@ -3653,6 +3728,7 @@ + @@ -4031,6 +4107,9 @@ + + + @@ -4112,6 +4191,7 @@ + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 099ada7d..259b2e9c 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3042,6 +3042,16 @@ + + + + + + + + + + @@ -3166,19 +3176,6 @@ - - - - - - - - - - - - - diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 2a7416ce..f93cf77d 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1121,6 +1121,34 @@ + + + + 151 + + + + + + + 152 + + + + + + + 153 + + + + + + + 154 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 6bc27d73..ad025b2c 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -257,6 +257,13 @@ + + + + + + + @@ -677,6 +684,20 @@ + + + + + + + + + + + + + + @@ -703,6 +724,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -739,8 +957,8 @@ - - + + @@ -764,7 +982,7 @@ - + @@ -1012,179 +1230,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1288,6 +1333,9 @@ + + + @@ -1881,6 +1929,7 @@ + @@ -2149,6 +2198,13 @@ + + + + 5 + + + @@ -3755,6 +3811,13 @@ + + + + 134217728 + + + @@ -3816,6 +3879,13 @@ + + + + + + + @@ -4213,6 +4283,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -5588,6 +5678,7 @@ + @@ -5645,21 +5736,67 @@ - + + + + + + + + + + + + + + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5704,7 +5841,7 @@ - + @@ -5719,7 +5856,7 @@ - + @@ -5749,14 +5886,14 @@ - + - + @@ -6030,7 +6167,7 @@ - + @@ -6064,15 +6201,59 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6094,7 +6275,7 @@ - + @@ -6108,7 +6289,7 @@ - + @@ -6133,10 +6314,24 @@ + + + + + + + + + + + + + + - + @@ -6206,7 +6401,7 @@ - + @@ -6237,6 +6432,7 @@ + @@ -6472,7 +6668,7 @@ - + @@ -6496,7 +6692,7 @@ - + @@ -6663,7 +6859,7 @@ - + @@ -6671,7 +6867,7 @@ - + @@ -6699,7 +6895,7 @@ - + @@ -6758,7 +6954,7 @@ - + @@ -6775,7 +6971,7 @@ - + @@ -6818,7 +7014,7 @@ - + @@ -6826,7 +7022,7 @@ - + @@ -6854,7 +7050,7 @@ - + @@ -6972,7 +7168,7 @@ - + @@ -7027,6 +7223,13 @@ + + + + + + + @@ -7113,6 +7316,13 @@ + + + + + + + @@ -7175,7 +7385,7 @@ - + @@ -7194,7 +7404,7 @@ - + @@ -7204,7 +7414,7 @@ - + @@ -7290,6 +7500,20 @@ + + + + 1024 + + + + + + + 2048 + + + @@ -7312,7 +7536,7 @@ - + @@ -7340,7 +7564,7 @@ - + @@ -7357,7 +7581,7 @@ - + @@ -7373,7 +7597,7 @@ - + @@ -7392,7 +7616,7 @@ - + @@ -7407,7 +7631,7 @@ - + @@ -7444,7 +7668,7 @@ - + @@ -7452,7 +7676,7 @@ - + @@ -7466,7 +7690,7 @@ - + @@ -7542,6 +7766,12 @@ + + + + + + @@ -7560,12 +7790,6 @@ - - - - - - @@ -9966,6 +10190,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -9985,7 +10233,7 @@ - + @@ -10009,7 +10257,7 @@ - + @@ -10033,7 +10281,7 @@ - + @@ -10057,7 +10305,7 @@ - + @@ -10081,7 +10329,7 @@ - + @@ -10105,7 +10353,7 @@ - + @@ -10129,7 +10377,7 @@ - + @@ -10153,11 +10401,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10177,7 +10449,7 @@ - + @@ -10201,7 +10473,7 @@ - + @@ -10225,7 +10497,7 @@ - + @@ -10249,7 +10521,7 @@ - + @@ -10273,7 +10545,7 @@ - + @@ -10297,7 +10569,7 @@ - + @@ -10321,7 +10593,7 @@ - + @@ -10345,7 +10617,7 @@ - + @@ -10369,7 +10641,7 @@ - + @@ -10393,7 +10665,7 @@ - + @@ -10417,7 +10689,7 @@ - + @@ -10441,7 +10713,7 @@ - + @@ -10465,7 +10737,7 @@ - + @@ -10489,7 +10761,7 @@ - + @@ -10513,7 +10785,7 @@ - + @@ -10537,7 +10809,7 @@ - + @@ -10561,7 +10833,7 @@ - + @@ -10585,7 +10857,7 @@ - + @@ -10609,7 +10881,7 @@ - + @@ -10633,7 +10905,7 @@ - + @@ -10657,7 +10929,7 @@ - + @@ -10681,7 +10953,7 @@ - + @@ -10705,7 +10977,7 @@ - + @@ -10729,7 +11001,7 @@ - + @@ -10753,7 +11025,7 @@ - + @@ -10777,7 +11049,7 @@ - + @@ -10801,7 +11073,7 @@ - + @@ -10825,7 +11097,7 @@ - + @@ -10849,7 +11121,7 @@ - + @@ -10873,7 +11145,7 @@ - + @@ -10897,7 +11169,7 @@ - + @@ -10921,7 +11193,7 @@ - + @@ -10945,7 +11217,7 @@ - + @@ -10969,7 +11241,7 @@ - + @@ -10993,7 +11265,7 @@ - + @@ -11017,7 +11289,7 @@ - + @@ -11041,7 +11313,7 @@ - + @@ -11623,6 +11895,12 @@ + + + + + + @@ -11671,6 +11949,12 @@ + + + + + + @@ -14105,6 +14389,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -14289,6 +14596,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 4b60b9e3..1a1ad7cf 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -176,6 +176,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -518,6 +549,7 @@ + @@ -534,6 +566,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -619,6 +701,12 @@ + + + + + + @@ -825,6 +913,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -882,6 +1014,18 @@ + + + + + + + + + + + + @@ -1081,6 +1225,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index 4a81b945..e4b1dbe3 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -1829,6 +1829,13 @@ + + + + 2052 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index f5596187..e4d4df6c 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -176,6 +176,12 @@ + + + + + + @@ -945,6 +951,12 @@ + + + + + + @@ -1393,6 +1405,12 @@ + + + + + + @@ -2083,6 +2101,9 @@ + + + @@ -2168,6 +2189,10 @@ + + + + @@ -2176,11 +2201,24 @@ + + + + + + + + + + + + + @@ -3109,6 +3147,16 @@ + + + + + + + + + + @@ -3117,6 +3165,7 @@ + @@ -3220,6 +3269,10 @@ + + + + @@ -3228,6 +3281,7 @@ + @@ -3317,6 +3371,10 @@ + + + + @@ -3325,6 +3383,7 @@ + @@ -3406,6 +3465,9 @@ + + + @@ -3415,6 +3477,7 @@ + @@ -3458,6 +3521,9 @@ + + + @@ -3500,6 +3566,10 @@ + + + + @@ -3507,6 +3577,7 @@ + @@ -3645,6 +3716,10 @@ + + + + @@ -3653,6 +3728,7 @@ + @@ -4031,6 +4107,9 @@ + + + @@ -4112,6 +4191,7 @@ + diff --git a/bingads/v13/reporting/reporting_operation.py b/bingads/v13/reporting/reporting_operation.py index 96c7a2d6..d1b0815d 100644 --- a/bingads/v13/reporting/reporting_operation.py +++ b/bingads/v13/reporting/reporting_operation.py @@ -104,30 +104,31 @@ def download_result_file(self, result_file_directory, result_file_name, decompre headers = { 'User-Agent': USER_AGENT, } - s = requests.Session() - s.mount('https://', TlsHttpAdapter()) - timeout_seconds = None if timeout_in_milliseconds is None else timeout_in_milliseconds / 1000.0 - try: - r = s.get(url, headers=headers, stream=True, verify=True, timeout=timeout_seconds) - except requests.Timeout as ex: - raise FileDownloadException(ex) - r.raise_for_status() - try: - with open(zip_file_path, 'wb') as f: - for chunk in r.iter_content(chunk_size=4096): - if chunk: - f.write(chunk) - f.flush() - if decompress: - with contextlib.closing(zipfile.ZipFile(zip_file_path)) as compressed: - first = compressed.namelist()[0] - with open(result_file_path, 'wb') as f, compressed.open(first, 'r') as cc: - shutil.copyfileobj(cc, f) - except Exception as ex: - raise ex - finally: - if decompress and os.path.exists(zip_file_path): - os.remove(zip_file_path) + + with requests.Session() as s: + s.mount('https://', TlsHttpAdapter()) + timeout_seconds = None if timeout_in_milliseconds is None else timeout_in_milliseconds / 1000.0 + try: + r = s.get(url, headers=headers, stream=True, verify=True, timeout=timeout_seconds) + except requests.Timeout as ex: + raise FileDownloadException(ex) + r.raise_for_status() + try: + with open(zip_file_path, 'wb') as f: + for chunk in r.iter_content(chunk_size=4096): + if chunk: + f.write(chunk) + f.flush() + if decompress: + with contextlib.closing(zipfile.ZipFile(zip_file_path)) as compressed: + first = compressed.namelist()[0] + with open(result_file_path, 'wb') as f, compressed.open(first, 'r') as cc: + shutil.copyfileobj(cc, f) + except Exception as ex: + raise ex + finally: + if decompress and os.path.exists(zip_file_path): + os.remove(zip_file_path) return result_file_path def track(self, timeout_in_milliseconds=None): diff --git a/setup.py b/setup.py index 2c8a8b58..295139a0 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.16' +VERSION = '13.0.17' with open('README.rst', 'r') as f: readme = f.read() From 846eb7c727b78869a57d78eeec96d4724ec7bf28 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Tue, 14 Nov 2023 12:10:27 +0800 Subject: [PATCH 25/55] v13.0.18 --- HISTORY.rst | 6 + bingads/manifest.py | 2 +- .../bulk/entities/bulk_offline_conversion.py | 54 ++- bingads/v13/internal/bulk/csv_headers.py | 4 +- bingads/v13/internal/bulk/string_table.py | 3 +- .../v13/proxies/production/bulk_service.xml | 21 + .../production/campaignmanagement_service.xml | 373 +++++++++++------- .../production/customerbilling_service.xml | 7 + .../production/customermanagement_service.xml | 103 +++++ .../proxies/production/reporting_service.xml | 2 + bingads/v13/proxies/sandbox/bulk_service.xml | 21 + .../sandbox/campaignmanagement_service.xml | 373 +++++++++++------- .../sandbox/customerbilling_service.xml | 15 +- .../sandbox/customermanagement_service.xml | 103 +++++ .../v13/proxies/sandbox/reporting_service.xml | 2 + setup.py | 2 +- 16 files changed, 771 insertions(+), 320 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index d773bafc..349a96cc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,5 +1,11 @@ .. :changelog: +Release History +13.0.18(2023-11-13) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). +* Added mappings for new fields in BulkOfflineConversion: HashedEmailAddress and HashedPhoneNumber. + Release History 13.0.17(2023-08-18) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index 199ce303..fa6a1428 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.17' +VERSION = '13.0.18' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/bulk_offline_conversion.py b/bingads/v13/bulk/entities/bulk_offline_conversion.py index 93a74789..168421ac 100644 --- a/bingads/v13/bulk/entities/bulk_offline_conversion.py +++ b/bingads/v13/bulk/entities/bulk_offline_conversion.py @@ -29,55 +29,55 @@ def __init__(self, offline_conversion=None): self._adjustment_currency_code = None self._external_attribution_model = None self._external_attribution_credit = None - + @property def adjustment_value(self): return self._adjustment_value; - + @adjustment_value.setter def adjustment_value(self, value): self._adjustment_value = value - + @property def adjustment_time(self): return self._adjustment_time; - + @adjustment_time.setter def adjustment_time(self, value): self._adjustment_time = value - + @property def adjustment_type(self): return self._adjustment_type; - + @adjustment_type.setter def adjustment_type(self, value): self._adjustment_type = value - + @property def adjustment_currency_code(self): return self._adjustment_currency_code; - + @adjustment_currency_code.setter def adjustment_currency_code(self, value): self._adjustment_currency_code = value - + @property def external_attribution_model(self): return self._external_attribution_model; - + @external_attribution_model.setter def external_attribution_model(self, value): self._external_attribution_model = value - + @property def external_attribution_credit(self): return self._external_attribution_credit; - + @external_attribution_credit.setter def external_attribution_credit(self, value): - self._external_attribution_credit = value - + self._external_attribution_credit = value + @property def offline_conversion(self): """ The offline conversion Data Object of the Campaign Management Service. @@ -145,7 +145,7 @@ def offline_conversion(self, value): float(v) if v else None ) ), - + _SimpleBulkMapping( header=_StringTable.AdjustmentType, field_to_csv=lambda c: c.adjustment_type, @@ -155,7 +155,7 @@ def offline_conversion(self, value): v ) ), - + _SimpleBulkMapping( header=_StringTable.AdjustmentCurrencyCode, field_to_csv=lambda c: c.adjustment_currency_code, @@ -165,7 +165,7 @@ def offline_conversion(self, value): v ) ), - + _SimpleBulkMapping( header=_StringTable.ExternalAttributionModel, field_to_csv=lambda c: c.external_attribution_model, @@ -184,8 +184,6 @@ def offline_conversion(self, value): float(v) if v else None ) ), - - _SimpleBulkMapping( header=_StringTable.AdjustmentTime, field_to_csv=lambda c: bulk_datetime_str(c.adjustment_time), @@ -195,6 +193,24 @@ def offline_conversion(self, value): parse_datetime(v) if v else None ) ), + _SimpleBulkMapping( + header=_StringTable.HashedEmailAddress, + field_to_csv=lambda c: c.offline_conversion.HashedEmailAddress, + csv_to_field=lambda c, v: setattr( + c.offline_conversion, + 'HashedEmailAddress', + v + ) + ), + _SimpleBulkMapping( + header=_StringTable.HashedPhoneNumber, + field_to_csv=lambda c: c.offline_conversion.HashedPhoneNumber, + csv_to_field=lambda c, v: setattr( + c.offline_conversion, + 'HashedPhoneNumber', + v + ) + ), ] def process_mappings_to_row_values(self, row_values, exclude_readonly_data): diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 27266d2c..2a8b96e1 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -426,6 +426,8 @@ class _CsvHeaders: _StringTable.AdjustmentType, _StringTable.ExternalAttributionCredit, _StringTable.ExternalAttributionModel, + _StringTable.HashedEmailAddress, + _StringTable.HashedPhoneNumber, # Account _StringTable.MSCLKIDAutoTaggingEnabled, @@ -455,7 +457,7 @@ class _CsvHeaders: # Hotel Ad _StringTable.MinTargetValue, _StringTable.MaxTargetValue, - + # PMax _StringTable.Audiences, _StringTable.AssetGroup, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 4307976d..44c75f93 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -592,7 +592,8 @@ class _StringTable: AdjustmentType = "Adjustment Type" ExternalAttributionModel = "External Attribution Model" ExternalAttributionCredit = "External Attribution Credit" - + HashedEmailAddress = "Hashed Email Address" + HashedPhoneNumber = "Hashed Phone Number" # Campaign Criterion CampaignAgeCriterion = 'Campaign Age Criterion' diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index c1140430..ceb2f3e4 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1149,6 +1149,27 @@ + + + + 155 + + + + + + + 156 + + + + + + + 157 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index ad4229b8..3a341c2d 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -632,6 +632,48 @@ + + + + 73 + + + + + + + 118 + + + + + + + 50 + + + + + + + 113 + + + + + + + 129 + + + + + + + 47 + + + @@ -906,6 +948,13 @@ + + + + + + + @@ -957,8 +1006,8 @@ - - + + @@ -982,7 +1031,7 @@ - + @@ -1240,7 +1289,7 @@ - + @@ -1257,7 +1306,7 @@ - + @@ -1281,7 +1330,7 @@ - + @@ -1336,6 +1385,7 @@ + @@ -1352,7 +1402,7 @@ - + @@ -1370,7 +1420,7 @@ - + @@ -1400,7 +1450,7 @@ - + @@ -1421,7 +1471,7 @@ - + @@ -1462,7 +1512,7 @@ - + @@ -1496,7 +1546,7 @@ - + @@ -1535,6 +1585,13 @@ + + + + + + + @@ -1647,7 +1704,6 @@ - @@ -1657,8 +1713,6 @@ - - @@ -1692,8 +1746,8 @@ - - + + @@ -1702,7 +1756,7 @@ - + @@ -1717,7 +1771,7 @@ - + @@ -1736,6 +1790,7 @@ + @@ -1777,7 +1832,7 @@ - + @@ -1786,7 +1841,7 @@ - + @@ -1807,7 +1862,7 @@ - + @@ -1868,14 +1923,14 @@ - + - + @@ -1895,7 +1950,7 @@ - + @@ -1946,7 +2001,7 @@ - + @@ -2013,10 +2068,10 @@ - + - - + + @@ -2063,8 +2118,8 @@ - - + + @@ -2073,7 +2128,7 @@ - + @@ -2103,7 +2158,7 @@ - + @@ -2141,7 +2196,7 @@ - + @@ -2282,7 +2337,7 @@ - + @@ -2291,7 +2346,7 @@ - + @@ -2494,7 +2549,7 @@ - + @@ -2632,10 +2687,10 @@ - + - - + + @@ -2643,7 +2698,7 @@ - + @@ -2666,9 +2721,9 @@ - + - + @@ -2708,9 +2763,9 @@ - + - + @@ -2723,9 +2778,9 @@ - + - + @@ -2825,7 +2880,7 @@ - + @@ -2871,8 +2926,8 @@ - - + + @@ -2912,9 +2967,9 @@ - + - + @@ -2988,11 +3043,11 @@ - + - + - + @@ -3052,12 +3107,12 @@ - + - + - - + + @@ -3074,9 +3129,9 @@ - + - + @@ -3094,9 +3149,9 @@ - + - + @@ -3142,7 +3197,7 @@ - + @@ -3167,7 +3222,7 @@ - + @@ -3239,7 +3294,7 @@ - + @@ -3328,7 +3383,7 @@ - + @@ -3356,7 +3411,7 @@ - + @@ -3433,7 +3488,7 @@ - + @@ -3472,7 +3527,7 @@ - + @@ -3480,7 +3535,7 @@ - + @@ -3567,7 +3622,7 @@ - + @@ -3583,7 +3638,7 @@ - + @@ -3618,7 +3673,7 @@ - + @@ -4174,7 +4229,7 @@ - + @@ -4319,9 +4374,9 @@ - + - + @@ -4380,7 +4435,7 @@ - + @@ -4403,7 +4458,7 @@ - + @@ -4465,7 +4520,7 @@ - + @@ -4480,7 +4535,7 @@ - + @@ -4538,7 +4593,7 @@ - + @@ -4547,7 +4602,7 @@ - + @@ -4673,7 +4728,7 @@ - + @@ -4705,14 +4760,14 @@ - + - + @@ -4763,7 +4818,7 @@ - + @@ -4796,6 +4851,14 @@ + + + + + + + + @@ -4836,7 +4899,7 @@ - + @@ -4869,7 +4932,7 @@ - + @@ -4892,7 +4955,7 @@ - + @@ -4961,7 +5024,7 @@ - + @@ -4978,7 +5041,7 @@ - + @@ -5012,7 +5075,7 @@ - + @@ -5054,7 +5117,7 @@ - + @@ -5247,7 +5310,7 @@ - + @@ -5270,7 +5333,7 @@ - + @@ -5286,7 +5349,7 @@ - + @@ -5327,7 +5390,7 @@ - + @@ -5349,7 +5412,7 @@ - + @@ -5363,7 +5426,7 @@ - + @@ -5378,7 +5441,7 @@ - + @@ -5416,7 +5479,7 @@ - + @@ -5438,7 +5501,7 @@ - + @@ -5452,7 +5515,7 @@ - + @@ -5467,7 +5530,7 @@ - + @@ -5580,7 +5643,7 @@ - + @@ -5602,7 +5665,7 @@ - + @@ -5616,7 +5679,7 @@ - + @@ -5649,9 +5712,9 @@ - - - + + + @@ -5685,7 +5748,7 @@ - + @@ -5709,7 +5772,7 @@ - + @@ -5724,7 +5787,7 @@ - + @@ -5791,7 +5854,7 @@ - + @@ -5841,7 +5904,7 @@ - + @@ -5856,7 +5919,7 @@ - + @@ -5886,14 +5949,14 @@ - + - + @@ -6167,7 +6230,7 @@ - + @@ -6253,7 +6316,7 @@ - + @@ -6275,7 +6338,7 @@ - + @@ -6289,7 +6352,7 @@ - + @@ -6331,7 +6394,7 @@ - + @@ -6401,7 +6464,7 @@ - + @@ -6668,7 +6731,7 @@ - + @@ -6692,7 +6755,7 @@ - + @@ -6859,7 +6922,7 @@ - + @@ -6867,7 +6930,7 @@ - + @@ -6895,7 +6958,7 @@ - + @@ -6954,7 +7017,7 @@ - + @@ -6971,7 +7034,7 @@ - + @@ -7014,7 +7077,7 @@ - + @@ -7022,7 +7085,7 @@ - + @@ -7050,7 +7113,7 @@ - + @@ -7168,7 +7231,7 @@ - + @@ -7331,6 +7394,13 @@ + + + + + + + @@ -7385,7 +7455,7 @@ - + @@ -7404,7 +7474,7 @@ - + @@ -7414,7 +7484,7 @@ - + @@ -7514,6 +7584,13 @@ + + + + 4096 + + + @@ -7536,7 +7613,7 @@ - + @@ -7564,7 +7641,7 @@ - + @@ -7581,7 +7658,7 @@ - + @@ -7597,7 +7674,7 @@ - + @@ -7616,7 +7693,7 @@ - + @@ -7631,7 +7708,7 @@ - + @@ -7668,7 +7745,7 @@ - + @@ -7676,7 +7753,7 @@ - + @@ -7690,7 +7767,7 @@ - + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index dae875c5..8455d3bb 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -281,6 +281,13 @@ + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 73db11b7..98b8dbe9 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -586,6 +586,22 @@ + + + + + + + + + + + + + + + + @@ -2301,6 +2317,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3250,6 +3304,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -3473,6 +3549,12 @@ + + + + + + @@ -4254,6 +4336,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 6df095a0..889243a8 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -1537,6 +1537,8 @@ + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index f93cf77d..e9fcdcc5 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1149,6 +1149,27 @@ + + + + 155 + + + + + + + 156 + + + + + + + 157 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index ad025b2c..2b97a739 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -632,6 +632,48 @@ + + + + 73 + + + + + + + 118 + + + + + + + 50 + + + + + + + 113 + + + + + + + 129 + + + + + + + 47 + + + @@ -906,6 +948,13 @@ + + + + + + + @@ -957,8 +1006,8 @@ - - + + @@ -982,7 +1031,7 @@ - + @@ -1240,7 +1289,7 @@ - + @@ -1257,7 +1306,7 @@ - + @@ -1281,7 +1330,7 @@ - + @@ -1336,6 +1385,7 @@ + @@ -1352,7 +1402,7 @@ - + @@ -1370,7 +1420,7 @@ - + @@ -1400,7 +1450,7 @@ - + @@ -1421,7 +1471,7 @@ - + @@ -1462,7 +1512,7 @@ - + @@ -1496,7 +1546,7 @@ - + @@ -1535,6 +1585,13 @@ + + + + + + + @@ -1647,7 +1704,6 @@ - @@ -1657,8 +1713,6 @@ - - @@ -1692,8 +1746,8 @@ - - + + @@ -1702,7 +1756,7 @@ - + @@ -1717,7 +1771,7 @@ - + @@ -1736,6 +1790,7 @@ + @@ -1777,7 +1832,7 @@ - + @@ -1786,7 +1841,7 @@ - + @@ -1807,7 +1862,7 @@ - + @@ -1868,14 +1923,14 @@ - + - + @@ -1895,7 +1950,7 @@ - + @@ -1946,7 +2001,7 @@ - + @@ -2013,10 +2068,10 @@ - + - - + + @@ -2063,8 +2118,8 @@ - - + + @@ -2073,7 +2128,7 @@ - + @@ -2103,7 +2158,7 @@ - + @@ -2141,7 +2196,7 @@ - + @@ -2282,7 +2337,7 @@ - + @@ -2291,7 +2346,7 @@ - + @@ -2494,7 +2549,7 @@ - + @@ -2632,10 +2687,10 @@ - + - - + + @@ -2643,7 +2698,7 @@ - + @@ -2666,9 +2721,9 @@ - + - + @@ -2708,9 +2763,9 @@ - + - + @@ -2723,9 +2778,9 @@ - + - + @@ -2825,7 +2880,7 @@ - + @@ -2871,8 +2926,8 @@ - - + + @@ -2912,9 +2967,9 @@ - + - + @@ -2988,11 +3043,11 @@ - + - + - + @@ -3052,12 +3107,12 @@ - + - + - - + + @@ -3074,9 +3129,9 @@ - + - + @@ -3094,9 +3149,9 @@ - + - + @@ -3142,7 +3197,7 @@ - + @@ -3167,7 +3222,7 @@ - + @@ -3239,7 +3294,7 @@ - + @@ -3328,7 +3383,7 @@ - + @@ -3356,7 +3411,7 @@ - + @@ -3433,7 +3488,7 @@ - + @@ -3472,7 +3527,7 @@ - + @@ -3480,7 +3535,7 @@ - + @@ -3567,7 +3622,7 @@ - + @@ -3583,7 +3638,7 @@ - + @@ -3618,7 +3673,7 @@ - + @@ -4174,7 +4229,7 @@ - + @@ -4319,9 +4374,9 @@ - + - + @@ -4380,7 +4435,7 @@ - + @@ -4403,7 +4458,7 @@ - + @@ -4465,7 +4520,7 @@ - + @@ -4480,7 +4535,7 @@ - + @@ -4538,7 +4593,7 @@ - + @@ -4547,7 +4602,7 @@ - + @@ -4673,7 +4728,7 @@ - + @@ -4705,14 +4760,14 @@ - + - + @@ -4763,7 +4818,7 @@ - + @@ -4796,6 +4851,14 @@ + + + + + + + + @@ -4836,7 +4899,7 @@ - + @@ -4869,7 +4932,7 @@ - + @@ -4892,7 +4955,7 @@ - + @@ -4961,7 +5024,7 @@ - + @@ -4978,7 +5041,7 @@ - + @@ -5012,7 +5075,7 @@ - + @@ -5054,7 +5117,7 @@ - + @@ -5247,7 +5310,7 @@ - + @@ -5270,7 +5333,7 @@ - + @@ -5286,7 +5349,7 @@ - + @@ -5327,7 +5390,7 @@ - + @@ -5349,7 +5412,7 @@ - + @@ -5363,7 +5426,7 @@ - + @@ -5378,7 +5441,7 @@ - + @@ -5416,7 +5479,7 @@ - + @@ -5438,7 +5501,7 @@ - + @@ -5452,7 +5515,7 @@ - + @@ -5467,7 +5530,7 @@ - + @@ -5580,7 +5643,7 @@ - + @@ -5602,7 +5665,7 @@ - + @@ -5616,7 +5679,7 @@ - + @@ -5649,9 +5712,9 @@ - - - + + + @@ -5685,7 +5748,7 @@ - + @@ -5709,7 +5772,7 @@ - + @@ -5724,7 +5787,7 @@ - + @@ -5791,7 +5854,7 @@ - + @@ -5841,7 +5904,7 @@ - + @@ -5856,7 +5919,7 @@ - + @@ -5886,14 +5949,14 @@ - + - + @@ -6167,7 +6230,7 @@ - + @@ -6253,7 +6316,7 @@ - + @@ -6275,7 +6338,7 @@ - + @@ -6289,7 +6352,7 @@ - + @@ -6331,7 +6394,7 @@ - + @@ -6401,7 +6464,7 @@ - + @@ -6668,7 +6731,7 @@ - + @@ -6692,7 +6755,7 @@ - + @@ -6859,7 +6922,7 @@ - + @@ -6867,7 +6930,7 @@ - + @@ -6895,7 +6958,7 @@ - + @@ -6954,7 +7017,7 @@ - + @@ -6971,7 +7034,7 @@ - + @@ -7014,7 +7077,7 @@ - + @@ -7022,7 +7085,7 @@ - + @@ -7050,7 +7113,7 @@ - + @@ -7168,7 +7231,7 @@ - + @@ -7331,6 +7394,13 @@ + + + + + + + @@ -7385,7 +7455,7 @@ - + @@ -7404,7 +7474,7 @@ - + @@ -7414,7 +7484,7 @@ - + @@ -7514,6 +7584,13 @@ + + + + 4096 + + + @@ -7536,7 +7613,7 @@ - + @@ -7564,7 +7641,7 @@ - + @@ -7581,7 +7658,7 @@ - + @@ -7597,7 +7674,7 @@ - + @@ -7616,7 +7693,7 @@ - + @@ -7631,7 +7708,7 @@ - + @@ -7668,7 +7745,7 @@ - + @@ -7676,7 +7753,7 @@ - + @@ -7690,7 +7767,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 1a1ad7cf..81444ce3 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -281,6 +281,13 @@ + + + + + + + @@ -549,7 +556,13 @@ - + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index e4b1dbe3..ad8ceb39 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -586,6 +586,22 @@ + + + + + + + + + + + + + + + + @@ -2301,6 +2317,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3250,6 +3304,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -3473,6 +3549,12 @@ + + + + + + @@ -4254,6 +4336,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index e4d4df6c..bd6031ed 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -1537,6 +1537,8 @@ + + diff --git a/setup.py b/setup.py index 295139a0..3343befd 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.17' +VERSION = '13.0.18' with open('README.rst', 'r') as f: readme = f.read() From abb7e486e1752285167338eadcb1d2378893d82d Mon Sep 17 00:00:00 2001 From: Vishal Jaishankar <30893603+VishalJaishankar@users.noreply.github.com> Date: Tue, 14 Nov 2023 21:39:40 +0530 Subject: [PATCH 26/55] Update setup.py to include long description type Adding a new metadata field to specify the type of long description. This will enable rendering of description when publishing to PyPI --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 3343befd..e3839b78 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,7 @@ version=VERSION, description='A library to make working with the Bing Ads APIs and bulk services easy', long_description=readme + '\n\n' + history, + long_description_content_type ='text/x-rst', author='Bing Ads SDK Team', author_email='bing_ads_sdk@microsoft.com', url='https://github.com/BingAds/BingAds-Python-SDK', From bcc1622a670743c8c3a0b8e8b6cf822af4a88524 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 15 Nov 2023 10:51:24 +0800 Subject: [PATCH 27/55] change history --- HISTORY.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 349a96cc..0d6e224e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,10 +3,9 @@ Release History 13.0.18(2023-11-13) +++++++++++++++++++++++++ -* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. * Added mappings for new fields in BulkOfflineConversion: HashedEmailAddress and HashedPhoneNumber. -Release History 13.0.17(2023-08-18) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. From e1fe5b01b70aff9fb3853e599de782140c17f609 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 15 Nov 2023 11:03:01 +0800 Subject: [PATCH 28/55] update history --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 0d6e224e..9cded815 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,7 @@ .. :changelog: Release History + 13.0.18(2023-11-13) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. From 8c10a39b42d4b4f3fb7a2fe22c4ce32087efb179 Mon Sep 17 00:00:00 2001 From: Vishal Jaishankar <30893603+VishalJaishankar@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:06:07 +0530 Subject: [PATCH 29/55] removed references as pypi does not support reference based hyperlinks --- README.rst | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/README.rst b/README.rst index 3ca06a4a..6904e7ea 100644 --- a/README.rst +++ b/README.rst @@ -11,26 +11,20 @@ with the Python programming language. The SDK includes proxy classes for all Bing Ads API web services and abstracts the low level details of authentication with OAuth. You can also read and write bulk files with the SDK BulkFileReader and BulkFileWriter, and use the high level BulkServiceManager interface to abstract and execute operations in the low level Bulk API. -For more information, see `Bing Ads Client Libraries`_. +For more information, see `Bing Ads Client Libraries `_. Getting Started --------------- To get started developing Bing Ads applications with Python, -install the SDK and either start with the `examples`_ or follow one of the application walkthroughs. -For more information, see `Getting Started Using Python with Bing Ads Services`_. +install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. +For more information, see `Getting Started Using Python with Bing Ads Services `_. External Dependencies --------------------- - - `suds-community`_ - - `requests`_ - - `enum34`_ - -.. _Bing Ads Client Libraries: https://docs.microsoft.com/en-us/bingads/guides/client-libraries -.. _examples: https://github.com/BingAds/BingAds-Python-SDK/tree/master/examples -.. _Getting Started Using Python with Bing Ads Services: https://docs.microsoft.com/en-us/bingads/guides/get-started-python - -.. _suds-community: https://pypi.org/pypi/suds-community/ -.. _requests: http://pypi.python.org/pypi/requests -.. _enum34: http://pypi.python.org/pypi/enum34 + - `suds-community `_ + + - `requests `_ + + - `enum34 `_ \ No newline at end of file From 05e6d3538956b543dad3471f92ab1c4c4049caab Mon Sep 17 00:00:00 2001 From: Vishal Jaishankar <30893603+VishalJaishankar@users.noreply.github.com> Date: Wed, 15 Nov 2023 12:43:36 +0530 Subject: [PATCH 30/55] removed appending history in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e3839b78..36b6417b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ name='bingads', version=VERSION, description='A library to make working with the Bing Ads APIs and bulk services easy', - long_description=readme + '\n\n' + history, + long_description=readme, long_description_content_type ='text/x-rst', author='Bing Ads SDK Team', author_email='bing_ads_sdk@microsoft.com', From e493f7971c1d5002d3803c4456afc6b6ae2ca677 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Mon, 27 Nov 2023 10:36:05 +0800 Subject: [PATCH 31/55] update README --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 6904e7ea..caef7c0f 100644 --- a/README.rst +++ b/README.rst @@ -11,14 +11,14 @@ with the Python programming language. The SDK includes proxy classes for all Bing Ads API web services and abstracts the low level details of authentication with OAuth. You can also read and write bulk files with the SDK BulkFileReader and BulkFileWriter, and use the high level BulkServiceManager interface to abstract and execute operations in the low level Bulk API. -For more information, see `Bing Ads Client Libraries `_. +For more information, see `Bing Ads Client Libraries `_. Getting Started --------------- To get started developing Bing Ads applications with Python, -install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. -For more information, see `Getting Started Using Python with Bing Ads Services `_. +install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. +For more information, see `Getting Started Using Python with Bing Ads Services `_. External Dependencies --------------------- From a5a05784b36c088dc648174fdd57e697248f90f6 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Tue, 30 Jan 2024 14:41:20 +0800 Subject: [PATCH 32/55] v13.0.18.1 --- HISTORY.rst | 4 + README.rst | 6 +- bingads/manifest.py | 2 +- .../proxies/production/adinsight_service.xml | 318 ++++++++++ .../v13/proxies/production/bulk_service.xml | 21 + .../production/campaignmanagement_service.xml | 559 ++++++++++------- .../production/customerbilling_service.xml | 85 ++- .../production/customermanagement_service.xml | 84 +++ .../proxies/production/reporting_service.xml | 1 + .../v13/proxies/sandbox/adinsight_service.xml | 318 ++++++++++ bingads/v13/proxies/sandbox/bulk_service.xml | 21 + .../sandbox/campaignmanagement_service.xml | 587 +++++++++++------- .../sandbox/customerbilling_service.xml | 77 ++- .../sandbox/customermanagement_service.xml | 84 +++ .../v13/proxies/sandbox/reporting_service.xml | 1 + setup.py | 3 +- 16 files changed, 1684 insertions(+), 487 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 9cded815..4fc6d232 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ Release History +13.0.18.1(2024-01-30) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. + 13.0.18(2023-11-13) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. diff --git a/README.rst b/README.rst index caef7c0f..6904e7ea 100644 --- a/README.rst +++ b/README.rst @@ -11,14 +11,14 @@ with the Python programming language. The SDK includes proxy classes for all Bing Ads API web services and abstracts the low level details of authentication with OAuth. You can also read and write bulk files with the SDK BulkFileReader and BulkFileWriter, and use the high level BulkServiceManager interface to abstract and execute operations in the low level Bulk API. -For more information, see `Bing Ads Client Libraries `_. +For more information, see `Bing Ads Client Libraries `_. Getting Started --------------- To get started developing Bing Ads applications with Python, -install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. -For more information, see `Getting Started Using Python with Bing Ads Services `_. +install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. +For more information, see `Getting Started Using Python with Bing Ads Services `_. External Dependencies --------------------- diff --git a/bingads/manifest.py b/bingads/manifest.py index fa6a1428..43f9e22c 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.18' +VERSION = '13.0.18.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index 9d29651b..f1ac8dc9 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3087,6 +3087,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3849,6 +4008,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4018,6 +4249,24 @@ + + + + + + + + + + + + + + + + + + @@ -4666,6 +4915,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index ceb2f3e4..5cc722a2 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1170,6 +1170,27 @@ + + + + 158 + + + + + + + 159 + + + + + + + 160 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 3a341c2d..c4bfb83d 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1004,10 +1004,17 @@ + + + + + + + - - + + @@ -1031,7 +1038,7 @@ - + @@ -1289,7 +1296,7 @@ - + @@ -1306,7 +1313,7 @@ - + @@ -1330,7 +1337,7 @@ - + @@ -1386,6 +1393,7 @@ + @@ -1402,7 +1410,7 @@ - + @@ -1420,7 +1428,7 @@ - + @@ -1450,7 +1458,7 @@ - + @@ -1471,7 +1479,7 @@ - + @@ -1512,7 +1520,7 @@ - + @@ -1546,7 +1554,7 @@ - + @@ -1746,8 +1754,8 @@ - - + + @@ -1756,7 +1764,7 @@ - + @@ -1771,7 +1779,7 @@ - + @@ -1832,7 +1840,7 @@ - + @@ -1841,7 +1849,7 @@ - + @@ -1862,7 +1870,7 @@ - + @@ -1923,14 +1931,14 @@ - + - + @@ -1950,7 +1958,7 @@ - + @@ -2001,7 +2009,7 @@ - + @@ -2068,10 +2076,10 @@ - + - - + + @@ -2118,8 +2126,8 @@ - - + + @@ -2128,7 +2136,7 @@ - + @@ -2158,7 +2166,7 @@ - + @@ -2196,7 +2204,7 @@ - + @@ -2337,7 +2345,7 @@ - + @@ -2346,7 +2354,7 @@ - + @@ -2503,6 +2511,13 @@ + + + + 16384 + + + @@ -2549,7 +2564,7 @@ - + @@ -2687,10 +2702,10 @@ - + - - + + @@ -2698,7 +2713,7 @@ - + @@ -2721,9 +2736,9 @@ - + - + @@ -2763,9 +2778,9 @@ - + - + @@ -2778,9 +2793,9 @@ - + - + @@ -2880,7 +2895,7 @@ - + @@ -2926,8 +2941,8 @@ - - + + @@ -2967,9 +2982,9 @@ - + - + @@ -3043,11 +3058,11 @@ - + - + - + @@ -3107,12 +3122,12 @@ - + - + - - + + @@ -3129,9 +3144,9 @@ - + - + @@ -3149,9 +3164,9 @@ - + - + @@ -3197,7 +3212,7 @@ - + @@ -3222,7 +3237,7 @@ - + @@ -3294,7 +3309,7 @@ - + @@ -3383,7 +3398,7 @@ - + @@ -3411,7 +3426,7 @@ - + @@ -3488,7 +3503,7 @@ - + @@ -3527,7 +3542,7 @@ - + @@ -3535,7 +3550,7 @@ - + @@ -3622,7 +3637,7 @@ - + @@ -3638,7 +3653,7 @@ - + @@ -3673,7 +3688,7 @@ - + @@ -3873,6 +3888,13 @@ + + + + 268435456 + + + @@ -4229,7 +4251,7 @@ - + @@ -4374,9 +4396,9 @@ - + - + @@ -4435,7 +4457,7 @@ - + @@ -4458,7 +4480,7 @@ - + @@ -4520,7 +4542,7 @@ - + @@ -4535,7 +4557,7 @@ - + @@ -4593,7 +4615,7 @@ - + @@ -4602,7 +4624,7 @@ - + @@ -4728,7 +4750,7 @@ - + @@ -4760,14 +4782,14 @@ - + - + @@ -4818,7 +4840,7 @@ - + @@ -4899,7 +4921,7 @@ - + @@ -4932,7 +4954,7 @@ - + @@ -4955,7 +4977,7 @@ - + @@ -5024,7 +5046,7 @@ - + @@ -5041,7 +5063,7 @@ - + @@ -5075,7 +5097,7 @@ - + @@ -5117,7 +5139,7 @@ - + @@ -5302,6 +5324,13 @@ + + + + 4194304 + + + @@ -5310,7 +5339,7 @@ - + @@ -5333,7 +5362,7 @@ - + @@ -5349,7 +5378,7 @@ - + @@ -5390,7 +5419,7 @@ - + @@ -5412,7 +5441,7 @@ - + @@ -5426,7 +5455,7 @@ - + @@ -5441,7 +5470,7 @@ - + @@ -5479,7 +5508,7 @@ - + @@ -5501,7 +5530,7 @@ - + @@ -5515,7 +5544,7 @@ - + @@ -5530,7 +5559,7 @@ - + @@ -5643,7 +5672,7 @@ - + @@ -5665,7 +5694,7 @@ - + @@ -5679,7 +5708,7 @@ - + @@ -5712,9 +5741,9 @@ - - - + + + @@ -5748,7 +5777,7 @@ - + @@ -5772,7 +5801,7 @@ - + @@ -5787,7 +5816,7 @@ - + @@ -5854,7 +5883,7 @@ - + @@ -5904,7 +5933,7 @@ - + @@ -5919,7 +5948,7 @@ - + @@ -5949,14 +5978,14 @@ - + - + @@ -6230,7 +6259,7 @@ - + @@ -6264,59 +6293,15 @@ - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -6338,7 +6323,7 @@ - + @@ -6352,7 +6337,7 @@ - + @@ -6391,10 +6376,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6464,7 +6488,7 @@ - + @@ -6731,7 +6755,7 @@ - + @@ -6755,7 +6779,7 @@ - + @@ -6922,7 +6946,7 @@ - + @@ -6930,7 +6954,7 @@ - + @@ -6958,7 +6982,7 @@ - + @@ -7017,7 +7041,7 @@ - + @@ -7034,7 +7058,7 @@ - + @@ -7077,7 +7101,7 @@ - + @@ -7085,7 +7109,7 @@ - + @@ -7113,7 +7137,7 @@ - + @@ -7231,7 +7255,7 @@ - + @@ -7284,6 +7308,13 @@ + + + + + + + @@ -7377,6 +7408,13 @@ + + + + + + + @@ -7455,7 +7493,7 @@ - + @@ -7474,7 +7512,7 @@ - + @@ -7484,7 +7522,7 @@ - + @@ -7591,6 +7629,20 @@ + + + + 8192 + + + + + + + 16384 + + + @@ -7613,7 +7665,7 @@ - + @@ -7641,7 +7693,7 @@ - + @@ -7658,7 +7710,7 @@ - + @@ -7674,7 +7726,7 @@ - + @@ -7693,7 +7745,7 @@ - + @@ -7708,7 +7760,7 @@ - + @@ -7745,7 +7797,7 @@ - + @@ -7753,7 +7805,7 @@ - + @@ -7767,7 +7819,7 @@ - + @@ -10507,6 +10559,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -10526,7 +10602,7 @@ - + @@ -10550,7 +10626,7 @@ - + @@ -10574,7 +10650,7 @@ - + @@ -10598,7 +10674,7 @@ - + @@ -10622,7 +10698,7 @@ - + @@ -10646,7 +10722,7 @@ - + @@ -10670,7 +10746,7 @@ - + @@ -10694,7 +10770,7 @@ - + @@ -10718,7 +10794,7 @@ - + @@ -10742,7 +10818,7 @@ - + @@ -10766,7 +10842,7 @@ - + @@ -10790,7 +10866,7 @@ - + @@ -10814,7 +10890,7 @@ - + @@ -10838,7 +10914,7 @@ - + @@ -10862,7 +10938,7 @@ - + @@ -10886,7 +10962,7 @@ - + @@ -10910,7 +10986,7 @@ - + @@ -10934,7 +11010,7 @@ - + @@ -10958,7 +11034,7 @@ - + @@ -10982,7 +11058,7 @@ - + @@ -11006,7 +11082,7 @@ - + @@ -11030,7 +11106,7 @@ - + @@ -11054,7 +11130,7 @@ - + @@ -11078,7 +11154,7 @@ - + @@ -11102,7 +11178,7 @@ - + @@ -11126,7 +11202,7 @@ - + @@ -11150,7 +11226,7 @@ - + @@ -11174,7 +11250,7 @@ - + @@ -11198,7 +11274,7 @@ - + @@ -11222,7 +11298,7 @@ - + @@ -11246,7 +11322,7 @@ - + @@ -11270,7 +11346,7 @@ - + @@ -11294,7 +11370,7 @@ - + @@ -11318,7 +11394,7 @@ - + @@ -11342,7 +11418,7 @@ - + @@ -11366,7 +11442,7 @@ - + @@ -11390,7 +11466,7 @@ - + @@ -12032,6 +12108,12 @@ + + + + + + @@ -14696,6 +14778,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 8455d3bb..3ce72efa 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -104,13 +104,14 @@ + - + @@ -132,7 +133,7 @@ - + @@ -141,7 +142,7 @@ - + @@ -163,16 +164,17 @@ - - - + + + + - + @@ -180,30 +182,30 @@ - + - + - + - - - + + + @@ -349,6 +351,20 @@ + + + + + + + + + + + + + + @@ -527,12 +543,47 @@ + + + + + + + + 0 + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + @@ -556,7 +607,13 @@ - + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 98b8dbe9..e2f40888 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -602,6 +602,19 @@ + + + + + + + + + + + + + @@ -2088,6 +2101,7 @@ + @@ -2355,6 +2369,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -3326,6 +3361,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -3555,6 +3612,12 @@ + + + + + + @@ -4357,6 +4420,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 889243a8..a6162b12 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -3159,6 +3159,7 @@ + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 259b2e9c..19468a03 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3087,6 +3087,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3849,6 +4008,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4018,6 +4249,24 @@ + + + + + + + + + + + + + + + + + + @@ -4666,6 +4915,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index e9fcdcc5..8ba6e837 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1170,6 +1170,27 @@ + + + + 158 + + + + + + + 159 + + + + + + + 160 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 2b97a739..612c5333 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1004,10 +1004,17 @@ + + + + + + + - - + + @@ -1031,7 +1038,7 @@ - + @@ -1289,7 +1296,7 @@ - + @@ -1306,7 +1313,7 @@ - + @@ -1330,7 +1337,7 @@ - + @@ -1386,6 +1393,7 @@ + @@ -1402,7 +1410,7 @@ - + @@ -1420,7 +1428,7 @@ - + @@ -1450,7 +1458,7 @@ - + @@ -1471,7 +1479,7 @@ - + @@ -1512,7 +1520,7 @@ - + @@ -1546,7 +1554,7 @@ - + @@ -1746,8 +1754,8 @@ - - + + @@ -1756,7 +1764,7 @@ - + @@ -1771,7 +1779,7 @@ - + @@ -1832,7 +1840,7 @@ - + @@ -1841,7 +1849,7 @@ - + @@ -1862,7 +1870,7 @@ - + @@ -1923,14 +1931,14 @@ - + - + @@ -1950,7 +1958,7 @@ - + @@ -2001,7 +2009,7 @@ - + @@ -2068,10 +2076,10 @@ - + - - + + @@ -2118,8 +2126,8 @@ - - + + @@ -2128,7 +2136,7 @@ - + @@ -2158,7 +2166,7 @@ - + @@ -2196,7 +2204,7 @@ - + @@ -2337,7 +2345,7 @@ - + @@ -2346,7 +2354,7 @@ - + @@ -2503,6 +2511,13 @@ + + + + 16384 + + + @@ -2549,7 +2564,7 @@ - + @@ -2687,10 +2702,10 @@ - + - - + + @@ -2698,7 +2713,7 @@ - + @@ -2721,9 +2736,9 @@ - + - + @@ -2763,9 +2778,9 @@ - + - + @@ -2778,9 +2793,9 @@ - + - + @@ -2880,7 +2895,7 @@ - + @@ -2926,8 +2941,8 @@ - - + + @@ -2967,9 +2982,9 @@ - + - + @@ -3043,11 +3058,11 @@ - + - + - + @@ -3107,12 +3122,12 @@ - + - + - - + + @@ -3129,9 +3144,9 @@ - + - + @@ -3149,9 +3164,9 @@ - + - + @@ -3197,7 +3212,7 @@ - + @@ -3222,7 +3237,7 @@ - + @@ -3294,7 +3309,7 @@ - + @@ -3383,7 +3398,7 @@ - + @@ -3411,7 +3426,7 @@ - + @@ -3488,7 +3503,7 @@ - + @@ -3527,7 +3542,7 @@ - + @@ -3535,7 +3550,7 @@ - + @@ -3622,7 +3637,7 @@ - + @@ -3638,7 +3653,7 @@ - + @@ -3673,7 +3688,7 @@ - + @@ -3873,6 +3888,13 @@ + + + + 268435456 + + + @@ -4229,7 +4251,7 @@ - + @@ -4374,9 +4396,9 @@ - + - + @@ -4435,7 +4457,7 @@ - + @@ -4458,7 +4480,7 @@ - + @@ -4520,7 +4542,7 @@ - + @@ -4535,7 +4557,7 @@ - + @@ -4593,7 +4615,7 @@ - + @@ -4602,7 +4624,7 @@ - + @@ -4728,7 +4750,7 @@ - + @@ -4760,14 +4782,14 @@ - + - + @@ -4818,7 +4840,7 @@ - + @@ -4899,7 +4921,7 @@ - + @@ -4932,7 +4954,7 @@ - + @@ -4955,7 +4977,7 @@ - + @@ -5024,7 +5046,7 @@ - + @@ -5041,7 +5063,7 @@ - + @@ -5075,7 +5097,7 @@ - + @@ -5117,7 +5139,7 @@ - + @@ -5302,6 +5324,13 @@ + + + + 4194304 + + + @@ -5310,7 +5339,7 @@ - + @@ -5333,7 +5362,7 @@ - + @@ -5349,7 +5378,7 @@ - + @@ -5390,7 +5419,7 @@ - + @@ -5412,7 +5441,7 @@ - + @@ -5426,7 +5455,7 @@ - + @@ -5441,7 +5470,7 @@ - + @@ -5479,7 +5508,7 @@ - + @@ -5501,7 +5530,7 @@ - + @@ -5515,7 +5544,7 @@ - + @@ -5530,7 +5559,7 @@ - + @@ -5643,7 +5672,7 @@ - + @@ -5665,7 +5694,7 @@ - + @@ -5679,7 +5708,7 @@ - + @@ -5712,9 +5741,9 @@ - - - + + + @@ -5748,7 +5777,7 @@ - + @@ -5772,7 +5801,7 @@ - + @@ -5787,7 +5816,7 @@ - + @@ -5854,7 +5883,7 @@ - + @@ -5904,7 +5933,7 @@ - + @@ -5919,7 +5948,7 @@ - + @@ -5949,14 +5978,14 @@ - + - + @@ -6230,7 +6259,7 @@ - + @@ -6264,59 +6293,15 @@ - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -6338,7 +6323,7 @@ - + @@ -6352,7 +6337,7 @@ - + @@ -6391,10 +6376,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -6464,7 +6488,7 @@ - + @@ -6731,7 +6755,7 @@ - + @@ -6755,7 +6779,7 @@ - + @@ -6922,7 +6946,7 @@ - + @@ -6930,7 +6954,7 @@ - + @@ -6958,7 +6982,7 @@ - + @@ -7017,7 +7041,7 @@ - + @@ -7034,7 +7058,7 @@ - + @@ -7077,7 +7101,7 @@ - + @@ -7085,7 +7109,7 @@ - + @@ -7113,7 +7137,7 @@ - + @@ -7231,7 +7255,7 @@ - + @@ -7262,6 +7286,13 @@ + + + + + + + @@ -7284,6 +7315,13 @@ + + + + + + + @@ -7346,6 +7384,13 @@ + + + + + + + @@ -7377,6 +7422,13 @@ + + + + + + + @@ -7455,7 +7507,7 @@ - + @@ -7474,7 +7526,7 @@ - + @@ -7484,7 +7536,7 @@ - + @@ -7591,6 +7643,34 @@ + + + + 8192 + + + + + + + 16384 + + + + + + + 32768 + + + + + + + 65536 + + + @@ -7613,7 +7693,7 @@ - + @@ -7641,7 +7721,7 @@ - + @@ -7658,7 +7738,7 @@ - + @@ -7674,7 +7754,7 @@ - + @@ -7693,7 +7773,7 @@ - + @@ -7708,7 +7788,7 @@ - + @@ -7745,7 +7825,7 @@ - + @@ -7753,7 +7833,7 @@ - + @@ -7767,7 +7847,7 @@ - + @@ -10507,6 +10587,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -10526,7 +10630,7 @@ - + @@ -10550,7 +10654,7 @@ - + @@ -10574,7 +10678,7 @@ - + @@ -10598,7 +10702,7 @@ - + @@ -10622,7 +10726,7 @@ - + @@ -10646,7 +10750,7 @@ - + @@ -10670,7 +10774,7 @@ - + @@ -10694,7 +10798,7 @@ - + @@ -10718,7 +10822,7 @@ - + @@ -10742,7 +10846,7 @@ - + @@ -10766,7 +10870,7 @@ - + @@ -10790,7 +10894,7 @@ - + @@ -10814,7 +10918,7 @@ - + @@ -10838,7 +10942,7 @@ - + @@ -10862,7 +10966,7 @@ - + @@ -10886,7 +10990,7 @@ - + @@ -10910,7 +11014,7 @@ - + @@ -10934,7 +11038,7 @@ - + @@ -10958,7 +11062,7 @@ - + @@ -10982,7 +11086,7 @@ - + @@ -11006,7 +11110,7 @@ - + @@ -11030,7 +11134,7 @@ - + @@ -11054,7 +11158,7 @@ - + @@ -11078,7 +11182,7 @@ - + @@ -11102,7 +11206,7 @@ - + @@ -11126,7 +11230,7 @@ - + @@ -11150,7 +11254,7 @@ - + @@ -11174,7 +11278,7 @@ - + @@ -11198,7 +11302,7 @@ - + @@ -11222,7 +11326,7 @@ - + @@ -11246,7 +11350,7 @@ - + @@ -11270,7 +11374,7 @@ - + @@ -11294,7 +11398,7 @@ - + @@ -11318,7 +11422,7 @@ - + @@ -11342,7 +11446,7 @@ - + @@ -11366,7 +11470,7 @@ - + @@ -11390,7 +11494,7 @@ - + @@ -12032,6 +12136,12 @@ + + + + + + @@ -14696,6 +14806,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 81444ce3..3542f4e1 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -104,13 +104,14 @@ + - + @@ -132,7 +133,7 @@ - + @@ -141,7 +142,7 @@ - + @@ -163,16 +164,17 @@ - - - + + + + - + @@ -180,30 +182,30 @@ - + - + - + - - - + + + @@ -349,6 +351,20 @@ + + + + + + + + + + + + + + @@ -527,12 +543,47 @@ + + + + + + + + 0 + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index ad8ceb39..d493ae1d 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -602,6 +602,19 @@ + + + + + + + + + + + + + @@ -2088,6 +2101,7 @@ + @@ -2355,6 +2369,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -3326,6 +3361,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -3555,6 +3612,12 @@ + + + + + + @@ -4357,6 +4420,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index bd6031ed..c82f45f9 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -3159,6 +3159,7 @@ + diff --git a/setup.py b/setup.py index 36b6417b..6dbf0672 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.18' +VERSION = '13.0.18.1' with open('README.rst', 'r') as f: readme = f.read() @@ -21,7 +21,6 @@ version=VERSION, description='A library to make working with the Bing Ads APIs and bulk services easy', long_description=readme, - long_description_content_type ='text/x-rst', author='Bing Ads SDK Team', author_email='bing_ads_sdk@microsoft.com', url='https://github.com/BingAds/BingAds-Python-SDK', From 740cef1fecc7166f77ac881c5130c88633250216 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Tue, 30 Jan 2024 14:47:51 +0800 Subject: [PATCH 33/55] recover readme --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 6904e7ea..caef7c0f 100644 --- a/README.rst +++ b/README.rst @@ -11,14 +11,14 @@ with the Python programming language. The SDK includes proxy classes for all Bing Ads API web services and abstracts the low level details of authentication with OAuth. You can also read and write bulk files with the SDK BulkFileReader and BulkFileWriter, and use the high level BulkServiceManager interface to abstract and execute operations in the low level Bulk API. -For more information, see `Bing Ads Client Libraries `_. +For more information, see `Bing Ads Client Libraries `_. Getting Started --------------- To get started developing Bing Ads applications with Python, -install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. -For more information, see `Getting Started Using Python with Bing Ads Services `_. +install the SDK and either start with the `examples `_ or follow one of the application walkthroughs. +For more information, see `Getting Started Using Python with Bing Ads Services `_. External Dependencies --------------------- From 64bc0ed1440cce92a8191cb5750ce479a9939e7c Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Mon, 25 Mar 2024 14:17:33 +0800 Subject: [PATCH 34/55] v13.0.19 --- HISTORY.rst | 9 + bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 3 + .../bulk_account_negative_keyword_list.py | 164 ++++ bingads/v13/bulk/entities/bulk_campaign.py | 99 ++- .../v13/bulk/entities/bulk_data_exclusion.py | 95 ++ .../bulk/entities/bulk_negative_keywords.py | 29 +- .../entities/bulk_seasonality_adjustment.py | 102 +++ .../v13/internal/bulk/bulk_object_factory.py | 5 + bingads/v13/internal/bulk/csv_headers.py | 12 + bingads/v13/internal/bulk/string_table.py | 11 + bingads/v13/internal/extensions.py | 55 ++ .../proxies/production/adinsight_service.xml | 553 ++++++++++++ .../v13/proxies/production/bulk_service.xml | 84 ++ .../production/campaignmanagement_service.xml | 832 ++++++++++++++++++ .../proxies/production/reporting_service.xml | 2 + .../v13/proxies/sandbox/adinsight_service.xml | 553 ++++++++++++ bingads/v13/proxies/sandbox/bulk_service.xml | 84 ++ .../sandbox/campaignmanagement_service.xml | 804 +++++++++++++++++ .../v13/proxies/sandbox/reporting_service.xml | 2 + setup.py | 2 +- 21 files changed, 3487 insertions(+), 15 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_account_negative_keyword_list.py create mode 100644 bingads/v13/bulk/entities/bulk_data_exclusion.py create mode 100644 bingads/v13/bulk/entities/bulk_seasonality_adjustment.py diff --git a/HISTORY.rst b/HISTORY.rst index 4fc6d232..e8342b70 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,15 @@ .. :changelog: Release History +13.0.19(2024-03-25) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. +* Added bulk mappings for Account Level Negative Keyword List i.e., BulkAccountNegativeKeywordList, BulkAccountNegativeKeywordListAssociation and BulkAccountSharedNegativeKeyword. +* Added bulk mappings for BulkSeasonalityAdjustment and BulkDataExclusion. +* Removed mappings for VerifiedTrackingSetting field in BulkCampaign. +* Added mappings for new field in BulkCampaign: AutoGeneratedImageOptOut and AutoGeneratedTextOptOut. +* Added PerformanceMaxsetting for PageFeedIds field in BulkCampaign. +* Added mappings for new BiddingScheme: CostPerSaleBiddingScheme. 13.0.18.1(2024-01-30) +++++++++++++++++++++++++ diff --git a/bingads/manifest.py b/bingads/manifest.py index 43f9e22c..55facdf3 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.18.1' +VERSION = '13.0.19' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index e466cd25..b9022fc6 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -47,3 +47,6 @@ from .bulk_asset_group_listing_group import * from .bulk_audience_group_asset_group_association import * from .bulk_campaign_negative_webpage import * +from .bulk_seasonality_adjustment import * +from .bulk_data_exclusion import * +from .bulk_account_negative_keyword_list import * diff --git a/bingads/v13/bulk/entities/bulk_account_negative_keyword_list.py b/bingads/v13/bulk/entities/bulk_account_negative_keyword_list.py new file mode 100644 index 00000000..f786f8c5 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_account_negative_keyword_list.py @@ -0,0 +1,164 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import bulk_str + +class BulkAccountNegativeKeywordList(_SingleRecordBulkEntity): + """ Represents an account negative keyword list association that can be read or written in a bulk file. + + This class exposes the :attr:`.BulkAccountNegativeKeywordList.account_negative_keyword_list` property that can be read and + written as fields of the account negative keyword list association record in a bulk file. + + For more information, see account negative keyword list association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, account_negative_keyword_list=None): + super(BulkAccountNegativeKeywordList, self).__init__() + + self._status = status + self._account_negative_keyword_list = account_negative_keyword_list + + @property + def account_negative_keyword_list(self): + """ The account negative keyword list association. + + see account negative keyword list association at https://go.microsoft.com/fwlink/?linkid=846127. + """ + + return self._account_negative_keyword_list + + @account_negative_keyword_list.setter + def account_negative_keyword_list(self, account_negative_keyword_list): + self._account_negative_keyword_list = account_negative_keyword_list + + @property + def status(self): + """ The status of the account negative keyword list association. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.account_negative_keyword_list.Id), + csv_to_field=lambda c, v: setattr(c.account_negative_keyword_list, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: c.account_negative_keyword_list.Name, + csv_to_field=lambda c, v: setattr(c.account_negative_keyword_list, 'Name', v) + ) + ] + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._account_negative_keyword_list, 'account_negative_keyword_list') + self.convert_to_values(row_values, BulkAccountNegativeKeywordList._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self._account_negative_keyword_list = _CAMPAIGN_OBJECT_FACTORY_V13.create('AccountNegativeKeywordList') + self._account_negative_keyword_list.Type = 'AccountNegativeKeywordList' + row_values.convert_to_entity(self, BulkAccountNegativeKeywordList._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAccountNegativeKeywordList, self).read_additional_data(stream_reader) + +class BulkAccountNegativeKeywordListAssociation(_SingleRecordBulkEntity): + """ Represents an account negative keyword list association that is assigned to a campaign. Each account negative keyword list association can be read or written in a bulk file. + + This class exposes the :attr:`BulkAccountNegativeKeywordListAssociation.SharedEntityAssociation` property that can be read + and written as fields of the account negative keyword list association record in a bulk file. + + For more information, see account negative keyword list association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, shared_entity_association=None): + super(BulkAccountNegativeKeywordListAssociation, self).__init__() + + self._shared_entity_association = shared_entity_association + self._status = status + + @property + def status(self): + """ The status of the account negative keyword list association. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def shared_entity_association(self): + """ The campaign and account negative keyword list association identifiers. + + see Campaign account negative keyword list association at https://go.microsoft.com/fwlink/?linkid=846127. + """ + + return self._shared_entity_association + + @shared_entity_association.setter + def shared_entity_association(self, shared_entity_association): + self._shared_entity_association = shared_entity_association + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: c.status, + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.shared_entity_association.SharedEntityId), + csv_to_field=lambda c, v: setattr(c.shared_entity_association, 'SharedEntityId', int(v)) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.shared_entity_association.EntityId), + csv_to_field=lambda c, v: setattr(c.shared_entity_association, 'EntityId', int(v)) + ), + ] + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._shared_entity_association, 'shared_entity_association') + self.convert_to_values(row_values, BulkAccountNegativeKeywordListAssociation._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self._shared_entity_association = _CAMPAIGN_OBJECT_FACTORY_V13.create('SharedEntityAssociation') + self._shared_entity_association.EntityType = 'Account' + self._shared_entity_association.SharedEntityType = 'NegativeKeywordList' + row_values.convert_to_entity(self, BulkAccountNegativeKeywordListAssociation._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAccountNegativeKeywordListAssociation, self).read_additional_data(stream_reader) + + diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index 3ddc712a..7907b0a9 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -41,6 +41,7 @@ def __init__(self, account_id=None, campaign=None): self._verified_tracking_data = None self._destination_channel = None self._is_multi_channel_campaign = None + self._should_serve_on_msan = None @property def account_id(self): @@ -137,6 +138,14 @@ def is_multi_channel_campaign(self): def is_multi_channel_campaign(self, value): self._is_multi_channel_campaign = value + @property + def should_serve_on_msan(self): + return self._should_serve_on_msan + + @should_serve_on_msan.setter + def should_serve_on_msan(self, value): + self._should_serve_on_msan = value + def _get_dynamic_feed_setting(self): return self._get_setting(_DynamicFeedSetting, 'DynamicFeedSetting') @@ -419,20 +428,76 @@ def _read_page_feed_ids(c, v): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - dsa_setting = c._get_dsa_setting() - if not dsa_setting: - return None - dsa_setting.PageFeedIds.long = csv_to_field_PageFeedIds(v) + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + performance_max_setting.PageFeedIds.long = csv_to_field_PageFeedIds(v) + else: + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + dsa_setting.PageFeedIds.long = csv_to_field_PageFeedIds(v) @staticmethod def _write_page_feed_ids(c): if not c.campaign.CampaignType: return None campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] - dsa_setting = c._get_dsa_setting() - if not dsa_setting: + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + return field_to_csv_Ids(performance_max_setting.PageFeedIds, c.campaign.Id) + else: + dsa_setting = c._get_dsa_setting() + if not dsa_setting: + return None + return field_to_csv_Ids(dsa_setting.PageFeedIds, c.campaign.Id) + + @staticmethod + def _read_text_opt_out(c, v): + if not c.campaign.CampaignType: return None - return field_to_csv_Ids(dsa_setting.PageFeedIds, c.campaign.Id) + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + performance_max_setting.AutoGeneratedTextOptOut = parse_bool(v) + + @staticmethod + def _write_text_opt_out(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + return bulk_str(performance_max_setting.AutoGeneratedTextOptOut) + + @staticmethod + def _read_image_opt_out(c, v): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + performance_max_setting.AutoGeneratedImageOptOut = parse_bool(v) + + @staticmethod + def _write_image_opt_out(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + return bulk_str(performance_max_setting.AutoGeneratedImageOptOut) @staticmethod def _read_website(c, v): @@ -639,11 +704,6 @@ def _write_website(c): field_to_csv=lambda c: BulkCampaign._write_DynamicDescriptionEnabled(c), csv_to_field=lambda c, v: BulkCampaign._read_DynamicDescriptionEnabled(c, v) ), - _SimpleBulkMapping( - header=_StringTable.Details, - field_to_csv=lambda c: to_verified_tracking_setting_string(c.verified_tracking_data), - csv_to_field=lambda c, v: setattr(c, 'verified_tracking_data', parse_verified_tracking_setting(v) if v else None) - ), _SimpleBulkMapping( header=_StringTable.DestinationChannel, field_to_csv=lambda c: c.destination_channel, @@ -654,6 +714,21 @@ def _write_website(c): field_to_csv=lambda c: field_to_csv_bool(c.is_multi_channel_campaign), csv_to_field=lambda c, v: setattr(c, 'is_multi_channel_campaign', parse_bool(v)) ), + _SimpleBulkMapping( + header=_StringTable.AutoGeneratedTextOptOut, + field_to_csv=lambda c: BulkCampaign._write_text_opt_out(c), + csv_to_field=lambda c, v: BulkCampaign._read_text_opt_out(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.AutoGeneratedImageOptOut, + field_to_csv=lambda c: BulkCampaign._write_image_opt_out(c), + csv_to_field=lambda c, v: BulkCampaign._read_image_opt_out(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.ShouldServeOnMSAN, + field_to_csv=lambda c: field_to_csv_bool(c.should_serve_on_msan), + csv_to_field=lambda c, v: setattr(c, 'should_serve_on_msan', parse_bool(v)) + ), ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/bulk/entities/bulk_data_exclusion.py b/bingads/v13/bulk/entities/bulk_data_exclusion.py new file mode 100644 index 00000000..b55276d6 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_data_exclusion.py @@ -0,0 +1,95 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkDataExclusion(_SingleRecordBulkEntity): + """ Represents an data exclusion. + + This class exposes the property :attr:`data_exclusion` that can be read and written as fields of the data exclusion record + in a bulk file. + + For more information, see data exclusion at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, campaign_id=None, campaign_name=None, data_exclusion=None): + super(BulkDataExclusion, self).__init__() + + self._data_exclusion = data_exclusion + + @property + def data_exclusion(self): + """ The DataExclusion Data Object of the Campaign Management Service. + + A subset of DataExclusion properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._data_exclusion + + @data_exclusion.setter + def data_exclusion(self, data_exclusion): + self._data_exclusion = data_exclusion + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.data_exclusion.Id), + csv_to_field=lambda c, v: setattr(c.data_exclusion, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.DataExclusion, + field_to_csv=lambda c: bulk_str(c.data_exclusion.Name), + csv_to_field=lambda c, v: setattr(c.data_exclusion, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.StartDate, + field_to_csv=lambda c: bulk_datetime_str2(c.data_exclusion.StartDate), + csv_to_field=lambda c, v: setattr(c.data_exclusion, 'StartDate', parse_datetime2(v)) + ), + _SimpleBulkMapping( + header=_StringTable.EndDate, + field_to_csv=lambda c: bulk_datetime_str2(c.data_exclusion.EndDate), + csv_to_field=lambda c, v: setattr(c.data_exclusion, 'EndDate', parse_datetime2(v)) + ), + _SimpleBulkMapping( + header=_StringTable.Description, + field_to_csv=lambda c: c.data_exclusion.Description, + csv_to_field=lambda c, v: setattr(c.data_exclusion, 'Description', v) + ), + _SimpleBulkMapping( + header=_StringTable.CampaignType, + field_to_csv=lambda c: field_to_csv_CampaignType(c.data_exclusion), + csv_to_field=lambda c, v: csv_to_field_CampaignType(c.data_exclusion, v) + ), + _SimpleBulkMapping( + header=_StringTable.DeviceType, + field_to_csv=lambda c: bulk_str(c.data_exclusion.DeviceTypeFilter), + csv_to_field=lambda c, v: setattr(c.data_exclusion, 'DeviceTypeFilter', v) + ), + _SimpleBulkMapping( + header=_StringTable.CampaignAssociations, + field_to_csv=lambda c: field_to_csv_CampaignAssociations(c.data_exclusion), + csv_to_field=lambda c, v: csv_to_field_CampaignAssociations(c.data_exclusion, v) + ), + ] + + def process_mappings_from_row_values(self, row_values): + self.data_exclusion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DataExclusion') + + row_values.convert_to_entity(self, BulkDataExclusion._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._data_exclusion, 'DataExclusion') + self.convert_to_values(row_values, BulkDataExclusion._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkDataExclusion, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_negative_keywords.py b/bingads/v13/bulk/entities/bulk_negative_keywords.py index a20bceb3..bce51892 100644 --- a/bingads/v13/bulk/entities/bulk_negative_keywords.py +++ b/bingads/v13/bulk/entities/bulk_negative_keywords.py @@ -373,7 +373,6 @@ def process_mappings_from_row_values(self, row_values): def read_additional_data(self, stream_reader): super(BulkCampaignNegativeKeywordList, self).read_additional_data(stream_reader) - class BulkNegativeKeywordList(_SingleRecordBulkEntity): """ Represents a negative keyword list that can be read or written in a bulk file. @@ -480,3 +479,31 @@ def negative_keyword_list_id(self): @negative_keyword_list_id.setter def negative_keyword_list_id(self, value): self._parent_id = value + +class BulkAccountSharedNegativeKeyword(_BulkNegativeKeyword): + """ Represents an account negative keyword that is shared in a negative keyword list. + + Each shared negative keyword can be read or written in a bulk file. + This class exposes the :attr:`.BulkNegativeKeyword.NegativeKeyword` property that + can be read and written as fields of the Account Shared Negative Keyword record in a bulk file. + + For more information, see Account Shared Negative Keyword at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, negative_keyword=None, negative_keyword_list_id=None): + super(BulkAccountSharedNegativeKeyword, self).__init__(status, negative_keyword, negative_keyword_list_id) + + @property + def negative_keyword_list_id(self): + return self._parent_id + + @negative_keyword_list_id.setter + def negative_keyword_list_id(self, value): + self._parent_id = value diff --git a/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py b/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py new file mode 100644 index 00000000..111148ba --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py @@ -0,0 +1,102 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkSeasonalityAdjustment(_SingleRecordBulkEntity): + """ Represents an seasonality adjustment. + + This class exposes the property :attr:`seasonality_adjustment` that can be read and written as fields of the seasonality adjustment record + in a bulk file. + + For more information, see seasonality adjustment at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, campaign_id=None, campaign_name=None, seasonality_adjustment=None): + super(BulkSeasonalityAdjustment, self).__init__() + + self._seasonality_adjustment = seasonality_adjustment + + @property + def seasonality_adjustment(self): + """ The SeasonalityAdjustment Data Object of the Campaign Management Service. + + A subset of SeasonalityAdjustment properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._seasonality_adjustment + + @seasonality_adjustment.setter + def seasonality_adjustment(self, seasonality_adjustment): + self._seasonality_adjustment = seasonality_adjustment + + + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.seasonality_adjustment.Id), + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.SeasonalityAdjustment, + field_to_csv=lambda c: bulk_str(c.seasonality_adjustment.Name), + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.StartDate, + field_to_csv=lambda c: bulk_datetime_str2(c.seasonality_adjustment.StartDate), + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'StartDate', parse_datetime2(v)) + ), + _SimpleBulkMapping( + header=_StringTable.EndDate, + field_to_csv=lambda c: bulk_datetime_str2(c.seasonality_adjustment.EndDate), + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'EndDate', parse_datetime2(v)) + ), + _SimpleBulkMapping( + header=_StringTable.Description, + field_to_csv=lambda c: c.seasonality_adjustment.Description, + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'Description', v) + ), + _SimpleBulkMapping( + header=_StringTable.CampaignType, + field_to_csv=lambda c: field_to_csv_CampaignType(c.seasonality_adjustment), + csv_to_field=lambda c, v: csv_to_field_CampaignType(c.seasonality_adjustment, v) + ), + _SimpleBulkMapping( + header=_StringTable.DeviceType, + field_to_csv=lambda c: bulk_str(c.seasonality_adjustment.DeviceTypeFilter), + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'DeviceTypeFilter', v) + ), + _SimpleBulkMapping( + header=_StringTable.AdjustmentValue, + field_to_csv=lambda c: c.seasonality_adjustment.AdjustmentPercentage, + csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'AdjustmentPercentage', float(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.CampaignAssociations, + field_to_csv=lambda c: field_to_csv_CampaignAssociations(c.seasonality_adjustment), + csv_to_field=lambda c, v: csv_to_field_CampaignAssociations(c.seasonality_adjustment, v) + ), + ] + + def process_mappings_from_row_values(self, row_values): + self.seasonality_adjustment = _CAMPAIGN_OBJECT_FACTORY_V13.create('SeasonalityAdjustment') + + row_values.convert_to_entity(self, BulkSeasonalityAdjustment._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._seasonality_adjustment, 'SeasonalityAdjustment') + self.convert_to_values(row_values, BulkSeasonalityAdjustment._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkSeasonalityAdjustment, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 837804ae..b3d925da 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -209,6 +209,11 @@ class _BulkObjectFactory(): _StringTable.CampaignNegativeWebpage: _EntityInfo(lambda: BulkCampaignNegativeWebpage()), _StringTable.AssetGroupListingGroup: _EntityInfo(lambda: BulkAssetGroupListingGroup()), _StringTable.AudienceGroupAssetGroupAssociation: _EntityInfo(lambda: BulkAudienceGroupAssetGroupAssociation()), + _StringTable.SeasonalityAdjustment: _EntityInfo(lambda: BulkSeasonalityAdjustment()), + _StringTable.DataExclusion: _EntityInfo(lambda: BulkDataExclusion()), + 'Account Negative Keyword List': _EntityInfo(lambda: BulkAccountNegativeKeywordList()), + 'Account Negative Keyword List Association': _EntityInfo(lambda: BulkAccountNegativeKeywordListAssociation()), + 'Account Shared Negative Keyword': _EntityInfo(lambda: BulkAccountSharedNegativeKeyword()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 2a8b96e1..0fca20f9 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -328,6 +328,7 @@ class _CsvHeaders: _StringTable.BidStrategyTargetImpressionShare, _StringTable.BidStrategyCommissionRate, _StringTable.BidStrategyPercentMaxCpc, + _StringTable.BidStrategyTargetCostPerSale, # Ad Format Preference _StringTable.AdFormatPreference, @@ -469,6 +470,17 @@ class _CsvHeaders: _StringTable.CampaignNegativeWebpage, _StringTable.AssetGroupListingGroup, _StringTable.AudienceGroupAssetGroupAssociation, + _StringTable.AutoGeneratedTextOptOut, + _StringTable.AutoGeneratedImageOptOut, + + # Seasonality Adjustment + _StringTable.SeasonalityAdjustment, + _StringTable.DataExclusion, + _StringTable.DeviceType, + _StringTable.CampaignAssociations, + + # DNV Serving on MSAN + _StringTable.ShouldServeOnMSAN, ] @staticmethod diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 44c75f93..60c58410 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -435,6 +435,7 @@ class _StringTable: BidStrategyTargetImpressionShare = "Bid Strategy TargetImpressionShare" BidStrategyPercentMaxCpc = "Bid Strategy PercentMaxCpc" BidStrategyCommissionRate = "Bid Strategy CommissionRate" + BidStrategyTargetCostPerSale = "Bid Strategy TargetCostPerSale" # Remarketing Audience = "Audience" @@ -647,8 +648,18 @@ class _StringTable: AgeRanges = "Age Ranges" GenderTypes = "Gender Types" ParentListingGroupId = "Parent Listing Group Id" + AutoGeneratedTextOptOut = "Auto Generated Text Assets Opt Out" + AutoGeneratedImageOptOut = "Auto Generated Image Assets Opt Out" # MultiChannel Campaign DestinationChannel = "Destination Channel" IsMultiChannelCampaign = "Is Multi Channel Campaign" + # Seasonality Adjustment + SeasonalityAdjustment = "Seasonality Adjustment" + DataExclusion = "Data Exclusion" + DeviceType = "Device Type" + CampaignAssociations = "Campaign Associations" + + # DNV Serving on MSAN + ShouldServeOnMSAN = "Should Serve On MSAN" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 82f95bfc..228587e5 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -55,6 +55,7 @@ TextAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TextAsset')) ImageAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset')) VideoAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAsset')) +CampaignAssociation = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CampaignAssociation')) KeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:KeyValuePairOfstringstring')) ArrayOfKeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:ArrayOfKeyValuePairOfstringstring')) ArrayOfArrayOfKeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:ArrayOfArrayOfKeyValuePairOfstringstring')) @@ -188,6 +189,9 @@ def entity_csv_to_biddingscheme(row_values, entity): success, target_ad_position_value = row_values.try_get_value(_StringTable.BidStrategyTargetAdPosition) + success, target_cost_per_sale_row_value = row_values.try_get_value(_StringTable.BidStrategyTargetCostPerSale) + target_cost_per_sale_value = float(target_cost_per_sale_row_value) if target_cost_per_sale_row_value else None + if bid_strategy_type == 'MaxConversions': entity.BiddingScheme.MaxCpc = max_cpc_value entity.BiddingScheme.TargetCpa = target_cpa_value @@ -217,6 +221,9 @@ def entity_csv_to_biddingscheme(row_values, entity): elif bid_strategy_type == "Commission": entity.BiddingScheme.MaxPercentCpc = commission_rate_value entity.BiddingScheme.Type = "Commission" + elif bid_strategy_type == "CostPerSale": + entity.BiddingScheme.TargetCostPerSale = target_cost_per_sale_value + entity.BiddingScheme.Type = "CostPerSale" def bid_strategy_biddingscheme_to_csv(bulk_bid_strategy, row_values): entity_biddingscheme_to_csv(bulk_bid_strategy.bid_strategy, row_values) @@ -256,6 +263,8 @@ def entity_biddingscheme_to_csv(entity, row_values): row_values[_StringTable.BidStrategyPercentMaxCpc] = bulk_str(entity.BiddingScheme.MaxPercentCpc) elif bid_strategy_type == 'Commission': row_values[_StringTable.BidStrategyCommissionRate] = bulk_str(entity.BiddingScheme.CommissionRate) + elif bid_strategy_type == 'CostPerSale': + row_values[_StringTable.BidStrategyTargetCostPerSale] = bulk_str(entity.BiddingScheme.TargetCostPerSale) def bulk_optional_str(value, id): @@ -358,6 +367,37 @@ def csv_to_field_GenderTypes(entity, value): return entity.gender_types = [None if i == 'None' else i for i in value.split(';')] +def field_to_csv_CampaignType(entity): + campaign_type = entity.CampaignTypeFilter + if campaign_type is None or len(campaign_type) == 0: + return None + return ','.join(type for type in campaign_type) + +def csv_to_field_CampaignType(entity, value): + if value is None or value.strip() == '': + return + entity.CampaignTypeFilter = [None if i == 'None' else i for i in value.split(',')] + +def field_to_csv_CampaignAssociations(entity): + associations = entity.CampaignAssociations + if associations is None or len(associations.CampaignAssociation) == 0: + return None + result = "" + for association in associations.CampaignAssociation: + result += str(association.CampaignId) + ";" + return result[:-1] + +def csv_to_field_CampaignAssociations(entity, value): + if value is None or value.strip() == '': + return + result = [] + strs = value.split(';') + for str in strs: + association = CampaignAssociation() + association.CampaignId = int(str) + result.append(association) + entity.CampaignAssociations = result + def field_to_csv_MediaIds(entity): """ MediaIds field to csv content @@ -2027,3 +2067,18 @@ def to_operation(op): if op.lower() == 'or': return 'Or' if op.lower() == 'not': return 'Not' return none + +def bulk_datetime_str2(value): + if value is None: + return None + + return value.strftime('%Y/%m/%d %H:%M:%S') + +def parse_datetime2(value): + + if not value: + return None + try: + return datetime.strptime(value, '%Y/%m/%d %H:%M:%S') + except Exception: + return parse_datetime(value) diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index f1ac8dc9..f1cc7426 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3246,6 +3246,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 23 + + + + + + + 15 + + + + + + + 1 + + + + + + + 78 + + + + + + + 87 + + + + + + + 2 + + + + + + + 3 + + + + + + + 16 + + + + + + + 18 + + + + + + + 20 + + + + + + + 5 + + + + + + + 88 + + + + + + + 25 + + + + + + + 6 + + + + + + + 33 + + + + + + + 30 + + + + + + + 36 + + + + + + + 8 + + + + + + + 48 + + + + + + + 58 + + + + + + + 57 + + + + + + + 52 + + + + + + + 82 + + + + + + + 10 + + + + + + + 9 + + + + + + + 64 + + + + + + + 65 + + + + + + + 69 + + + + + + + 34 + + + + + + + 72 + + + + + + + 74 + + + + + + + 13 + + + + + + + 11 + + + + + + + 4 + + + + + + + 93 + + + + + + + 7 + + + + + + + 12 + + + + + + + 45 + + + + + + + 17 + + + + + + + 67 + + + + + + + 21 + + + + + + + 35 + + + + + + + 99 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4080,6 +4580,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -4267,6 +4791,12 @@ + + + + + + @@ -4984,6 +5514,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 5cc722a2..fad72b2e 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1191,6 +1191,90 @@ + + + + 161 + + + + + + + 162 + + + + + + + 163 + + + + + + + 164 + + + + + + + 165 + + + + + + + 166 + + + + + + + 167 + + + + + + + 168 + + + + + + + 169 + + + + + + + 170 + + + + + + + 171 + + + + + + + 172 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index c4bfb83d..a3711e86 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -947,6 +947,20 @@ + + + + + + + + + + + + + + @@ -1394,6 +1408,7 @@ + @@ -4766,6 +4781,16 @@ + + + + + + + + + + @@ -4881,6 +4906,14 @@ + + + + + + + + @@ -7286,6 +7319,13 @@ + + + + + + + @@ -7377,6 +7417,20 @@ + + + + + + + + + + + + + + @@ -7643,6 +7697,27 @@ + + + + 32768 + + + + + + + 65536 + + + + + + + 131072 + + + @@ -7887,6 +7962,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11471,6 +11773,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12336,6 +12878,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15652,6 +16254,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index a6162b12..fd612003 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -4113,6 +4113,7 @@ + @@ -4195,6 +4196,7 @@ + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 19468a03..a85e68f5 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3246,6 +3246,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 23 + + + + + + + 15 + + + + + + + 1 + + + + + + + 78 + + + + + + + 87 + + + + + + + 2 + + + + + + + 3 + + + + + + + 16 + + + + + + + 18 + + + + + + + 20 + + + + + + + 5 + + + + + + + 88 + + + + + + + 25 + + + + + + + 6 + + + + + + + 33 + + + + + + + 30 + + + + + + + 36 + + + + + + + 8 + + + + + + + 48 + + + + + + + 58 + + + + + + + 57 + + + + + + + 52 + + + + + + + 82 + + + + + + + 10 + + + + + + + 9 + + + + + + + 64 + + + + + + + 65 + + + + + + + 69 + + + + + + + 34 + + + + + + + 72 + + + + + + + 74 + + + + + + + 13 + + + + + + + 11 + + + + + + + 4 + + + + + + + 93 + + + + + + + 7 + + + + + + + 12 + + + + + + + 45 + + + + + + + 17 + + + + + + + 67 + + + + + + + 21 + + + + + + + 35 + + + + + + + 99 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4080,6 +4580,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -4267,6 +4791,12 @@ + + + + + + @@ -4984,6 +5514,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 8ba6e837..cc383e37 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1191,6 +1191,90 @@ + + + + 161 + + + + + + + 162 + + + + + + + 163 + + + + + + + 164 + + + + + + + 165 + + + + + + + 166 + + + + + + + 167 + + + + + + + 168 + + + + + + + 169 + + + + + + + 170 + + + + + + + 171 + + + + + + + 172 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 612c5333..4054fabf 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -947,6 +947,20 @@ + + + + + + + + + + + + + + @@ -1394,6 +1408,7 @@ + @@ -4766,6 +4781,16 @@ + + + + + + + + + + @@ -4881,6 +4906,14 @@ + + + + + + + + @@ -7391,6 +7424,13 @@ + + + + + + + @@ -7671,6 +7711,13 @@ + + + + 131072 + + + @@ -7915,6 +7962,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11499,6 +11773,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12364,6 +12878,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15680,6 +16254,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index c82f45f9..4b5a9a0b 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -4113,6 +4113,7 @@ + @@ -4195,6 +4196,7 @@ + diff --git a/setup.py b/setup.py index 6dbf0672..88f52c54 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.18.1' +VERSION = '13.0.19' with open('README.rst', 'r') as f: readme = f.read() From d40f69ea7ff248c16c0ba68dbf9854bbe26defff Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Tue, 9 Apr 2024 14:04:32 +0800 Subject: [PATCH 35/55] v13.0.19.1 --- HISTORY.rst | 4 + bingads/manifest.py | 2 +- .../v13/proxies/production/bulk_service.xml | 14 ++++ .../production/campaignmanagement_service.xml | 28 +++++++ .../proxies/production/reporting_service.xml | 80 ++++++++++++++++++- bingads/v13/proxies/sandbox/bulk_service.xml | 14 ++++ .../sandbox/campaignmanagement_service.xml | 28 +++++++ .../v13/proxies/sandbox/reporting_service.xml | 80 ++++++++++++++++++- setup.py | 2 +- 9 files changed, 248 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e8342b70..ab335629 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ .. :changelog: Release History +13.0.19.1(2024-04-09) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. + 13.0.19(2024-03-25) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. diff --git a/bingads/manifest.py b/bingads/manifest.py index 55facdf3..6dd47e39 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.19' +VERSION = '13.0.19.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index fad72b2e..48d9fde5 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1275,6 +1275,20 @@ + + + + 173 + + + + + + + 174 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index a3711e86..5ba6e7f9 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -7335,6 +7335,13 @@ + + + + + + + @@ -7450,6 +7457,13 @@ + + + + + + + @@ -7718,6 +7732,20 @@ + + + + 262144 + + + + + + + 524288 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index fd612003..569f9b80 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -1411,6 +1411,7 @@ + @@ -1539,6 +1540,7 @@ + @@ -1658,6 +1660,7 @@ + @@ -2669,6 +2672,7 @@ + @@ -3912,6 +3916,7 @@ + @@ -4209,6 +4214,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4226,7 +4304,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index cc383e37..59f5c4c4 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1275,6 +1275,20 @@ + + + + 173 + + + + + + + 174 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 4054fabf..3499ae96 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -7335,6 +7335,13 @@ + + + + + + + @@ -7450,6 +7457,13 @@ + + + + + + + @@ -7718,6 +7732,20 @@ + + + + 262144 + + + + + + + 524288 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 4b5a9a0b..6d5cdf40 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -1411,6 +1411,7 @@ + @@ -1539,6 +1540,7 @@ + @@ -1658,6 +1660,7 @@ + @@ -2669,6 +2672,7 @@ + @@ -3912,6 +3916,7 @@ + @@ -4209,6 +4214,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4226,7 +4304,7 @@ - + diff --git a/setup.py b/setup.py index 88f52c54..99afcfdd 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.19' +VERSION = '13.0.19.1' with open('README.rst', 'r') as f: readme = f.read() From e7c8134bffe601770516ad541d9ab6b13c9a1532 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Fri, 12 Apr 2024 21:23:58 +0800 Subject: [PATCH 36/55] update examples --- examples/v13/conversion_goals.py | 2 ++ examples/v13/offline_conversions.py | 1 + 2 files changed, 3 insertions(+) diff --git a/examples/v13/conversion_goals.py b/examples/v13/conversion_goals.py index 967ee793..b65bf30b 100644 --- a/examples/v13/conversion_goals.py +++ b/examples/v13/conversion_goals.py @@ -76,6 +76,7 @@ def main(authorization_data): conversion_goals.ConversionGoal.append(duration_goal) event_goal=set_elements_to_none(campaign_service.factory.create('EventGoal')) + event_goal.GoalCategory = "Purchase" # The type of user interaction you want to track. event_goal.ActionExpression = "play" event_goal.ActionOperator = 'Contains' @@ -118,6 +119,7 @@ def main(authorization_data): conversion_goals.ConversionGoal.append(pages_viewed_per_visit_goal) url_goal=set_elements_to_none(campaign_service.factory.create('UrlGoal')) + url_goal.GoalCategory = "Purchase" url_goal.ConversionWindowInMinutes = 30 url_goal.CountType = 'All' url_goal.Name = "My Url Goal" diff --git a/examples/v13/offline_conversions.py b/examples/v13/offline_conversions.py index a4910b8e..40f03991 100644 --- a/examples/v13/offline_conversions.py +++ b/examples/v13/offline_conversions.py @@ -15,6 +15,7 @@ def main(authorization_data): conversion_goals=campaign_service.factory.create('ArrayOfConversionGoal') offline_conversion_goal=set_elements_to_none(campaign_service.factory.create('OfflineConversionGoal')) + offline_conversion_goal.GoalCategory = "Purchase" # Determines how long after a click that you want to count offline conversions. offline_conversion_goal.ConversionWindowInMinutes = 43200 # If the count type is 'Unique' then only the first offline conversion will be counted. From 12beb39e732ea189f549e7be51f0b658c429cd45 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Mon, 22 Jul 2024 18:16:46 +0800 Subject: [PATCH 37/55] v13.0.21 --- HISTORY.rst | 10 + bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 5 + .../ad_extensions/bulk_image_ad_extensions.py | 2 +- .../v13/bulk/entities/audiences/__init__.py | 7 +- ...sion_based_remarketing_list_association.py | 14 + ...sion_based_remarketing_list_association.py | 14 + ...sion_based_remarketing_list_association.py | 14 + ...sion_based_remarketing_list_association.py | 14 + .../bulk_impression_based_remarketing_list.py | 67 +++++ bingads/v13/bulk/entities/bulk_account.py | 2 +- bingads/v13/bulk/entities/bulk_ad_group.py | 2 +- .../entities/bulk_asset_group_search_theme.py | 87 ++++++ bingads/v13/bulk/entities/bulk_brand_item.py | 207 +++++++++++++ bingads/v13/bulk/entities/bulk_brand_list.py | 88 ++++++ bingads/v13/bulk/entities/bulk_campaign.py | 29 +- .../bulk_campaign_brand_list_association.py | 120 ++++++++ .../v13/bulk/entities/bulk_data_exclusion.py | 10 +- bingads/v13/bulk/entities/bulk_keyword.py | 2 +- .../entities/bulk_seasonality_adjustment.py | 10 +- bingads/v13/bulk/entities/goals/__init__.py | 13 + .../entities/goals/bulk_app_install_goal.py | 64 ++++ .../entities/goals/bulk_conversion_goal.py | 125 ++++++++ .../bulk/entities/goals/bulk_duration_goal.py | 57 ++++ .../bulk/entities/goals/bulk_event_goal.py | 94 ++++++ .../goals/bulk_in_store_transaction_goal.py | 53 ++++ .../goals/bulk_in_store_visit_goal.py | 53 ++++ .../goals/bulk_offline_conversion_goal.py | 53 ++++ .../goals/bulk_pages_viewed_per_visit_goal.py | 57 ++++ .../bulk/entities/goals/bulk_product_goal.py | 53 ++++ .../v13/bulk/entities/goals/bulk_url_goal.py | 64 ++++ .../v13/internal/bulk/bulk_object_factory.py | 18 ++ bingads/v13/internal/bulk/csv_headers.py | 36 +++ bingads/v13/internal/bulk/string_table.py | 59 +++- bingads/v13/internal/extensions.py | 11 + .../v13/proxies/production/bulk_service.xml | 63 ++++ .../production/campaignmanagement_service.xml | 282 ++++++++++++++++-- .../production/customerbilling_service.xml | 14 + .../production/customermanagement_service.xml | 17 ++ .../proxies/production/reporting_service.xml | 105 ++++++- bingads/v13/proxies/sandbox/bulk_service.xml | 63 ++++ .../sandbox/campaignmanagement_service.xml | 282 ++++++++++++++++-- .../sandbox/customerbilling_service.xml | 15 + .../sandbox/customermanagement_service.xml | 17 ++ .../v13/proxies/sandbox/reporting_service.xml | 105 ++++++- setup.py | 2 +- 46 files changed, 2420 insertions(+), 61 deletions(-) create mode 100644 bingads/v13/bulk/entities/audiences/bulk_ad_group_impression_based_remarketing_list_association.py create mode 100644 bingads/v13/bulk/entities/audiences/bulk_ad_group_negative_impression_based_remarketing_list_association.py create mode 100644 bingads/v13/bulk/entities/audiences/bulk_campaign_impression_based_remarketing_list_association.py create mode 100644 bingads/v13/bulk/entities/audiences/bulk_campaign_negative_impression_based_remarketing_list_association.py create mode 100644 bingads/v13/bulk/entities/audiences/bulk_impression_based_remarketing_list.py create mode 100644 bingads/v13/bulk/entities/bulk_asset_group_search_theme.py create mode 100644 bingads/v13/bulk/entities/bulk_brand_item.py create mode 100644 bingads/v13/bulk/entities/bulk_brand_list.py create mode 100644 bingads/v13/bulk/entities/bulk_campaign_brand_list_association.py create mode 100644 bingads/v13/bulk/entities/goals/__init__.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_app_install_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_conversion_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_duration_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_event_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_in_store_transaction_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_in_store_visit_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_offline_conversion_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_pages_viewed_per_visit_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_product_goal.py create mode 100644 bingads/v13/bulk/entities/goals/bulk_url_goal.py diff --git a/HISTORY.rst b/HISTORY.rst index ab335629..a15a657d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,16 @@ .. :changelog: Release History +13.0.21(2024-07-18) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). +* Added bulk mappings for new AudienceType:ImpressionBasedRemarketingList i.e., BulkImpressionBasedRemarketingList, BulkAdGroupImpressionBasedRemarketingListAssociation, BulkAdGroupNegativeImpressionBasedRemarketingListAssociation, BulkCampaignImpressionBasedRemarketingListAssociation and BulkCampaignNegativeImpressionBasedRemarketingListAssociation. +* Added bulk mappings for Goals i.e., BulkAppInstallGoal, BulkDurationGoal, BulkEventGoal, BulkInStoreTransactionGoal, BulkInStoreVisitGoal, BulkOfflineConversionGoal, BulkPagesViewedPerVisitGoal, BulkProductGoal and BulkUrlGoal. +* Added bulk mappings for BulkBrandItem, BulkBrandList and BulkCampaignBrandListAssociation. +* Added bulk mappings for BulkAssetGroupSearchTheme. +* Added mappings for new field in BulkCampaign: CostPerSaleOptOut. +* Changed DeviceTypeFilter to enum list in BulkSeasonlityAdjustment and BulkDataExclusion. + 13.0.19.1(2024-04-09) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. diff --git a/bingads/manifest.py b/bingads/manifest.py index 6dd47e39..53448925 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.19.1' +VERSION = '13.0.21' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index b9022fc6..db4ace73 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -50,3 +50,8 @@ from .bulk_seasonality_adjustment import * from .bulk_data_exclusion import * from .bulk_account_negative_keyword_list import * +from .bulk_asset_group_search_theme import * +from .bulk_campaign_brand_list_association import * +from .bulk_brand_item import * +from .bulk_brand_list import * +from .goals import * diff --git a/bingads/v13/bulk/entities/ad_extensions/bulk_image_ad_extensions.py b/bingads/v13/bulk/entities/ad_extensions/bulk_image_ad_extensions.py index 9b06980e..3d274aa8 100644 --- a/bingads/v13/bulk/entities/ad_extensions/bulk_image_ad_extensions.py +++ b/bingads/v13/bulk/entities/ad_extensions/bulk_image_ad_extensions.py @@ -74,7 +74,7 @@ def image_ad_extension(self, value): ), _SimpleBulkMapping( header=_StringTable.TrackingTemplate, - field_to_csv=lambda c: bulk_str(c.image_ad_extension.TrackingUrlTemplate), + field_to_csv=lambda c: bulk_optional_str(c.image_ad_extension.TrackingUrlTemplate, c.image_ad_extension.Id), csv_to_field=lambda c, v: setattr(c.image_ad_extension, 'TrackingUrlTemplate', v if v else None) ), _SimpleBulkMapping( diff --git a/bingads/v13/bulk/entities/audiences/__init__.py b/bingads/v13/bulk/entities/audiences/__init__.py index 5f18f653..a4784b0b 100644 --- a/bingads/v13/bulk/entities/audiences/__init__.py +++ b/bingads/v13/bulk/entities/audiences/__init__.py @@ -41,4 +41,9 @@ from .bulk_ad_group_negative_customer_list_association import * from .bulk_campaign_customer_list_association import * from .bulk_campaign_negative_customer_list_association import * -from .bulk_customer_list_item import * \ No newline at end of file +from .bulk_customer_list_item import * +from .bulk_ad_group_impression_based_remarketing_list_association import * +from .bulk_ad_group_negative_impression_based_remarketing_list_association import * +from .bulk_campaign_impression_based_remarketing_list_association import * +from .bulk_campaign_negative_impression_based_remarketing_list_association import * +from .bulk_impression_based_remarketing_list import * diff --git a/bingads/v13/bulk/entities/audiences/bulk_ad_group_impression_based_remarketing_list_association.py b/bingads/v13/bulk/entities/audiences/bulk_ad_group_impression_based_remarketing_list_association.py new file mode 100644 index 00000000..f63f3582 --- /dev/null +++ b/bingads/v13/bulk/entities/audiences/bulk_ad_group_impression_based_remarketing_list_association.py @@ -0,0 +1,14 @@ +from bingads.v13.bulk.entities.audiences.bulk_ad_group_audience_association import BulkAdGroupAudienceAssociation + +class BulkAdGroupImpressionBasedRemarketingListAssociation(BulkAdGroupAudienceAssociation): + """ Represents an Ad Group Impression Based Remarketing List Association that can be read or written in a bulk file. + + For more information, see Ad Group Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ diff --git a/bingads/v13/bulk/entities/audiences/bulk_ad_group_negative_impression_based_remarketing_list_association.py b/bingads/v13/bulk/entities/audiences/bulk_ad_group_negative_impression_based_remarketing_list_association.py new file mode 100644 index 00000000..179dd160 --- /dev/null +++ b/bingads/v13/bulk/entities/audiences/bulk_ad_group_negative_impression_based_remarketing_list_association.py @@ -0,0 +1,14 @@ +from bingads.v13.bulk.entities.audiences.bulk_ad_group_negative_audience_association import BulkAdGroupNegativeAudienceAssociation + +class BulkAdGroupNegativeImpressionBasedRemarketingListAssociation(BulkAdGroupNegativeAudienceAssociation): + """ Represents an Ad Group Negative Impression Based Remarketing List Association that can be read or written in a bulk file. + + For more information, see Ad Group Negative Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ diff --git a/bingads/v13/bulk/entities/audiences/bulk_campaign_impression_based_remarketing_list_association.py b/bingads/v13/bulk/entities/audiences/bulk_campaign_impression_based_remarketing_list_association.py new file mode 100644 index 00000000..0d7796b2 --- /dev/null +++ b/bingads/v13/bulk/entities/audiences/bulk_campaign_impression_based_remarketing_list_association.py @@ -0,0 +1,14 @@ +from bingads.v13.bulk.entities.audiences.bulk_campaign_audience_association import BulkCampaignAudienceAssociation + +class BulkCampaignImpressionBasedRemarketingListAssociation(BulkCampaignAudienceAssociation): + """ Represents a Campaign Impression Based Remarketing List Association that can be read or written in a bulk file. + + For more information, see Campaign Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ diff --git a/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_impression_based_remarketing_list_association.py b/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_impression_based_remarketing_list_association.py new file mode 100644 index 00000000..658a91a6 --- /dev/null +++ b/bingads/v13/bulk/entities/audiences/bulk_campaign_negative_impression_based_remarketing_list_association.py @@ -0,0 +1,14 @@ +from bingads.v13.bulk.entities.audiences.bulk_campaign_negative_audience_association import BulkCampaignNegativeAudienceAssociation + +class BulkCampaignNegativeImpressionBasedRemarketingListAssociation(BulkCampaignNegativeAudienceAssociation): + """ Represents a Campaign Negative Impression Based Remarketing List Association that can be read or written in a bulk file. + + For more information, see Campaign Negative Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ diff --git a/bingads/v13/bulk/entities/audiences/bulk_impression_based_remarketing_list.py b/bingads/v13/bulk/entities/audiences/bulk_impression_based_remarketing_list.py new file mode 100644 index 00000000..f2709c73 --- /dev/null +++ b/bingads/v13/bulk/entities/audiences/bulk_impression_based_remarketing_list.py @@ -0,0 +1,67 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_audience import BulkAudience + +class BulkImpressionBasedRemarketingList(BulkAudience): + """ Represents a Impression Based Remarketing List that can be read or written in a bulk file. + + This class exposes the :attr:`impression_based_remarketing_list` property that can be read and written as fields of the + Impression Based Remarketing List record in a bulk file. + + For more information, see Impression Based Remarketing List at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + impression_based_remarketing_list=None, + status=None,): + super(BulkImpressionBasedRemarketingList, self).__init__(audience = impression_based_remarketing_list, status = status) + + _MAPPINGS = [ + _SimpleBulkMapping( + _StringTable.ImpressionCampaignId, + field_to_csv=lambda c: bulk_str(c.impression_based_remarketing_list.CampaignId), + csv_to_field=lambda c, v: setattr(c.impression_based_remarketing_list, 'CampaignId', int(v) if v else None) + ), + _SimpleBulkMapping( + _StringTable.ImpressionAdGroupId, + field_to_csv=lambda c: bulk_str(c.impression_based_remarketing_list.AdGroupId), + csv_to_field=lambda c, v: setattr(c.impression_based_remarketing_list, 'AdGroupId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.EntityType, + field_to_csv=lambda c: bulk_str(c.impression_based_remarketing_list.EntityType), + csv_to_field=lambda c, v: setattr(c.impression_based_remarketing_list, 'EntityType', v) + ), + ] + + @property + def impression_based_remarketing_list(self): + """ Defines a Impression Based Remarketing List """ + + return self._audience + + @impression_based_remarketing_list.setter + def impression_based_remarketing_list(self, impression_based_remarketing_list): + self._audience = impression_based_remarketing_list + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.impression_based_remarketing_list, 'impression_based_remarketing_list') + super(BulkImpressionBasedRemarketingList, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkImpressionBasedRemarketingList._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.impression_based_remarketing_list = _CAMPAIGN_OBJECT_FACTORY_V13.create('ImpressionBasedRemarketingList') + super(BulkImpressionBasedRemarketingList, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkImpressionBasedRemarketingList._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/bulk_account.py b/bingads/v13/bulk/entities/bulk_account.py index 8d80bf7d..29b67e9f 100644 --- a/bingads/v13/bulk/entities/bulk_account.py +++ b/bingads/v13/bulk/entities/bulk_account.py @@ -191,7 +191,7 @@ def business_attributes(self, v): ), _SimpleBulkMapping( header=_StringTable.TrackingTemplate, - field_to_csv=lambda c: bulk_str(c.tracking_url_template), + field_to_csv=lambda c: bulk_optional_str(c.tracking_url_template, c.id), csv_to_field=lambda c, v: setattr(c, '_tracking_url_template', v) ), _SimpleBulkMapping( diff --git a/bingads/v13/bulk/entities/bulk_ad_group.py b/bingads/v13/bulk/entities/bulk_ad_group.py index 758c1bec..f820234d 100644 --- a/bingads/v13/bulk/entities/bulk_ad_group.py +++ b/bingads/v13/bulk/entities/bulk_ad_group.py @@ -215,7 +215,7 @@ def quality_score_data(self): ), _SimpleBulkMapping( header=_StringTable.TrackingTemplate, - field_to_csv=lambda c: bulk_str(c.ad_group.TrackingUrlTemplate), + field_to_csv=lambda c: bulk_optional_str(c.ad_group.TrackingUrlTemplate, c.ad_group.Id), csv_to_field=lambda c, v: setattr(c.ad_group, 'TrackingUrlTemplate', v if v else None) ), _SimpleBulkMapping( diff --git a/bingads/v13/bulk/entities/bulk_asset_group_search_theme.py b/bingads/v13/bulk/entities/bulk_asset_group_search_theme.py new file mode 100644 index 00000000..5bbdf222 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_asset_group_search_theme.py @@ -0,0 +1,87 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAssetGroupSearchTheme(_SingleRecordBulkEntity): + """ Represents an asset group search theme. + + This class exposes the property :attr:`asset_group_search_theme` that can be read and written as fields of the asset group search theme record + in a bulk file. + + For more information, see asset group search theme at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, asset_group_id=None, asset_group_search_theme=None): + super(BulkAssetGroupSearchTheme, self).__init__() + + self._asset_group_search_theme = asset_group_search_theme + self._asset_group_id = asset_group_id + + @property + def asset_group_search_theme(self): + """ The AssetGroupSearchTheme Data Object of the Campaign Management Service. + + A subset of AssetGroupSearchTheme properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._asset_group_search_theme + + @asset_group_search_theme.setter + def asset_group_search_theme(self, asset_group_search_theme): + self._asset_group_search_theme = asset_group_search_theme + + @property + def asset_group_id(self): + """ The identifier of the asset group that contains the search theme. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._asset_group_id + + @asset_group_id.setter + def asset_group_id(self, asset_group_id): + self._asset_group_id = asset_group_id + + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.asset_group_search_theme.Id), + csv_to_field=lambda c, v: setattr(c.asset_group_search_theme, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.asset_group_id), + csv_to_field=lambda c, v: setattr(c, 'asset_group_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.SearchTheme, + field_to_csv=lambda c: bulk_str(c.asset_group_search_theme.SearchTheme), + csv_to_field=lambda c, v: setattr(c.asset_group_search_theme, 'SearchTheme', v) + ), + ] + + def process_mappings_from_row_values(self, row_values): + self.asset_group_search_theme = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetGroupSearchTheme') + + row_values.convert_to_entity(self, BulkAssetGroupSearchTheme._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._asset_group_search_theme, 'AssetGroupSearchTheme') + self.convert_to_values(row_values, BulkAssetGroupSearchTheme._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAssetGroupSearchTheme, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_brand_item.py b/bingads/v13/bulk/entities/bulk_brand_item.py new file mode 100644 index 00000000..30a93fcb --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_brand_item.py @@ -0,0 +1,207 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkBrandItem(_SingleRecordBulkEntity): + """ Represents a brand item. + + This class exposes the property :attr:`brand_item` that can be read and written as fields of the brand item record + in a bulk file. + + For more information, see brand item at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id=None, brand_list_id=None, name=None, brand_name=None, brand_url=None, editorial_status=None, editorial_status_date=None, brand_item=None): + super(BulkBrandItem, self).__init__() + + self._id = id + self._brand_list_id = brand_list_id + self._name = name + self._brand_name = brand_name + self._brand_url = brand_url + self._editorial_status = editorial_status + self._editorial_status_date = editorial_status_date + self._brand_item = brand_item + + @property + def brand_item(self): + """ The BrandItem Data Object of the Campaign Management Service. + + A subset of BrandItem properties are available in the Brand Item record. + For more information, see Brand Item at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._brand_item + + @brand_item.setter + def brand_item(self, brand_item): + self._brand_item = brand_item + + @property + def id(self): + """ The identifier of the brand item. + + Corresponds to the 'Id' field in the bulk file. + + :rtype: int + """ + + return self._id + + @id.setter + def id(self, id): + self._id = id + + @property + def brand_list_id(self): + """ The identifier of the brand list that contains the brand item. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._brand_list_id + + @brand_list_id.setter + def brand_list_id(self, brand_list_id): + self._brand_list_id = brand_list_id + + @property + def name(self): + """ The name of the brand item. + + Corresponds to the 'Name' field in the bulk file. + + :rtype: str + """ + + return self._name + + @name.setter + def name(self, name): + self._name = name + + @property + def brand_name(self): + """ The name of the brand. + + Corresponds to the 'Brand Name' field in the bulk file. + + :rtype: str + """ + + return self._brand_name + + @brand_name.setter + def brand_name(self, brand_name): + self._brand_name = brand_name + + @property + def brand_url(self): + """ The url of the brand. + + Corresponds to the 'Brand Url' field in the bulk file. + + :rtype: str + """ + + return self._brand_url + + @brand_url.setter + def brand_url(self, brand_url): + self._brand_url = brand_url + + @property + def editorial_status(self): + """ The editorial status + + Corresponds to the 'Editorial Status' field in the bulk file. + + :rtype: str + """ + + return self._editorial_status + + @editorial_status.setter + def editorial_status(self, editorial_status): + self._editorial_status = editorial_status + + @property + def editorial_status_date(self): + """ The editorial status date + + Corresponds to the 'Editorial Status Date' field in the bulk file. + + :rtype: str + """ + + return self._editorial_status_date + + @editorial_status_date.setter + def editorial_status_date(self, editorial_status_date): + self._editorial_status_date = editorial_status_date + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.id), + csv_to_field=lambda c, v: setattr(c, 'id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.name), + csv_to_field=lambda c, v: setattr(c, 'name', v) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.brand_list_id), + csv_to_field=lambda c, v: setattr(c, 'brand_list_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.BrandId, + field_to_csv=lambda c: bulk_str(c.brand_item.BrandId), + csv_to_field=lambda c, v: setattr(c.brand_item, 'BrandId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.BrandName, + field_to_csv=lambda c: bulk_str(c.brand_name), + csv_to_field=lambda c, v: setattr(c, 'brand_name', v) + ), + _SimpleBulkMapping( + header=_StringTable.BrandUrl, + field_to_csv=lambda c: bulk_str(c.brand_url), + csv_to_field=lambda c, v: setattr(c, 'brand_url', v) + ), + _SimpleBulkMapping( + header=_StringTable.EditorialStatus, + field_to_csv=lambda c: bulk_str(c.editorial_status), + csv_to_field=lambda c, v: setattr(c, 'editorial_status', v) + ), + _SimpleBulkMapping( + header=_StringTable.StatusDateTime, + field_to_csv=lambda c: bulk_datetime_str2(c.editorial_status_date), + csv_to_field=lambda c, v: setattr(c, 'editorial_status_date', parse_datetime2(v)) + ), + ] + + def process_mappings_from_row_values(self, row_values): + self.brand_item = _CAMPAIGN_OBJECT_FACTORY_V13.create('BrandItem') + + row_values.convert_to_entity(self, BulkBrandItem._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.brand_item, 'BrandItem') + self.convert_to_values(row_values, BulkBrandItem._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkBrandItem, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_brand_list.py b/bingads/v13/bulk/entities/bulk_brand_list.py new file mode 100644 index 00000000..ae0c9964 --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_brand_list.py @@ -0,0 +1,88 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkBrandList(_SingleRecordBulkEntity): + """ Represents a campaign brand list association. + + This class exposes the property :attr:`campaign_brand_list_association` that can be read and written as fields of the campaign brand list association record + in a bulk file. + + For more information, see campaign brand list association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, account_id=None, brand_list=None): + super(BulkBrandList, self).__init__() + + self._account_id = account_id + self._brand_list = brand_list + + @property + def brand_list(self): + """ The BrandList Data Object of the Campaign Management Service. + + A subset of BrandList properties are available in the Brand List record. + For more information, see Brand Item at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._brand_list + + @brand_list.setter + def brand_list(self, brand_list): + self._brand_list = brand_list + + @property + def account_id(self): + """ The identifier of the account that contains the brand list. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._account_id + + @account_id.setter + def account_id(self, account_id): + self._account_id = account_id + + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.brand_list.Id), + csv_to_field=lambda c, v: setattr(c.brand_list, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.brand_list.Name), + csv_to_field=lambda c, v: setattr(c.brand_list, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.account_id), + csv_to_field=lambda c, v: setattr(c, 'account_id', int(v) if v else None) + ), + + ] + + def process_mappings_from_row_values(self, row_values): + self.brand_list = _CAMPAIGN_OBJECT_FACTORY_V13.create('BrandList') + + row_values.convert_to_entity(self, BulkBrandList._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.brand_list, 'BrandList') + self.convert_to_values(row_values, BulkBrandList._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkBrandList, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index 7907b0a9..e9d9bfcb 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -477,6 +477,28 @@ def _write_text_opt_out(c): return None return bulk_str(performance_max_setting.AutoGeneratedTextOptOut) + @staticmethod + def _read_cost_per_sale_opt_out(c, v): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + performance_max_setting.CostPerSaleOptOut = parse_bool(v) + + @staticmethod + def _write_cost_per_sale_opt_out(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + performance_max_setting = c._get_performance_max_setting() + if not performance_max_setting: + return None + return bulk_str(performance_max_setting.CostPerSaleOptOut) + @staticmethod def _read_image_opt_out(c, v): if not c.campaign.CampaignType: @@ -600,7 +622,7 @@ def _write_website(c): ), _SimpleBulkMapping( header=_StringTable.TrackingTemplate, - field_to_csv=lambda c: bulk_str(c.campaign.TrackingUrlTemplate), + field_to_csv=lambda c: bulk_optional_str(c.campaign.TrackingUrlTemplate, c.campaign.Id), csv_to_field=lambda c, v: setattr(c.campaign, 'TrackingUrlTemplate', v if v else None) ), _SimpleBulkMapping( @@ -724,6 +746,11 @@ def _write_website(c): field_to_csv=lambda c: BulkCampaign._write_image_opt_out(c), csv_to_field=lambda c, v: BulkCampaign._read_image_opt_out(c, v) ), + _SimpleBulkMapping( + header=_StringTable.CostPerSaleOptOut, + field_to_csv=lambda c: BulkCampaign._write_cost_per_sale_opt_out(c), + csv_to_field=lambda c, v: BulkCampaign._read_cost_per_sale_opt_out(c, v) + ), _SimpleBulkMapping( header=_StringTable.ShouldServeOnMSAN, field_to_csv=lambda c: field_to_csv_bool(c.should_serve_on_msan), diff --git a/bingads/v13/bulk/entities/bulk_campaign_brand_list_association.py b/bingads/v13/bulk/entities/bulk_campaign_brand_list_association.py new file mode 100644 index 00000000..36da8e8c --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_campaign_brand_list_association.py @@ -0,0 +1,120 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkCampaignBrandListAssociation(_SingleRecordBulkEntity): + """ Represents a campaign brand list association. + + This class exposes the property :attr:`campaign_brand_list_association` that can be read and written as fields of the campaign brand list association record + in a bulk file. + + For more information, see campaign brand list association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, id=None, campaign_id=None, name=None, is_excluded=None): + super(BulkCampaignBrandListAssociation, self).__init__() + + self._id = id + self._campaign_id = campaign_id + self._name = name + self._is_excluded = is_excluded + + @property + def id(self): + """ The identifier of the campaign brand list association. + + Corresponds to the 'Id' field in the bulk file. + + :rtype: int + """ + + return self._id + + @id.setter + def id(self, id): + self._id = id + + @property + def campaign_id(self): + """ The identifier of the campaign that contains the brand list association. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._campaign_id + + @campaign_id.setter + def campaign_id(self, campaign_id): + self._campaign_id = campaign_id + + @property + def name(self): + """ The name of the brand list association. + + Corresponds to the 'Name' field in the bulk file. + + :rtype: str + """ + + return self._name + + @name.setter + def name(self, name): + self._name = name + + @property + def is_excluded(self): + """ Corresponds to the 'Is Excluded' field in the bulk file. + + :rtype: bool + """ + + return self._is_excluded + + @is_excluded.setter + def is_excluded(self, is_excluded): + self._is_excluded = is_excluded + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.id), + csv_to_field=lambda c, v: setattr(c, 'id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.name), + csv_to_field=lambda c, v: setattr(c, 'name', v) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.campaign_id), + csv_to_field=lambda c, v: setattr(c, 'campaign_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.IsExcluded, + field_to_csv=lambda c: bulk_str(c.is_excluded), + csv_to_field=lambda c, v: setattr(c, 'is_excluded', parse_bool(v)) + ), + ] + + def process_mappings_from_row_values(self, row_values): + row_values.convert_to_entity(self, BulkCampaignBrandListAssociation._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkCampaignBrandListAssociation._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkCampaignBrandListAssociation, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/bulk_data_exclusion.py b/bingads/v13/bulk/entities/bulk_data_exclusion.py index b55276d6..d887eab7 100644 --- a/bingads/v13/bulk/entities/bulk_data_exclusion.py +++ b/bingads/v13/bulk/entities/bulk_data_exclusion.py @@ -21,7 +21,7 @@ class BulkDataExclusion(_SingleRecordBulkEntity): * :class:`.BulkFileWriter` """ - def __init__(self, campaign_id=None, campaign_name=None, data_exclusion=None): + def __init__(self, data_exclusion=None): super(BulkDataExclusion, self).__init__() self._data_exclusion = data_exclusion @@ -30,8 +30,8 @@ def __init__(self, campaign_id=None, campaign_name=None, data_exclusion=None): def data_exclusion(self): """ The DataExclusion Data Object of the Campaign Management Service. - A subset of DataExclusion properties are available in the Ad Group record. - For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + A subset of DataExclusion properties are available in the Data Exclusion record. + For more information, see Data Exclusion at https://go.microsoft.com/fwlink/?linkid=846127. """ return self._data_exclusion @@ -72,8 +72,8 @@ def data_exclusion(self, data_exclusion): ), _SimpleBulkMapping( header=_StringTable.DeviceType, - field_to_csv=lambda c: bulk_str(c.data_exclusion.DeviceTypeFilter), - csv_to_field=lambda c, v: setattr(c.data_exclusion, 'DeviceTypeFilter', v) + field_to_csv=lambda c: field_to_csv_DeviceType(c.data_exclusion), + csv_to_field=lambda c, v: csv_to_field_DeviceType(c.data_exclusion, v) ), _SimpleBulkMapping( header=_StringTable.CampaignAssociations, diff --git a/bingads/v13/bulk/entities/bulk_keyword.py b/bingads/v13/bulk/entities/bulk_keyword.py index 9b727921..2caa6bff 100644 --- a/bingads/v13/bulk/entities/bulk_keyword.py +++ b/bingads/v13/bulk/entities/bulk_keyword.py @@ -250,7 +250,7 @@ def bid_suggestions(self): ), _SimpleBulkMapping( header=_StringTable.TrackingTemplate, - field_to_csv=lambda c: bulk_str(c.keyword.TrackingUrlTemplate), + field_to_csv=lambda c: bulk_optional_str(c.keyword.TrackingUrlTemplate, c.keyword.Id), csv_to_field=lambda c, v: setattr(c.keyword, 'TrackingUrlTemplate', v if v else None) ), _SimpleBulkMapping( diff --git a/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py b/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py index 111148ba..f03079ee 100644 --- a/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py +++ b/bingads/v13/bulk/entities/bulk_seasonality_adjustment.py @@ -21,7 +21,7 @@ class BulkSeasonalityAdjustment(_SingleRecordBulkEntity): * :class:`.BulkFileWriter` """ - def __init__(self, campaign_id=None, campaign_name=None, seasonality_adjustment=None): + def __init__(self, seasonality_adjustment=None): super(BulkSeasonalityAdjustment, self).__init__() self._seasonality_adjustment = seasonality_adjustment @@ -30,8 +30,8 @@ def __init__(self, campaign_id=None, campaign_name=None, seasonality_adjustment= def seasonality_adjustment(self): """ The SeasonalityAdjustment Data Object of the Campaign Management Service. - A subset of SeasonalityAdjustment properties are available in the Ad Group record. - For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + A subset of SeasonalityAdjustment properties are available in the Seasonality Adjustment record. + For more information, see Seasonality Adjustment at https://go.microsoft.com/fwlink/?linkid=846127. """ return self._seasonality_adjustment @@ -74,8 +74,8 @@ def seasonality_adjustment(self, seasonality_adjustment): ), _SimpleBulkMapping( header=_StringTable.DeviceType, - field_to_csv=lambda c: bulk_str(c.seasonality_adjustment.DeviceTypeFilter), - csv_to_field=lambda c, v: setattr(c.seasonality_adjustment, 'DeviceTypeFilter', v) + field_to_csv=lambda c: field_to_csv_DeviceType(c.seasonality_adjustment), + csv_to_field=lambda c, v: csv_to_field_DeviceType(c.seasonality_adjustment, v) ), _SimpleBulkMapping( header=_StringTable.AdjustmentValue, diff --git a/bingads/v13/bulk/entities/goals/__init__.py b/bingads/v13/bulk/entities/goals/__init__.py new file mode 100644 index 00000000..473d18cb --- /dev/null +++ b/bingads/v13/bulk/entities/goals/__init__.py @@ -0,0 +1,13 @@ +__author__ = 'Bing Ads SDK Team' +__email__ = 'bing_ads_sdk@microsoft.com' + +from .bulk_conversion_goal import * +from .bulk_app_install_goal import * +from .bulk_event_goal import * +from .bulk_duration_goal import * +from .bulk_in_store_transaction_goal import * +from .bulk_in_store_visit_goal import * +from .bulk_offline_conversion_goal import * +from .bulk_pages_viewed_per_visit_goal import * +from .bulk_product_goal import * +from .bulk_url_goal import * diff --git a/bingads/v13/bulk/entities/goals/bulk_app_install_goal.py b/bingads/v13/bulk/entities/goals/bulk_app_install_goal.py new file mode 100644 index 00000000..89decb0b --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_app_install_goal.py @@ -0,0 +1,64 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkAppInstallGoal(BulkConversionGoal): + """ Represents an AppInstall Goal that can be read or written in a bulk file. + + This class exposes the :attr:`app_install_goal` property that can be read and written as fields of the + AppInstall Goal record in a bulk file. + + For more information, see AppInstall Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + app_install_goal=None): + super(BulkAppInstallGoal, self).__init__(conversion_goal = app_install_goal) + + _MAPPINGS = [ + + _SimpleBulkMapping( + header=_StringTable.AppPlatform, + field_to_csv=lambda c: bulk_str(c.app_install_goal.AppPlatform), + csv_to_field=lambda c, v: setattr(c.app_install_goal, 'AppPlatform', v) + ), + _SimpleBulkMapping( + header=_StringTable.AppStoreId, + field_to_csv=lambda c: bulk_str(c.app_install_goal.AppStoreId), + csv_to_field=lambda c, v: setattr(c.app_install_goal, 'AppStoreId', v) + ), + + ] + + @property + def app_install_goal(self): + """ Defines a AppInstall Goal """ + + return self._conversion_goal + + @app_install_goal.setter + def app_install_goal(self, app_install_goal): + self._conversion_goal = app_install_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.app_install_goal, 'app_install_goal') + super(BulkAppInstallGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkAppInstallGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.app_install_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('AppInstallGoal') + super(BulkAppInstallGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkAppInstallGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_conversion_goal.py b/bingads/v13/bulk/entities/goals/bulk_conversion_goal.py new file mode 100644 index 00000000..e3c90b8a --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_conversion_goal.py @@ -0,0 +1,125 @@ +from bingads.v13.bulk.entities import * +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from decimal import Decimal + +class BulkConversionGoal(_SingleRecordBulkEntity): + """ Represents a ConversionGoal that can be read or written in a bulk file. + + This class exposes the :attr:`conversion_goal` property that can be read and written as fields of the + ConversionGoal record in a bulk file. + + For more information, see ConversionGoal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + conversion_goal=None): + super(BulkConversionGoal, self).__init__() + + self._conversion_goal = conversion_goal + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Status), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'Status', v) + ), + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Id), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Name), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'Name', v) + ), + _SimpleBulkMapping( + header=_StringTable.AttributionModelType, + field_to_csv=lambda c: bulk_str(c.conversion_goal.AttributionModelType), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'AttributionModelType', v) + ), + _SimpleBulkMapping( + header=_StringTable.ConversionWindowInMinutes, + field_to_csv=lambda c: bulk_str(c.conversion_goal.ConversionWindowInMinutes), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'ConversionWindowInMinutes', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.CountType, + field_to_csv=lambda c: bulk_str(c.conversion_goal.CountType), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'CountType', v) + ), + _SimpleBulkMapping( + header=_StringTable.ExcludeFromBidding, + field_to_csv=lambda c: bulk_str(c.conversion_goal.ExcludeFromBidding), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'ExcludeFromBidding', parse_bool(v)) + ), + _SimpleBulkMapping( + header=_StringTable.GoalCategory, + field_to_csv=lambda c: bulk_str(c.conversion_goal.GoalCategory), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'GoalCategory', v) + ), + _SimpleBulkMapping( + header=_StringTable.IsEnhancedConversionsEnabled, + field_to_csv=lambda c: bulk_str(c.conversion_goal.IsEnhancedConversionsEnabled), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'IsEnhancedConversionsEnabled', parse_bool(v)) + ), + _SimpleBulkMapping( + header=_StringTable.CurrencyCode, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Revenue.CurrencyCode), + csv_to_field=lambda c, v: setattr(c.conversion_goal.Revenue, 'CurrencyCode', v) + ), + _SimpleBulkMapping( + header=_StringTable.RevenueValue, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Revenue.Value), + csv_to_field=lambda c, v: setattr(c.conversion_goal.Revenue, 'Value', Decimal(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.RevenueType, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Revenue.Type), + csv_to_field=lambda c, v: setattr(c.conversion_goal.Revenue, 'Type', v) + ), + _SimpleBulkMapping( + header=_StringTable.Scope, + field_to_csv=lambda c: bulk_str(c.conversion_goal.Scope), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'Scope', v) + ), + _SimpleBulkMapping( + header=_StringTable.TagId, + field_to_csv=lambda c: bulk_str(c.conversion_goal.TagId), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'TagId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ViewThroughConversionWindowInMinutes, + field_to_csv=lambda c: bulk_str(c.conversion_goal.ViewThroughConversionWindowInMinutes), + csv_to_field=lambda c, v: setattr(c.conversion_goal, 'ViewThroughConversionWindowInMinutes', int(v) if v else None) + ), + ] + + @property + def conversion_goal(self): + """ Defines a ConversionGoal """ + + return self._conversion_goal + + @conversion_goal.setter + def conversion_goal(self, conversion_goal): + self._conversion_goal = conversion_goal + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkConversionGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + row_values.convert_to_entity(self, BulkConversionGoal._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkConversionGoal, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/goals/bulk_duration_goal.py b/bingads/v13/bulk/entities/goals/bulk_duration_goal.py new file mode 100644 index 00000000..d72738e5 --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_duration_goal.py @@ -0,0 +1,57 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkDurationGoal(BulkConversionGoal): + """ Represents an Duration Goal that can be read or written in a bulk file. + + This class exposes the :attr:`duration_goal` property that can be read and written as fields of the + Duration Goal record in a bulk file. + + For more information, see Duration Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + duration_goal=None): + super(BulkDurationGoal, self).__init__(conversion_goal = duration_goal) + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.MinimumDurationInSecond, + field_to_csv=lambda c: bulk_str(c.duration_goal.MinimumDurationInSeconds), + csv_to_field=lambda c, v: setattr(c.duration_goal, 'MinimumDurationInSeconds', int(v) if v else None) + ), + ] + + @property + def duration_goal(self): + """ Defines a Duration Goal """ + + return self._conversion_goal + + @duration_goal.setter + def duration_goal(self, duration_goal): + self._conversion_goal = duration_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.duration_goal, 'duration_goal') + super(BulkDurationGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkDurationGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.duration_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('DurationGoal') + super(BulkDurationGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkDurationGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_event_goal.py b/bingads/v13/bulk/entities/goals/bulk_event_goal.py new file mode 100644 index 00000000..007409b7 --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_event_goal.py @@ -0,0 +1,94 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal +from decimal import Decimal + +class BulkEventGoal(BulkConversionGoal): + """ Represents an Event Goal that can be read or written in a bulk file. + + This class exposes the :attr:`event_goal` property that can be read and written as fields of the + Event Goal record in a bulk file. + + For more information, see Event Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + event_goal=None): + super(BulkEventGoal, self).__init__(conversion_goal = event_goal) + + _MAPPINGS = [ + + _SimpleBulkMapping( + header=_StringTable.CategoryExpression, + field_to_csv=lambda c: bulk_str(c.event_goal.CategoryExpression), + csv_to_field=lambda c, v: setattr(c.event_goal, 'CategoryExpression', v) + ), + _SimpleBulkMapping( + header=_StringTable.CategoryOperator, + field_to_csv=lambda c: bulk_str(c.event_goal.CategoryOperator), + csv_to_field=lambda c, v: setattr(c.event_goal, 'CategoryOperator', v) + ), + _SimpleBulkMapping( + header=_StringTable.ActionExpression, + field_to_csv=lambda c: bulk_str(c.event_goal.ActionExpression), + csv_to_field=lambda c, v: setattr(c.event_goal, 'ActionExpression', v) + ), + _SimpleBulkMapping( + header=_StringTable.ActionOperator, + field_to_csv=lambda c: bulk_str(c.event_goal.ActionOperator), + csv_to_field=lambda c, v: setattr(c.event_goal, 'ActionOperator', v) + ), + _SimpleBulkMapping( + header=_StringTable.LabelExpression, + field_to_csv=lambda c: bulk_str(c.event_goal.LabelExpression), + csv_to_field=lambda c, v: setattr(c.event_goal, 'LabelExpression', v) + ), + _SimpleBulkMapping( + header=_StringTable.LabelOperator, + field_to_csv=lambda c: bulk_str(c.event_goal.LabelOperator), + csv_to_field=lambda c, v: setattr(c.event_goal, 'LabelOperator', v) + ), + _SimpleBulkMapping( + header=_StringTable.EventValue, + field_to_csv=lambda c: bulk_str(c.event_goal.Value), + csv_to_field=lambda c, v: setattr(c.event_goal, 'Value', Decimal(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.EventValueOperator, + field_to_csv=lambda c: bulk_str(c.event_goal.ValueOperator), + csv_to_field=lambda c, v: setattr(c.event_goal, 'ValueOperator', v) + ), + ] + + @property + def event_goal(self): + """ Defines a Event Goal """ + + return self._conversion_goal + + @event_goal.setter + def event_goal(self, event_goal): + self._conversion_goal = event_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.event_goal, 'event_goal') + super(BulkEventGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkEventGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.event_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('EventGoal') + super(BulkEventGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkEventGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_in_store_transaction_goal.py b/bingads/v13/bulk/entities/goals/bulk_in_store_transaction_goal.py new file mode 100644 index 00000000..8bf057f7 --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_in_store_transaction_goal.py @@ -0,0 +1,53 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkInStoreTransactionGoal(BulkConversionGoal): + """ Represents an InStoreTransaction Goal that can be read or written in a bulk file. + + This class exposes the :attr:`in_store_transaction_goal` property that can be read and written as fields of the + InStoreTransaction Goal record in a bulk file. + + For more information, see InStoreTransaction Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + in_store_transaction_goal=None): + super(BulkInStoreTransactionGoal, self).__init__(conversion_goal = in_store_transaction_goal) + + _MAPPINGS = [ + + ] + + @property + def in_store_transaction_goal(self): + """ Defines a InStoreTransaction Goal """ + + return self._conversion_goal + + @in_store_transaction_goal.setter + def in_store_transaction_goal(self, in_store_transaction_goal): + self._conversion_goal = in_store_transaction_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.in_store_transaction_goal, 'in_store_transaction_goal') + super(BulkInStoreTransactionGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkInStoreTransactionGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.in_store_transaction_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('InStoreTransactionGoal') + super(BulkInStoreTransactionGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkInStoreTransactionGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_in_store_visit_goal.py b/bingads/v13/bulk/entities/goals/bulk_in_store_visit_goal.py new file mode 100644 index 00000000..b7cf5770 --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_in_store_visit_goal.py @@ -0,0 +1,53 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkInStoreVisitGoal(BulkConversionGoal): + """ Represents an InStoreVisit Goal that can be read or written in a bulk file. + + This class exposes the :attr:`in_store_visit_goal` property that can be read and written as fields of the + InStoreVisit Goal record in a bulk file. + + For more information, see InStoreVisit Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + in_store_visit_goal=None,): + super(BulkInStoreVisitGoal, self).__init__(conversion_goal = in_store_visit_goal) + + _MAPPINGS = [ + + ] + + @property + def in_store_visit_goal(self): + """ Defines a InStoreVisit Goal """ + + return self._conversion_goal + + @in_store_visit_goal.setter + def in_store_visit_goal(self, in_store_visit_goal): + self._conversion_goall = in_store_visit_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.in_store_visit_goal, 'in_store_visit_goal') + super(BulkInStoreVisitGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkInStoreVisitGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.in_store_visit_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('ConversionGoal') + super(BulkInStoreVisitGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkInStoreVisitGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_offline_conversion_goal.py b/bingads/v13/bulk/entities/goals/bulk_offline_conversion_goal.py new file mode 100644 index 00000000..b4ed023c --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_offline_conversion_goal.py @@ -0,0 +1,53 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkOfflineConversionGoal(BulkConversionGoal): + """ Represents an OfflineConversion Goal that can be read or written in a bulk file. + + This class exposes the :attr:`offline_conversion_goal` property that can be read and written as fields of the + OfflineConversion Goal record in a bulk file. + + For more information, see OfflineConversion Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + offline_conversion_goal=None): + super(BulkOfflineConversionGoal, self).__init__(conversion_goal = offline_conversion_goal) + + _MAPPINGS = [ + + ] + + @property + def offline_conversion_goal(self): + """ Defines a OfflineConversion Goal """ + + return self._conversion_goal + + @offline_conversion_goal.setter + def offline_conversion_goal(self, offline_conversion_goal): + self._conversion_goal = offline_conversion_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.offline_conversion_goal, 'offline_conversion_goal') + super(BulkOfflineConversionGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkOfflineConversionGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.offline_conversion_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('OfflineConversionGoal') + super(BulkOfflineConversionGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkOfflineConversionGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_pages_viewed_per_visit_goal.py b/bingads/v13/bulk/entities/goals/bulk_pages_viewed_per_visit_goal.py new file mode 100644 index 00000000..464872fa --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_pages_viewed_per_visit_goal.py @@ -0,0 +1,57 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkPagesViewedPerVisitGoal(BulkConversionGoal): + """ Represents an PagesViewedPerVisit Goal that can be read or written in a bulk file. + + This class exposes the :attr:`pages_viewed_per_visit_goal` property that can be read and written as fields of the + PagesViewedPerVisit Goal record in a bulk file. + + For more information, see PagesViewedPerVisit Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + pages_viewed_per_visit_goal=None): + super(BulkPagesViewedPerVisitGoal, self).__init__(conversion_goal = pages_viewed_per_visit_goal) + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.MinimumPagesViewed, + field_to_csv=lambda c: bulk_str(c.pages_viewed_per_visit_goal.MinimumPagesViewed), + csv_to_field=lambda c, v: setattr(c.pages_viewed_per_visit_goal, 'MinimumPagesViewed', int(v) if v else None) + ), + ] + + @property + def pages_viewed_per_visit_goal(self): + """ Defines a PagesViewedPerVisit Goal """ + + return self._conversion_goal + + @pages_viewed_per_visit_goal.setter + def pages_viewed_per_visit_goal(self, pages_viewed_per_visit_goal): + self._conversion_goal = pages_viewed_per_visit_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.pages_viewed_per_visit_goal, 'pages_viewed_per_visit_goal') + super(BulkPagesViewedPerVisitGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkPagesViewedPerVisitGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.pages_viewed_per_visit_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('PagesViewedPerVisitGoal') + super(BulkPagesViewedPerVisitGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkPagesViewedPerVisitGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_product_goal.py b/bingads/v13/bulk/entities/goals/bulk_product_goal.py new file mode 100644 index 00000000..2d453dc0 --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_product_goal.py @@ -0,0 +1,53 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkProductGoal(BulkConversionGoal): + """ Represents an ProductGoal Goal that can be read or written in a bulk file. + + This class exposes the :attr:`product_goal` property that can be read and written as fields of the + ProductGoal Goal record in a bulk file. + + For more information, see ProductGoal Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + product_goal=None): + super(BulkProductGoal, self).__init__(conversion_goal = product_goal) + + _MAPPINGS = [ + + ] + + @property + def product_goal(self): + """ Defines a ProductGoal Goal """ + + return self._conversion_goal + + @product_goal.setter + def product_goal(self, product_goal): + self._conversion_goall = product_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.product_goal, 'product_goal') + super(BulkProductGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkProductGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.product_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('ConversionGoal') + super(BulkProductGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkProductGoal._MAPPINGS) + diff --git a/bingads/v13/bulk/entities/goals/bulk_url_goal.py b/bingads/v13/bulk/entities/goals/bulk_url_goal.py new file mode 100644 index 00000000..92513a21 --- /dev/null +++ b/bingads/v13/bulk/entities/goals/bulk_url_goal.py @@ -0,0 +1,64 @@ +from bingads.v13.bulk.entities import * +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.extensions import * +from .bulk_conversion_goal import BulkConversionGoal + +class BulkUrlGoal(BulkConversionGoal): + """ Represents an Url Goal that can be read or written in a bulk file. + + This class exposes the :attr:`url_goal` property that can be read and written as fields of the + Url Goal record in a bulk file. + + For more information, see Url Goal at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, + url_goal=None): + super(BulkUrlGoal, self).__init__(conversion_goal = url_goal) + + _MAPPINGS = [ + + _SimpleBulkMapping( + header=_StringTable.UrlExpression, + field_to_csv=lambda c: bulk_str(c.url_goal.UrlExpression), + csv_to_field=lambda c, v: setattr(c.url_goal, 'UrlExpression', v) + ), + _SimpleBulkMapping( + header=_StringTable.UrlOperator, + field_to_csv=lambda c: bulk_str(c.url_goal.UrlOperator), + csv_to_field=lambda c, v: setattr(c.url_goal, 'UrlOperator', v) + ), + + ] + + @property + def url_goal(self): + """ Defines a Url Goal """ + + return self._conversion_goal + + @url_goal.setter + def url_goal(self, url_goal): + self._conversion_goal = url_goal + + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.url_goal, 'url_goal') + super(BulkUrlGoal, self).process_mappings_to_row_values(row_values, exclude_readonly_data) + self.convert_to_values(row_values, BulkUrlGoal._MAPPINGS) + + def process_mappings_from_row_values(self, row_values): + self.url_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('UrlGoal') + super(BulkUrlGoal, self).process_mappings_from_row_values(row_values) + row_values.convert_to_entity(self, BulkUrlGoal._MAPPINGS) + diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index b3d925da..236eec61 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -166,6 +166,11 @@ class _BulkObjectFactory(): _StringTable.CampaignNegativeCombinedListAssociation: _EntityInfo(lambda: BulkCampaignNegativeCombinedListAssociation()), _StringTable.CampaignCustomerListAssociation: _EntityInfo(lambda: BulkCampaignCustomerListAssociation()), _StringTable.CampaignNegativeCustomerListAssociation: _EntityInfo(lambda: BulkCampaignNegativeCustomerListAssociation()), + _StringTable.ImpressionBasedRemarketingList: _EntityInfo(lambda: BulkImpressionBasedRemarketingList()), + _StringTable.CampaignImpressionBasedRemarketingListAssociation: _EntityInfo(lambda: BulkCampaignImpressionBasedRemarketingListAssociation()), + _StringTable.CampaignNegativeImpressionBasedRemarketingListAssociation: _EntityInfo(lambda: BulkCampaignNegativeImpressionBasedRemarketingListAssociation()), + _StringTable.AdGroupImpressionBasedRemarketingListAssociation: _EntityInfo(lambda: BulkAdGroupImpressionBasedRemarketingListAssociation()), + _StringTable.AdGroupNegativeImpressionBasedRemarketingListAssociation: _EntityInfo(lambda: BulkAdGroupNegativeImpressionBasedRemarketingListAssociation()), _StringTable.AdGroupIndustryCriterion: _EntityInfo(lambda: BulkAdGroupIndustryCriterion()), _StringTable.AdGroupCompanyNameCriterion: _EntityInfo(lambda: BulkAdGroupCompanyNameCriterion()), _StringTable.AdGroupJobFunctionCriterion: _EntityInfo(lambda: BulkAdGroupJobFunctionCriterion()), @@ -214,6 +219,19 @@ class _BulkObjectFactory(): 'Account Negative Keyword List': _EntityInfo(lambda: BulkAccountNegativeKeywordList()), 'Account Negative Keyword List Association': _EntityInfo(lambda: BulkAccountNegativeKeywordListAssociation()), 'Account Shared Negative Keyword': _EntityInfo(lambda: BulkAccountSharedNegativeKeyword()), + _StringTable.EventGoal: _EntityInfo(lambda: BulkEventGoal()), + _StringTable.AppInstallGoal: _EntityInfo(lambda: BulkAppInstallGoal()), + _StringTable.DurationGoal: _EntityInfo(lambda: BulkDurationGoal()), + _StringTable.OfflineConversionGoal: _EntityInfo(lambda: BulkOfflineConversionGoal()), + _StringTable.UrlGoal: _EntityInfo(lambda: BulkUrlGoal()), + _StringTable.InStoreTransactionGoal: _EntityInfo(lambda: BulkInStoreTransactionGoal()), + _StringTable.PagesViewedPerVisitGoal: _EntityInfo(lambda: BulkPagesViewedPerVisitGoal()), + _StringTable.InStoreVisitGoal: _EntityInfo(lambda: BulkInStoreVisitGoal()), + _StringTable.ProductGoal: _EntityInfo(lambda: BulkProductGoal()), + _StringTable.AssetGroupSearchTheme: _EntityInfo(lambda: BulkAssetGroupSearchTheme()), + _StringTable.BrandList: _EntityInfo(lambda: BulkBrandList()), + _StringTable.BrandItem: _EntityInfo(lambda: BulkBrandItem()), + _StringTable.CampaignBrandList: _EntityInfo(lambda: BulkCampaignBrandListAssociation()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 0fca20f9..704abb9c 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -348,6 +348,9 @@ class _CsvHeaders: _StringTable.ProductAudienceType, _StringTable.SourceId, _StringTable.CombinationRule, + _StringTable.EntityType, + _StringTable.ImpressionCampaignId, + _StringTable.ImpressionAdGroupId, # Expanded Text Ad @@ -472,6 +475,8 @@ class _CsvHeaders: _StringTable.AudienceGroupAssetGroupAssociation, _StringTable.AutoGeneratedTextOptOut, _StringTable.AutoGeneratedImageOptOut, + _StringTable.CostPerSaleOptOut, + _StringTable.SearchTheme, # Seasonality Adjustment _StringTable.SeasonalityAdjustment, @@ -481,6 +486,37 @@ class _CsvHeaders: # DNV Serving on MSAN _StringTable.ShouldServeOnMSAN, + + # Goal + _StringTable.AttributionModelType, + _StringTable.ConversionWindowInMinutes, + _StringTable.CountType, + _StringTable.ExcludeFromBidding, + _StringTable.GoalCategory, + _StringTable.IsEnhancedConversionsEnabled, + _StringTable.RevenueType, + _StringTable.RevenueValue, + _StringTable.TrackingStatus, + _StringTable.ViewThroughConversionWindowInMinutes, + _StringTable.MinimumDurationInSecond, + _StringTable.ActionExpression, + _StringTable.ActionOperator, + _StringTable.CategoryExpression, + _StringTable.CategoryOperator, + _StringTable.LabelExpression, + _StringTable.LabelOperator, + _StringTable.EventValue, + _StringTable.EventValueOperator, + _StringTable.IsExternallyAttributed, + _StringTable.MinimumPagesViewed, + _StringTable.UrlExpression, + _StringTable.UrlOperator, + + # Brand List + _StringTable.BrandId, + _StringTable.BrandUrl, + _StringTable.BrandName, + _StringTable.StatusDateTime, ] @staticmethod diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 60c58410..28e239c4 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -101,7 +101,7 @@ class _StringTable: MultiMediaAdBidAdjustment = "Multi Media Ad Bid Adjustment" UseOptimizedTargeting = "Use Optimized Targeting" BusinessAttributes = "Business Attributes" - Schedule = "Schedule"; + Schedule = "Schedule" # Entity Types SemanticVersion = "Format Version" @@ -489,6 +489,14 @@ class _StringTable: AdGroupNegativeCustomerListAssociation = "Ad Group Negative Customer List Association" CampaignCustomerListAssociation = "Campaign Customer List Association" CampaignNegativeCustomerListAssociation = "Campaign Negative Customer List Association" + ImpressionBasedRemarketingList = "Impression Based Remarketing List" + AdGroupImpressionBasedRemarketingListAssociation = "Ad Group Impression Based Remarketing List Association" + AdGroupNegativeImpressionBasedRemarketingListAssociation = "Ad Group Negative Impression Based Remarketing List Association" + CampaignImpressionBasedRemarketingListAssociation = "Campaign Impression Based Remarketing List Association" + CampaignNegativeImpressionBasedRemarketingListAssociation = "Campaign Negative Impression Based Remarketing List Association" + EntityType = "Entity Type" + ImpressionCampaignId = "Impression Campaign Id" + ImpressionAdGroupId = "Impression Ad Group Id" # Expanded Text Ad TitlePart1 = "Title Part 1" @@ -650,6 +658,9 @@ class _StringTable: ParentListingGroupId = "Parent Listing Group Id" AutoGeneratedTextOptOut = "Auto Generated Text Assets Opt Out" AutoGeneratedImageOptOut = "Auto Generated Image Assets Opt Out" + CostPerSaleOptOut = "Cost Per Sale Opt Out" + AssetGroupSearchTheme = "Asset Group Search Theme" + SearchTheme = "Search Theme" # MultiChannel Campaign DestinationChannel = "Destination Channel" @@ -663,3 +674,49 @@ class _StringTable: # DNV Serving on MSAN ShouldServeOnMSAN = "Should Serve On MSAN" + + # Conversion Goal + AttributionModelType = "Attribution Model Type" + ConversionWindowInMinutes = "Conversion Window In Minutes" + CountType = "Count Type" + ExcludeFromBidding = "Exclude From Bidding" + GoalCategory = "Goal Category" + IsEnhancedConversionsEnabled = "Is Enhanced Conversions Enabled" + RevenueType = "Revenue Type" + RevenueValue = "Revenue Value" + TrackingStatus = "Tracking Status" + ViewThroughConversionWindowInMinutes = "View Through Conversion Window In Minutes" + MinimumDurationInSecond = "Minimum Duration In Second" + ActionExpression = "Action Expression" + ActionOperator = "Action Operator" + CategoryExpression = "Category Expression" + CategoryOperator = "Category Operator" + LabelExpression = "Label Expression" + LabelOperator = "Label Operator" + EventValue = "Event Value" + EventValueOperator = "Event Value Operator" + IsExternallyAttributed = "Is Externally Attributed" + MinimumPagesViewed = "Minimum Pages Viewed" + UrlExpression = "URL Expression" + UrlOperator = "URL Operator" + ConversionGoal = "Conversion Goal" + EventGoal = "Event Goal" + AppInstallGoal = "AppInstall Goal" + MultiStageGoal = "MultiStage Goal" + DurationGoal = "Duration Goal" + OfflineConversionGoal = "OfflineConversion Goal" + UrlGoal = "URL Goal" + InStoreTransactionGoal = "InStoreTransaction Goal" + PagesViewedPerVisitGoal = "PagesViewedPerVisit Goal" + SmartGoal = "Smart Goal" + InStoreVisitGoal = "InStoreVisit Goal" + ProductGoal = "Product Goal" + + # Brand List + BrandList = "Brand List" + BrandItem = "Brand Item" + CampaignBrandList = "Campaign Brand List Association" + BrandId = "Brand Id" + BrandUrl = "Brand Url" + BrandName = "Brand Name" + StatusDateTime = "Editorial Status Date" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 228587e5..78915182 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -378,6 +378,17 @@ def csv_to_field_CampaignType(entity, value): return entity.CampaignTypeFilter = [None if i == 'None' else i for i in value.split(',')] +def field_to_csv_DeviceType(entity): + device_type = entity.DeviceTypeFilter + if device_type is None or len(device_type) == 0: + return None + return ','.join(type for type in device_type) + +def csv_to_field_DeviceType(entity, value): + if value is None or value.strip() == '': + return + entity.DeviceTypeFilter = [None if i == 'None' else i for i in value.split(',')] + def field_to_csv_CampaignAssociations(entity): associations = entity.CampaignAssociations if associations is None or len(associations.CampaignAssociation) == 0: diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 48d9fde5..edd75799 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1289,6 +1289,69 @@ + + + + 175 + + + + + + + 176 + + + + + + + 177 + + + + + + + 178 + + + + + + + 179 + + + + + + + 180 + + + + + + + 181 + + + + + + + 182 + + + + + + + 183 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 5ba6e7f9..876c51e3 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -233,6 +233,13 @@ + + + + + + + @@ -276,6 +283,17 @@ + + + + + + + + + + + @@ -961,6 +979,13 @@ + + + + + + + @@ -984,6 +1009,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + @@ -1234,7 +1319,15 @@ - + + + + + + + + + @@ -1289,6 +1382,13 @@ + + + + 128 + + + @@ -1409,6 +1509,9 @@ + + + @@ -2008,6 +2111,7 @@ + @@ -2735,6 +2839,13 @@ + + + + + + + @@ -3193,6 +3304,19 @@ + + + + + + + + + + + + + @@ -3277,6 +3401,7 @@ + @@ -3292,6 +3417,7 @@ + @@ -3540,6 +3666,13 @@ + + + + + + + @@ -3581,6 +3714,7 @@ + @@ -3602,6 +3736,16 @@ + + + + + + + + + + @@ -3620,6 +3764,13 @@ + + + + + + + @@ -3653,6 +3804,7 @@ + @@ -3910,6 +4062,13 @@ + + + + 536870912 + + + @@ -4319,6 +4478,7 @@ + @@ -5364,6 +5524,13 @@ + + + + 8388608 + + + @@ -5769,6 +5936,13 @@ + + + + + + + @@ -5789,6 +5963,19 @@ + + + + + + + + + + + + + @@ -5850,9 +6037,20 @@ + + + + + + + + + + + @@ -5865,6 +6063,7 @@ + @@ -6331,6 +6530,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -6382,6 +6601,7 @@ + @@ -8030,25 +8250,47 @@ - - - - - - - - 4 - - - - - - - 7 - - - - + + + + + + + 0 + + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + 7 + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 3ce72efa..cb7ff9d7 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -290,6 +290,13 @@ + + + + + + + @@ -323,6 +330,13 @@ + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index e2f40888..06c0ab22 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -865,6 +865,9 @@ + + + @@ -1998,6 +2001,20 @@ + + + + 1055 + + + + + + + 1124 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 569f9b80..637444b6 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -4287,6 +4287,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4304,7 +4407,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 59f5c4c4..697ae86c 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1289,6 +1289,69 @@ + + + + 175 + + + + + + + 176 + + + + + + + 177 + + + + + + + 178 + + + + + + + 179 + + + + + + + 180 + + + + + + + 181 + + + + + + + 182 + + + + + + + 183 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 3499ae96..3077f0f4 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -233,6 +233,13 @@ + + + + + + + @@ -276,6 +283,17 @@ + + + + + + + + + + + @@ -961,6 +979,13 @@ + + + + + + + @@ -984,6 +1009,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + @@ -1234,7 +1319,15 @@ - + + + + + + + + + @@ -1289,6 +1382,13 @@ + + + + 128 + + + @@ -1409,6 +1509,9 @@ + + + @@ -2008,6 +2111,7 @@ + @@ -2735,6 +2839,13 @@ + + + + + + + @@ -3193,6 +3304,19 @@ + + + + + + + + + + + + + @@ -3277,6 +3401,7 @@ + @@ -3292,6 +3417,7 @@ + @@ -3540,6 +3666,13 @@ + + + + + + + @@ -3581,6 +3714,7 @@ + @@ -3602,6 +3736,16 @@ + + + + + + + + + + @@ -3620,6 +3764,13 @@ + + + + + + + @@ -3653,6 +3804,7 @@ + @@ -3910,6 +4062,13 @@ + + + + 536870912 + + + @@ -4319,6 +4478,7 @@ + @@ -5364,6 +5524,13 @@ + + + + 8388608 + + + @@ -5769,6 +5936,13 @@ + + + + + + + @@ -5789,6 +5963,19 @@ + + + + + + + + + + + + + @@ -5850,9 +6037,20 @@ + + + + + + + + + + + @@ -5865,6 +6063,7 @@ + @@ -6331,6 +6530,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -6382,6 +6601,7 @@ + @@ -8030,25 +8250,47 @@ - - - - - - - - 4 - - - - - - - 7 - - - - + + + + + + + 0 + + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + 7 + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 3542f4e1..28794ee3 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -36,6 +36,7 @@ + @@ -290,6 +291,13 @@ + + + + + + + @@ -323,6 +331,13 @@ + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index d493ae1d..2f81d61b 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -865,6 +865,9 @@ + + + @@ -1998,6 +2001,20 @@ + + + + 1055 + + + + + + + 1124 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 6d5cdf40..8fee965a 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -4287,6 +4287,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4304,7 +4407,7 @@ - + diff --git a/setup.py b/setup.py index 99afcfdd..2ff1d58a 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.19.1' +VERSION = '13.0.21' with open('README.rst', 'r') as f: readme = f.read() From 764466472dc54f17450f3e2eeb7c3f409895af25 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 24 Jul 2024 10:10:36 +0800 Subject: [PATCH 38/55] update HISTORY --- HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index a15a657d..6ff2b0a0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,7 +3,7 @@ Release History 13.0.21(2024-07-18) +++++++++++++++++++++++++ -* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. * Added bulk mappings for new AudienceType:ImpressionBasedRemarketingList i.e., BulkImpressionBasedRemarketingList, BulkAdGroupImpressionBasedRemarketingListAssociation, BulkAdGroupNegativeImpressionBasedRemarketingListAssociation, BulkCampaignImpressionBasedRemarketingListAssociation and BulkCampaignNegativeImpressionBasedRemarketingListAssociation. * Added bulk mappings for Goals i.e., BulkAppInstallGoal, BulkDurationGoal, BulkEventGoal, BulkInStoreTransactionGoal, BulkInStoreVisitGoal, BulkOfflineConversionGoal, BulkPagesViewedPerVisitGoal, BulkProductGoal and BulkUrlGoal. * Added bulk mappings for BulkBrandItem, BulkBrandList and BulkCampaignBrandListAssociation. From 54ae2488773813195e5e82e7aec78c1016fdef5b Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 24 Jul 2024 10:15:04 +0800 Subject: [PATCH 39/55] update HISTORY --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 6ff2b0a0..219dc6e2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,7 @@ .. :changelog: Release History + 13.0.21(2024-07-18) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. From 02c3670a7c3ca3f3d31227d13871bb79228e2a41 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 24 Jul 2024 13:31:02 +0800 Subject: [PATCH 40/55] update setup --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 2ff1d58a..f11c3473 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,7 @@ 'bingads.v13.bulk.entities.feeds', 'bingads.v13.bulk.entities.target_criterions', 'bingads.v13.bulk.entities.labels', + 'bingads.v13.bulk.entities.goals', 'bingads.v13.internal', 'bingads.v13.internal.bulk', 'bingads.v13.internal.bulk.entities', From 92fd4ff7985f491e100ed3e978f86dde4866885a Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 24 Jul 2024 13:38:14 +0800 Subject: [PATCH 41/55] v13.0.21.1 --- HISTORY.rst | 4 ++++ bingads/manifest.py | 2 +- setup.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 219dc6e2..17494d70 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ Release History +13.0.21.1(2024-07-24) ++++++++++++++++++++++++++ +* Fix Issue #294: https://github.com/BingAds/BingAds-Python-SDK/issues/291 + 13.0.21(2024-07-18) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. diff --git a/bingads/manifest.py b/bingads/manifest.py index 53448925..ee2f9374 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.21' +VERSION = '13.0.21.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/setup.py b/setup.py index f11c3473..6f196e18 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.21' +VERSION = '13.0.21.1' with open('README.rst', 'r') as f: readme = f.read() From 56ae7b7369934fdb8eb3ca791aefe7f6b79119e0 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Wed, 24 Jul 2024 13:40:15 +0800 Subject: [PATCH 42/55] update --- HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 17494d70..6234cec5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release History 13.0.21.1(2024-07-24) +++++++++++++++++++++++++ -* Fix Issue #294: https://github.com/BingAds/BingAds-Python-SDK/issues/291 +* Fix Issue #291: https://github.com/BingAds/BingAds-Python-SDK/issues/291 13.0.21(2024-07-18) +++++++++++++++++++++++++ From cba6db7db7c32a1fb5ac690a813e588b0e12c73c Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Mon, 19 Aug 2024 16:33:40 +0800 Subject: [PATCH 43/55] v13.0.21.2 --- HISTORY.rst | 5 ++++ bingads/manifest.py | 2 +- bingads/v13/internal/extensions.py | 2 +- .../production/campaignmanagement_service.xml | 17 ++++++++++++- .../production/customerbilling_service.xml | 1 + .../proxies/production/reporting_service.xml | 24 +++++++++++++++++++ .../sandbox/campaignmanagement_service.xml | 17 ++++++++++++- .../v13/proxies/sandbox/reporting_service.xml | 24 +++++++++++++++++++ setup.py | 2 +- 9 files changed, 89 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 6234cec5..938e6256 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ Release History +13.0.21.2(2024-08-19) ++++++++++++++++++++++++++ +* Fix Issue #295: https://github.com/BingAds/BingAds-Python-SDK/issues/295 +* Change 'ImpreesionBasedRemarketingList' to 'ImpressionBasedRemarketingList' in AudienceAdditionalField + 13.0.21.1(2024-07-24) +++++++++++++++++++++++++ * Fix Issue #291: https://github.com/BingAds/BingAds-Python-SDK/issues/291 diff --git a/bingads/manifest.py b/bingads/manifest.py index ee2f9374..6b2bc4b8 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.21.1' +VERSION = '13.0.21.2' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 78915182..35275f2e 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -258,7 +258,7 @@ def entity_biddingscheme_to_csv(entity, row_values): elif bid_strategy_type == 'TargetImpressionShare': row_values[_StringTable.BidStrategyMaxCpc] = bid_bulk_str(entity.BiddingScheme.MaxCpc, entity.Id) row_values[_StringTable.BidStrategyTargetAdPosition] = bulk_optional_str(entity.BiddingScheme.TargetAdPosition, entity.Id) - row_values[_StringTable.BidStrategyTargetImpressionShare] = TargetImpressionShare(entity.BiddingScheme.TargetImpressionShare) + row_values[_StringTable.BidStrategyTargetImpressionShare] = bulk_str(entity.BiddingScheme.TargetImpressionShare) elif bid_strategy_type == 'PercentCpc': row_values[_StringTable.BidStrategyPercentMaxCpc] = bulk_str(entity.BiddingScheme.MaxPercentCpc) elif bid_strategy_type == 'Commission': diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 876c51e3..8521b877 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1121,6 +1121,13 @@ + + + + + + + @@ -1512,6 +1519,7 @@ + @@ -2637,6 +2645,13 @@ + + + + 32768 + + + @@ -6601,7 +6616,7 @@ - + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index cb7ff9d7..06121522 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -36,6 +36,7 @@ + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 637444b6..88bd9dad 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -182,6 +182,18 @@ + + + + + + + + + + + + @@ -957,6 +969,18 @@ + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 3077f0f4..57a34566 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1121,6 +1121,13 @@ + + + + + + + @@ -1512,6 +1519,7 @@ + @@ -2637,6 +2645,13 @@ + + + + 32768 + + + @@ -6601,7 +6616,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 8fee965a..28e452eb 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -182,6 +182,18 @@ + + + + + + + + + + + + @@ -957,6 +969,18 @@ + + + + + + + + + + + + diff --git a/setup.py b/setup.py index 6f196e18..3ea93908 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.21.1' +VERSION = '13.0.21.2' with open('README.rst', 'r') as f: readme = f.read() From 8c685dd4776f0867b760b05eba4be0b70f794afe Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Fri, 22 Nov 2024 12:55:09 +0800 Subject: [PATCH 44/55] v13.0.23 --- HISTORY.rst | 5 + bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 1 + .../entities/bulk_asset_group_url_target.py | 205 +++ .../v13/internal/bulk/bulk_object_factory.py | 1 + bingads/v13/internal/bulk/csv_headers.py | 11 + bingads/v13/internal/bulk/string_table.py | 12 + bingads/v13/internal/extensions.py | 2 + .../proxies/production/adinsight_service.xml | 66 + .../production/campaignmanagement_service.xml | 1431 ++++++++++++++--- .../production/customermanagement_service.xml | 66 + .../proxies/production/reporting_service.xml | 99 +- .../v13/proxies/sandbox/adinsight_service.xml | 66 + bingads/v13/proxies/sandbox/bulk_service.xml | 7 + .../sandbox/campaignmanagement_service.xml | 1431 ++++++++++++++--- .../sandbox/customermanagement_service.xml | 66 + .../v13/proxies/sandbox/reporting_service.xml | 99 +- setup.py | 2 +- 18 files changed, 3106 insertions(+), 466 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_asset_group_url_target.py diff --git a/HISTORY.rst b/HISTORY.rst index 938e6256..fead018f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ Release History +13.0.23(2024-11-21) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. +* Added bulk mappings for BulkAssetGroupUrlTarget. + 13.0.21.2(2024-08-19) +++++++++++++++++++++++++ * Fix Issue #295: https://github.com/BingAds/BingAds-Python-SDK/issues/295 diff --git a/bingads/manifest.py b/bingads/manifest.py index 6b2bc4b8..8a70e169 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.21.2' +VERSION = '13.0.23' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index db4ace73..36cd5a06 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -45,6 +45,7 @@ from .bulk_asset_group import * from .bulk_audience_group import * from .bulk_asset_group_listing_group import * +from .bulk_asset_group_url_target import * from .bulk_audience_group_asset_group_association import * from .bulk_campaign_negative_webpage import * from .bulk_seasonality_adjustment import * diff --git a/bingads/v13/bulk/entities/bulk_asset_group_url_target.py b/bingads/v13/bulk/entities/bulk_asset_group_url_target.py new file mode 100644 index 00000000..cb73621e --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_asset_group_url_target.py @@ -0,0 +1,205 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAssetGroupUrlTarget(_SingleRecordBulkEntity): + """ Represents an asset group url target. + + This class exposes the property :attr:`asset_group_url_target` that can be read and written as fields of the asset group url target record + in a bulk file. + + For more information, see Asset Group at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None): + super(BulkAssetGroupUrlTarget, self).__init__() + + self._status = status + self._id = None + self._asset_group_id = None + self._target_condition1 = None + self._target_condition2 = None + self._target_condition3 = None + self._target_condition_operator1 = None + self._target_condition_operator2 = None + self._target_condition_operator3 = None + self._target_value1 = None + self._target_value2 = None + self._target_value3 = None + + @property + def status(self): + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def id(self): + return self._id + + @id.setter + def id(self, id): + self._id = id + + @property + def asset_group_id(self): + return self._asset_group_id + + @asset_group_id.setter + def asset_group_id(self, asset_group_id): + self._asset_group_id = asset_group_id + + @property + def target_condition1(self): + return self._target_condition1 + + @target_condition1.setter + def target_condition1(self, target_condition1): + self._target_condition1 = target_condition1 + + @property + def target_condition2(self): + return self._target_condition2 + + @target_condition2.setter + def target_condition2(self, target_condition2): + self._target_condition2 = target_condition2 + + @property + def target_condition3(self): + return self._target_condition3 + + @target_condition3.setter + def target_condition3(self, target_condition3): + self._target_condition3 = target_condition3 + + @property + def target_condition_operator1(self): + return self._target_condition_operator1 + + @target_condition_operator1.setter + def target_condition_operator1(self, target_condition_operator1): + self._target_condition_operator1 = target_condition_operator1 + + @property + def target_condition_operator2(self): + return self._target_condition_operator2 + + @target_condition_operator2.setter + def target_condition_operator2(self, target_condition_operator2): + self._target_condition_operator2 = target_condition_operator2 + + @property + def target_condition_operator3(self): + return self._target_condition_operator3 + + @target_condition_operator3.setter + def target_condition_operator3(self, target_condition_operator3): + self._target_condition_operator3 = target_condition_operator3 + + @property + def target_value1(self): + return self._target_value1 + + @target_value1.setter + def target_value1(self, target_value1): + self._target_value1 = target_value1 + + @property + def target_value2(self): + return self._target_value2 + + @target_value2.setter + def target_value2(self, target_value2): + self._target_value2 = target_value2 + + @property + def target_value3(self): + return self._target_value3 + + @target_value3.setter + def target_value3(self, target_value3): + self._target_value3 = target_value3 + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.id), + csv_to_field=lambda c, v: setattr(c, 'id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.asset_group_id), + csv_to_field=lambda c, v: setattr(c, 'asset_group_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetCondition1, + field_to_csv=lambda c: c.target_condition1, + csv_to_field=lambda c, v: setattr(c, 'target_condition1', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetCondition2, + field_to_csv=lambda c: c.target_condition2, + csv_to_field=lambda c, v: setattr(c, 'target_condition2', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetCondition3, + field_to_csv=lambda c: c.target_condition3, + csv_to_field=lambda c, v: setattr(c, 'target_condition3', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetConditionOperator1, + field_to_csv=lambda c: c.target_condition_operator1, + csv_to_field=lambda c, v: setattr(c, 'target_condition_operator1', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetConditionOperator2, + field_to_csv=lambda c: c.target_condition_operator2, + csv_to_field=lambda c, v: setattr(c, 'target_condition_operator2', v) + ),_SimpleBulkMapping( + header=_StringTable.AssetGroupTargetConditionOperator3, + field_to_csv=lambda c: c.target_condition_operator3, + csv_to_field=lambda c, v: setattr(c, 'target_condition_operator3', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetValue1, + field_to_csv=lambda c: c.target_value1, + csv_to_field=lambda c, v: setattr(c, 'target_value1', v) + ), + _SimpleBulkMapping( + header=_StringTable.AssetGroupTargetValue2, + field_to_csv=lambda c: c.target_value2, + csv_to_field=lambda c, v: setattr(c, 'target_value2', v) + ),_SimpleBulkMapping( + header=_StringTable.AssetGroupTargetValue3, + field_to_csv=lambda c: c.target_value3, + csv_to_field=lambda c, v: setattr(c, 'target_value3', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + row_values.convert_to_entity(self, BulkAssetGroupUrlTarget._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self.convert_to_values(row_values, BulkAssetGroupUrlTarget._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAssetGroupUrlTarget, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 236eec61..ca0a4c30 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -232,6 +232,7 @@ class _BulkObjectFactory(): _StringTable.BrandList: _EntityInfo(lambda: BulkBrandList()), _StringTable.BrandItem: _EntityInfo(lambda: BulkBrandItem()), _StringTable.CampaignBrandList: _EntityInfo(lambda: BulkCampaignBrandListAssociation()), + _StringTable.AssetGroupUrlTarget: _EntityInfo(lambda: BulkAssetGroupUrlTarget()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 704abb9c..e5cef573 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -517,6 +517,17 @@ class _CsvHeaders: _StringTable.BrandUrl, _StringTable.BrandName, _StringTable.StatusDateTime, + + # Asset Group Url Target + _StringTable.AssetGroupTargetCondition1, + _StringTable.AssetGroupTargetCondition2, + _StringTable.AssetGroupTargetCondition3, + _StringTable.AssetGroupTargetConditionOperator1, + _StringTable.AssetGroupTargetConditionOperator2, + _StringTable.AssetGroupTargetConditionOperator3, + _StringTable.AssetGroupTargetValue1, + _StringTable.AssetGroupTargetValue2, + _StringTable.AssetGroupTargetValue3, ] @staticmethod diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 28e239c4..26b7197e 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -720,3 +720,15 @@ class _StringTable: BrandUrl = "Brand Url" BrandName = "Brand Name" StatusDateTime = "Editorial Status Date" + + # Asset Group Url Target + AssetGroupUrlTarget = "Asset Group Url Target"; + AssetGroupTargetCondition1 = "Asset Group Target Condition 1"; + AssetGroupTargetCondition2 = "Asset Group Target Condition 2"; + AssetGroupTargetCondition3 = "Asset Group Target Condition 3"; + AssetGroupTargetConditionOperator1 = "Asset Group Target Condition Operator 1"; + AssetGroupTargetConditionOperator2 = "Asset Group Target Condition Operator 2"; + AssetGroupTargetConditionOperator3 = "Asset Group Target Condition Operator 3"; + AssetGroupTargetValue1 = "Asset Group Target Value 1"; + AssetGroupTargetValue2 = "Asset Group Target Value 2"; + AssetGroupTargetValue3 = "Asset Group Target Value 3"; diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 35275f2e..2e93e68a 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -753,6 +753,7 @@ def field_to_csv_ImageAssetLinks(entity): contract['pinnedField'] = assetLink.PinnedField if hasattr(assetLink, 'PinnedField') else None contract['targetWidth'] = assetLink.TargetWidth if hasattr(assetLink, 'TargetWidth') else None contract['targetHeight'] = assetLink.TargetHeight if hasattr(assetLink, 'TargetHeight') else None + contract['subType'] = assetLink.Asset.SubType if hasattr(assetLink.Asset, 'SubType') else None assetLinkContracts.append(contract) if len(assetLinkContracts) > 0: return json.dumps(assetLinkContracts) @@ -778,6 +779,7 @@ def csv_to_field_ImageAssetLinks(assetLinks, value): asset_link.EditorialStatus = assetLinkContract.get('editorialStatus') asset_link.TargetWidth = assetLinkContract.get('targetWidth') asset_link.TargetHeight = assetLinkContract.get('targetHeight') + asset_link.Asset.SubType = assetLinkContract.get('subType') assetLinks.AssetLink.append(asset_link) def field_to_csv_TextAssetLinks(entity): diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index f1cc7426..1ac4127f 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3165,8 +3165,11 @@ + + + @@ -3206,6 +3209,27 @@ + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + @@ -3246,6 +3270,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 8521b877..b12f7ca1 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1004,6 +1004,13 @@ + + + + + + + @@ -1069,6 +1076,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + @@ -1103,7 +1161,7 @@ - + @@ -1112,8 +1170,8 @@ - - + + @@ -1144,7 +1202,7 @@ - + @@ -1417,7 +1475,7 @@ - + @@ -1434,7 +1492,7 @@ - + @@ -1458,7 +1516,7 @@ - + @@ -1520,6 +1578,9 @@ + + + @@ -1536,7 +1597,7 @@ - + @@ -1554,7 +1615,7 @@ - + @@ -1584,7 +1645,7 @@ - + @@ -1605,7 +1666,7 @@ - + @@ -1646,7 +1707,7 @@ - + @@ -1680,7 +1741,7 @@ - + @@ -1880,8 +1941,8 @@ - - + + @@ -1890,7 +1951,7 @@ - + @@ -1905,7 +1966,7 @@ - + @@ -1966,7 +2027,7 @@ - + @@ -1975,7 +2036,7 @@ - + @@ -1996,7 +2057,7 @@ - + @@ -2057,14 +2118,14 @@ - + - + @@ -2084,7 +2145,7 @@ - + @@ -2136,7 +2197,7 @@ - + @@ -2203,10 +2264,10 @@ - + - - + + @@ -2253,8 +2314,8 @@ - - + + @@ -2263,7 +2324,7 @@ - + @@ -2293,7 +2354,7 @@ - + @@ -2331,7 +2392,7 @@ - + @@ -2472,7 +2533,7 @@ - + @@ -2481,7 +2542,7 @@ - + @@ -2652,6 +2713,13 @@ + + + + 65536 + + + @@ -2698,7 +2766,7 @@ - + @@ -2836,10 +2904,10 @@ - + - - + + @@ -2847,7 +2915,7 @@ - + @@ -2877,9 +2945,9 @@ - + - + @@ -2919,9 +2987,9 @@ - + - + @@ -2934,9 +3002,9 @@ - + - + @@ -3036,7 +3104,7 @@ - + @@ -3082,8 +3150,8 @@ - - + + @@ -3123,9 +3191,9 @@ - + - + @@ -3199,11 +3267,11 @@ - + - + - + @@ -3263,12 +3331,12 @@ - + - + - - + + @@ -3285,9 +3353,9 @@ - + - + @@ -3305,9 +3373,9 @@ - + - + @@ -3366,7 +3434,7 @@ - + @@ -3391,7 +3459,7 @@ - + @@ -3465,7 +3533,7 @@ - + @@ -3554,7 +3622,7 @@ - + @@ -3582,7 +3650,7 @@ - + @@ -3659,7 +3727,7 @@ - + @@ -3705,7 +3773,7 @@ - + @@ -3713,7 +3781,7 @@ - + @@ -3818,7 +3886,7 @@ - + @@ -3835,7 +3903,7 @@ - + @@ -3870,7 +3938,7 @@ - + @@ -4084,6 +4152,13 @@ + + + + 1073741824 + + + @@ -4095,6 +4170,7 @@ + @@ -4363,6 +4439,8 @@ + + @@ -4440,7 +4518,7 @@ - + @@ -4535,6 +4613,20 @@ + + + + 3 + + + + + + + 4 + + + @@ -4570,6 +4662,17 @@ + + + + + + + + + + + @@ -4586,9 +4689,9 @@ - + - + @@ -4647,7 +4750,7 @@ - + @@ -4670,7 +4773,7 @@ - + @@ -4732,7 +4835,7 @@ - + @@ -4747,7 +4850,7 @@ - + @@ -4805,7 +4908,7 @@ - + @@ -4814,7 +4917,7 @@ - + @@ -4940,7 +5043,7 @@ - + @@ -4982,14 +5085,14 @@ - + - + @@ -5040,7 +5143,7 @@ - + @@ -5129,7 +5232,7 @@ - + @@ -5162,7 +5265,7 @@ - + @@ -5185,7 +5288,7 @@ - + @@ -5254,7 +5357,7 @@ - + @@ -5271,7 +5374,7 @@ - + @@ -5305,7 +5408,7 @@ - + @@ -5347,7 +5450,7 @@ - + @@ -5554,7 +5657,7 @@ - + @@ -5577,7 +5680,7 @@ - + @@ -5593,7 +5696,7 @@ - + @@ -5634,7 +5737,7 @@ - + @@ -5656,7 +5759,7 @@ - + @@ -5670,7 +5773,7 @@ - + @@ -5685,7 +5788,7 @@ - + @@ -5723,7 +5826,7 @@ - + @@ -5745,7 +5848,7 @@ - + @@ -5759,7 +5862,7 @@ - + @@ -5774,7 +5877,7 @@ - + @@ -5887,7 +5990,7 @@ - + @@ -5909,7 +6012,7 @@ - + @@ -5923,7 +6026,7 @@ - + @@ -5963,9 +6066,9 @@ - - - + + + @@ -6012,7 +6115,7 @@ - + @@ -6036,7 +6139,7 @@ - + @@ -6051,7 +6154,7 @@ - + @@ -6130,7 +6233,7 @@ - + @@ -6180,7 +6283,7 @@ - + @@ -6195,7 +6298,7 @@ - + @@ -6225,14 +6328,14 @@ - + - + @@ -6506,7 +6609,7 @@ - + @@ -6568,7 +6671,7 @@ - + @@ -6590,7 +6693,7 @@ - + @@ -6604,7 +6707,7 @@ - + @@ -6656,7 +6759,7 @@ - + @@ -6686,7 +6789,7 @@ - + @@ -6756,7 +6859,7 @@ - + @@ -7023,7 +7126,7 @@ - + @@ -7047,7 +7150,7 @@ - + @@ -7189,6 +7292,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7214,7 +7348,7 @@ - + @@ -7222,7 +7356,7 @@ - + @@ -7250,7 +7384,7 @@ - + @@ -7309,7 +7443,7 @@ - + @@ -7326,7 +7460,7 @@ - + @@ -7369,7 +7503,7 @@ - + @@ -7377,7 +7511,7 @@ - + @@ -7405,7 +7539,7 @@ - + @@ -7523,7 +7657,7 @@ - + @@ -7568,6 +7702,13 @@ + + + + + + + @@ -7687,6 +7828,13 @@ + + + + + + + @@ -7796,7 +7944,7 @@ - + @@ -7815,7 +7963,7 @@ - + @@ -7825,7 +7973,7 @@ - + @@ -7981,6 +8129,20 @@ + + + + 1048576 + + + + + + + 2097152 + + + @@ -8003,7 +8165,7 @@ - + @@ -8031,7 +8193,7 @@ - + @@ -8048,7 +8210,7 @@ - + @@ -8064,7 +8226,7 @@ - + @@ -8083,7 +8245,7 @@ - + @@ -8098,7 +8260,7 @@ - + @@ -8135,7 +8297,7 @@ - + @@ -8143,7 +8305,7 @@ - + @@ -8157,7 +8319,7 @@ - + @@ -8311,7 +8473,7 @@ - + @@ -8335,7 +8497,7 @@ - + @@ -8350,7 +8512,7 @@ - + @@ -8408,7 +8570,7 @@ - + @@ -8432,7 +8594,7 @@ - + @@ -8447,7 +8609,7 @@ - + @@ -8474,59 +8636,442 @@ - - - + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + - + - - + + - + + - - - - - true - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - + + - + - - - - - - - - - true - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + @@ -11410,6 +11955,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -11429,7 +11998,7 @@ - + @@ -11453,7 +12022,7 @@ - + @@ -11477,7 +12046,7 @@ - + @@ -11501,7 +12070,7 @@ - + @@ -11525,7 +12094,7 @@ - + @@ -11549,7 +12118,7 @@ - + @@ -11573,7 +12142,7 @@ - + @@ -11597,7 +12166,7 @@ - + @@ -11621,7 +12190,7 @@ - + @@ -11645,7 +12214,7 @@ - + @@ -11669,7 +12238,7 @@ - + @@ -11693,7 +12262,7 @@ - + @@ -11717,7 +12286,7 @@ - + @@ -11741,7 +12310,7 @@ - + @@ -11765,7 +12334,7 @@ - + @@ -11789,7 +12358,7 @@ - + @@ -11813,7 +12382,7 @@ - + @@ -11837,7 +12406,7 @@ - + @@ -11861,7 +12430,7 @@ - + @@ -11885,7 +12454,7 @@ - + @@ -11909,7 +12478,7 @@ - + @@ -11933,7 +12502,7 @@ - + @@ -11957,7 +12526,7 @@ - + @@ -11981,7 +12550,7 @@ - + @@ -12005,7 +12574,7 @@ - + @@ -12029,7 +12598,7 @@ - + @@ -12053,7 +12622,7 @@ - + @@ -12077,7 +12646,7 @@ - + @@ -12101,7 +12670,7 @@ - + @@ -12125,7 +12694,7 @@ - + @@ -12149,7 +12718,7 @@ - + @@ -12173,7 +12742,7 @@ - + @@ -12197,7 +12766,7 @@ - + @@ -12221,7 +12790,7 @@ - + @@ -12245,7 +12814,7 @@ - + @@ -12269,7 +12838,7 @@ - + @@ -12293,11 +12862,179 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13001,6 +13738,12 @@ + + + + + + @@ -13223,6 +13966,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15918,6 +16703,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -16769,6 +17577,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 06c0ab22..c72e7a9f 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -868,6 +868,16 @@ + + + + + + + + + + @@ -2015,6 +2025,62 @@ + + + + 1045 + + + + + + + 1086 + + + + + + + 1058 + + + + + + + 1029 + + + + + + + 1048 + + + + + + + 1032 + + + + + + + 1038 + + + + + + + 1081 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 88bd9dad..d8f252c2 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -4411,9 +4411,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4431,7 +4528,7 @@ - + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index a85e68f5..0ad60b78 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3165,8 +3165,11 @@ + + + @@ -3206,6 +3209,27 @@ + + + + 4 + + + + + + + 5 + + + + + + + 6 + + + @@ -3246,6 +3270,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 697ae86c..52aaac67 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1352,6 +1352,13 @@ + + + + 184 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 57a34566..6d9d9cf8 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1004,6 +1004,13 @@ + + + + + + + @@ -1069,6 +1076,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + @@ -1103,7 +1161,7 @@ - + @@ -1112,8 +1170,8 @@ - - + + @@ -1144,7 +1202,7 @@ - + @@ -1417,7 +1475,7 @@ - + @@ -1434,7 +1492,7 @@ - + @@ -1458,7 +1516,7 @@ - + @@ -1520,6 +1578,9 @@ + + + @@ -1536,7 +1597,7 @@ - + @@ -1554,7 +1615,7 @@ - + @@ -1584,7 +1645,7 @@ - + @@ -1605,7 +1666,7 @@ - + @@ -1646,7 +1707,7 @@ - + @@ -1680,7 +1741,7 @@ - + @@ -1880,8 +1941,8 @@ - - + + @@ -1890,7 +1951,7 @@ - + @@ -1905,7 +1966,7 @@ - + @@ -1966,7 +2027,7 @@ - + @@ -1975,7 +2036,7 @@ - + @@ -1996,7 +2057,7 @@ - + @@ -2057,14 +2118,14 @@ - + - + @@ -2084,7 +2145,7 @@ - + @@ -2136,7 +2197,7 @@ - + @@ -2203,10 +2264,10 @@ - + - - + + @@ -2253,8 +2314,8 @@ - - + + @@ -2263,7 +2324,7 @@ - + @@ -2293,7 +2354,7 @@ - + @@ -2331,7 +2392,7 @@ - + @@ -2472,7 +2533,7 @@ - + @@ -2481,7 +2542,7 @@ - + @@ -2652,6 +2713,13 @@ + + + + 65536 + + + @@ -2698,7 +2766,7 @@ - + @@ -2836,10 +2904,10 @@ - + - - + + @@ -2847,7 +2915,7 @@ - + @@ -2877,9 +2945,9 @@ - + - + @@ -2919,9 +2987,9 @@ - + - + @@ -2934,9 +3002,9 @@ - + - + @@ -3036,7 +3104,7 @@ - + @@ -3082,8 +3150,8 @@ - - + + @@ -3123,9 +3191,9 @@ - + - + @@ -3199,11 +3267,11 @@ - + - + - + @@ -3263,12 +3331,12 @@ - + - + - - + + @@ -3285,9 +3353,9 @@ - + - + @@ -3305,9 +3373,9 @@ - + - + @@ -3366,7 +3434,7 @@ - + @@ -3391,7 +3459,7 @@ - + @@ -3465,7 +3533,7 @@ - + @@ -3554,7 +3622,7 @@ - + @@ -3582,7 +3650,7 @@ - + @@ -3659,7 +3727,7 @@ - + @@ -3705,7 +3773,7 @@ - + @@ -3713,7 +3781,7 @@ - + @@ -3818,7 +3886,7 @@ - + @@ -3835,7 +3903,7 @@ - + @@ -3870,7 +3938,7 @@ - + @@ -4084,6 +4152,13 @@ + + + + 1073741824 + + + @@ -4095,6 +4170,7 @@ + @@ -4363,6 +4439,8 @@ + + @@ -4440,7 +4518,7 @@ - + @@ -4535,6 +4613,20 @@ + + + + 3 + + + + + + + 4 + + + @@ -4570,6 +4662,17 @@ + + + + + + + + + + + @@ -4586,9 +4689,9 @@ - + - + @@ -4647,7 +4750,7 @@ - + @@ -4670,7 +4773,7 @@ - + @@ -4732,7 +4835,7 @@ - + @@ -4747,7 +4850,7 @@ - + @@ -4805,7 +4908,7 @@ - + @@ -4814,7 +4917,7 @@ - + @@ -4940,7 +5043,7 @@ - + @@ -4982,14 +5085,14 @@ - + - + @@ -5040,7 +5143,7 @@ - + @@ -5129,7 +5232,7 @@ - + @@ -5162,7 +5265,7 @@ - + @@ -5185,7 +5288,7 @@ - + @@ -5254,7 +5357,7 @@ - + @@ -5271,7 +5374,7 @@ - + @@ -5305,7 +5408,7 @@ - + @@ -5347,7 +5450,7 @@ - + @@ -5554,7 +5657,7 @@ - + @@ -5577,7 +5680,7 @@ - + @@ -5593,7 +5696,7 @@ - + @@ -5634,7 +5737,7 @@ - + @@ -5656,7 +5759,7 @@ - + @@ -5670,7 +5773,7 @@ - + @@ -5685,7 +5788,7 @@ - + @@ -5723,7 +5826,7 @@ - + @@ -5745,7 +5848,7 @@ - + @@ -5759,7 +5862,7 @@ - + @@ -5774,7 +5877,7 @@ - + @@ -5887,7 +5990,7 @@ - + @@ -5909,7 +6012,7 @@ - + @@ -5923,7 +6026,7 @@ - + @@ -5963,9 +6066,9 @@ - - - + + + @@ -6012,7 +6115,7 @@ - + @@ -6036,7 +6139,7 @@ - + @@ -6051,7 +6154,7 @@ - + @@ -6130,7 +6233,7 @@ - + @@ -6180,7 +6283,7 @@ - + @@ -6195,7 +6298,7 @@ - + @@ -6225,14 +6328,14 @@ - + - + @@ -6506,7 +6609,7 @@ - + @@ -6568,7 +6671,7 @@ - + @@ -6590,7 +6693,7 @@ - + @@ -6604,7 +6707,7 @@ - + @@ -6656,7 +6759,7 @@ - + @@ -6686,7 +6789,7 @@ - + @@ -6756,7 +6859,7 @@ - + @@ -7023,7 +7126,7 @@ - + @@ -7047,7 +7150,7 @@ - + @@ -7189,6 +7292,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7214,7 +7348,7 @@ - + @@ -7222,7 +7356,7 @@ - + @@ -7250,7 +7384,7 @@ - + @@ -7309,7 +7443,7 @@ - + @@ -7326,7 +7460,7 @@ - + @@ -7369,7 +7503,7 @@ - + @@ -7377,7 +7511,7 @@ - + @@ -7405,7 +7539,7 @@ - + @@ -7523,7 +7657,7 @@ - + @@ -7568,6 +7702,13 @@ + + + + + + + @@ -7687,6 +7828,13 @@ + + + + + + + @@ -7796,7 +7944,7 @@ - + @@ -7815,7 +7963,7 @@ - + @@ -7825,7 +7973,7 @@ - + @@ -7981,6 +8129,20 @@ + + + + 1048576 + + + + + + + 2097152 + + + @@ -8003,7 +8165,7 @@ - + @@ -8031,7 +8193,7 @@ - + @@ -8048,7 +8210,7 @@ - + @@ -8064,7 +8226,7 @@ - + @@ -8083,7 +8245,7 @@ - + @@ -8098,7 +8260,7 @@ - + @@ -8135,7 +8297,7 @@ - + @@ -8143,7 +8305,7 @@ - + @@ -8157,7 +8319,7 @@ - + @@ -8311,7 +8473,7 @@ - + @@ -8335,7 +8497,7 @@ - + @@ -8350,7 +8512,7 @@ - + @@ -8408,7 +8570,7 @@ - + @@ -8432,7 +8594,7 @@ - + @@ -8447,7 +8609,7 @@ - + @@ -8474,59 +8636,442 @@ - - - + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + - + - - + + - + + - - - - - true - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - + + - + - - - - - - - - - true - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + + + + + 32 + + + + + + + 64 + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + @@ -11410,6 +11955,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -11429,7 +11998,7 @@ - + @@ -11453,7 +12022,7 @@ - + @@ -11477,7 +12046,7 @@ - + @@ -11501,7 +12070,7 @@ - + @@ -11525,7 +12094,7 @@ - + @@ -11549,7 +12118,7 @@ - + @@ -11573,7 +12142,7 @@ - + @@ -11597,7 +12166,7 @@ - + @@ -11621,7 +12190,7 @@ - + @@ -11645,7 +12214,7 @@ - + @@ -11669,7 +12238,7 @@ - + @@ -11693,7 +12262,7 @@ - + @@ -11717,7 +12286,7 @@ - + @@ -11741,7 +12310,7 @@ - + @@ -11765,7 +12334,7 @@ - + @@ -11789,7 +12358,7 @@ - + @@ -11813,7 +12382,7 @@ - + @@ -11837,7 +12406,7 @@ - + @@ -11861,7 +12430,7 @@ - + @@ -11885,7 +12454,7 @@ - + @@ -11909,7 +12478,7 @@ - + @@ -11933,7 +12502,7 @@ - + @@ -11957,7 +12526,7 @@ - + @@ -11981,7 +12550,7 @@ - + @@ -12005,7 +12574,7 @@ - + @@ -12029,7 +12598,7 @@ - + @@ -12053,7 +12622,7 @@ - + @@ -12077,7 +12646,7 @@ - + @@ -12101,7 +12670,7 @@ - + @@ -12125,7 +12694,7 @@ - + @@ -12149,7 +12718,7 @@ - + @@ -12173,7 +12742,7 @@ - + @@ -12197,7 +12766,7 @@ - + @@ -12221,7 +12790,7 @@ - + @@ -12245,7 +12814,7 @@ - + @@ -12269,7 +12838,7 @@ - + @@ -12293,11 +12862,179 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13001,6 +13738,12 @@ + + + + + + @@ -13223,6 +13966,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15918,6 +16703,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -16769,6 +17577,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index 2f81d61b..af5956c5 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -868,6 +868,16 @@ + + + + + + + + + + @@ -2015,6 +2025,62 @@ + + + + 1045 + + + + + + + 1086 + + + + + + + 1058 + + + + + + + 1029 + + + + + + + 1048 + + + + + + + 1032 + + + + + + + 1038 + + + + + + + 1081 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 28e452eb..4c63671c 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -4411,9 +4411,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4431,7 +4528,7 @@ - + diff --git a/setup.py b/setup.py index 3ea93908..8d186006 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.21.2' +VERSION = '13.0.23' with open('README.rst', 'r') as f: readme = f.read() From f8a2d6a669b10151af1449f379db300b933613e1 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Fri, 24 Jan 2025 11:47:06 +0800 Subject: [PATCH 45/55] v13.0.23.1 --- HISTORY.rst | 5 + bingads/manifest.py | 2 +- .../audiences/bulk_product_audience.py | 2 +- bingads/v13/internal/bulk/string_table.py | 1 - .../v13/proxies/production/bulk_service.xml | 42 ++ .../production/campaignmanagement_service.xml | 670 +++++++++++++++++- .../production/customermanagement_service.xml | 24 + .../proxies/production/reporting_service.xml | 76 ++ bingads/v13/proxies/sandbox/bulk_service.xml | 35 + .../sandbox/campaignmanagement_service.xml | 670 +++++++++++++++++- .../sandbox/customermanagement_service.xml | 24 + .../v13/proxies/sandbox/reporting_service.xml | 76 ++ setup.py | 2 +- 13 files changed, 1603 insertions(+), 26 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index fead018f..eb273b40 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ Release History +13.0.23.1(2025-01-23) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. +* Fix issue in BulkProductAudience mapping. + 13.0.23(2024-11-21) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. diff --git a/bingads/manifest.py b/bingads/manifest.py index 8a70e169..b5c38812 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.23' +VERSION = '13.0.23.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/audiences/bulk_product_audience.py b/bingads/v13/bulk/entities/audiences/bulk_product_audience.py index 45bd2bbd..8b07b06c 100644 --- a/bingads/v13/bulk/entities/audiences/bulk_product_audience.py +++ b/bingads/v13/bulk/entities/audiences/bulk_product_audience.py @@ -34,7 +34,7 @@ def __init__(self, csv_to_field=lambda c, v: setattr(c.product_audience, 'TagId', int(v) if v else None) ), _SimpleBulkMapping( - _StringTable.Audience, + _StringTable.ProductAudienceType, field_to_csv=lambda c: bulk_str(c.product_audience.ProductAudienceType), csv_to_field=lambda c, v: setattr(c.product_audience, 'ProductAudienceType', v) ), diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 26b7197e..27a240b8 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -453,7 +453,6 @@ class _StringTable: ProductAudienceType = "Product Audience Type" CombinationRule = "Combination Rule" SourceId = "Source Id" - ProductAudienceType = "Product Audience Type" AdGroupProductAudienceAssociation = "Ad Group Product Audience Association" AdGroupNegativeProductAudienceAssociation = "Ad Group Negative Product Audience Association" CampaignProductAudienceAssociation = "Campaign Product Audience Association" diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index edd75799..4f5f97f0 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1352,6 +1352,48 @@ + + + + 184 + + + + + + + 185 + + + + + + + 186 + + + + + + + 187 + + + + + + + 188 + + + + + + + 189 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index b12f7ca1..46fd11e8 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1127,6 +1127,18 @@ + + + + + + + + + + + + @@ -1273,7 +1285,15 @@ - + + + + + + + + + @@ -1411,6 +1431,7 @@ + @@ -1581,6 +1602,8 @@ + + @@ -5192,6 +5215,14 @@ + + + + + + + + @@ -5929,6 +5960,7 @@ + @@ -5987,6 +6019,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -6027,9 +6082,20 @@ + + + + + + + + + + + @@ -6061,6 +6127,13 @@ + + + + + + + @@ -6078,6 +6151,13 @@ + + + + + + + @@ -6094,6 +6174,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -6164,6 +6265,7 @@ + @@ -8694,6 +8796,7 @@ + @@ -8831,7 +8934,7 @@ - + @@ -8882,17 +8985,11 @@ - + - - - - - - @@ -9011,10 +9108,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13011,6 +13288,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13030,11 +13355,131 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14002,12 +14447,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17715,6 +18202,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17738,6 +18271,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index c72e7a9f..0ec8c375 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -878,6 +878,9 @@ + + + @@ -2081,6 +2084,27 @@ + + + + 1026 + + + + + + + 1063 + + + + + + + 1050 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index d8f252c2..94b5fcae 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -194,6 +194,11 @@ + + + + + @@ -981,6 +986,11 @@ + + + + + @@ -2473,6 +2483,10 @@ + + + + @@ -2481,6 +2495,13 @@ + + + + + + + @@ -4499,6 +4520,7 @@ + @@ -4511,6 +4533,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 52aaac67..77f6a0fe 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1359,6 +1359,41 @@ + + + + 185 + + + + + + + 186 + + + + + + + 187 + + + + + + + 188 + + + + + + + 189 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 6d9d9cf8..1043af29 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1127,6 +1127,18 @@ + + + + + + + + + + + + @@ -1273,7 +1285,15 @@ - + + + + + + + + + @@ -1411,6 +1431,7 @@ + @@ -1581,6 +1602,8 @@ + + @@ -5192,6 +5215,14 @@ + + + + + + + + @@ -5929,6 +5960,7 @@ + @@ -5987,6 +6019,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -6027,9 +6082,20 @@ + + + + + + + + + + + @@ -6061,6 +6127,13 @@ + + + + + + + @@ -6078,6 +6151,13 @@ + + + + + + + @@ -6094,6 +6174,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -6164,6 +6265,7 @@ + @@ -8694,6 +8796,7 @@ + @@ -8831,7 +8934,7 @@ - + @@ -8882,17 +8985,11 @@ - + - - - - - - @@ -9011,10 +9108,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13011,6 +13288,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13030,11 +13355,131 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14002,12 +14447,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17715,6 +18202,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17738,6 +18271,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index af5956c5..026f0ef0 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -878,6 +878,9 @@ + + + @@ -2081,6 +2084,27 @@ + + + + 1026 + + + + + + + 1063 + + + + + + + 1050 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 4c63671c..b9d856cd 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -194,6 +194,11 @@ + + + + + @@ -981,6 +986,11 @@ + + + + + @@ -2473,6 +2483,10 @@ + + + + @@ -2481,6 +2495,13 @@ + + + + + + + @@ -4499,6 +4520,7 @@ + @@ -4511,6 +4533,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index 8d186006..d309d24f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.23' +VERSION = '13.0.23.1' with open('README.rst', 'r') as f: readme = f.read() From da4337d8232da3c42e59073fb802d00f21ca45a7 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Thu, 20 Feb 2025 19:38:08 +0800 Subject: [PATCH 46/55] v13.0.24 --- HISTORY.rst | 8 + bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 1 + bingads/v13/bulk/entities/bulk_budget.py | 21 +- bingads/v13/bulk/entities/bulk_campaign.py | 87 +++ .../entities/bulk_campaign_conversion_goal.py | 43 +- .../bulk_new_customer_acquisition_goal.py | 81 +++ .../v13/internal/bulk/bulk_object_factory.py | 1 + bingads/v13/internal/bulk/csv_headers.py | 7 + bingads/v13/internal/bulk/string_table.py | 7 + .../production/campaignmanagement_service.xml | 546 +++++++++++++++++- .../production/customermanagement_service.xml | 16 + .../proxies/production/reporting_service.xml | 2 + .../sandbox/campaignmanagement_service.xml | 546 +++++++++++++++++- .../sandbox/customermanagement_service.xml | 16 + .../v13/proxies/sandbox/reporting_service.xml | 2 + examples/v13/responsive_ad_recommendation.py | 198 +++++++ setup.py | 2 +- 18 files changed, 1521 insertions(+), 65 deletions(-) create mode 100644 bingads/v13/bulk/entities/bulk_new_customer_acquisition_goal.py create mode 100644 examples/v13/responsive_ad_recommendation.py diff --git a/HISTORY.rst b/HISTORY.rst index eb273b40..b4d138ca 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,14 @@ Release History +13.0.24(2025-02-20) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. +* Added NewCustomerAcquisitionGoalSetting in BulkCampaign mapping. +* Added SubType, ActionType in BulkCampaignConversionGoal mapping. +* Added CampaignId in BulkKeyword mapping. +* Added bulk mappings for NCA: BulkNewCustomerAcquisitionGoal. + 13.0.23.1(2025-01-23) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. diff --git a/bingads/manifest.py b/bingads/manifest.py index b5c38812..28bd4ee8 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.23.1' +VERSION = '13.0.24' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index 36cd5a06..4ed27c99 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -55,4 +55,5 @@ from .bulk_campaign_brand_list_association import * from .bulk_brand_item import * from .bulk_brand_list import * +from .bulk_new_customer_acquisition_goal import * from .goals import * diff --git a/bingads/v13/bulk/entities/bulk_budget.py b/bingads/v13/bulk/entities/bulk_budget.py index a9c585e7..91c49778 100644 --- a/bingads/v13/bulk/entities/bulk_budget.py +++ b/bingads/v13/bulk/entities/bulk_budget.py @@ -20,11 +20,12 @@ class BulkBudget(_SingleRecordBulkEntity): * :class:`.BulkFileWriter` """ - def __init__(self, budget=None, status=None, account_id=None): + def __init__(self, budget=None, status=None, account_id=None, campaign_id=None): super(BulkBudget, self).__init__() self._budget = budget self._status = status self._account_id = account_id + self._campaign_id = campaign_id @property def budget(self): @@ -63,6 +64,19 @@ def account_id(self): def account_id(self, value): self._account_id = value + @property + def campaign_id(self): + """ the id of the campaign which contains the budget + Corresponds to the 'Campaign Id' field in the bulk file. + + :rtype: long + """ + return self._campaign_id + + @campaign_id.setter + def campaign_id(self, value): + self._campaign_id = value + _MAPPINGS = [ _SimpleBulkMapping( @@ -75,6 +89,11 @@ def account_id(self, value): field_to_csv=lambda c: bulk_str(c.account_id), csv_to_field=lambda c, v: setattr(c, 'account_id', int(v) if v else None) ), + _SimpleBulkMapping( + header=_StringTable.CampaignId, + field_to_csv=lambda c: bulk_str(c.campaign_id), + csv_to_field=lambda c, v: setattr(c, 'campaign_id', int(v) if v else None) + ), _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: c.status, diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index e9d9bfcb..991474b5 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -4,6 +4,7 @@ from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _ComplexBulkMapping from bingads.v13.internal.extensions import * +from decimal import Decimal _DynamicFeedSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DynamicFeedSetting')) _TargetSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('TargetSetting')) @@ -12,6 +13,7 @@ _DisclaimerSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('DisclaimerSetting')) _VerifiedTrackingSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VerifiedTrackingSetting')) _PerformanceMaxSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('PerformanceMaxSetting')) +_NewCustomerAcquisitionGoalSetting = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('NewCustomerAcquisitionGoalSetting')) class BulkCampaign(_SingleRecordBulkEntity): """ Represents a campaign that can be read or written in a bulk file. @@ -167,6 +169,9 @@ def _get_verified_tracking_setting(self): def _get_performance_max_setting(self): return self._get_setting(_PerformanceMaxSetting, 'PerformanceMaxSetting') + def _get_new_customer_acquisition_goal_setting(self): + return self._get_setting(_NewCustomerAcquisitionGoalSetting, 'NewCustomerAcquisitionGoalSetting') + def _get_setting(self, setting_type, setting_name): if not self.campaign.Settings.Setting: return None @@ -205,6 +210,7 @@ def _read_campaign_type(c, v): if campaign_type.lower() == 'performancemax': BulkCampaign._create_campaign_setting(c.campaign, 'PerformanceMaxSetting') BulkCampaign._create_campaign_setting(c.campaign, 'ShoppingSetting') + BulkCampaign._create_campaign_setting(c.campaign, 'NewCustomerAcquisitionGoalSetting') @staticmethod def _create_campaign_setting(campaign, setting_type): @@ -521,6 +527,72 @@ def _write_image_opt_out(c): return None return bulk_str(performance_max_setting.AutoGeneratedImageOptOut) + @staticmethod + def _read_new_customer_acquisition_bid_only_mode(c, v): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + new_customer_acquisition_goal_setting = c._get_new_customer_acquisition_goal_setting() + if not new_customer_acquisition_goal_setting: + return None + new_customer_acquisition_goal_setting.NewCustomerAcquisitionBidOnlyMode = parse_bool(v) + + @staticmethod + def _write_new_customer_acquisition_bid_only_mode(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + new_customer_acquisition_goal_setting = c._get_new_customer_acquisition_goal_setting() + if not new_customer_acquisition_goal_setting: + return None + return bulk_str(new_customer_acquisition_goal_setting.NewCustomerAcquisitionBidOnlyMode) + + @staticmethod + def _read_new_customer_acquisition_goal_id(c, v): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + new_customer_acquisition_goal_setting = c._get_new_customer_acquisition_goal_setting() + if not new_customer_acquisition_goal_setting: + return None + new_customer_acquisition_goal_setting.NewCustomerAcquisitionGoalId = int(v) if v else None + + @staticmethod + def _write_new_customer_acquisition_goal_id(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + new_customer_acquisition_goal_setting = c._get_new_customer_acquisition_goal_setting() + if not new_customer_acquisition_goal_setting: + return None + return bulk_str(new_customer_acquisition_goal_setting.NewCustomerAcquisitionGoalId) + + @staticmethod + def _read_additional_conversion_value(c, v): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + new_customer_acquisition_goal_setting = c._get_new_customer_acquisition_goal_setting() + if not new_customer_acquisition_goal_setting: + return None + new_customer_acquisition_goal_setting.AdditionalConversionValue = Decimal(v) if v else None + + @staticmethod + def _write_additional_conversion_value(c): + if not c.campaign.CampaignType: + return None + campgaign_types = [campaign_type.lower() for campaign_type in c.campaign.CampaignType] + if 'performancemax' in campgaign_types: + new_customer_acquisition_goal_setting = c._get_new_customer_acquisition_goal_setting() + if not new_customer_acquisition_goal_setting: + return None + return bulk_str(new_customer_acquisition_goal_setting.AdditionalConversionValue) + @staticmethod def _read_website(c, v): if not c.campaign.CampaignType: @@ -756,6 +828,21 @@ def _write_website(c): field_to_csv=lambda c: field_to_csv_bool(c.should_serve_on_msan), csv_to_field=lambda c, v: setattr(c, 'should_serve_on_msan', parse_bool(v)) ), + _SimpleBulkMapping( + header=_StringTable.NewCustomerAcquisitionGoalId, + field_to_csv=lambda c: BulkCampaign._write_new_customer_acquisition_goal_id(c), + csv_to_field=lambda c, v: BulkCampaign._read_new_customer_acquisition_goal_id(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.NewCustomerAcquisitionBidOnlyMode, + field_to_csv=lambda c: BulkCampaign._write_new_customer_acquisition_bid_only_mode(c), + csv_to_field=lambda c, v: BulkCampaign._read_new_customer_acquisition_bid_only_mode(c, v) + ), + _SimpleBulkMapping( + header=_StringTable.AdditionalConversionValue, + field_to_csv=lambda c: BulkCampaign._write_additional_conversion_value(c), + csv_to_field=lambda c, v: BulkCampaign._read_additional_conversion_value(c, v) + ), ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py b/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py index 7900c52c..0ae398fc 100644 --- a/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py +++ b/bingads/v13/bulk/entities/bulk_campaign_conversion_goal.py @@ -10,7 +10,7 @@ class BulkCampaignConversionGoal(_SingleRecordBulkEntity): Properties of this class and of classes that it is derived from, correspond to fields of the CampaignConversionGoal record in a bulk file. For more information, see CampaignConversionGoal at https://go.microsoft.com/fwlink/?linkid=846127 - + *See also:* * :class:`.BulkServiceManager` @@ -19,10 +19,11 @@ class BulkCampaignConversionGoal(_SingleRecordBulkEntity): * :class:`.BulkFileWriter` """ - def __init__(self, campaign_conversion_goal = None): + def __init__(self, campaign_conversion_goal = None, sub_type = None, action_type = None): super(BulkCampaignConversionGoal, self).__init__() self._campaign_conversion_goal = campaign_conversion_goal - + self._sub_type = sub_type + self._action_type = action_type @property def campaign_conversion_goal(self): @@ -34,7 +35,31 @@ def campaign_conversion_goal(self): @campaign_conversion_goal.setter def campaign_conversion_goal(self, value): - self._campaign_conversion_goal = value + self._campaign_conversion_goal = value + + @property + def sub_type(self): + """ Corresponds to the 'Sub Type' field in the bulk file. + + :rtype: str + """ + return self._sub_type + + @sub_type.setter + def sub_type(self, value): + self._sub_type = value + + @property + def action_type(self): + """ Corresponds to the 'Action Type' field in the bulk file. + + :rtype: str + """ + return self._action_type + + @action_type.setter + def action_type(self, value): + self._action_type = value _MAPPINGS = [ @@ -48,6 +73,16 @@ def campaign_conversion_goal(self, value): field_to_csv=lambda c: bulk_str(c.campaign_conversion_goal.GoalId), csv_to_field=lambda c, v: setattr(c.campaign_conversion_goal, 'GoalId', int(v) if v else None) ), + _SimpleBulkMapping( + header=_StringTable.ActionType, + field_to_csv=lambda c: c.action_type, + csv_to_field=lambda c, v: setattr(c, 'action_type', v) + ), + _SimpleBulkMapping( + header=_StringTable.SubType, + field_to_csv=lambda c: c.sub_type, + csv_to_field=lambda c, v: setattr(c, 'sub_type', v) + ), ] def process_mappings_from_row_values(self, row_values): diff --git a/bingads/v13/bulk/entities/bulk_new_customer_acquisition_goal.py b/bingads/v13/bulk/entities/bulk_new_customer_acquisition_goal.py new file mode 100644 index 00000000..816aed2c --- /dev/null +++ b/bingads/v13/bulk/entities/bulk_new_customer_acquisition_goal.py @@ -0,0 +1,81 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * +from decimal import Decimal + + +class BulkNewCustomerAcquisitionGoal (_SingleRecordBulkEntity): + """ Represents a new customer acquisition goal that can be read or written in a bulk file. + + Properties of this class and of classes that it is derived from, correspond to fields of the Budget record in a bulk file. + For more information, see Budget at https://go.microsoft.com/fwlink/?linkid=846127 + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, new_customer_acquisition_goal=None, target=None): + super(BulkNewCustomerAcquisitionGoal , self).__init__() + self._new_customer_acquisition_goal = new_customer_acquisition_goal + self._target = target + + @property + def new_customer_acquisition_goal (self): + """ + the NewCustomerAcquisitionGoal object, see more detail at: https://go.microsoft.com/fwlink/?linkid=846127 + """ + return self._new_customer_acquisition_goal + + @new_customer_acquisition_goal .setter + def new_customer_acquisition_goal (self, value): + self._new_customer_acquisition_goal = value + + @property + def target(self): + """ + The ids of audiences within the new customer acquisition. + It should be split by simicolon. example: "123;456;789" + Corresponds to 'Target' field in bulk file. + :rtype: str + """ + return self._target + + @target.setter + def target(self, value): + self._target = value + + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.new_customer_acquisition_goal .Id), + csv_to_field=lambda c, v: setattr(c.new_customer_acquisition_goal , 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Target, + field_to_csv=lambda c: bulk_str(c.target), + csv_to_field=lambda c, v: setattr(c, 'target', v) + ), + _SimpleBulkMapping( + header=_StringTable.AdditionalConversionValue, + field_to_csv=lambda c: bulk_str(c.new_customer_acquisition_goal.AdditionalValue), + csv_to_field=lambda c, v: setattr(c.new_customer_acquisition_goal , 'AdditionalValue', Decimal(v) if v else None) + ), + ] + + def process_mappings_from_row_values(self, row_values): + self._new_customer_acquisition_goal = _CAMPAIGN_OBJECT_FACTORY_V13.create('NewCustomerAcquisitionGoal') + row_values.convert_to_entity(self, BulkNewCustomerAcquisitionGoal ._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self.new_customer_acquisition_goal , 'new_customer_acquisition_goal ') + self.convert_to_values(row_values, BulkNewCustomerAcquisitionGoal ._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkNewCustomerAcquisitionGoal , self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index ca0a4c30..8cd63936 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -233,6 +233,7 @@ class _BulkObjectFactory(): _StringTable.BrandItem: _EntityInfo(lambda: BulkBrandItem()), _StringTable.CampaignBrandList: _EntityInfo(lambda: BulkCampaignBrandListAssociation()), _StringTable.AssetGroupUrlTarget: _EntityInfo(lambda: BulkAssetGroupUrlTarget()), + _StringTable.NewCustomerAcquisitionGoal: _EntityInfo(lambda: BulkNewCustomerAcquisitionGoal()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index e5cef573..62c040d6 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -8,6 +8,7 @@ class _CsvHeaders: _StringTable.Status, _StringTable.Id, _StringTable.ParentId, + _StringTable.CampaignId, _StringTable.SubType, _StringTable.Campaign, _StringTable.AdGroup, @@ -528,6 +529,12 @@ class _CsvHeaders: _StringTable.AssetGroupTargetValue1, _StringTable.AssetGroupTargetValue2, _StringTable.AssetGroupTargetValue3, + + # New Customer Acquisition Goal + _StringTable.AdditionalConversionValue, + _StringTable.NewCustomerAcquisitionGoalId, + _StringTable.NewCustomerAcquisitionBidOnlyMode, + ] @staticmethod diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 27a240b8..72134e26 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -7,6 +7,7 @@ class _StringTable: Id = "Id" BusinessId = "Business Id" ParentId = "Parent Id" + CampaignId = "Campaign Id" TimeZone = "Time Zone" Budget = "Budget" BudgetType = "Budget Type" @@ -731,3 +732,9 @@ class _StringTable: AssetGroupTargetValue1 = "Asset Group Target Value 1"; AssetGroupTargetValue2 = "Asset Group Target Value 2"; AssetGroupTargetValue3 = "Asset Group Target Value 3"; + + # New Customer Acquisition Goal + NewCustomerAcquisitionGoal = "New Customer Acquisition Goal"; + AdditionalConversionValue = "Additional Conversion Value"; + NewCustomerAcquisitionGoalId = "New Customer Acquisition Goal Id"; + NewCustomerAcquisitionBidOnlyMode = "New Customer Acquisition Bid Only Mode"; diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 46fd11e8..de79c6e8 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1180,6 +1180,13 @@ + + + + + + + @@ -1206,11 +1213,25 @@ + + + + + + + + + + + + + + @@ -1604,6 +1625,7 @@ + @@ -5092,6 +5114,17 @@ + + + + + + + + + + + @@ -5223,6 +5256,14 @@ + + + + + + + + @@ -8809,9 +8850,29 @@ + + + + + + + 1 + + + + + + + 2 + + + + + + @@ -8873,37 +8934,50 @@ - - - + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + - + - + - + - - + + - + + - - - - - - - + @@ -8915,7 +8989,7 @@ - + @@ -8930,7 +9004,7 @@ - + @@ -9195,11 +9269,11 @@ - - + + - + @@ -9212,26 +9286,38 @@ - - + + - - + + - + - + - + - + + + + + + + + + + + + + @@ -9296,6 +9382,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9328,6 +9545,12 @@ + + + + + + @@ -13480,6 +13703,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14495,6 +14838,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18386,6 +18759,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customermanagement_service.xml b/bingads/v13/proxies/production/customermanagement_service.xml index 0ec8c375..a9abb138 100644 --- a/bingads/v13/proxies/production/customermanagement_service.xml +++ b/bingads/v13/proxies/production/customermanagement_service.xml @@ -881,6 +881,8 @@ + + @@ -1867,6 +1869,20 @@ + + + + 1060 + + + + + + + 1062 + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index 94b5fcae..cb38a40f 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -4438,6 +4438,8 @@ + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 1043af29..725d6028 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1180,6 +1180,13 @@ + + + + + + + @@ -1206,11 +1213,25 @@ + + + + + + + + + + + + + + @@ -1604,6 +1625,7 @@ + @@ -5092,6 +5114,17 @@ + + + + + + + + + + + @@ -5223,6 +5256,14 @@ + + + + + + + + @@ -8809,9 +8850,29 @@ + + + + + + + 1 + + + + + + + 2 + + + + + + @@ -8873,37 +8934,50 @@ - - - + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + - + - + - + - - + + - + + - - - - - - - + @@ -8915,7 +8989,7 @@ - + @@ -8930,7 +9004,7 @@ - + @@ -9195,11 +9269,11 @@ - - + + - + @@ -9212,26 +9286,38 @@ - - + + - - + + - + - + - + - + + + + + + + + + + + + + @@ -9296,6 +9382,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9328,6 +9545,12 @@ + + + + + + @@ -13480,6 +13703,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14495,6 +14838,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18386,6 +18759,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customermanagement_service.xml b/bingads/v13/proxies/sandbox/customermanagement_service.xml index 026f0ef0..a5cebe75 100644 --- a/bingads/v13/proxies/sandbox/customermanagement_service.xml +++ b/bingads/v13/proxies/sandbox/customermanagement_service.xml @@ -881,6 +881,8 @@ + + @@ -1867,6 +1869,20 @@ + + + + 1060 + + + + + + + 1062 + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index b9d856cd..864e0650 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -4438,6 +4438,8 @@ + + diff --git a/examples/v13/responsive_ad_recommendation.py b/examples/v13/responsive_ad_recommendation.py new file mode 100644 index 00000000..aaeda249 --- /dev/null +++ b/examples/v13/responsive_ad_recommendation.py @@ -0,0 +1,198 @@ +import base64 + +from auth_helper import * +from campaignmanagement_example_helper import * + +# You must provide credentials in auth_helper.py. + +def main(authorization_data): + + try: + # To run this example you'll need to provide a valid Ad Final URL + ad_final_url = "https://contoso.com" + # Set false to disable cleanup of created entities at the end + do_cleanup = True + + final_urls = campaign_service.factory.create('ns3:ArrayOfstring') + final_urls.string.append(ad_final_url) + + output_status_message("-----\nCreateResponsiveAdRecommendation:"); + output_status_message(f"-----\nGetting ad recommendation for URL {ad_final_url} ..."); + responsive_ad_recommendation_response = campaign_service.CreateResponsiveAdRecommendation( + FinalUrls=final_urls + ) + responsive_ad = responsive_ad_recommendation_response.ResponsiveAd + image_suggestions = responsive_ad_recommendation_response.ImageSuggestions['AdRecommendationImageSuggestion'] + + # Select a few images from the suggested list. This example picks first 5 images + selected_images = image_suggestions[:5] + + # Add selected images to your media library + save_images(selected_images) + + images = campaign_service.factory.create('ArrayOfAssetLink') + images.AssetLink = [obj.AssetLink for obj in selected_images] + responsive_ad.Images = images + + responsive_ad.BusinessName = "Contoso" + #responsive_ad.CallToAction = 'ShopNow' + responsive_ad.CallToActionLanguage = 'English' + + # Create an Audience campaign with one ad group and a responsive ad + campaigns = campaign_service.factory.create('ArrayOfCampaign') + campaign = set_elements_to_none(campaign_service.factory.create('Campaign')) + campaign.BudgetType = 'DailyBudgetStandard' + # CampaignType must be set for Audience campaigns + campaign.CampaignType = ['Audience'] + campaign.DailyBudget = 50.00 + languages = campaign_service.factory.create('ns3:ArrayOfstring') + languages.string.append('All') + campaign.Languages = languages + campaign.Name = "Ad recommendation test " + str(datetime.now()) + campaign.TimeZone = 'PacificTimeUSCanadaTijuana' + campaigns.Campaign.append(campaign) + + output_status_message("-----\nAddCampaigns:") + add_campaigns_response = campaign_service.AddCampaigns( + AccountId=authorization_data.account_id, + Campaigns=campaigns + ) + campaign_ids = { + 'long': add_campaigns_response.CampaignIds['long'] if add_campaigns_response.CampaignIds['long'] else None + } + output_status_message("CampaignIds:") + output_array_of_long(campaign_ids) + output_status_message("PartialErrors:") + output_array_of_batcherror(add_campaigns_response.PartialErrors) + + # Add an ad group within the campaign. + ad_groups = campaign_service.factory.create('ArrayOfAdGroup') + ad_group = set_elements_to_none(campaign_service.factory.create('AdGroup')) + ad_group.Name = "Holiday Sale" + ad_group.StartDate = None + end_date = campaign_service.factory.create('Date') + end_date.Day = 31 + end_date.Month = 12 + current_time = gmtime() + end_date.Year = current_time.tm_year + ad_group.EndDate = end_date + cpc_bid = campaign_service.factory.create('Bid') + cpc_bid.Amount = 0.09 + ad_group.CpcBid = cpc_bid + # Network cannot be set for ad groups in Audience campaigns + ad_group.Network = None + ad_groups.AdGroup.append(ad_group) + + output_status_message("-----\nAddAdGroups:") + add_ad_groups_response = campaign_service.AddAdGroups( + CampaignId=campaign_ids['long'][0], + AdGroups=ad_groups, + ReturnInheritedBidStrategyTypes=False + ) + ad_group_ids = { + 'long': add_ad_groups_response.AdGroupIds['long'] if add_ad_groups_response.AdGroupIds['long'] else None + } + output_status_message("AdGroupIds:") + output_array_of_long(ad_group_ids) + output_status_message("PartialErrors:") + output_array_of_batcherror(add_ad_groups_response.PartialErrors) + + # Add a responsive ad within the ad group + ads = campaign_service.factory.create('ArrayOfAd') + ads.Ad.append(responsive_ad) + + output_status_message("-----\nAddAds:") + add_ads_response = campaign_service.AddAds( + AdGroupId=ad_group_ids['long'][0], + Ads=ads + ) + ad_ids = { + 'long': add_ads_response.AdIds['long'] if add_ads_response.AdIds['long'] else None + } + output_status_message("AdIds:") + output_array_of_long(ad_ids) + output_status_message("PartialErrors:") + output_array_of_batcherror(add_ads_response.PartialErrors) + + output_status_message(f"-----\nCreated campaign: + {campaign.Name}") + + if not do_cleanup: + return + else: + # Delete the account's media + output_status_message("-----\nDeleteMedia:") + media_ids = campaign_service.factory.create('ns3:ArrayOflong') + media_ids['long'] = [obj.Asset.Id for obj in responsive_ad.Images.AssetLink] + delete_media_response = campaign_service.DeleteMedia( + AccountId=authorization_data.account_id, + MediaIds=media_ids + ) + + for media_id in media_ids['long']: + output_status_message("Deleted Media Id {0}".format(media_id)) + + # Delete the campaign and everything it contains e.g., ad groups and ads + output_status_message("-----\nDeleteCampaigns:") + campaign_service.DeleteCampaigns( + AccountId=authorization_data.account_id, + CampaignIds=campaign_ids + ) + output_status_message("Deleted Campaign Id {0}".format(campaign_ids['long'][0])) + + + except WebFault as ex: + output_webfault_errors(ex) + except Exception as ex: + output_status_message(ex) + +def save_images(image_suggestions): + medias_to_add = campaign_service.factory.create('ArrayOfMedia') + for item in image_suggestions: + image = item.Image + image_bytes = download_bytes(item.ImageUrl) + image_base64 = base64.b64encode(image_bytes).decode('utf-8') + image.Data = image_base64 + medias_to_add.Media.append(image) + + media_ids = campaign_service.AddMedia( + AccountId=authorization_data.account_id, + Media=medias_to_add + ) + + for i in range(len(media_ids['long'])): + image_suggestions[i].AssetLink.Asset.Id = media_ids['long'][i] + +def download_bytes(url): + response = requests.get(url, stream=True) + response.raise_for_status() + + output_stream = bytearray() + + for chunk in response.iter_content(chunk_size=4096): + if chunk: + output_stream.extend(chunk) + + return bytes(output_stream) + +# Main execution +if __name__ == '__main__': + + print("Loading the web service client proxies...") + + authorization_data=AuthorizationData( + account_id=None, + customer_id=None, + developer_token=DEVELOPER_TOKEN, + authentication=None, + ) + + campaign_service=ServiceClient( + service='CampaignManagementService', + version=13, + authorization_data=authorization_data, + environment=ENVIRONMENT, + ) + + authenticate(authorization_data) + + main(authorization_data) diff --git a/setup.py b/setup.py index d309d24f..7710251c 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.23.1' +VERSION = '13.0.24' with open('README.rst', 'r') as f: readme = f.read() From 5832802aa63c6e50241b0b2c4ef9c522be100e9c Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Fri, 21 Feb 2025 17:55:14 +0800 Subject: [PATCH 47/55] v13.0.24.1 --- HISTORY.rst | 5 ++++- bingads/manifest.py | 2 +- bingads/v13/bulk/entities/bulk_budget.py | 21 +-------------------- setup.py | 2 +- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b4d138ca..1ca55bdc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,12 +2,15 @@ Release History +13.0.24.1(2025-02-21) ++++++++++++++++++++++++++ +* Fix issue in BulkBudget in version 13.0.24. + 13.0.24(2025-02-20) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes: https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13. * Added NewCustomerAcquisitionGoalSetting in BulkCampaign mapping. * Added SubType, ActionType in BulkCampaignConversionGoal mapping. -* Added CampaignId in BulkKeyword mapping. * Added bulk mappings for NCA: BulkNewCustomerAcquisitionGoal. 13.0.23.1(2025-01-23) diff --git a/bingads/manifest.py b/bingads/manifest.py index 28bd4ee8..98c6a9d8 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.24' +VERSION = '13.0.24.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/bulk_budget.py b/bingads/v13/bulk/entities/bulk_budget.py index 91c49778..a9c585e7 100644 --- a/bingads/v13/bulk/entities/bulk_budget.py +++ b/bingads/v13/bulk/entities/bulk_budget.py @@ -20,12 +20,11 @@ class BulkBudget(_SingleRecordBulkEntity): * :class:`.BulkFileWriter` """ - def __init__(self, budget=None, status=None, account_id=None, campaign_id=None): + def __init__(self, budget=None, status=None, account_id=None): super(BulkBudget, self).__init__() self._budget = budget self._status = status self._account_id = account_id - self._campaign_id = campaign_id @property def budget(self): @@ -64,19 +63,6 @@ def account_id(self): def account_id(self, value): self._account_id = value - @property - def campaign_id(self): - """ the id of the campaign which contains the budget - Corresponds to the 'Campaign Id' field in the bulk file. - - :rtype: long - """ - return self._campaign_id - - @campaign_id.setter - def campaign_id(self, value): - self._campaign_id = value - _MAPPINGS = [ _SimpleBulkMapping( @@ -89,11 +75,6 @@ def campaign_id(self, value): field_to_csv=lambda c: bulk_str(c.account_id), csv_to_field=lambda c, v: setattr(c, 'account_id', int(v) if v else None) ), - _SimpleBulkMapping( - header=_StringTable.CampaignId, - field_to_csv=lambda c: bulk_str(c.campaign_id), - csv_to_field=lambda c, v: setattr(c, 'campaign_id', int(v) if v else None) - ), _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: c.status, diff --git a/setup.py b/setup.py index 7710251c..28b3cc56 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.24' +VERSION = '13.0.24.1' with open('README.rst', 'r') as f: readme = f.read() From 534e1b35f752c5e527fa00af94bce395b1f60d23 Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Mon, 28 Apr 2025 13:33:59 +0800 Subject: [PATCH 48/55] v13.0.24.2 --- HISTORY.rst | 4 + bingads/authorization.py | 70 +- bingads/manifest.py | 2 +- .../v13/proxies/production/bulk_service.xml | 21 + .../production/campaignmanagement_service.xml | 695 ++++++++++++++++- .../proxies/production/reporting_service.xml | 135 ++++ bingads/v13/proxies/sandbox/bulk_service.xml | 21 + .../sandbox/campaignmanagement_service.xml | 714 +++++++++++++++++- .../sandbox/customerbilling_service.xml | 83 ++ .../v13/proxies/sandbox/reporting_service.xml | 135 ++++ setup.py | 2 +- 11 files changed, 1811 insertions(+), 71 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 1ca55bdc..91d78a52 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ Release History +13.0.24.2(2025-04-28) ++++++++++++++++++++++++++ +* Enable MSA Production support on the sandbox by default, as MSA INT will soon be deprecated. + 13.0.24.1(2025-02-21) +++++++++++++++++++++++++ * Fix issue in BulkBudget in version 13.0.24. diff --git a/bingads/authorization.py b/bingads/authorization.py index 37e6c35c..3a1898bc 100644 --- a/bingads/authorization.py +++ b/bingads/authorization.py @@ -14,6 +14,7 @@ MSADS_MANAGE='msads.manage' ADS_MANAGE='ads.manage' BINGADS_MANAGE='bingads.manage' +MSA_PROD='msa.prod' class AuthorizationData: """ Represents a user who intends to access the corresponding customer and account. @@ -216,11 +217,11 @@ def __init__(self, access_token=None, access_token_expires_in_seconds=None, refr self._refresh_token = refresh_token self._response_json = response_json self._access_token_received_datetime=datetime.utcnow() - + @property def access_token_received_datetime(self): """ The datetime when access token was received - + :rtype: datetime """ return self._access_token_received_datetime @@ -264,7 +265,7 @@ def refresh_token(self): """ return self._refresh_token - + @property def response_json(self): """ OAuth whole attribute that got along with access token. @@ -288,7 +289,7 @@ class OAuthAuthorization(Authentication): * :class:`.OAuthWebAuthCodeGrant` """ - def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common'): + def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common', use_msa_prod=True): """ Initializes a new instance of the OAuthAuthorization class. :param client_id: The client identifier corresponding to your registered application. @@ -303,10 +304,10 @@ def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSA self._client_id = client_id self._oauth_tokens = oauth_tokens self._state = None - self.environment=env - self._oauth_scope=oauth_scope + self.environment = env + self._oauth_scope = MSA_PROD if env == SANDBOX and use_msa_prod else oauth_scope self._tenant = tenant - + @property def tenant(self): """ tenant @@ -387,7 +388,7 @@ class OAuthWithAuthorizationCode(OAuthAuthorization): For more information about registering a Bing Ads application, see http://go.microsoft.com/fwlink/?LinkID=511607. """ - def __init__(self, client_id, client_secret, redirection_uri, token_refreshed_callback=None, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant="common"): + def __init__(self, client_id, client_secret, redirection_uri, token_refreshed_callback=None, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant="common", use_msa_prod=True): """ Initialize a new instance of this class. :param client_id: The client identifier corresponding to your registered application. @@ -404,7 +405,7 @@ def __init__(self, client_id, client_secret, redirection_uri, token_refreshed_ca :return: """ - super(OAuthWithAuthorizationCode, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, oauth_scope=oauth_scope, tenant=tenant) + super(OAuthWithAuthorizationCode, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, oauth_scope=oauth_scope, tenant=tenant, use_msa_prod=use_msa_prod) self._client_secret = client_secret self._redirection_uri = redirection_uri self._token_refreshed_callback = token_refreshed_callback @@ -418,14 +419,14 @@ def get_authorization_endpoint(self): endpoint_url = _UriOAuthService.AUTHORIZE_URI[(self.environment, self._oauth_scope)] if self.environment == PRODUCTION and (self._oauth_scope == MSADS_MANAGE or self._oauth_scope == ADS_MANAGE): endpoint_url = endpoint_url.replace('common', self.tenant); - + endpoint = str.format( endpoint_url, self._client_id, 'code', quote_plus(self._redirection_uri) ) - + return endpoint if self.state is None else endpoint + '&state=' + self.state def request_oauth_tokens_by_response_uri(self, response_uri, **kwargs): @@ -546,7 +547,7 @@ class OAuthDesktopMobileAuthCodeGrant(OAuthWithAuthorizationCode): For more information about registering a Bing Ads application, see http://go.microsoft.com/fwlink/?LinkID=511607. """ - def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common'): + def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common', use_msa_prod=True): """ Initializes a new instance of the this class with the specified client id. :param client_id: The client identifier corresponding to your registered application. @@ -555,14 +556,16 @@ def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSA :type oauth_tokens: OAuthTokens """ + effective_scope = MSA_PROD if env == SANDBOX and use_msa_prod else oauth_scope super(OAuthDesktopMobileAuthCodeGrant, self).__init__( client_id, None, - _UriOAuthService.REDIRECTION_URI[(env, oauth_scope)], + _UriOAuthService.REDIRECTION_URI[(env, effective_scope)], oauth_tokens=oauth_tokens, env=env, - oauth_scope=oauth_scope, - tenant=tenant + oauth_scope=effective_scope, + tenant=tenant, + use_msa_prod=use_msa_prod ) @@ -594,9 +597,9 @@ class OAuthDesktopMobileImplicitGrant(OAuthAuthorization): Authorization Code Grant section of the OAuth 2.0 spec at https://tools.ietf.org/html/rfc6749#section-4.1. For more information about registering a Bing Ads application, see http://go.microsoft.com/fwlink/?LinkID=511607. """ - - def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common'): + + def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSADS_MANAGE, tenant='common', use_msa_prod=True): """ Initializes a new instance of the this class with the specified client id. :param client_id: The client identifier corresponding to your registered application. @@ -605,9 +608,10 @@ def __init__(self, client_id, oauth_tokens=None, env=PRODUCTION, oauth_scope=MSA :type oauth_tokens: OAuthTokens """ - super(OAuthDesktopMobileImplicitGrant, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, oauth_scope=oauth_scope, tenant=tenant) - - + effective_scope = MSA_PROD if env == SANDBOX and use_msa_prod else oauth_scope + super(OAuthDesktopMobileImplicitGrant, self).__init__(client_id, oauth_tokens=oauth_tokens, env=env, oauth_scope=effective_scope, tenant=tenant) + + def get_authorization_endpoint(self): """ Gets the Microsoft Account authorization endpoint where the user should be navigated to give his or her consent. @@ -625,7 +629,7 @@ def get_authorization_endpoint(self): 'token', _UriOAuthService.REDIRECTION_URI[(self.environment, self._oauth_scope)], ) - + return endpoint if self.state is None else endpoint + '&state=' + self.state def extract_access_token_from_uri(self, redirection_uri): @@ -666,25 +670,29 @@ def __init__(self): (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/nativeclient', (PRODUCTION, ADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/nativeclient', (PRODUCTION, BINGADS_MANAGE): 'https://login.live.com/oauth20_desktop.srf', - (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/common/oauth2/nativeclient' + (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/common/oauth2/nativeclient', + (SANDBOX, MSA_PROD): 'https://login.microsoftonline.com/common/oauth2/nativeclient' } AUTH_TOKEN_URI={ (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/token', (PRODUCTION, ADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/token', (PRODUCTION, BINGADS_MANAGE): 'https://login.live.com/oauth20_token.srf', - (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/consumers/oauth2/v2.0/token' + (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/consumers/oauth2/v2.0/token', + (SANDBOX, MSA_PROD): 'https://login.microsoftonline.com/common/oauth2/v2.0/token' } AUTHORIZE_URI={ - (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fads.microsoft.com%2Fmsads.manage%20offline_access&response_type={1}&redirect_uri={2}', + (PRODUCTION, MSADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fads.microsoft.com%2Fmsads.manage%20offline_access&response_type={1}&redirect_uri={2}', (PRODUCTION, ADS_MANAGE): 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fads.microsoft.com%2Fads.manage%20offline_access&response_type={1}&redirect_uri={2}', (PRODUCTION, BINGADS_MANAGE): 'https://login.live.com/oauth20_authorize.srf?client_id={0}&scope=bingads.manage&response_type={1}&redirect_uri={2}', - (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/consumers/oauth2/v2.0/authorize?client_id={0}&scope=https://api.ads.microsoft.com/msads.manage%20offline_access&response_type={1}&redirect_uri={2}&prompt=login' + (SANDBOX, MSADS_MANAGE): 'https://login.windows-ppe.net/consumers/oauth2/v2.0/authorize?client_id={0}&scope=https://api.ads.microsoft.com/msads.manage%20offline_access&response_type={1}&redirect_uri={2}&prompt=login', + (SANDBOX, MSA_PROD): 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={0}&scope=https%3A%2F%2Fsi.ads.microsoft.com%2Fmsads.manage%20offline_access&response_type={1}&redirect_uri={2}' } SCOPE={ - (PRODUCTION, MSADS_MANAGE): 'https://ads.microsoft.com/msads.manage offline_access', - (PRODUCTION, ADS_MANAGE): 'https://ads.microsoft.com/ads.manage offline_access', + (PRODUCTION, MSADS_MANAGE): 'https://ads.microsoft.com/msads.manage offline_access', + (PRODUCTION, ADS_MANAGE): 'https://ads.microsoft.com/ads.manage offline_access', (PRODUCTION, BINGADS_MANAGE): 'bingads.manage', - (SANDBOX, MSADS_MANAGE): 'https://api.ads.microsoft.com/msads.manage offline_access' + (SANDBOX, MSADS_MANAGE): 'https://api.ads.microsoft.com/msads.manage offline_access', + (SANDBOX, MSA_PROD): 'https://si.ads.microsoft.com' } @staticmethod @@ -699,12 +707,12 @@ def get_access_token(**kwargs): if 'client_secret' in kwargs and kwargs['client_secret'] is None: del kwargs['client_secret'] - + if 'oauth_scope' in kwargs and kwargs['oauth_scope'] == 'bingads.manage': del kwargs['tenant'] - + auth_token_url = _UriOAuthService.AUTH_TOKEN_URI[(kwargs['environment'], kwargs['oauth_scope'])] - + if 'tenant' in kwargs and kwargs['tenant'] is not None: auth_token_url = auth_token_url.replace('common', kwargs['tenant']) diff --git a/bingads/manifest.py b/bingads/manifest.py index 98c6a9d8..277d2473 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.24.1' +VERSION = '13.0.24.2' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index 4f5f97f0..eb41088e 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1394,6 +1394,27 @@ + + + + 190 + + + + + + + 191 + + + + + + + 192 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index de79c6e8..229fc6aa 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -385,6 +385,14 @@ + + + + + + + + @@ -692,6 +700,13 @@ + + + + 64 + + + @@ -4927,6 +4942,13 @@ + + + + + + + @@ -4963,9 +4985,20 @@ + + + + + + + + + + + @@ -6212,9 +6245,20 @@ + + + + + + + + + + + @@ -6224,6 +6268,7 @@ + @@ -7854,6 +7899,13 @@ + + + + + + + @@ -8286,6 +8338,13 @@ + + + + 4194304 + + + @@ -8785,6 +8844,7 @@ + @@ -8821,11 +8881,38 @@ + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + @@ -8839,10 +8926,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + @@ -8851,6 +9051,8 @@ + + @@ -8879,6 +9081,7 @@ + @@ -8915,6 +9118,9 @@ + + + @@ -8932,36 +9138,44 @@ - + + + + + + + + + + + + + + + - + 1 - + 2 - - - - 3 - - - - + + @@ -8978,11 +9192,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8990,6 +9232,7 @@ + @@ -9466,23 +9709,40 @@ + + + + + + + + + + + + + + + + - - + + + - - + + - - + + @@ -9504,15 +9764,200 @@ + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13799,6 +14244,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -13818,11 +14287,83 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14862,12 +15403,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -18851,6 +19416,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -18874,6 +19462,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index cb38a40f..c36da555 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -3209,6 +3209,7 @@ + @@ -3335,11 +3336,65 @@ + + + + + + + + + + 3 + + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + + @@ -4589,6 +4644,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 77f6a0fe..16daf3d4 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1394,6 +1394,27 @@ + + + + 190 + + + + + + + 191 + + + + + + + 192 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 725d6028..618c0c04 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -385,6 +385,14 @@ + + + + + + + + @@ -692,6 +700,13 @@ + + + + 64 + + + @@ -4927,6 +4942,13 @@ + + + + + + + @@ -4963,9 +4985,20 @@ + + + + + + + + + + + @@ -6212,9 +6245,20 @@ + + + + + + + + + + + @@ -6224,6 +6268,7 @@ + @@ -7854,6 +7899,13 @@ + + + + + + + @@ -8286,6 +8338,13 @@ + + + + 4194304 + + + @@ -8785,6 +8844,7 @@ + @@ -8821,11 +8881,38 @@ + + + + + + 1 + + + + + + + 2 + + + + + + + 4 + + + + + + + @@ -8839,10 +8926,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + @@ -8851,6 +9051,8 @@ + + @@ -8879,6 +9081,7 @@ + @@ -8915,6 +9118,9 @@ + + + @@ -8932,36 +9138,44 @@ - + + + + + + + + + + + + + + + - + 1 - + 2 - - - - 3 - - - - + + @@ -8978,11 +9192,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8990,6 +9232,7 @@ + @@ -9267,6 +9510,13 @@ + + + + + + + @@ -9456,9 +9706,20 @@ + + + + + + + + + + + @@ -9466,23 +9727,41 @@ + + + + + + + + + + + + + + + + + - - + + + - - + + - - + + @@ -9504,15 +9783,200 @@ + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13799,6 +14263,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -13818,11 +14306,83 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14862,12 +15422,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -18851,6 +19435,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -18874,6 +19481,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index 28794ee3..d1fc5e6b 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -210,6 +210,20 @@ + + + + + + + + + + + + + + @@ -695,6 +709,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -1036,6 +1070,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -1105,6 +1161,12 @@ + + + + + + @@ -1346,6 +1408,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 864e0650..d0994f15 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -3209,6 +3209,7 @@ + @@ -3335,11 +3336,65 @@ + + + + + + + + + + 3 + + + + + + + + 6 + + + + + + + 7 + + + + + + + 8 + + + + + + + 9 + + + + + + + 10 + + + + + + + + @@ -4589,6 +4644,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index 28b3cc56..33fecc80 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.24.1' +VERSION = '13.0.24.2' with open('README.rst', 'r') as f: readme = f.read() From 06af688ad5aa8245a4a9a9fbd696273cab9fe0e8 Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Mon, 28 Apr 2025 15:12:55 +0800 Subject: [PATCH 49/55] update pipeline to use ubuntu 22.04 --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d022b360..4aadbe77 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ trigger: - main pool: - vmImage: ubuntu-latest + vmImage: ubuntu-22.04 strategy: matrix: Python37: From 2dbb411f7eb967100880de79908ca0449a1b19a0 Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Thu, 10 Jul 2025 18:42:28 +0800 Subject: [PATCH 50/55] v13.0.25 --- HISTORY.rst | 15 + bingads/authorization.py | 2 +- bingads/manifest.py | 2 +- bingads/v13/bulk/entities/__init__.py | 1 + .../__init__.py | 9 + .../bulk_account_placement_exlucison_list.py | 88 ++ ...k_account_placement_exlucison_list_item.py | 40 + .../bulk_account_placement_inclusion_list.py | 88 ++ ...k_account_placement_inclusion_list_item.py | 40 + ...nt_placement_exclusion_list_association.py | 88 ++ ...nt_placement_inclusion_list_association.py | 88 ++ .../bulk_location_ad_extensions.py | 2 +- .../v13/bulk/entities/ad_extensions/common.py | 2 +- .../bulk/entities/audiences/bulk_audience.py | 2 +- bingads/v13/bulk/entities/bulk_ad_group.py | 6 +- bingads/v13/bulk/entities/bulk_ads.py | 4 +- bingads/v13/bulk/entities/bulk_asset_group.py | 6 +- bingads/v13/bulk/entities/bulk_campaign.py | 6 +- bingads/v13/bulk/entities/bulk_keyword.py | 20 +- .../bulk/entities/bulk_negative_keywords.py | 4 +- .../v13/internal/bulk/bulk_object_factory.py | 6 + bingads/v13/internal/bulk/csv_headers.py | 2 + .../entities/bulk_shared_negative_site.py | 108 +++ .../bulk/entities/bulk_shared_site.py | 111 +++ bingads/v13/internal/bulk/string_table.py | 40 +- bingads/v13/internal/extensions.py | 100 ++- .../v13/proxies/production/bulk_service.xml | 21 + .../production/campaignmanagement_service.xml | 749 ++++++++++++++--- .../production/customerbilling_service.xml | 91 +++ .../proxies/production/reporting_service.xml | 138 ++++ bingads/v13/proxies/sandbox/bulk_service.xml | 21 + .../sandbox/campaignmanagement_service.xml | 754 +++++++++++++++--- .../sandbox/customerbilling_service.xml | 8 + .../v13/proxies/sandbox/reporting_service.xml | 138 ++++ bingads/v13/reporting/reporting_operation.py | 11 +- .../reporting/reporting_service_manager.py | 29 +- examples/v13/perf_test.py | 93 +++ setup.py | 2 +- 38 files changed, 2636 insertions(+), 299 deletions(-) create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/__init__.py create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list.py create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list_item.py create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list.py create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list_item.py create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_exclusion_list_association.py create mode 100644 bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_inclusion_list_association.py create mode 100644 bingads/v13/internal/bulk/entities/bulk_shared_negative_site.py create mode 100644 bingads/v13/internal/bulk/entities/bulk_shared_site.py create mode 100644 examples/v13/perf_test.py diff --git a/HISTORY.rst b/HISTORY.rst index 91d78a52..03073185 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,21 @@ Release History +13.0.25(2025-07-10) ++++++++++++++++++++++++++ +API Updates: +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). +* New Reports in Reporting Service: AppsPerformanceReport, TravelQueryInsightReport and FeedIemPerformanceReport. +* Support CampaignTypeReportFilter in Reporting API. +* New APIs in CampaignManagement Service: GetAnnotationOptOut, UpdateAnnotationOptOut, CreateBrandKitRecommendation and GetResponsiveAdRecommendationJob. +* New field ListingGroupPath in AssetGroupListingGroup. +* New field IsAutoGoal in ConversionGoal. +* New field MaxCpc in MaxConversionValueBiddingScheme. +* New API in CustomerBilling Service: GetCouponInfo. + +Bulk Mapping Updates: +* Added bulk mappings for Site Exclusion: BulkAccountPlacementExclusionList, BulkSharedListNegativeSite, BulkAccountPlacementExclusionListAssociation, BulkAccountPlacementInclusionList, BulkSharedListSite and BulkAccountPlacementInclusionListAssociation. + 13.0.24.2(2025-04-28) +++++++++++++++++++++++++ * Enable MSA Production support on the sandbox by default, as MSA INT will soon be deprecated. diff --git a/bingads/authorization.py b/bingads/authorization.py index 3a1898bc..97589659 100644 --- a/bingads/authorization.py +++ b/bingads/authorization.py @@ -692,7 +692,7 @@ def __init__(self): (PRODUCTION, ADS_MANAGE): 'https://ads.microsoft.com/ads.manage offline_access', (PRODUCTION, BINGADS_MANAGE): 'bingads.manage', (SANDBOX, MSADS_MANAGE): 'https://api.ads.microsoft.com/msads.manage offline_access', - (SANDBOX, MSA_PROD): 'https://si.ads.microsoft.com' + (SANDBOX, MSA_PROD): 'https://si.ads.microsoft.com/msads.manage offline_access' } @staticmethod diff --git a/bingads/manifest.py b/bingads/manifest.py index 277d2473..a4608f49 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.24.2' +VERSION = '13.0.25' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/__init__.py b/bingads/v13/bulk/entities/__init__.py index 4ed27c99..f019fad5 100644 --- a/bingads/v13/bulk/entities/__init__.py +++ b/bingads/v13/bulk/entities/__init__.py @@ -57,3 +57,4 @@ from .bulk_brand_list import * from .bulk_new_customer_acquisition_goal import * from .goals import * +from .account_placement_exclusion_list import * diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/__init__.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/__init__.py new file mode 100644 index 00000000..d4d6610f --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/__init__.py @@ -0,0 +1,9 @@ +__author__ = 'Bing Ads SDK Team' +__email__ = 'bing_ads_sdk@microsoft.com' + +from .bulk_account_placement_exlucison_list import * +from .bulk_account_placement_exlucison_list_item import * +from .bulk_account_placement_inclusion_list import * +from .bulk_account_placement_inclusion_list_item import * +from .bulk_campaign_account_placement_exclusion_list_association import * +from .bulk_campaign_account_placement_inclusion_list_association import * diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list.py new file mode 100644 index 00000000..c2515f57 --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list.py @@ -0,0 +1,88 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAccountPlacementExclusionList(_SingleRecordBulkEntity): + """ Represents an account placement exclusion list. + + This class exposes the property :attr:`account_placement_exclusion_list` that can be read and written as fields of the account placement exclusion list record + in a bulk file. + + For more information, see account placement exclusion list at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, account_placement_exclusion_list=None): + super(BulkAccountPlacementExclusionList, self).__init__() + + self._status = status + self._account_placement_exclusion_list = account_placement_exclusion_list + + + @property + def status(self): + """ The status of the account placement exclusion list. + + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def account_placement_exclusion_list(self): + """ The AccountPlacementExclusionList Data Object of the Campaign Management Service. + + A subset of AccountPlacementExclusionList properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._account_placement_exclusion_list + + @account_placement_exclusion_list.setter + def account_placement_exclusion_list(self, account_placement_exclusion_list): + self._account_placement_exclusion_list = account_placement_exclusion_list + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.account_placement_exclusion_list.Id), + csv_to_field=lambda c, v: setattr(c.account_placement_exclusion_list, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.account_placement_exclusion_list.Name), + csv_to_field=lambda c, v: setattr(c.account_placement_exclusion_list, 'Name', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.account_placement_exclusion_list = _CAMPAIGN_OBJECT_FACTORY_V13.create('AccountPlacementExclusionList') + + row_values.convert_to_entity(self, BulkAccountPlacementExclusionList._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._account_placement_exclusion_list, 'AccountPlacementExclusionList') + self.convert_to_values(row_values, BulkAccountPlacementExclusionList._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAccountPlacementExclusionList, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list_item.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list_item.py new file mode 100644 index 00000000..32764df9 --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_exlucison_list_item.py @@ -0,0 +1,40 @@ +from bingads.v13.internal.bulk.entities.bulk_shared_negative_site import BulkSharedNegativeSite + + +class BulkAccountPlacementExclusionListItem(BulkSharedNegativeSite): + """ Represents an account placement exclusion list item. + + This class exposes the property :attr:`account_placement_exclusion_list` that can be read and written as fields of the account placement exclusion list item record + in a bulk file. + + For more information, see account placement exclusion list item at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, parent_id=None): + super(BulkAccountPlacementExclusionListItem, self).__init__() + + self._parent_id = parent_id + + + @property + def account_placement_exclusion_list_id(self): + """ The status of the account placement exclusion list id. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._parent_id + + @account_placement_exclusion_list_id.setter + def account_placement_exclusion_list_id(self, account_placement_exclusion_list_id): + self._parent_id = account_placement_exclusion_list_id + diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list.py new file mode 100644 index 00000000..70326c10 --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list.py @@ -0,0 +1,88 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAccountPlacementInclusionList(_SingleRecordBulkEntity): + """ Represents an account placement inclusion list. + + This class exposes the property :attr:`account_placement_inclusion_list` that can be read and written as fields of the account placement inclusion list record + in a bulk file. + + For more information, see account placement inclusion list at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, account_placement_inclusion_list=None): + super(BulkAccountPlacementInclusionList, self).__init__() + + self._status = status + self._account_placement_inclusion_list = account_placement_inclusion_list + + + @property + def status(self): + """ The status of the account placement inclusion list. + + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def account_placement_inclusion_list(self): + """ The AccountPlacementInclusionList Data Object of the Campaign Management Service. + + A subset of AccountPlacementInclusionList properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._account_placement_inclusion_list + + @account_placement_inclusion_list.setter + def account_placement_inclusion_list(self, account_placement_inclusion_list): + self._account_placement_inclusion_list = account_placement_inclusion_list + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.account_placement_inclusion_list.Id), + csv_to_field=lambda c, v: setattr(c.account_placement_inclusion_list, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Name, + field_to_csv=lambda c: bulk_str(c.account_placement_inclusion_list.Name), + csv_to_field=lambda c, v: setattr(c.account_placement_inclusion_list, 'Name', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.account_placement_inclusion_list = _CAMPAIGN_OBJECT_FACTORY_V13.create('AccountPlacementInclusionList') + + row_values.convert_to_entity(self, BulkAccountPlacementInclusionList._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._account_placement_inclusion_list, 'AccountPlacementInclusionList') + self.convert_to_values(row_values, BulkAccountPlacementInclusionList._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAccountPlacementInclusionList, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list_item.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list_item.py new file mode 100644 index 00000000..5fd72b27 --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_account_placement_inclusion_list_item.py @@ -0,0 +1,40 @@ +from bingads.v13.internal.bulk.entities.bulk_shared_site import BulkSharedSite + + +class BulkAccountPlacementInclusionListItem(BulkSharedSite): + """ Represents an account placement inclusion list item. + + This class exposes the property :attr:`account_placement_inclusion_list` that can be read and written as fields of the account placement inclusion list item record + in a bulk file. + + For more information, see account placement inclusion list item at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, parent_id=None): + super(BulkAccountPlacementInclusionListItem, self).__init__() + + self._parent_id = parent_id + + + @property + def account_placement_inclusion_list_id(self): + """ The status of the account placement inclusion list id. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._parent_id + + @account_placement_inclusion_list_id.setter + def account_placement_inclusion_list_id(self, account_placement_inclusion_list_id): + self._parent_id = account_placement_inclusion_list_id + diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_exclusion_list_association.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_exclusion_list_association.py new file mode 100644 index 00000000..a6c9e119 --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_exclusion_list_association.py @@ -0,0 +1,88 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAccountPlacementExclusionListAssociation(_SingleRecordBulkEntity): + """ Represents an account placement exclusion list association. + + This class exposes the property :attr:`shared_entity_association` that can be read and written as fields of the account placement exclusion list association record + in a bulk file. + + For more information, see account placement exclusion list association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, shared_entity_association=None): + super(BulkAccountPlacementExclusionListAssociation, self).__init__() + + self._status = status + self._shared_entity_association = shared_entity_association + + + @property + def status(self): + """ The status of the account placement exclusion list association. + + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def shared_entity_association(self): + """ The AccountPlacementExclusionList Data Object of the Campaign Management Service. + + A subset of AccountPlacementExclusionList properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._shared_entity_association + + @shared_entity_association.setter + def shared_entity_association(self, shared_entity_association): + self._shared_entity_association = shared_entity_association + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.shared_entity_association.SharedEntityId), + csv_to_field=lambda c, v: setattr(c.shared_entity_association, 'SharedEntityId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.shared_entity_association.EntityId), + csv_to_field=lambda c, v: setattr(c.shared_entity_association, 'EntityId', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.shared_entity_association = _CAMPAIGN_OBJECT_FACTORY_V13.create('AccountPlacementExclusionList') + + row_values.convert_to_entity(self, BulkAccountPlacementExclusionListAssociation._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._shared_entity_association, 'AccountPlacementExclusionList') + self.convert_to_values(row_values, BulkAccountPlacementExclusionListAssociation._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAccountPlacementExclusionListAssociation, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_inclusion_list_association.py b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_inclusion_list_association.py new file mode 100644 index 00000000..6a410fbb --- /dev/null +++ b/bingads/v13/bulk/entities/account_placement_exclusion_list/bulk_campaign_account_placement_inclusion_list_association.py @@ -0,0 +1,88 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkAccountPlacementInclusionListAssociation(_SingleRecordBulkEntity): + """ Represents an account placement inclusion list association. + + This class exposes the property :attr:`shared_entity_association` that can be read and written as fields of the account placement inclusion list association record + in a bulk file. + + For more information, see account placement inclusion list association at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, status=None, shared_entity_association=None): + super(BulkAccountPlacementInclusionListAssociation, self).__init__() + + self._status = status + self._shared_entity_association = shared_entity_association + + + @property + def status(self): + """ The status of the account placement inclusion list association. + + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def shared_entity_association(self): + """ The AccountPlacementInclusionList Data Object of the Campaign Management Service. + + A subset of AccountPlacementInclusionList properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._shared_entity_association + + @shared_entity_association.setter + def shared_entity_association(self, shared_entity_association): + self._shared_entity_association = shared_entity_association + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.shared_entity_association.SharedEntityId), + csv_to_field=lambda c, v: setattr(c.shared_entity_association, 'SharedEntityId', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.shared_entity_association.EntityId), + csv_to_field=lambda c, v: setattr(c.shared_entity_association, 'EntityId', v) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.shared_entity_association = _CAMPAIGN_OBJECT_FACTORY_V13.create('AccountPlacementInclusionList') + + row_values.convert_to_entity(self, BulkAccountPlacementInclusionListAssociation._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._shared_entity_association, 'AccountPlacementInclusionList') + self.convert_to_values(row_values, BulkAccountPlacementInclusionListAssociation._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkAccountPlacementInclusionListAssociation, self).read_additional_data(stream_reader) diff --git a/bingads/v13/bulk/entities/ad_extensions/bulk_location_ad_extensions.py b/bingads/v13/bulk/entities/ad_extensions/bulk_location_ad_extensions.py index b4134621..897e951e 100644 --- a/bingads/v13/bulk/entities/ad_extensions/bulk_location_ad_extensions.py +++ b/bingads/v13/bulk/entities/ad_extensions/bulk_location_ad_extensions.py @@ -64,7 +64,7 @@ def location_ad_extension(self, value): _SimpleBulkMapping( header=_StringTable.GeoCodeStatus, field_to_csv=lambda c: bulk_str(c.location_ad_extension.GeoCodeStatus), - csv_to_field=lambda c, v: setattr(c.location_ad_extension, 'GeoCodeStatus', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.location_ad_extension, v, 'GeoCodeStatus', BusinessGeoCodeStatus) ), _SimpleBulkMapping( header=_StringTable.AddressLine1, diff --git a/bingads/v13/bulk/entities/ad_extensions/common.py b/bingads/v13/bulk/entities/ad_extensions/common.py index 3abfc52b..d8a55e0a 100644 --- a/bingads/v13/bulk/entities/ad_extensions/common.py +++ b/bingads/v13/bulk/entities/ad_extensions/common.py @@ -42,7 +42,7 @@ def account_id(self, account_id): _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: bulk_str(c._ad_extension.Status), - csv_to_field=lambda c, v: setattr(c._ad_extension, 'Status', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c._ad_extension, v, 'Status', AdExtensionStatus) ), _SimpleBulkMapping( header=_StringTable.Id, diff --git a/bingads/v13/bulk/entities/audiences/bulk_audience.py b/bingads/v13/bulk/entities/audiences/bulk_audience.py index c0d97205..09b8b28d 100644 --- a/bingads/v13/bulk/entities/audiences/bulk_audience.py +++ b/bingads/v13/bulk/entities/audiences/bulk_audience.py @@ -63,7 +63,7 @@ def __init__(self, _SimpleBulkMapping( header=_StringTable.Scope, field_to_csv=lambda c: bulk_str(c.audience.Scope), - csv_to_field=lambda c, v: setattr(c.audience, 'Scope', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.audience, v, 'Scope', EntityScope) ), _SimpleBulkMapping( _StringTable.AudienceSearchSize, diff --git a/bingads/v13/bulk/entities/bulk_ad_group.py b/bingads/v13/bulk/entities/bulk_ad_group.py index f820234d..ab4c1aa6 100644 --- a/bingads/v13/bulk/entities/bulk_ad_group.py +++ b/bingads/v13/bulk/entities/bulk_ad_group.py @@ -28,7 +28,7 @@ def csv_to_coop_setting(row_values, bulk_ad_group): if maximum_bid_success or bid_boost_value_success or bid_option_success: coop_setting = _CAMPAIGN_OBJECT_FACTORY_V13.create('CoOpSetting') coop_setting.Type = 'CoOpSetting' - coop_setting.BidOption = bid_option if bid_option else None + coop_setting.BidOption = parse_bid_option(bid_option) coop_setting.BidBoostValue = float(bid_boost_value) if bid_boost_value else None coop_setting.BidMaxValue = float(maximum_bid) if maximum_bid else None bulk_ad_group.ad_group.Settings.Setting.append(coop_setting) @@ -55,7 +55,7 @@ def csv_to_bidding_scheme(row_values, bulk_ad_group): if success and inherited_bid_strategy_type != '': bulk_ad_group.ad_group.BiddingScheme.InheritedBidStrategyType = inherited_bid_strategy_type elif hasattr(bulk_ad_group.ad_group.BiddingScheme, 'InheritedBidStrategyType'): - del bulk_ad_group.ad_group.BiddingScheme.InheritedBidStrategyType + bulk_ad_group.ad_group.BiddingScheme.InheritedBidStrategyType = None else: bulk_ad_group.ad_group.BiddingScheme.Type = bid_strategy_type @@ -177,7 +177,7 @@ def quality_score_data(self): _SimpleBulkMapping( header=_StringTable.NetworkDistribution, field_to_csv=lambda c: bulk_str(c.ad_group.Network), - csv_to_field=lambda c, v: setattr(c.ad_group, 'Network', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.ad_group, v, 'Network', Network) ), _SimpleBulkMapping( header=_StringTable.AdRotation, diff --git a/bingads/v13/bulk/entities/bulk_ads.py b/bingads/v13/bulk/entities/bulk_ads.py index bb222667..96e114b3 100644 --- a/bingads/v13/bulk/entities/bulk_ads.py +++ b/bingads/v13/bulk/entities/bulk_ads.py @@ -115,7 +115,7 @@ def ad(self, ad): _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: bulk_str(c.ad.Status), - csv_to_field=lambda c, v: setattr(c.ad, 'Status', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.ad, v, 'Status', AdStatus) ), _SimpleBulkMapping( header=_StringTable.Id, @@ -140,7 +140,7 @@ def ad(self, ad): _SimpleBulkMapping( header=_StringTable.EditorialStatus, field_to_csv=lambda c: c.ad.EditorialStatus, - csv_to_field=lambda c, v: setattr(c.ad, 'EditorialStatus', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.ad, v, 'EditorialStatus', AdEditorialStatus) ), _SimpleBulkMapping( header=_StringTable.DevicePreference, diff --git a/bingads/v13/bulk/entities/bulk_asset_group.py b/bingads/v13/bulk/entities/bulk_asset_group.py index bc056b2f..ba3831f9 100644 --- a/bingads/v13/bulk/entities/bulk_asset_group.py +++ b/bingads/v13/bulk/entities/bulk_asset_group.py @@ -81,7 +81,7 @@ def asset_group(self, asset_group): _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: bulk_str(c.asset_group.Status), - csv_to_field=lambda c, v: setattr(c.asset_group, 'Status', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.asset_group, v, 'Status', AssetGroupStatus) ), _SimpleBulkMapping( header=_StringTable.ParentId, @@ -116,7 +116,7 @@ def asset_group(self, asset_group): _SimpleBulkMapping( header=_StringTable.CallToAction, field_to_csv=lambda c: c.asset_group.CallToAction, - csv_to_field=lambda c, v: setattr(c.asset_group, 'CallToAction', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.asset_group, v, 'CallToAction', CallToAction) ), _SimpleBulkMapping( header=_StringTable.Descriptions, @@ -126,7 +126,7 @@ def asset_group(self, asset_group): _SimpleBulkMapping( header=_StringTable.EditorialStatus, field_to_csv=lambda c: c.asset_group.EditorialStatus, - csv_to_field=lambda c, v: setattr(c.asset_group, 'EditorialStatus', v if v else None) + csv_to_field=lambda c, v: csv_to_field_enum(c.asset_group, v, 'EditorialStatus', AssetGroupEditorialStatus) ), _SimpleBulkMapping( header=_StringTable.FinalMobileUrl, diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index 991474b5..d4154fcf 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -622,11 +622,7 @@ def _write_website(c): _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: bulk_str(c.campaign.Status), - csv_to_field=lambda c, v: setattr( - c.campaign, - 'Status', - v if v else None - ) + csv_to_field=lambda c, v: csv_to_field_enum(c.campaign, v, 'Status', CampaignStatus) ), _SimpleBulkMapping( header=_StringTable.Id, diff --git a/bingads/v13/bulk/entities/bulk_keyword.py b/bingads/v13/bulk/entities/bulk_keyword.py index 2caa6bff..a7776384 100644 --- a/bingads/v13/bulk/entities/bulk_keyword.py +++ b/bingads/v13/bulk/entities/bulk_keyword.py @@ -27,7 +27,7 @@ def csv_to_bidding_scheme(row_values, bulk_keyword): if success and inherited_bid_strategy_type != '': bulk_keyword.keyword.BiddingScheme.InheritedBidStrategyType = inherited_bid_strategy_type elif hasattr(bulk_keyword.keyword.BiddingScheme, 'InheritedBidStrategyType'): - del bulk_keyword.keyword.BiddingScheme.InheritedBidStrategyType + bulk_keyword.keyword.BiddingScheme.InheritedBidStrategyType = None else: bulk_keyword.keyword.BiddingScheme.Type = bid_strategy_type @@ -136,11 +136,7 @@ def bid_suggestions(self): _SimpleBulkMapping( header=_StringTable.Status, field_to_csv=lambda c: bulk_str(c.keyword.Status), - csv_to_field=lambda c, v: setattr( - c.keyword, - 'Status', - v if v else None - ) + csv_to_field=lambda c, v: csv_to_field_enum(c.keyword, v, 'Status', KeywordStatus) ), _SimpleBulkMapping( header=_StringTable.Id, @@ -178,20 +174,12 @@ def bid_suggestions(self): _SimpleBulkMapping( header=_StringTable.EditorialStatus, field_to_csv=lambda c: bulk_str(c.keyword.EditorialStatus), - csv_to_field=lambda c, v: setattr( - c.keyword, - 'EditorialStatus', - v if v else None - ) + csv_to_field=lambda c, v: csv_to_field_enum(c.keyword, v, 'EditorialStatus', KeywordEditorialStatus) ), _SimpleBulkMapping( header=_StringTable.MatchType, field_to_csv=lambda c: bulk_str(c.keyword.MatchType), - csv_to_field=lambda c, v: setattr( - c.keyword, - 'MatchType', - v if v else None - ) + csv_to_field=lambda c, v: csv_to_field_enum(c.keyword, v, 'MatchType', MatchType) ), _SimpleBulkMapping( header=_StringTable.DestinationUrl, diff --git a/bingads/v13/bulk/entities/bulk_negative_keywords.py b/bingads/v13/bulk/entities/bulk_negative_keywords.py index bce51892..5930f9c3 100644 --- a/bingads/v13/bulk/entities/bulk_negative_keywords.py +++ b/bingads/v13/bulk/entities/bulk_negative_keywords.py @@ -2,7 +2,7 @@ from bingads.v13.internal.bulk.string_table import _StringTable from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping, _DynamicColumnNameMapping -from bingads.v13.internal.extensions import bulk_str +from bingads.v13.internal.extensions import * class _BulkNegativeKeyword(_SingleRecordBulkEntity): @@ -73,7 +73,7 @@ def negative_keyword(self, negative_keyword): _SimpleBulkMapping( header=_StringTable.MatchType, field_to_csv=lambda c: bulk_str(c.negative_keyword.MatchType), - csv_to_field=lambda c, v: setattr(c.negative_keyword, 'MatchType', v) + csv_to_field=lambda c, v: csv_to_field_enum(c.negative_keyword, v, 'MatchType', MatchType) ) ] diff --git a/bingads/v13/internal/bulk/bulk_object_factory.py b/bingads/v13/internal/bulk/bulk_object_factory.py index 8cd63936..77f116eb 100644 --- a/bingads/v13/internal/bulk/bulk_object_factory.py +++ b/bingads/v13/internal/bulk/bulk_object_factory.py @@ -234,6 +234,12 @@ class _BulkObjectFactory(): _StringTable.CampaignBrandList: _EntityInfo(lambda: BulkCampaignBrandListAssociation()), _StringTable.AssetGroupUrlTarget: _EntityInfo(lambda: BulkAssetGroupUrlTarget()), _StringTable.NewCustomerAcquisitionGoal: _EntityInfo(lambda: BulkNewCustomerAcquisitionGoal()), + _StringTable.AccountPlacementExclusionList: _EntityInfo(lambda: BulkAccountPlacementExclusionList()), + _StringTable.AccountPlacementExclusionListItem: _EntityInfo(lambda: BulkSharedNegativeSite()), + _StringTable.CampaignAccountPlacementListAssociation: _EntityInfo(lambda: BulkAccountPlacementExclusionListAssociation()), + _StringTable.AccountPlacementInclusionList: _EntityInfo(lambda: BulkAccountPlacementInclusionList()), + _StringTable.AccountPlacementInclusionListItem: _EntityInfo(lambda: BulkSharedSite()), + _StringTable.CampaignAccountPlacementInclusionListAssociation: _EntityInfo(lambda: BulkAccountPlacementInclusionListAssociation()), } ADDITIONAL_OBJECT_MAP = { diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index 62c040d6..bc8a5ebb 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -535,6 +535,8 @@ class _CsvHeaders: _StringTable.NewCustomerAcquisitionGoalId, _StringTable.NewCustomerAcquisitionBidOnlyMode, + _StringTable.AccountPlacementListItemUrl, + ] @staticmethod diff --git a/bingads/v13/internal/bulk/entities/bulk_shared_negative_site.py b/bingads/v13/internal/bulk/entities/bulk_shared_negative_site.py new file mode 100644 index 00000000..96e94cad --- /dev/null +++ b/bingads/v13/internal/bulk/entities/bulk_shared_negative_site.py @@ -0,0 +1,108 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkSharedNegativeSite(_SingleRecordBulkEntity): + """ Represents a negative site. + + This class exposes the property :attr:`negative_site` that can be read and written as fields of the negative site record + in a bulk file. + + For more information, see negative site at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, parent_id=None, status=None, negative_site=None): + super(BulkSharedNegativeSite, self).__init__() + + self._parent_id = parent_id + self._status = status + self._negative_site = negative_site + + @property + def parent_id(self): + """ The identifier of the parent entity that contains the negative site. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + self._parent_id = parent_id + + @property + def status(self): + """ The status of the negative site. + + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + @property + def negative_site(self): + """ The NegativeSite Data Object of the Campaign Management Service. + + A subset of NegativeSite properties are available in the Ad Group record. + For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. + """ + return self._negative_site + + @negative_site.setter + def negative_site(self, negative_site): + self._negative_site = negative_site + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.negative_site.Id), + csv_to_field=lambda c, v: setattr(c.negative_site, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.parent_id), + csv_to_field=lambda c, v: setattr(c, 'parent_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.AccountPlacementListItemUrl, + field_to_csv=lambda c: bulk_str(c.negative_site.Url), + csv_to_field=lambda c, v: setattr(c.negative_site, 'Url', v if v else None) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.negative_site = _CAMPAIGN_OBJECT_FACTORY_V13.create('NegativeSite') + + row_values.convert_to_entity(self, BulkSharedNegativeSite._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._negative_site, 'NegativeSite') + self.convert_to_values(row_values, BulkSharedNegativeSite._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkSharedNegativeSite, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/entities/bulk_shared_site.py b/bingads/v13/internal/bulk/entities/bulk_shared_site.py new file mode 100644 index 00000000..4d65499c --- /dev/null +++ b/bingads/v13/internal/bulk/entities/bulk_shared_site.py @@ -0,0 +1,111 @@ +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 + +from bingads.v13.internal.bulk.string_table import _StringTable +from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity +from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping +from bingads.v13.internal.extensions import * + +class BulkSharedSite(_SingleRecordBulkEntity): + """ Represents a site. + + This class exposes the property :attr:`site` that can be read and written as fields of the site record + in a bulk file. + + For more information, see site at https://go.microsoft.com/fwlink/?linkid=846127. + + *See also:* + + * :class:`.BulkServiceManager` + * :class:`.BulkOperation` + * :class:`.BulkFileReader` + * :class:`.BulkFileWriter` + """ + + def __init__(self, parent_id=None, url=None, status=None, site=None): + super(BulkSharedSite, self).__init__() + + self._parent_id = parent_id + self._url = url + self._status = status + self._site = site + + @property + def parent_id(self): + """ The identifier of the parent entity that contains the site. + + Corresponds to the 'Parent Id' field in the bulk file. + + :rtype: int + """ + + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + self._parent_id = parent_id + + @property + def url(self): + """ The url of a website. + + Corresponds to the 'Website' field in the bulk file. + + :rtype: str + """ + + return self._url + + @url.setter + def url(self, url): + self._url = url + + @property + def status(self): + """ The status of the site. + + Corresponds to the 'Status' field in the bulk file. + + :rtype: str + """ + + return self._status + + @status.setter + def status(self, status): + self._status = status + + _MAPPINGS = [ + _SimpleBulkMapping( + header=_StringTable.Id, + field_to_csv=lambda c: bulk_str(c.site.Id), + csv_to_field=lambda c, v: setattr(c.site, 'Id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.Status, + field_to_csv=lambda c: bulk_str(c.status), + csv_to_field=lambda c, v: setattr(c, 'status', v if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.ParentId, + field_to_csv=lambda c: bulk_str(c.parent_id), + csv_to_field=lambda c, v: setattr(c, 'parent_id', int(v) if v else None) + ), + _SimpleBulkMapping( + header=_StringTable.AccountPlacementListItemUrl, + field_to_csv=lambda c: bulk_str(c.site.Url), + csv_to_field=lambda c, v: setattr(c.site, 'Url', v if v else None) + ), + ] + + + def process_mappings_from_row_values(self, row_values): + self.site = _CAMPAIGN_OBJECT_FACTORY_V13.create('Site') + + row_values.convert_to_entity(self, BulkSharedSite._MAPPINGS) + + def process_mappings_to_row_values(self, row_values, exclude_readonly_data): + self._validate_property_not_null(self._site, 'Site') + self.convert_to_values(row_values, BulkSharedSite._MAPPINGS) + + def read_additional_data(self, stream_reader): + super(BulkSharedSite, self).read_additional_data(stream_reader) diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 72134e26..351e0408 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -722,19 +722,31 @@ class _StringTable: StatusDateTime = "Editorial Status Date" # Asset Group Url Target - AssetGroupUrlTarget = "Asset Group Url Target"; - AssetGroupTargetCondition1 = "Asset Group Target Condition 1"; - AssetGroupTargetCondition2 = "Asset Group Target Condition 2"; - AssetGroupTargetCondition3 = "Asset Group Target Condition 3"; - AssetGroupTargetConditionOperator1 = "Asset Group Target Condition Operator 1"; - AssetGroupTargetConditionOperator2 = "Asset Group Target Condition Operator 2"; - AssetGroupTargetConditionOperator3 = "Asset Group Target Condition Operator 3"; - AssetGroupTargetValue1 = "Asset Group Target Value 1"; - AssetGroupTargetValue2 = "Asset Group Target Value 2"; - AssetGroupTargetValue3 = "Asset Group Target Value 3"; + AssetGroupUrlTarget = "Asset Group Url Target" + AssetGroupTargetCondition1 = "Asset Group Target Condition 1" + AssetGroupTargetCondition2 = "Asset Group Target Condition 2" + AssetGroupTargetCondition3 = "Asset Group Target Condition 3" + AssetGroupTargetConditionOperator1 = "Asset Group Target Condition Operator 1" + AssetGroupTargetConditionOperator2 = "Asset Group Target Condition Operator 2" + AssetGroupTargetConditionOperator3 = "Asset Group Target Condition Operator 3" + AssetGroupTargetValue1 = "Asset Group Target Value 1" + AssetGroupTargetValue2 = "Asset Group Target Value 2" + AssetGroupTargetValue3 = "Asset Group Target Value 3" # New Customer Acquisition Goal - NewCustomerAcquisitionGoal = "New Customer Acquisition Goal"; - AdditionalConversionValue = "Additional Conversion Value"; - NewCustomerAcquisitionGoalId = "New Customer Acquisition Goal Id"; - NewCustomerAcquisitionBidOnlyMode = "New Customer Acquisition Bid Only Mode"; + NewCustomerAcquisitionGoal = "New Customer Acquisition Goal" + AdditionalConversionValue = "Additional Conversion Value" + NewCustomerAcquisitionGoalId = "New Customer Acquisition Goal Id" + NewCustomerAcquisitionBidOnlyMode = "New Customer Acquisition Bid Only Mode" + + AccountPlacementExclusionList = "Account Placement Exclusion List" + AccountPlacementExclusionListItem = "Account Placement Exclusion List Item" + AccountPlacementListItemUrl = "Site List Item Url" + CampaignAccountPlacementListAssociation = "Campaign Account Placement Exclusion List Association" + AccountPlacementExclusionListId = "Account Placement Exclusion List Id" + AccountPlacementExclusionListItemId = "Account Placement Exclusion List Item Id" + AccountPlacementInclusionList = "Account Placement Inclusion List" + AccountPlacementInclusionListItem = "Account Placement Inclusion List Item" + CampaignAccountPlacementInclusionListAssociation = "Campaign Account Placement Inclusion List Association" + AccountPlacementInclusionListId = "Account Placement Inclusion List Id" + AccountPlacementInclusionListItemId = "Account Placement Inclusion List Item Id" diff --git a/bingads/v13/internal/extensions.py b/bingads/v13/internal/extensions.py index 2e93e68a..7838891f 100644 --- a/bingads/v13/internal/extensions.py +++ b/bingads/v13/internal/extensions.py @@ -3,7 +3,7 @@ from bingads.v13.internal.bulk.string_table import _StringTable import re import json -from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13, _CAMPAIGN_MANAGEMENT_SERVICE_V13 +from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 target_setting_detail_pattern=r'^(Age|Audience|CompanyName|Gender|Industry|JobFunction)$' @@ -17,7 +17,24 @@ custom_param_pattern = r'^\{_(.*?)\}=(.*$)' combine_rule_pattern = r'^(And|Or|Not)\(([\d|\s|,]*?)\)$' +AdEditorialStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('AdEditorialStatus') +AdStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('AdStatus') +AssetGroupStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetGroupStatus') +AdGroupStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('AdGroupStatus') +AssetGroupEditorialStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetGroupEditorialStatus') +AdExtensionStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('AdExtensionStatus') +EntityScope = _CAMPAIGN_OBJECT_FACTORY_V13.create('EntityScope') +Network = _CAMPAIGN_OBJECT_FACTORY_V13.create('Network') +Minute = _CAMPAIGN_OBJECT_FACTORY_V13.create('Minute') +Day = _CAMPAIGN_OBJECT_FACTORY_V13.create('Day') +BusinessGeoCodeStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('BusinessGeoCodeStatus') +BidOption = _CAMPAIGN_OBJECT_FACTORY_V13.create('BidOption') +CallToAction = _CAMPAIGN_OBJECT_FACTORY_V13.create('CallToAction') +MatchType = _CAMPAIGN_OBJECT_FACTORY_V13.create('MatchType') +KeywordEditorialStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('KeywordEditorialStatus') +KeywordStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('KeywordStatus') BudgetLimitType = _CAMPAIGN_OBJECT_FACTORY_V13.create('BudgetLimitType') +CampaignStatus = _CAMPAIGN_OBJECT_FACTORY_V13.create('CampaignStatus') DynamicSearchAdsSetting = _CAMPAIGN_OBJECT_FACTORY_V13.create('DynamicSearchAdsSetting') Webpage = _CAMPAIGN_OBJECT_FACTORY_V13.create('Webpage') WebpageConditionOperand = _CAMPAIGN_OBJECT_FACTORY_V13.create('WebpageConditionOperand') @@ -56,9 +73,7 @@ ImageAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ImageAsset')) VideoAsset_Type = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('VideoAsset')) CampaignAssociation = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('CampaignAssociation')) -KeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:KeyValuePairOfstringstring')) -ArrayOfKeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:ArrayOfKeyValuePairOfstringstring')) -ArrayOfArrayOfKeyValuePairOfstringstring = type(_CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:ArrayOfArrayOfKeyValuePairOfstringstring')) + def bulk_str(value): if value is None or (hasattr(value, 'value') and value.value is None): @@ -101,7 +116,7 @@ def parse_verified_tracking_setting(str): array = [] for res in result: if res is not None and res.__contains__('key') and res.__contains__('value'): - kv = KeyValuePairOfstringstring() + kv = _CAMPAIGN_OBJECT_FACTORY_V13.create('ns1:KeyValuePairOfstringstring') kv['key'] = res['key'] kv['value'] = res['value'] array.append(kv) @@ -277,11 +292,24 @@ def bulk_optional_str(value, id): def csv_to_status(c, v): if v == 'Expired': - c.ad_group.Status = 'Expired' + c.ad_group.Status = AdGroupStatus.Expired c._is_expired = True + elif v == 'Active': + c.ad_group.Status = AdGroupStatus.Active + elif v == 'Paused': + c.ad_group.Status = AdGroupStatus.Paused + elif v == 'Deleted': + c.ad_group.Status = AdGroupStatus.Deleted else: - c.ad_group.Status = v if v else None - + c.ad_group.Status = None + +def parse_bid_option(str): + if str == "BidValue": + return BidOption.BidValue + elif str == "BidBoost": + return BidOption.BidBoost + else: + return None def bulk_device_preference_str(value): if value is None: @@ -751,8 +779,8 @@ def field_to_csv_ImageAssetLinks(entity): contract['assetPerformanceLabel'] = assetLink.AssetPerformanceLabel if hasattr(assetLink, 'AssetPerformanceLabel') else None contract['editorialStatus'] = assetLink.EditorialStatus if hasattr(assetLink, 'EditorialStatus') else None contract['pinnedField'] = assetLink.PinnedField if hasattr(assetLink, 'PinnedField') else None - contract['targetWidth'] = assetLink.TargetWidth if hasattr(assetLink, 'TargetWidth') else None - contract['targetHeight'] = assetLink.TargetHeight if hasattr(assetLink, 'TargetHeight') else None + contract['targetWidth'] = assetLink.Asset.TargetWidth if hasattr(assetLink.Asset, 'TargetWidth') else None + contract['targetHeight'] = assetLink.Asset.TargetHeight if hasattr(assetLink.Asset, 'TargetHeight') else None contract['subType'] = assetLink.Asset.SubType if hasattr(assetLink.Asset, 'SubType') else None assetLinkContracts.append(contract) if len(assetLinkContracts) > 0: @@ -777,8 +805,8 @@ def csv_to_field_ImageAssetLinks(assetLinks, value): asset_link.AssetPerformanceLabel = assetLinkContract.get('assetPerformanceLabel') asset_link.PinnedField = assetLinkContract.get('pinnedField') asset_link.EditorialStatus = assetLinkContract.get('editorialStatus') - asset_link.TargetWidth = assetLinkContract.get('targetWidth') - asset_link.TargetHeight = assetLinkContract.get('targetHeight') + asset_link.Asset.TargetWidth = assetLinkContract.get('targetWidth') + asset_link.Asset.TargetHeight = assetLinkContract.get('targetHeight') asset_link.Asset.SubType = assetLinkContract.get('subType') assetLinks.AssetLink.append(asset_link) @@ -895,15 +923,16 @@ def bid_multiplier_bulk_str(value): return bulk_str(value.Multiplier) def parse_minute(value): + Minute = _CAMPAIGN_OBJECT_FACTORY_V13.create('Minute') minute_number = int(value) if minute_number == 0: - return 'Zero' + return Minute.Zero elif minute_number == 15: - return 'Fifteen' + return Minute.Fifteen elif minute_number == 30: - return 'Thirty' + return Minute.Thirty elif minute_number == 45: - return 'FortyFive' + return Minute.FortyFive raise ValueError('Unknown minute') @@ -1068,6 +1097,45 @@ def field_to_csv_UseSearcherTimeZone(bool_value, id): return DELETE_VALUE if id and id > 0 else None else: return str(bool_value) + +def csv_to_field_enum(entity, value, attr_name, enum_class): + """ + Generic method to convert CSV string values to enum fields on an entity. + + Args: + entity: The entity object to set the attribute on + value: The string value from CSV + attr_name: The name of the attribute to set on the entity + enum_class: The enum class to convert the value to + """ + if value is None or value == '': + setattr(entity, attr_name, None) + return + + try: + enum_value = getattr(enum_class, value) + setattr(entity, attr_name, enum_value) + except (AttributeError, ValueError): + # If the value doesn't match any enum value, set to None + setattr(entity, attr_name, None) + +def csv_to_field_CampaignStatus(entity, value): + if value is None or value == '': + entity.Status = None + elif value == 'Active': + entity.Status = CampaignStatus.Active + elif value == 'Paused': + entity.Status = CampaignStatus.Paused + elif value == 'BudgetPaused': + entity.Status = CampaignStatus.BudgetPaused + elif value == 'BudgetAndManualPaused': + entity.Status = CampaignStatus.BudgetAndManualPaused + elif value == 'Deleted': + entity.Status = CampaignStatus.Deleted + elif value == 'Suspended': + entity.Status = CampaignStatus.Suspended + else: + entity.Status = None def field_to_csv_bool(bool_value): if bool_value is None: diff --git a/bingads/v13/proxies/production/bulk_service.xml b/bingads/v13/proxies/production/bulk_service.xml index eb41088e..f260e3ac 100644 --- a/bingads/v13/proxies/production/bulk_service.xml +++ b/bingads/v13/proxies/production/bulk_service.xml @@ -1415,6 +1415,27 @@ + + + + 193 + + + + + + + 194 + + + + + + + 195 + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 229fc6aa..8345c70f 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -289,6 +289,13 @@ + + + + 3 + + + @@ -1399,6 +1406,13 @@ + + + + + + + @@ -1607,6 +1621,11 @@ + + + + + @@ -1641,6 +1660,7 @@ + @@ -2046,6 +2066,7 @@ + @@ -2400,9 +2421,26 @@ + + + + + + + + + 2 + + + + + + + + @@ -2415,6 +2453,7 @@ + @@ -2430,6 +2469,7 @@ + @@ -4006,6 +4046,11 @@ + + + + + @@ -4219,6 +4264,13 @@ + + + + 2147483648 + + + @@ -4733,6 +4785,17 @@ + + + + + + + + + + + @@ -5968,9 +6031,26 @@ + + + + + + + + + 2 + + + + + + + + @@ -6841,7 +6921,21 @@ + + + + + + + + + + + + + + @@ -6859,7 +6953,7 @@ - + @@ -6881,7 +6975,7 @@ - + @@ -6895,7 +6989,7 @@ - + @@ -6908,6 +7002,7 @@ + @@ -6947,7 +7042,7 @@ - + @@ -6977,7 +7072,7 @@ - + @@ -7047,7 +7142,7 @@ - + @@ -7079,6 +7174,7 @@ + @@ -7118,6 +7214,13 @@ + + + + + + + @@ -7314,7 +7417,7 @@ - + @@ -7338,7 +7441,7 @@ - + @@ -7536,7 +7639,7 @@ - + @@ -7544,7 +7647,7 @@ - + @@ -7572,7 +7675,7 @@ - + @@ -7631,7 +7734,7 @@ - + @@ -7648,7 +7751,7 @@ - + @@ -7691,7 +7794,7 @@ - + @@ -7699,7 +7802,7 @@ - + @@ -7727,7 +7830,7 @@ - + @@ -7845,7 +7948,7 @@ - + @@ -8020,6 +8123,13 @@ + + + + + + + @@ -8139,7 +8249,7 @@ - + @@ -8158,7 +8268,7 @@ - + @@ -8168,7 +8278,7 @@ - + @@ -8345,6 +8455,13 @@ + + + + 8388608 + + + @@ -8367,7 +8484,7 @@ - + @@ -8395,7 +8512,7 @@ - + @@ -8412,7 +8529,7 @@ - + @@ -8428,7 +8545,7 @@ - + @@ -8447,7 +8564,7 @@ - + @@ -8462,7 +8579,7 @@ - + @@ -8499,7 +8616,7 @@ - + @@ -8507,7 +8624,7 @@ - + @@ -8521,7 +8638,7 @@ - + @@ -8675,7 +8792,7 @@ - + @@ -8699,7 +8816,7 @@ - + @@ -8714,7 +8831,7 @@ - + @@ -8772,7 +8889,7 @@ - + @@ -8796,7 +8913,7 @@ - + @@ -8811,7 +8928,7 @@ - + @@ -8841,7 +8958,7 @@ - + @@ -9047,7 +9164,7 @@ - + @@ -9082,6 +9199,7 @@ + @@ -9097,10 +9215,19 @@ + + + + + + + + + - + @@ -9251,6 +9378,24 @@ + + + + + + + + + + + + + + + + + + @@ -9435,7 +9580,7 @@ - + @@ -9458,7 +9603,7 @@ - + @@ -9481,7 +9626,7 @@ - + @@ -9510,6 +9655,20 @@ + + + + + + + + + + + + + + @@ -9520,6 +9679,13 @@ + + + + + + + @@ -9528,21 +9694,12 @@ - + - - - - - - - - - @@ -9571,6 +9728,7 @@ + @@ -9582,7 +9740,7 @@ - + @@ -9590,7 +9748,7 @@ - + @@ -9614,7 +9772,7 @@ - + @@ -9625,6 +9783,21 @@ + + + + + + + + + + + + + + + @@ -9662,7 +9835,7 @@ - + @@ -9713,7 +9886,7 @@ - + @@ -9737,12 +9910,12 @@ - - + + - - + + @@ -9771,7 +9944,7 @@ - + @@ -9784,8 +9957,8 @@ - - + + @@ -9845,7 +10018,7 @@ - + @@ -9853,7 +10026,7 @@ - + @@ -9873,8 +10046,8 @@ - - + + @@ -9887,33 +10060,17 @@ - - - - - - - - - - - - - - - - @@ -9922,12 +10079,27 @@ + + + + + + + + + + + + + + + @@ -9936,14 +10108,22 @@ - + + + + + + + + + @@ -9958,6 +10138,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13956,6 +14238,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -13975,7 +14281,7 @@ - + @@ -13999,7 +14305,7 @@ - + @@ -14023,7 +14329,7 @@ - + @@ -14047,7 +14353,7 @@ - + @@ -14071,7 +14377,7 @@ - + @@ -14095,7 +14401,7 @@ - + @@ -14119,7 +14425,7 @@ - + @@ -14143,11 +14449,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14167,7 +14497,7 @@ - + @@ -14191,7 +14521,7 @@ - + @@ -14215,7 +14545,7 @@ - + @@ -14239,7 +14569,7 @@ - + @@ -14263,7 +14593,7 @@ - + @@ -14287,7 +14617,7 @@ - + @@ -14311,7 +14641,7 @@ - + @@ -14335,7 +14665,7 @@ - + @@ -14359,11 +14689,83 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15331,6 +15733,12 @@ + + + + + + @@ -15379,6 +15787,12 @@ + + + + + + @@ -15433,6 +15847,24 @@ + + + + + + + + + + + + + + + + + + @@ -19140,6 +19572,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -19324,6 +19779,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -19531,6 +20009,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/customerbilling_service.xml b/bingads/v13/proxies/production/customerbilling_service.xml index 06121522..e4ad96a2 100644 --- a/bingads/v13/proxies/production/customerbilling_service.xml +++ b/bingads/v13/proxies/production/customerbilling_service.xml @@ -210,6 +210,20 @@ + + + + + + + + + + + + + + @@ -695,6 +709,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1036,6 +1078,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -1105,6 +1169,12 @@ + + + + + + @@ -1346,6 +1416,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index c36da555..c70b4b01 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -199,6 +199,10 @@ + + + + @@ -991,6 +995,10 @@ + + + + @@ -2232,6 +2240,21 @@ + + + + + + + + + + + + + + + @@ -2487,6 +2510,7 @@ + @@ -4354,6 +4378,7 @@ + @@ -4724,6 +4749,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/bulk_service.xml b/bingads/v13/proxies/sandbox/bulk_service.xml index 16daf3d4..9035ec2c 100644 --- a/bingads/v13/proxies/sandbox/bulk_service.xml +++ b/bingads/v13/proxies/sandbox/bulk_service.xml @@ -1415,6 +1415,27 @@ + + + + 193 + + + + + + + 194 + + + + + + + 195 + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 618c0c04..482f9743 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -289,6 +289,13 @@ + + + + 3 + + + @@ -1399,6 +1406,13 @@ + + + + + + + @@ -1607,6 +1621,11 @@ + + + + + @@ -1641,6 +1660,7 @@ + @@ -2046,6 +2066,7 @@ + @@ -2400,9 +2421,26 @@ + + + + + + + + + 2 + + + + + + + + @@ -2415,6 +2453,7 @@ + @@ -2430,6 +2469,7 @@ + @@ -4006,6 +4046,11 @@ + + + + + @@ -4219,6 +4264,13 @@ + + + + 2147483648 + + + @@ -4733,6 +4785,17 @@ + + + + + + + + + + + @@ -5968,9 +6031,26 @@ + + + + + + + + + 2 + + + + + + + + @@ -6841,7 +6921,21 @@ + + + + + + + + + + + + + + @@ -6859,7 +6953,7 @@ - + @@ -6881,7 +6975,7 @@ - + @@ -6895,7 +6989,7 @@ - + @@ -6908,6 +7002,7 @@ + @@ -6947,7 +7042,7 @@ - + @@ -6977,7 +7072,7 @@ - + @@ -7047,7 +7142,7 @@ - + @@ -7079,6 +7174,7 @@ + @@ -7118,6 +7214,13 @@ + + + + + + + @@ -7314,7 +7417,7 @@ - + @@ -7338,7 +7441,7 @@ - + @@ -7536,7 +7639,7 @@ - + @@ -7544,7 +7647,7 @@ - + @@ -7572,7 +7675,7 @@ - + @@ -7631,7 +7734,7 @@ - + @@ -7648,7 +7751,7 @@ - + @@ -7691,7 +7794,7 @@ - + @@ -7699,7 +7802,7 @@ - + @@ -7727,7 +7830,7 @@ - + @@ -7845,7 +7948,7 @@ - + @@ -8020,6 +8123,13 @@ + + + + + + + @@ -8139,7 +8249,7 @@ - + @@ -8158,7 +8268,7 @@ - + @@ -8168,7 +8278,7 @@ - + @@ -8345,6 +8455,13 @@ + + + + 8388608 + + + @@ -8367,7 +8484,7 @@ - + @@ -8395,7 +8512,7 @@ - + @@ -8412,7 +8529,7 @@ - + @@ -8428,7 +8545,7 @@ - + @@ -8447,7 +8564,7 @@ - + @@ -8462,7 +8579,7 @@ - + @@ -8499,7 +8616,7 @@ - + @@ -8507,7 +8624,7 @@ - + @@ -8521,7 +8638,7 @@ - + @@ -8675,7 +8792,7 @@ - + @@ -8699,7 +8816,7 @@ - + @@ -8714,7 +8831,7 @@ - + @@ -8772,7 +8889,7 @@ - + @@ -8796,7 +8913,7 @@ - + @@ -8811,7 +8928,7 @@ - + @@ -8841,7 +8958,7 @@ - + @@ -9047,7 +9164,7 @@ - + @@ -9082,6 +9199,7 @@ + @@ -9097,10 +9215,19 @@ + + + + + + + + + - + @@ -9251,6 +9378,24 @@ + + + + + + + + + + + + + + + + + + @@ -9435,7 +9580,7 @@ - + @@ -9458,7 +9603,7 @@ - + @@ -9481,7 +9626,7 @@ - + @@ -9510,6 +9655,13 @@ + + + + + + + @@ -9527,6 +9679,13 @@ + + + + + + + @@ -9535,21 +9694,12 @@ - + - - - - - - - - - @@ -9578,6 +9728,7 @@ + @@ -9589,7 +9740,7 @@ - + @@ -9597,7 +9748,7 @@ - + @@ -9621,7 +9772,7 @@ - + @@ -9632,6 +9783,21 @@ + + + + + + + + + + + + + + + @@ -9669,7 +9835,7 @@ - + @@ -9706,20 +9872,9 @@ - - - - - - - - - - - @@ -9731,8 +9886,7 @@ - - + @@ -9756,12 +9910,12 @@ - - + + - - + + @@ -9790,7 +9944,7 @@ - + @@ -9803,8 +9957,8 @@ - - + + @@ -9864,7 +10018,7 @@ - + @@ -9872,7 +10026,7 @@ - + @@ -9892,8 +10046,8 @@ - - + + @@ -9906,33 +10060,17 @@ - - - - - - - - - - - - - - - - @@ -9941,12 +10079,27 @@ + + + + + + + + + + + + + + + @@ -9955,14 +10108,22 @@ - + + + + + + + + + @@ -9977,6 +10138,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13975,6 +14238,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -13994,7 +14281,7 @@ - + @@ -14018,7 +14305,7 @@ - + @@ -14042,7 +14329,7 @@ - + @@ -14066,7 +14353,7 @@ - + @@ -14090,7 +14377,7 @@ - + @@ -14114,7 +14401,7 @@ - + @@ -14138,7 +14425,7 @@ - + @@ -14162,11 +14449,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14186,7 +14497,7 @@ - + @@ -14210,7 +14521,7 @@ - + @@ -14234,7 +14545,7 @@ - + @@ -14258,7 +14569,7 @@ - + @@ -14282,7 +14593,7 @@ - + @@ -14306,7 +14617,7 @@ - + @@ -14330,7 +14641,7 @@ - + @@ -14354,7 +14665,7 @@ - + @@ -14378,11 +14689,83 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15350,6 +15733,12 @@ + + + + + + @@ -15398,6 +15787,12 @@ + + + + + + @@ -15452,6 +15847,24 @@ + + + + + + + + + + + + + + + + + + @@ -19159,6 +19572,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -19343,6 +19779,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -19550,6 +20009,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/customerbilling_service.xml b/bingads/v13/proxies/sandbox/customerbilling_service.xml index d1fc5e6b..6594f522 100644 --- a/bingads/v13/proxies/sandbox/customerbilling_service.xml +++ b/bingads/v13/proxies/sandbox/customerbilling_service.xml @@ -726,6 +726,14 @@ + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index d0994f15..8b580d5c 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -199,6 +199,10 @@ + + + + @@ -991,6 +995,10 @@ + + + + @@ -2232,6 +2240,21 @@ + + + + + + + + + + + + + + + @@ -2487,6 +2510,7 @@ + @@ -4354,6 +4378,7 @@ + @@ -4724,6 +4749,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/reporting/reporting_operation.py b/bingads/v13/reporting/reporting_operation.py index d1b0815d..f29f995d 100644 --- a/bingads/v13/reporting/reporting_operation.py +++ b/bingads/v13/reporting/reporting_operation.py @@ -56,9 +56,10 @@ def __init__(self, self._authorization_data = authorization_data self._poll_interval_in_milliseconds = poll_interval_in_milliseconds self._final_status = None - self.tracking_id=tracking_id + self.tracking_id = tracking_id - def download_result_file(self, result_file_directory, result_file_name, decompress, overwrite, timeout_in_milliseconds=None): + def download_result_file(self, result_file_directory, result_file_name, decompress, overwrite, + timeout_in_milliseconds=None): """ Download file with specified URL and download parameters. :param result_file_directory: The download result local directory name. @@ -104,7 +105,7 @@ def download_result_file(self, result_file_directory, result_file_name, decompre headers = { 'User-Agent': USER_AGENT, } - + with requests.Session() as s: s.mount('https://', TlsHttpAdapter()) timeout_seconds = None if timeout_in_milliseconds is None else timeout_in_milliseconds / 1000.0 @@ -168,9 +169,9 @@ def get_status(self): status = ReportingOperationStatus( status=response.Status, report_download_url=response.ReportDownloadUrl - ) + ) if status.status == 'Success' or \ - status.status == 'Error': + status.status == 'Error': self._final_status = status return status diff --git a/bingads/v13/reporting/reporting_service_manager.py b/bingads/v13/reporting/reporting_service_manager.py index 198429a1..e7971d97 100644 --- a/bingads/v13/reporting/reporting_service_manager.py +++ b/bingads/v13/reporting/reporting_service_manager.py @@ -7,6 +7,7 @@ from ...exceptions import TimeoutException from ...util import _TimeHelper + class ReportingServiceManager: """ Provides high level methods for downloading reporting files using the Reporting API functionality. @@ -21,7 +22,9 @@ class ReportingServiceManager: or :meth:`.ReportingDownloadOperation.track`, and then download the file with the :meth:`.ReportingOperation.download_result_file` method. """ - def __init__(self, authorization_data, poll_interval_in_milliseconds=5000, environment='production', working_directory=None, **suds_options): + + def __init__(self, authorization_data, poll_interval_in_milliseconds=5000, environment='production', + working_directory=None, **suds_options): """ Initialize a new instance of this class. :param authorization_data: Represents a user who intends to access the corresponding customer and account. @@ -47,7 +50,7 @@ def __init__(self, authorization_data, poll_interval_in_milliseconds=5000, envir if not os.path.exists(self._working_directory): os.makedirs(self._working_directory) self._suds_options = suds_options - + def download_report(self, download_parameters): """ Downloads the specified reporting to a local file and parse it with report_file_reader. @@ -60,7 +63,6 @@ def download_report(self, download_parameters): if report_file_path: reader = ReportFileReader(report_file_path, download_parameters.report_request.Format) return reader.get_report() - def download_file(self, download_parameters): """ Downloads the specified reporting to a local file. @@ -80,7 +82,8 @@ def download_file(self, download_parameters): result_file_directory = self.working_directory if download_parameters.result_file_directory is not None: result_file_directory = download_parameters.result_file_directory - download_result_file_timeout = _TimeHelper.get_remaining_time_milliseconds_with_min_value(start_timestamp, download_parameters.timeout_in_milliseconds) + download_result_file_timeout = _TimeHelper.get_remaining_time_milliseconds_with_min_value(start_timestamp, + download_parameters.timeout_in_milliseconds) result_file_path = operation.download_result_file( result_file_directory=result_file_directory, result_file_name=download_parameters.result_file_name, @@ -106,7 +109,7 @@ def submit_download(self, report_request): authorization_data=self._authorization_data, poll_interval_in_milliseconds=self._poll_interval_in_milliseconds, environment=self._environment, - tracking_id = headers['TrackingId'] if 'TrackingId' in headers else None, + tracking_id=headers['TrackingId'] if 'TrackingId' in headers else None, **self.suds_options ) return operation @@ -115,19 +118,19 @@ def normalize_request(self, report_request): if report_request is None: return - + if not hasattr(report_request, 'Time'): return if hasattr(report_request.Time, 'ReportTimeZone') \ - and hasattr(report_request.Time.ReportTimeZone, 'value') \ - and report_request.Time.ReportTimeZone.value is None: - report_request.Time.ReportTimeZone=None - + and hasattr(report_request.Time.ReportTimeZone, 'value') \ + and report_request.Time.ReportTimeZone.value is None: + report_request.Time.ReportTimeZone = None + if hasattr(report_request.Time, 'PredefinedTime') \ - and hasattr(report_request.Time.PredefinedTime, 'value') \ - and report_request.Time.PredefinedTime.value is None: - report_request.Time.PredefinedTime=None + and hasattr(report_request.Time.PredefinedTime, 'value') \ + and report_request.Time.PredefinedTime.value is None: + report_request.Time.PredefinedTime = None @property def service_client(self): diff --git a/examples/v13/perf_test.py b/examples/v13/perf_test.py new file mode 100644 index 00000000..5655164a --- /dev/null +++ b/examples/v13/perf_test.py @@ -0,0 +1,93 @@ +import base64 +import timeit + +from auth_helper import * +from campaignmanagement_example_helper import * +def main(authorization_data): + + try: + + campaigns=campaign_service.factory.create('ArrayOfCampaign') + campaign=set_elements_to_none(campaign_service.factory.create('Campaign')) + campaign.BudgetType='DailyBudgetStandard' + campaign.DailyBudget=50 + campaign.Name="Perf test campaign " + strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()) + campaign.TimeZone='PacificTimeUSCanadaTijuana' + campaigns.Campaign.append(campaign) + + output_status_message("-----\nAddCampaigns:") + add_campaigns_response=campaign_service.AddCampaigns( + AccountId=authorization_data.account_id, + Campaigns=campaigns + ) + campaign_ids={ + 'long': add_campaigns_response.CampaignIds['long'] if add_campaigns_response.CampaignIds['long'] else None + } + output_status_message("CampaignIds:") + output_array_of_long(campaign_ids) + output_status_message("PartialErrors:") + output_array_of_batcherror(add_campaigns_response.PartialErrors) + + ad_groups = campaign_service.factory.create('ArrayOfAdGroup') + for i in range(100): + ad_group = set_elements_to_none(campaign_service.factory.create('AdGroup')) + ad_group.Name = "Perf test ad group" + str(i) + ad_group.Language = "English" + ad_groups.AdGroup.append(ad_group) + + add_ad_groups_response=campaign_service.AddAdGroups( + CampaignId=campaign_ids['long'][0], + AdGroups=ad_groups + ) + execution_time = timeit.timeit(get_method(campaign_ids), number=20) + print(f"execution time: {execution_time} seconds.") + + output_status_message("-----\nDeleteCampaigns:") + campaign_service.DeleteCampaigns( + AccountId=authorization_data.account_id, + CampaignIds=campaign_ids + ) + output_status_message("Deleted Campaign Id {0}".format(campaign_ids['long'][0])) + + except WebFault as ex: + output_webfault_errors(ex) + except Exception as ex: + output_status_message(ex) + +def get_method(campaign_ids): + def _get(): + get_response = campaign_service.GetAdGroupsByCampaignId( + CampaignId=campaign_ids['long'][0] + ) + print("get ad groups") + return _get + +# Main execution +if __name__ == '__main__': + + print("Loading the web service client proxies...") + + authorization_data=AuthorizationData( + account_id=None, + customer_id=None, + developer_token=DEVELOPER_TOKEN, + authentication=None, + ) + + campaign_service=ServiceClient( + service='CampaignManagementService', + version=13, + authorization_data=authorization_data, + environment=ENVIRONMENT, + ) + + customer_service=ServiceClient( + service='CustomerManagementService', + version=13, + authorization_data=authorization_data, + environment=ENVIRONMENT, + ) + + authenticate(authorization_data) + + main(authorization_data) diff --git a/setup.py b/setup.py index 33fecc80..7b832305 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.24.2' +VERSION = '13.0.25' with open('README.rst', 'r') as f: readme = f.read() From 46f8520ad9693554918c8955930182808a6a1ddc Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Thu, 10 Jul 2025 18:46:03 +0800 Subject: [PATCH 51/55] remove test --- examples/v13/perf_test.py | 93 --------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 examples/v13/perf_test.py diff --git a/examples/v13/perf_test.py b/examples/v13/perf_test.py deleted file mode 100644 index 5655164a..00000000 --- a/examples/v13/perf_test.py +++ /dev/null @@ -1,93 +0,0 @@ -import base64 -import timeit - -from auth_helper import * -from campaignmanagement_example_helper import * -def main(authorization_data): - - try: - - campaigns=campaign_service.factory.create('ArrayOfCampaign') - campaign=set_elements_to_none(campaign_service.factory.create('Campaign')) - campaign.BudgetType='DailyBudgetStandard' - campaign.DailyBudget=50 - campaign.Name="Perf test campaign " + strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()) - campaign.TimeZone='PacificTimeUSCanadaTijuana' - campaigns.Campaign.append(campaign) - - output_status_message("-----\nAddCampaigns:") - add_campaigns_response=campaign_service.AddCampaigns( - AccountId=authorization_data.account_id, - Campaigns=campaigns - ) - campaign_ids={ - 'long': add_campaigns_response.CampaignIds['long'] if add_campaigns_response.CampaignIds['long'] else None - } - output_status_message("CampaignIds:") - output_array_of_long(campaign_ids) - output_status_message("PartialErrors:") - output_array_of_batcherror(add_campaigns_response.PartialErrors) - - ad_groups = campaign_service.factory.create('ArrayOfAdGroup') - for i in range(100): - ad_group = set_elements_to_none(campaign_service.factory.create('AdGroup')) - ad_group.Name = "Perf test ad group" + str(i) - ad_group.Language = "English" - ad_groups.AdGroup.append(ad_group) - - add_ad_groups_response=campaign_service.AddAdGroups( - CampaignId=campaign_ids['long'][0], - AdGroups=ad_groups - ) - execution_time = timeit.timeit(get_method(campaign_ids), number=20) - print(f"execution time: {execution_time} seconds.") - - output_status_message("-----\nDeleteCampaigns:") - campaign_service.DeleteCampaigns( - AccountId=authorization_data.account_id, - CampaignIds=campaign_ids - ) - output_status_message("Deleted Campaign Id {0}".format(campaign_ids['long'][0])) - - except WebFault as ex: - output_webfault_errors(ex) - except Exception as ex: - output_status_message(ex) - -def get_method(campaign_ids): - def _get(): - get_response = campaign_service.GetAdGroupsByCampaignId( - CampaignId=campaign_ids['long'][0] - ) - print("get ad groups") - return _get - -# Main execution -if __name__ == '__main__': - - print("Loading the web service client proxies...") - - authorization_data=AuthorizationData( - account_id=None, - customer_id=None, - developer_token=DEVELOPER_TOKEN, - authentication=None, - ) - - campaign_service=ServiceClient( - service='CampaignManagementService', - version=13, - authorization_data=authorization_data, - environment=ENVIRONMENT, - ) - - customer_service=ServiceClient( - service='CustomerManagementService', - version=13, - authorization_data=authorization_data, - environment=ENVIRONMENT, - ) - - authenticate(authorization_data) - - main(authorization_data) From 1a5e3ec277841ab72d2507802acd6f257c9908cf Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Thu, 17 Jul 2025 10:55:06 +0800 Subject: [PATCH 52/55] update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 7b832305..c60aa976 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ 'bingads.v13.bulk.entities.target_criterions', 'bingads.v13.bulk.entities.labels', 'bingads.v13.bulk.entities.goals', + 'bingads.v13.bulk.entities.account_placement_exclusion_list', 'bingads.v13.internal', 'bingads.v13.internal.bulk', 'bingads.v13.internal.bulk.entities', From 80c2f61fcb6e2c6d5d740f423593206f8edf628f Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Thu, 17 Jul 2025 10:58:54 +0800 Subject: [PATCH 53/55] update version --- HISTORY.rst | 4 ++++ bingads/manifest.py | 2 +- setup.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 03073185..d588e53e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ Release History +13.0.25.1(2025-07-17) ++++++++++++++++++++++++++ +* Fix Issue #321: https://github.com/BingAds/BingAds-Python-SDK/issues/321 + 13.0.25(2025-07-10) +++++++++++++++++++++++++ API Updates: diff --git a/bingads/manifest.py b/bingads/manifest.py index a4608f49..1e338b4a 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.25' +VERSION = '13.0.25.1' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/setup.py b/setup.py index c60aa976..7ee3e9f0 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.25' +VERSION = '13.0.25.1' with open('README.rst', 'r') as f: readme = f.read() From 35c8b2a3aa33c6a7785f1816cd70ef043f1567cf Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Thu, 31 Jul 2025 14:15:20 +0800 Subject: [PATCH 54/55] v13.0.25.2 --- HISTORY.rst | 4 ++ bingads/manifest.py | 2 +- .../proxies/production/adinsight_service.xml | 4 ++ .../production/campaignmanagement_service.xml | 42 +++++++++++++++++++ .../proxies/production/reporting_service.xml | 31 ++++++++++++++ .../v13/proxies/sandbox/adinsight_service.xml | 4 ++ .../sandbox/campaignmanagement_service.xml | 42 +++++++++++++++++++ .../v13/proxies/sandbox/reporting_service.xml | 31 ++++++++++++++ setup.py | 2 +- 9 files changed, 160 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index d588e53e..e25ed0d9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,10 @@ Release History +13.0.25.2(2025-07-31) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). + 13.0.25.1(2025-07-17) +++++++++++++++++++++++++ * Fix Issue #321: https://github.com/BingAds/BingAds-Python-SDK/issues/321 diff --git a/bingads/manifest.py b/bingads/manifest.py index 1e338b4a..20dc4439 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.25.1' +VERSION = '13.0.25.2' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index 1ac4127f..cc4972b3 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3329,6 +3329,10 @@ + + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 8345c70f..69069302 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -7073,9 +7073,20 @@ + + + + + + + + + + + @@ -7095,6 +7106,13 @@ + + + + + + + @@ -7102,6 +7120,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index c70b4b01..c63353ff 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -239,6 +239,13 @@ + + + + 32 + + + @@ -2151,6 +2158,18 @@ + + + + + + + + + + + + @@ -3851,6 +3870,18 @@ + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index 0ad60b78..ae6f927d 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3329,6 +3329,10 @@ + + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index 482f9743..ba8c4ca8 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -7073,9 +7073,20 @@ + + + + + + + + + + + @@ -7095,6 +7106,13 @@ + + + + + + + @@ -7102,6 +7120,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 8b580d5c..93a4e318 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -239,6 +239,13 @@ + + + + 32 + + + @@ -2151,6 +2158,18 @@ + + + + + + + + + + + + @@ -3851,6 +3870,18 @@ + + + + + + + + + + + + diff --git a/setup.py b/setup.py index 7ee3e9f0..a1f8a12f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.25.1' +VERSION = '13.0.25.2' with open('README.rst', 'r') as f: readme = f.read() From 5b69117022fd6d59defdfeafe0e7655b06cfd407 Mon Sep 17 00:00:00 2001 From: xinyuwen2 Date: Fri, 12 Sep 2025 22:00:22 +0800 Subject: [PATCH 55/55] v13.0.25.3 --- HISTORY.rst | 5 + bingads/manifest.py | 2 +- bingads/v13/bulk/entities/bulk_campaign.py | 5 + bingads/v13/internal/bulk/csv_headers.py | 1 + bingads/v13/internal/bulk/string_table.py | 1 + .../proxies/production/adinsight_service.xml | 196 ++++++ .../production/campaignmanagement_service.xml | 622 +++++++++++++++--- .../proxies/production/reporting_service.xml | 62 ++ .../v13/proxies/sandbox/adinsight_service.xml | 196 ++++++ .../sandbox/campaignmanagement_service.xml | 622 +++++++++++++++--- .../v13/proxies/sandbox/reporting_service.xml | 62 ++ setup.py | 2 +- 12 files changed, 1586 insertions(+), 190 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e25ed0d9..04a046b6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ Release History +13.0.25.3(2025-09-12) ++++++++++++++++++++++++++ +* Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). +* Support IsPolitical in BulkCampaign. + 13.0.25.2(2025-07-31) +++++++++++++++++++++++++ * Update Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the [Bing Ads API Release Notes](https://learn.microsoft.com/en-us/advertising/guides/release-notes?view=bingads-13). diff --git a/bingads/manifest.py b/bingads/manifest.py index 20dc4439..8388f538 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.25.2' +VERSION = '13.0.25.3' BULK_FORMAT_VERSION_6 = '6.0' WORKING_NAME = 'BingAdsSDKPython' USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index d4154fcf..0cd6f0c4 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -839,6 +839,11 @@ def _write_website(c): field_to_csv=lambda c: BulkCampaign._write_additional_conversion_value(c), csv_to_field=lambda c, v: BulkCampaign._read_additional_conversion_value(c, v) ), + _SimpleBulkMapping( + header=_StringTable.IsPolitical, + field_to_csv=lambda c: field_to_csv_bool(c.campaign.IsPolitical), + csv_to_field=lambda c, v: setattr(c.campaign, 'IsPolitical', parse_bool(v)) + ), ] def read_additional_data(self, stream_reader): diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index bc8a5ebb..47924ea4 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -30,6 +30,7 @@ class _CsvHeaders: _StringTable.BudgetId, _StringTable.DestinationChannel, _StringTable.IsMultiChannelCampaign, + _StringTable.IsPolitical, # AdGroup _StringTable.StartDate, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index 351e0408..683406e9 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -103,6 +103,7 @@ class _StringTable: UseOptimizedTargeting = "Use Optimized Targeting" BusinessAttributes = "Business Attributes" Schedule = "Schedule" + IsPolitical = "Is Political" # Entity Types SemanticVersion = "Format Version" diff --git a/bingads/v13/proxies/production/adinsight_service.xml b/bingads/v13/proxies/production/adinsight_service.xml index cc4972b3..8a659060 100644 --- a/bingads/v13/proxies/production/adinsight_service.xml +++ b/bingads/v13/proxies/production/adinsight_service.xml @@ -3333,6 +3333,7 @@ + @@ -3769,6 +3770,14 @@ + + + + + + + + @@ -3816,6 +3825,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3904,6 +4041,12 @@ + + + + + + @@ -4674,6 +4817,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -4867,6 +5034,12 @@ + + + + + + @@ -5607,6 +5780,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/campaignmanagement_service.xml b/bingads/v13/proxies/production/campaignmanagement_service.xml index 69069302..43423f23 100644 --- a/bingads/v13/proxies/production/campaignmanagement_service.xml +++ b/bingads/v13/proxies/production/campaignmanagement_service.xml @@ -1227,6 +1227,13 @@ + + + + + + + @@ -2556,6 +2563,20 @@ + + + + 6 + + + + + + + 7 + + + @@ -6046,6 +6067,27 @@ + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + @@ -6294,6 +6336,13 @@ + + + + + + + @@ -6305,6 +6354,20 @@ + + + + + + + + + + + + + + @@ -6432,6 +6495,9 @@ + + + @@ -7059,6 +7125,7 @@ + @@ -7217,6 +7284,7 @@ + @@ -7291,6 +7359,7 @@ + @@ -8020,6 +8089,13 @@ + + + + + + + @@ -8504,6 +8580,13 @@ + + + + 16777216 + + + @@ -8707,6 +8790,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8834,7 +8984,7 @@ - + @@ -8858,7 +9008,7 @@ - + @@ -8873,7 +9023,7 @@ - + @@ -8931,7 +9081,7 @@ - + @@ -8955,7 +9105,7 @@ - + @@ -8970,7 +9120,7 @@ - + @@ -9000,7 +9150,7 @@ - + @@ -9206,7 +9356,7 @@ - + @@ -9269,7 +9419,7 @@ - + @@ -9622,7 +9772,7 @@ - + @@ -9645,7 +9795,7 @@ - + @@ -9668,7 +9818,7 @@ - + @@ -9724,7 +9874,7 @@ - + @@ -9790,7 +9940,7 @@ - + @@ -9814,7 +9964,7 @@ - + @@ -9877,7 +10027,7 @@ - + @@ -9928,7 +10078,7 @@ - + @@ -9952,12 +10102,12 @@ - - + + - - + + @@ -9986,7 +10136,7 @@ - + @@ -9999,8 +10149,8 @@ - - + + @@ -10060,7 +10210,7 @@ - + @@ -10068,7 +10218,7 @@ - + @@ -10161,7 +10311,7 @@ - + @@ -10183,60 +10333,185 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - + + - - - - - - + + + - - + + - + + + + - - + + - - + + + + - + @@ -13848,6 +14123,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13867,7 +14214,7 @@ - + @@ -13891,7 +14238,7 @@ - + @@ -13915,7 +14262,7 @@ - + @@ -13939,7 +14286,7 @@ - + @@ -13963,7 +14310,7 @@ - + @@ -13987,7 +14334,7 @@ - + @@ -14011,7 +14358,7 @@ - + @@ -14035,7 +14382,7 @@ - + @@ -14059,7 +14406,7 @@ - + @@ -14083,7 +14430,7 @@ - + @@ -14107,7 +14454,7 @@ - + @@ -14131,7 +14478,7 @@ - + @@ -14155,7 +14502,7 @@ - + @@ -14179,7 +14526,7 @@ - + @@ -14203,7 +14550,7 @@ - + @@ -14227,7 +14574,7 @@ - + @@ -14251,7 +14598,7 @@ - + @@ -14275,7 +14622,7 @@ - + @@ -14299,7 +14646,7 @@ - + @@ -14323,7 +14670,7 @@ - + @@ -14347,7 +14694,7 @@ - + @@ -14371,7 +14718,7 @@ - + @@ -14395,7 +14742,7 @@ - + @@ -14419,7 +14766,7 @@ - + @@ -14443,7 +14790,7 @@ - + @@ -14467,7 +14814,7 @@ - + @@ -14491,7 +14838,7 @@ - + @@ -14515,7 +14862,7 @@ - + @@ -14539,7 +14886,7 @@ - + @@ -14563,7 +14910,7 @@ - + @@ -14587,7 +14934,7 @@ - + @@ -14611,7 +14958,7 @@ - + @@ -14635,7 +14982,7 @@ - + @@ -14659,7 +15006,7 @@ - + @@ -14683,7 +15030,7 @@ - + @@ -14707,7 +15054,7 @@ - + @@ -14731,7 +15078,7 @@ - + @@ -14755,7 +15102,7 @@ - + @@ -14779,7 +15126,7 @@ - + @@ -14803,7 +15150,7 @@ - + @@ -15667,6 +16014,24 @@ + + + + + + + + + + + + + + + + + + @@ -19200,6 +19565,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/production/reporting_service.xml b/bingads/v13/proxies/production/reporting_service.xml index c63353ff..d6d4fa4e 100644 --- a/bingads/v13/proxies/production/reporting_service.xml +++ b/bingads/v13/proxies/production/reporting_service.xml @@ -203,6 +203,7 @@ + @@ -1006,6 +1007,7 @@ + @@ -4410,6 +4412,7 @@ + @@ -4893,6 +4896,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/adinsight_service.xml b/bingads/v13/proxies/sandbox/adinsight_service.xml index ae6f927d..5c4ce362 100644 --- a/bingads/v13/proxies/sandbox/adinsight_service.xml +++ b/bingads/v13/proxies/sandbox/adinsight_service.xml @@ -3333,6 +3333,7 @@ + @@ -3769,6 +3770,14 @@ + + + + + + + + @@ -3816,6 +3825,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3904,6 +4041,12 @@ + + + + + + @@ -4674,6 +4817,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -4867,6 +5034,12 @@ + + + + + + @@ -5607,6 +5780,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml index ba8c4ca8..60bb0ee0 100644 --- a/bingads/v13/proxies/sandbox/campaignmanagement_service.xml +++ b/bingads/v13/proxies/sandbox/campaignmanagement_service.xml @@ -1227,6 +1227,13 @@ + + + + + + + @@ -2556,6 +2563,20 @@ + + + + 6 + + + + + + + 7 + + + @@ -6046,6 +6067,27 @@ + + + + 4 + + + + + + + 8 + + + + + + + 16 + + + @@ -6294,6 +6336,13 @@ + + + + + + + @@ -6305,6 +6354,20 @@ + + + + + + + + + + + + + + @@ -6432,6 +6495,9 @@ + + + @@ -7059,6 +7125,7 @@ + @@ -7217,6 +7284,7 @@ + @@ -7291,6 +7359,7 @@ + @@ -8020,6 +8089,13 @@ + + + + + + + @@ -8504,6 +8580,13 @@ + + + + 16777216 + + + @@ -8707,6 +8790,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8834,7 +8984,7 @@ - + @@ -8858,7 +9008,7 @@ - + @@ -8873,7 +9023,7 @@ - + @@ -8931,7 +9081,7 @@ - + @@ -8955,7 +9105,7 @@ - + @@ -8970,7 +9120,7 @@ - + @@ -9000,7 +9150,7 @@ - + @@ -9206,7 +9356,7 @@ - + @@ -9269,7 +9419,7 @@ - + @@ -9622,7 +9772,7 @@ - + @@ -9645,7 +9795,7 @@ - + @@ -9668,7 +9818,7 @@ - + @@ -9724,7 +9874,7 @@ - + @@ -9790,7 +9940,7 @@ - + @@ -9814,7 +9964,7 @@ - + @@ -9877,7 +10027,7 @@ - + @@ -9928,7 +10078,7 @@ - + @@ -9952,12 +10102,12 @@ - - + + - - + + @@ -9986,7 +10136,7 @@ - + @@ -9999,8 +10149,8 @@ - - + + @@ -10060,7 +10210,7 @@ - + @@ -10068,7 +10218,7 @@ - + @@ -10161,7 +10311,7 @@ - + @@ -10183,60 +10333,185 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - + + - - - - - - + + + - - + + - + + + + - - + + - - + + + + - + @@ -13848,6 +14123,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13867,7 +14214,7 @@ - + @@ -13891,7 +14238,7 @@ - + @@ -13915,7 +14262,7 @@ - + @@ -13939,7 +14286,7 @@ - + @@ -13963,7 +14310,7 @@ - + @@ -13987,7 +14334,7 @@ - + @@ -14011,7 +14358,7 @@ - + @@ -14035,7 +14382,7 @@ - + @@ -14059,7 +14406,7 @@ - + @@ -14083,7 +14430,7 @@ - + @@ -14107,7 +14454,7 @@ - + @@ -14131,7 +14478,7 @@ - + @@ -14155,7 +14502,7 @@ - + @@ -14179,7 +14526,7 @@ - + @@ -14203,7 +14550,7 @@ - + @@ -14227,7 +14574,7 @@ - + @@ -14251,7 +14598,7 @@ - + @@ -14275,7 +14622,7 @@ - + @@ -14299,7 +14646,7 @@ - + @@ -14323,7 +14670,7 @@ - + @@ -14347,7 +14694,7 @@ - + @@ -14371,7 +14718,7 @@ - + @@ -14395,7 +14742,7 @@ - + @@ -14419,7 +14766,7 @@ - + @@ -14443,7 +14790,7 @@ - + @@ -14467,7 +14814,7 @@ - + @@ -14491,7 +14838,7 @@ - + @@ -14515,7 +14862,7 @@ - + @@ -14539,7 +14886,7 @@ - + @@ -14563,7 +14910,7 @@ - + @@ -14587,7 +14934,7 @@ - + @@ -14611,7 +14958,7 @@ - + @@ -14635,7 +14982,7 @@ - + @@ -14659,7 +15006,7 @@ - + @@ -14683,7 +15030,7 @@ - + @@ -14707,7 +15054,7 @@ - + @@ -14731,7 +15078,7 @@ - + @@ -14755,7 +15102,7 @@ - + @@ -14779,7 +15126,7 @@ - + @@ -14803,7 +15150,7 @@ - + @@ -15667,6 +16014,24 @@ + + + + + + + + + + + + + + + + + + @@ -19200,6 +19565,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bingads/v13/proxies/sandbox/reporting_service.xml b/bingads/v13/proxies/sandbox/reporting_service.xml index 93a4e318..3f73b4a5 100644 --- a/bingads/v13/proxies/sandbox/reporting_service.xml +++ b/bingads/v13/proxies/sandbox/reporting_service.xml @@ -203,6 +203,7 @@ + @@ -1006,6 +1007,7 @@ + @@ -4410,6 +4412,7 @@ + @@ -4893,6 +4896,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index a1f8a12f..3aaa4fa4 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.25.2' +VERSION = '13.0.25.3' with open('README.rst', 'r') as f: readme = f.read()