From eae386006f597f9dff070c333e496225547a5917 Mon Sep 17 00:00:00 2001 From: Xinyu Wen Date: Thu, 22 Dec 2022 10:27:42 +0800 Subject: [PATCH] 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 =