From 33e437e04af63303b73f78fd7165da04f4691f91 Mon Sep 17 00:00:00 2001 From: Qingjun Tian Date: Mon, 12 Oct 2020 15:47:28 +0800 Subject: [PATCH] version 13.0.6 --- HISTORY.rst | 41 ++++++++++ bingads/manifest.py | 2 +- .../bulk_filterlink_ad_extensions.py | 5 ++ bingads/v13/bulk/entities/bulk_ad_group.py | 7 +- bingads/v13/bulk/entities/bulk_campaign.py | 4 +- bingads/v13/internal/bulk/csv_headers.py | 1 + bingads/v13/internal/bulk/string_table.py | 1 + .../proxies/campaign_management_service.xml | 79 ++++++++++++++++++- setup.py | 2 +- 9 files changed, 136 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f075bb22..4ef661aa 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,8 +1,18 @@ .. :changelog: Release History +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. + 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. @@ -11,10 +21,12 @@ Release History 13.0.4.1(2020-07-23) +++++++++++++++++++++++++ + * 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. @@ -24,6 +36,7 @@ Release History 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. @@ -34,11 +47,13 @@ Release History 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. 13.0.1(2019-11-08) +++++++++++++++++++++++++ + * Updated Bing Ads API Version 13 service proxies to reflect recent interface changes. For details please see the Bing Ads API Release Notes. * Removed support for Bing Ads API Version 12 i.e., removed the service proxies and bulk entities. * Added mappings for the "Target Ad Group Id" and "Target Campaign Id" bulk columns in BulkFeedItem. @@ -46,26 +61,31 @@ Release History 12.13.6(2019-10-12) +++++++++++++++++++++++++ + * 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. * 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.4.1(2019-08-23) +++++++++++++++++++++++++ + * Write TextAsset and ImageAsset to the Bulk upload file without the Type explicitly set. 12.13.4(2019-08-09) +++++++++++++++++++++++++ + * 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. * Add a check for report_request time attribute to resolve issue 116: https://github.com/BingAds/BingAds-Python-SDK/issues/116. 12.13.3.2(2019-07-04) +++++++++++++++++++++++++ + * Add Bulk entity mapping for the CustomLabel dynamic ad target condition. 12.13.3.1(2019-07-02) @@ -74,6 +94,7 @@ Release History 12.13.3(2019-06-15) +++++++++++++++++++++++++ + * 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. * For Bing Ads API version 13, added BulkFeed and BulkFeedItem for ad customizer feeds and page feeds. For more information please see the Feed: https://docs.microsoft.com/en-us/advertising/bulk-service/feed?view=bingads-13 and Feed Item: https://docs.microsoft.com/en-us/advertising/bulk-service/feed-item?view=bingads-13 reference documentation. * For Bing Ads API version 13, added the mapping for PageFeedIds in BulkCampaign. For more information please see the Campaign: https://docs.microsoft.com/en-us/advertising/bulk-service/dynamic-search-ad?view=bingads-13#pagefeedids reference documentation. @@ -81,18 +102,21 @@ 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. * 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. 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. * 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. 12.0.4(2019-03-15) +++++++++++++++++++++++++ + * 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. @@ -101,10 +125,12 @@ Release History 12.0.3.1(2019-02-01) +++++++++++++++++++++++++ + * Fix import issue introduced by version 12.0.3, in which version python 3 users will see error "ImportError: No module named 'bulk_ad_group_negative_audience_association". See issue: https://github.com/BingAds/BingAds-Python-SDK/issues/110. 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. * 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. @@ -114,69 +140,82 @@ Release History 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. 12.0.1(2018-11-10) +++++++++++++++++++++++++ + * 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. 11.12.7(2018-10-10) +++++++++++++++++++++++++ + * Update service proxies to reflect recent interface changes. * Map TitlePart3 and TextPart2 to BulkExpandedTextAd. 11.12.6(2018-09-10) +++++++++++++++++++++++++ + * 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. 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. 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 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. 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. 11.5.9(2018-03-12) +++++++++++++++++++++++++ + * 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. 11.5.6(2017-11-01) +++++++++++++++++++++++++ + * Support for version 9 and 10 ended on October 31st, 2017. The following version 9 and 10 proxies are now removed from the SDK. You must upgrade to version 11. - Removed the Version 9 proxies for Customer Billing, Customer Management, and Reporting services. Also removed the Version 9 ReportingServiceManager. - Removed the Version 10 proxies for Ad Insight, Bulk, and Campaign Management services. Also removed the Version 10 BulkServiceManager and Version 10 Bulk entities. @@ -186,10 +225,12 @@ Release History 11.5.5.1(2017-09-19) +++++++++++++++++++++++++ + * Fix user-agent including '\n' character issue introduced by 11.5.5. Only (Major, Minor, Micro) tuple will be added into user-agent. 11.5.5(2017-09-13) +++++++++++++++++++++++++ + * The Reporting service proxies are updated to support new columns for location targeting. diff --git a/bingads/manifest.py b/bingads/manifest.py index e4244df3..c7d92fd0 100644 --- a/bingads/manifest.py +++ b/bingads/manifest.py @@ -1,5 +1,5 @@ import sys -VERSION = '13.0.5' +VERSION = '13.0.6' 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/bulk_filterlink_ad_extensions.py b/bingads/v13/bulk/entities/ad_extensions/bulk_filterlink_ad_extensions.py index 5c582add..79444539 100644 --- a/bingads/v13/bulk/entities/ad_extensions/bulk_filterlink_ad_extensions.py +++ b/bingads/v13/bulk/entities/ad_extensions/bulk_filterlink_ad_extensions.py @@ -86,6 +86,11 @@ def filter_link_ad_extension(self, value): header=_StringTable.FinalMobileUrl, field_to_csv=lambda c: field_to_csv_Urls(c.filter_link_ad_extension.FinalMobileUrls, c.filter_link_ad_extension.Id), csv_to_field=lambda c, v: csv_to_field_Urls(c.filter_link_ad_extension.FinalMobileUrls, v) + ), + _SimpleBulkMapping( + header=_StringTable.FinalUrlSuffix, + field_to_csv=lambda c: bulk_optional_str(c.filter_link_ad_extension.FinalUrlSuffix, c.filter_link_ad_extension.Id), + csv_to_field=lambda c, v: setattr(c.filter_link_ad_extension, 'FinalUrlSuffix', v) ) ] diff --git a/bingads/v13/bulk/entities/bulk_ad_group.py b/bingads/v13/bulk/entities/bulk_ad_group.py index 0ce57ef3..04e56dc2 100644 --- a/bingads/v13/bulk/entities/bulk_ad_group.py +++ b/bingads/v13/bulk/entities/bulk_ad_group.py @@ -235,9 +235,14 @@ def quality_score_data(self): _SimpleBulkMapping( header=_StringTable.AdScheduleUseSearcherTimeZone, - field_to_csv=lambda c: field_to_csv_UseSearcherTimeZone(c.ad_group.AdScheduleUseSearcherTimeZone, c.ad_group.Id), + field_to_csv=lambda c: field_to_csv_UseSearcherTimeZone(c.ad_group.AdScheduleUseSearcherTimeZone, None), csv_to_field=lambda c, v: setattr(c.ad_group, 'AdScheduleUseSearcherTimeZone', parse_bool(v)) ), + _SimpleBulkMapping( + header=_StringTable.AdGroupType, + field_to_csv=lambda c: c.ad_group.AdGroupType, + csv_to_field=lambda c, v: setattr(c.ad_group, 'AdGroupType', v) + ), ] diff --git a/bingads/v13/bulk/entities/bulk_campaign.py b/bingads/v13/bulk/entities/bulk_campaign.py index 3d8e3be3..3d55f119 100644 --- a/bingads/v13/bulk/entities/bulk_campaign.py +++ b/bingads/v13/bulk/entities/bulk_campaign.py @@ -120,7 +120,7 @@ def _read_campaign_type(c, v): if campaign_type.lower() == 'shopping' or campaign_type.lower() == 'audience': BulkCampaign._create_campaign_setting(c.campaign, 'ShoppingSetting') - elif campaign_type.lower() == 'dynamicsearchads': + elif campaign_type.lower() == 'dynamicsearchads' or campaign_type.lower() == 'search': BulkCampaign._create_campaign_setting(c.campaign, 'DynamicSearchAdsSetting') @staticmethod @@ -449,7 +449,7 @@ def _write_website(c): ), _SimpleBulkMapping( header=_StringTable.AdScheduleUseSearcherTimeZone, - field_to_csv=lambda c: field_to_csv_UseSearcherTimeZone(c.campaign.AdScheduleUseSearcherTimeZone, c.campaign.Id), + 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)) ), ] diff --git a/bingads/v13/internal/bulk/csv_headers.py b/bingads/v13/internal/bulk/csv_headers.py index d89126b5..bfdf6461 100644 --- a/bingads/v13/internal/bulk/csv_headers.py +++ b/bingads/v13/internal/bulk/csv_headers.py @@ -31,6 +31,7 @@ class _CsvHeaders: _StringTable.CpcBid, _StringTable.Language, _StringTable.PrivacyStatus, + _StringTable.AdGroupType, # Ads _StringTable.Title, diff --git a/bingads/v13/internal/bulk/string_table.py b/bingads/v13/internal/bulk/string_table.py index cbdd6496..52aacf43 100644 --- a/bingads/v13/internal/bulk/string_table.py +++ b/bingads/v13/internal/bulk/string_table.py @@ -19,6 +19,7 @@ class _StringTable: ExperimentType = "Experiment Type" BudgetId = "Budget Id" AdGroup = "Ad Group" + AdGroupType = "Ad Group Type" Keyword = "Keyword" TextAd = "Text Ad" ProductAd = "Product Ad" diff --git a/bingads/v13/proxies/campaign_management_service.xml b/bingads/v13/proxies/campaign_management_service.xml index 5b8ac699..f74faa00 100644 --- a/bingads/v13/proxies/campaign_management_service.xml +++ b/bingads/v13/proxies/campaign_management_service.xml @@ -720,6 +720,7 @@ + @@ -891,6 +892,13 @@ + + + + + + + @@ -982,6 +990,7 @@ + @@ -2139,6 +2148,7 @@ + @@ -2187,6 +2197,7 @@ + @@ -3349,9 +3360,21 @@ - + + + + + + + + + + + + + @@ -3385,6 +3408,13 @@ + + + + 2 + + + @@ -4582,6 +4612,7 @@ + @@ -4606,6 +4637,13 @@ + + + + + + + @@ -4631,6 +4669,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -5364,9 +5423,26 @@ + + + + + + + + + 0 + + + + + + + + @@ -5414,6 +5490,7 @@ + diff --git a/setup.py b/setup.py index fd7d1c31..f72460c1 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except ImportError: from distutils.core import setup -VERSION = '13.0.5' +VERSION = '13.0.6' with open('README.rst', 'r') as f: readme = f.read()