From d383c38f96706862567674fbe0d2c8df461cb1d9 Mon Sep 17 00:00:00 2001 From: Michael Cloonan Date: Fri, 28 Mar 2014 09:21:17 -0400 Subject: [PATCH] Removing v201306 support. --- adwords_api/ChangeLog | 3 + .../account_management/create_account.rb | 95 ------ .../account_management/get_account_alerts.rb | 122 ------- .../account_management/get_account_changes.rb | 145 -------- .../get_account_hierarchy.rb | 103 ------ .../add_ad_group_bid_modifier.rb | 105 ------ .../add_click_to_download_ad.rb | 137 -------- .../advanced_operations/add_site_links.rb | 244 -------------- .../create_and_attach_shared_keyword_set.rb | 147 -------- ...ind_and_remove_criteria_from_shared_set.rb | 181 ---------- .../get_ad_group_bid_modifiers.rb | 106 ------ .../v201306/basic_operations/add_ad_groups.rb | 143 -------- .../v201306/basic_operations/add_campaigns.rb | 162 --------- .../v201306/basic_operations/add_keywords.rb | 116 ------- .../v201306/basic_operations/add_text_ads.rb | 113 ------- .../v201306/basic_operations/delete_ad.rb | 93 ------ .../basic_operations/delete_ad_group.rb | 110 ------ .../basic_operations/delete_campaign.rb | 111 ------- .../basic_operations/delete_keyword.rb | 98 ------ .../v201306/basic_operations/get_ad_groups.rb | 106 ------ .../v201306/basic_operations/get_campaigns.rb | 101 ------ .../get_campaigns_with_awql.rb | 93 ------ .../v201306/basic_operations/get_keywords.rb | 112 ------- .../v201306/basic_operations/get_text_ads.rb | 114 ------- .../v201306/basic_operations/pause_ad.rb | 92 ----- .../basic_operations/update_ad_group.rb | 89 ----- .../basic_operations/update_campaign.rb | 90 ----- .../basic_operations/update_keyword.rb | 110 ------ .../campaign_management/add_experiment.rb | 166 ---------- .../add_keywords_in_bulk.rb | 158 --------- .../add_location_extension.rb | 125 ------- .../add_location_extension_override.rb | 91 ----- .../get_all_disapproved_ads.rb | 101 ------ .../get_all_disapproved_ads_with_awql.rb | 92 ----- .../campaign_management/promote_experiment.rb | 85 ----- .../campaign_management/set_ad_parameters.rb | 122 ------- .../set_criterion_bid_modifier.rb | 110 ------ .../campaign_management/validate_text_ad.rb | 114 ------- .../handle_captcha_challenge.rb | 93 ------ .../error_handling/handle_partial_failures.rb | 134 -------- .../handle_policy_violation_error.rb | 145 -------- .../handle_two_factor_authorization_error.rb | 88 ----- .../migration/upgrade_legacy_sitelinks.rb | 313 ------------------ .../v201306/misc/get_all_images_and_videos.rb | 108 ------ .../examples/v201306/misc/setup_oauth2.rb | 88 ----- .../examples/v201306/misc/upload_image.rb | 97 ------ .../examples/v201306/misc/use_oauth2_jwt.rb | 97 ------ .../optimization/estimate_keyword_traffic.rb | 137 -------- .../get_keyword_bid_simulations.rb | 100 ------ .../v201306/optimization/get_keyword_ideas.rb | 130 -------- .../optimization/get_placement_ideas.rb | 112 ------- .../v201306/remarketing/add_audience.rb | 123 ------- .../remarketing/add_conversion_tracker.rb | 104 ------ .../reporting/download_criteria_report.rb | 87 ----- .../download_criteria_report_with_awql.rb | 86 ----- .../v201306/reporting/get_campaign_stats.rb | 113 ------- .../v201306/reporting/get_report_fields.rb | 79 ----- .../reporting/parallel_report_download.rb | 171 ---------- .../add_campaign_targeting_criteria.rb | 123 ------- .../add_demographic_targeting_criteria.rb | 116 ------- .../get_campaign_targeting_criteria.rb | 110 ------ .../get_targetable_languages_and_carriers.rb | 94 ------ .../v201306/targeting/lookup_location.rb | 112 ------- adwords_api/lib/adwords_api/api_config.rb | 76 ----- .../v201306/ad_extension_override_service.rb | 38 --- .../ad_extension_override_service_registry.rb | 46 --- .../v201306/ad_group_ad_service.rb | 42 --- .../v201306/ad_group_ad_service_registry.rb | 46 --- .../v201306/ad_group_bid_modifier_service.rb | 38 --- .../ad_group_bid_modifier_service_registry.rb | 46 --- .../v201306/ad_group_criterion_service.rb | 42 --- .../ad_group_criterion_service_registry.rb | 46 --- .../v201306/ad_group_feed_service.rb | 38 --- .../v201306/ad_group_feed_service_registry.rb | 46 --- .../adwords_api/v201306/ad_group_service.rb | 42 --- .../v201306/ad_group_service_registry.rb | 46 --- .../adwords_api/v201306/ad_param_service.rb | 38 --- .../v201306/ad_param_service_registry.rb | 46 --- .../v201306/adwords_user_list_service.rb | 38 --- .../adwords_user_list_service_registry.rb | 46 --- .../lib/adwords_api/v201306/alert_service.rb | 34 -- .../v201306/alert_service_registry.rb | 46 --- .../v201306/bidding_strategy_service.rb | 38 --- .../bidding_strategy_service_registry.rb | 46 --- .../v201306/budget_order_service.rb | 42 --- .../v201306/budget_order_service_registry.rb | 46 --- .../lib/adwords_api/v201306/budget_service.rb | 38 --- .../v201306/budget_service_registry.rb | 46 --- .../v201306/campaign_ad_extension_service.rb | 38 --- .../campaign_ad_extension_service_registry.rb | 46 --- .../v201306/campaign_criterion_service.rb | 42 --- .../campaign_criterion_service_registry.rb | 46 --- .../v201306/campaign_feed_service.rb | 38 --- .../v201306/campaign_feed_service_registry.rb | 46 --- .../adwords_api/v201306/campaign_service.rb | 42 --- .../v201306/campaign_service_registry.rb | 46 --- .../v201306/campaign_shared_set_service.rb | 38 --- .../campaign_shared_set_service_registry.rb | 47 --- .../v201306/constant_data_service.rb | 62 ---- .../v201306/constant_data_service_registry.rb | 46 --- .../v201306/conversion_tracker_service.rb | 38 --- .../conversion_tracker_service_registry.rb | 46 --- .../adwords_api/v201306/customer_service.rb | 34 -- .../v201306/customer_service_registry.rb | 46 --- .../v201306/customer_sync_service.rb | 34 -- .../v201306/customer_sync_service_registry.rb | 47 --- .../lib/adwords_api/v201306/data_service.rb | 38 --- .../v201306/data_service_registry.rb | 46 --- .../adwords_api/v201306/experiment_service.rb | 38 --- .../v201306/experiment_service_registry.rb | 46 --- .../adwords_api/v201306/feed_item_service.rb | 38 --- .../v201306/feed_item_service_registry.rb | 46 --- .../v201306/feed_mapping_service.rb | 38 --- .../v201306/feed_mapping_service_registry.rb | 46 --- .../lib/adwords_api/v201306/feed_service.rb | 38 --- .../v201306/feed_service_registry.rb | 46 --- .../v201306/geo_location_service.rb | 34 -- .../v201306/geo_location_service_registry.rb | 46 --- .../v201306/location_criterion_service.rb | 34 -- .../location_criterion_service_registry.rb | 46 --- .../v201306/managed_customer_service.rb | 50 --- .../managed_customer_service_registry.rb | 46 --- .../lib/adwords_api/v201306/media_service.rb | 38 --- .../v201306/media_service_registry.rb | 46 --- .../adwords_api/v201306/mutate_job_service.rb | 42 --- .../v201306/mutate_job_service_registry.rb | 46 --- .../v201306/report_definition_service.rb | 34 -- .../report_definition_service_registry.rb | 46 --- .../v201306/shared_criterion_service.rb | 38 --- .../shared_criterion_service_registry.rb | 47 --- .../adwords_api/v201306/shared_set_service.rb | 38 --- .../v201306/shared_set_service_registry.rb | 47 --- .../v201306/targeting_idea_service.rb | 38 --- .../targeting_idea_service_registry.rb | 46 --- .../v201306/traffic_estimator_service.rb | 34 -- .../traffic_estimator_service_registry.rb | 46 --- adwords_api/lib/adwords_api/version.rb | 2 +- .../basic_operations_get_campaigns.def | 114 ------- .../templates/v201306/misc_use_oauth2_jwt.def | 131 -------- 139 files changed, 4 insertions(+), 10748 deletions(-) delete mode 100755 adwords_api/examples/v201306/account_management/create_account.rb delete mode 100755 adwords_api/examples/v201306/account_management/get_account_alerts.rb delete mode 100755 adwords_api/examples/v201306/account_management/get_account_changes.rb delete mode 100755 adwords_api/examples/v201306/account_management/get_account_hierarchy.rb delete mode 100755 adwords_api/examples/v201306/advanced_operations/add_ad_group_bid_modifier.rb delete mode 100755 adwords_api/examples/v201306/advanced_operations/add_click_to_download_ad.rb delete mode 100755 adwords_api/examples/v201306/advanced_operations/add_site_links.rb delete mode 100755 adwords_api/examples/v201306/advanced_operations/create_and_attach_shared_keyword_set.rb delete mode 100755 adwords_api/examples/v201306/advanced_operations/find_and_remove_criteria_from_shared_set.rb delete mode 100755 adwords_api/examples/v201306/advanced_operations/get_ad_group_bid_modifiers.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/add_ad_groups.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/add_campaigns.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/add_keywords.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/add_text_ads.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/delete_ad.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/delete_ad_group.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/delete_campaign.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/delete_keyword.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/get_ad_groups.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/get_campaigns.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/get_campaigns_with_awql.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/get_keywords.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/get_text_ads.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/pause_ad.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/update_ad_group.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/update_campaign.rb delete mode 100755 adwords_api/examples/v201306/basic_operations/update_keyword.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/add_experiment.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/add_keywords_in_bulk.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/add_location_extension.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/add_location_extension_override.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads_with_awql.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/promote_experiment.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/set_ad_parameters.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/set_criterion_bid_modifier.rb delete mode 100755 adwords_api/examples/v201306/campaign_management/validate_text_ad.rb delete mode 100755 adwords_api/examples/v201306/error_handling/handle_captcha_challenge.rb delete mode 100755 adwords_api/examples/v201306/error_handling/handle_partial_failures.rb delete mode 100755 adwords_api/examples/v201306/error_handling/handle_policy_violation_error.rb delete mode 100755 adwords_api/examples/v201306/error_handling/handle_two_factor_authorization_error.rb delete mode 100755 adwords_api/examples/v201306/migration/upgrade_legacy_sitelinks.rb delete mode 100755 adwords_api/examples/v201306/misc/get_all_images_and_videos.rb delete mode 100755 adwords_api/examples/v201306/misc/setup_oauth2.rb delete mode 100755 adwords_api/examples/v201306/misc/upload_image.rb delete mode 100755 adwords_api/examples/v201306/misc/use_oauth2_jwt.rb delete mode 100755 adwords_api/examples/v201306/optimization/estimate_keyword_traffic.rb delete mode 100755 adwords_api/examples/v201306/optimization/get_keyword_bid_simulations.rb delete mode 100755 adwords_api/examples/v201306/optimization/get_keyword_ideas.rb delete mode 100755 adwords_api/examples/v201306/optimization/get_placement_ideas.rb delete mode 100755 adwords_api/examples/v201306/remarketing/add_audience.rb delete mode 100755 adwords_api/examples/v201306/remarketing/add_conversion_tracker.rb delete mode 100755 adwords_api/examples/v201306/reporting/download_criteria_report.rb delete mode 100755 adwords_api/examples/v201306/reporting/download_criteria_report_with_awql.rb delete mode 100755 adwords_api/examples/v201306/reporting/get_campaign_stats.rb delete mode 100755 adwords_api/examples/v201306/reporting/get_report_fields.rb delete mode 100755 adwords_api/examples/v201306/reporting/parallel_report_download.rb delete mode 100755 adwords_api/examples/v201306/targeting/add_campaign_targeting_criteria.rb delete mode 100755 adwords_api/examples/v201306/targeting/add_demographic_targeting_criteria.rb delete mode 100755 adwords_api/examples/v201306/targeting/get_campaign_targeting_criteria.rb delete mode 100755 adwords_api/examples/v201306/targeting/get_targetable_languages_and_carriers.rb delete mode 100755 adwords_api/examples/v201306/targeting/lookup_location.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_extension_override_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_extension_override_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_ad_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_ad_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_criterion_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_criterion_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_feed_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_feed_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_group_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_param_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/ad_param_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/adwords_user_list_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/adwords_user_list_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/alert_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/alert_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/bidding_strategy_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/bidding_strategy_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/budget_order_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/budget_order_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/budget_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/budget_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_criterion_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_criterion_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_feed_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_feed_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_shared_set_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/campaign_shared_set_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/constant_data_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/constant_data_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/conversion_tracker_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/conversion_tracker_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/customer_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/customer_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/customer_sync_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/customer_sync_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/data_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/data_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/experiment_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/experiment_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/feed_item_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/feed_item_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/feed_mapping_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/feed_mapping_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/feed_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/feed_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/geo_location_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/geo_location_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/location_criterion_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/location_criterion_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/managed_customer_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/managed_customer_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/media_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/media_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/mutate_job_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/mutate_job_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/report_definition_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/report_definition_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/shared_criterion_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/shared_criterion_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/shared_set_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/shared_set_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/targeting_idea_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/targeting_idea_service_registry.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/traffic_estimator_service.rb delete mode 100644 adwords_api/lib/adwords_api/v201306/traffic_estimator_service_registry.rb delete mode 100644 adwords_api/test/templates/v201306/basic_operations_get_campaigns.def delete mode 100644 adwords_api/test/templates/v201306/misc_use_oauth2_jwt.def diff --git a/adwords_api/ChangeLog b/adwords_api/ChangeLog index 9c1cf7685..bf448d25b 100644 --- a/adwords_api/ChangeLog +++ b/adwords_api/ChangeLog @@ -1,3 +1,6 @@ +0.12.0: + - Removed deprecated API version v201306. + 0.11.1: - Support and examples for v201402. - Removed support for ClientLogin for versions > v201309. diff --git a/adwords_api/examples/v201306/account_management/create_account.rb b/adwords_api/examples/v201306/account_management/create_account.rb deleted file mode 100755 index e8999767d..000000000 --- a/adwords_api/examples/v201306/account_management/create_account.rb +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to create an account. Note by default this -# account will only be accessible via parent MCC. -# -# Note: This code example uses MCC-level calls and won't work with Test -# Accounts, see: https://developers.google.com/adwords/api/docs/test-accounts -# -# Tags: ManagedCustomerService.mutate - -require 'adwords_api' -require 'adwords_api/utils' - -def create_account() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - managed_customer_srv = adwords.service(:ManagedCustomerService, API_VERSION) - - # Create a local Customer object. - customer = { - :name => 'Account created with ManagedCustomerService', - :currency_code => 'EUR', - :date_time_zone => 'Europe/London' - } - - # Prepare operation to create an account. - operation = { - :operator => 'ADD', - :operand => customer - } - - # Create the account. It is possible to create multiple accounts with one - # request by sending an array of operations. - response = managed_customer_srv.mutate([operation]) - - response[:value].each do |new_account| - puts "Account with customer ID '%s' was successfully created." % - AdwordsApi::Utils.format_id(new_account[:customer_id]) - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - create_account() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/account_management/get_account_alerts.rb b/adwords_api/examples/v201306/account_management/get_account_alerts.rb deleted file mode 100755 index 44226f6fb..000000000 --- a/adwords_api/examples/v201306/account_management/get_account_alerts.rb +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets all alerts for all clients of an MCC account. The effective -# user (clientCustomerId, or authToken) must be an MCC user to get results. -# -# Note: This code example uses MCC-level calls and won't work with Test -# Accounts, see: https://developers.google.com/adwords/api/docs/test-accounts -# -# Tags: AlertService.get - -require 'adwords_api' -require 'adwords_api/utils' - -def get_account_alerts() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - alert_srv = adwords.service(:AlertService, API_VERSION) - - # Create the selector. - selector = { - :query => { - :filter_spec => 'ALL', - :client_spec => 'ALL', - :trigger_time_spec => 'ALL_TIME', - :severities => ['GREEN', 'YELLOW', 'RED'], - :types => [ - 'ACCOUNT_BUDGET_BURN_RATE', 'ACCOUNT_BUDGET_ENDING', - 'ACCOUNT_ON_TARGET', 'CAMPAIGN_ENDED', 'CAMPAIGN_ENDING', - 'CREDIT_CARD_EXPIRING', 'DECLINED_PAYMENT', 'MANAGER_LINK_PENDING', - 'MISSING_BANK_REFERENCE_NUMBER', 'PAYMENT_NOT_ENTERED', - 'TV_ACCOUNT_BUDGET_ENDING', 'TV_ACCOUNT_ON_TARGET', - 'TV_ZERO_DAILY_SPENDING_LIMIT', 'USER_INVITE_ACCEPTED', - 'USER_INVITE_PENDING', 'ZERO_DAILY_SPENDING_LIMIT' - ] - }, - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - # Get alerts. - begin - page = alert_srv.get(selector) - if page[:entries] - page[:entries].each_with_index do |alert, index| - puts "%d) Customer ID is '%s', alert type is '%s', severity is '%s'." - [AdwordsApi::Utils.format_id(alert[:client_customer_id]), - alert[:alert_type], alert[:alert_severity]] - alert[:details].each do |detail| - puts "\t- triggered at %s" % detail[:trigger_time] - end - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tTotal number of alerts: %d." % page[:total_num_entries] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - get_account_alerts() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/account_management/get_account_changes.rb b/adwords_api/examples/v201306/account_management/get_account_changes.rb deleted file mode 100755 index fa6a6bc10..000000000 --- a/adwords_api/examples/v201306/account_management/get_account_changes.rb +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets all account changes that happened within the last 24 hours, -# for all your campaigns. -# -# Tags: CustomerSyncService.get - -require 'adwords_api' -require 'date' -require 'pp' - -def get_account_changes() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_srv = adwords.service(:CampaignService, API_VERSION) - customer_sync_srv = adwords.service(:CustomerSyncService, API_VERSION) - - today_at_midnight = DateTime.parse(Date.today.to_s) - yesterday_at_midnight = DateTime.parse((Date.today - 1).to_s) - min_date_time = yesterday_at_midnight.strftime("%Y%m%d %H%M%S") - max_date_time = today_at_midnight.strftime("%Y%m%d %H%M%S") - - # Get all the campaigns for this account. - selector = { - :fields => ['Id'] - } - response = campaign_srv.get(selector) - - campaign_ids = [] - - if response and response[:entries] - campaign_ids = response[:entries].map { |campaign| campaign[:id] } - else - raise StandardError, 'No campaigns were found.' - end - - # Create a selector for CustomerSyncService. - selector = { - :campaign_ids => campaign_ids, - :date_time_range => { - :min => min_date_time, - :max => max_date_time - } - } - - # Get all account changes for the campaigns. - campaign_changes = customer_sync_srv.get(selector) - - # Display changes. - if campaign_changes - puts "Most recent change: %s" % campaign_changes[:last_change_timestamp] - campaign_changes[:changed_campaigns].each do |campaign| - puts "Campaign with ID %d was changed:" % campaign[:campaign_id] - puts "\tCampaign change status: '%s'" % campaign[:campaign_change_status] - unless ['NEW', 'FIELDS_UNCHANGED'].include?( - campaign[:campaign_change_status]) - puts "\tAdded ad extensions: '%s'" % - campaign[:added_ad_extensions].pretty_inspect.chomp - puts "\tAdded campaign criteria: '%s'" % - campaign[:added_campaign_criteria].pretty_inspect.chomp - puts "\tAdded campaign targeting: '%s'" % - campaign[:campaign_targeting_changed].pretty_inspect.chomp - puts "\tDeleted ad extensions: '%s'" % - campaign[:deleted_ad_extensions].pretty_inspect.chomp - puts "\tDeleted campaign criteria: '%s'" % - campaign[:deleted_campaign_criteria].pretty_inspect.chomp - - if campaign[:changed_ad_groups] - campaign[:changed_ad_groups].each do |ad_group| - puts "\tAd group with ID %d was changed:" % ad_group[:ad_group_id] - puts "\t\tAd group changed status: '%s'" % - ad_group[:ad_group_change_status] - unless ['NEW', 'FIELDS_UNCHANGED'].include?( - ad_group[:ad_group_change_status]) - puts "\t\tAds changed: '%s'" % - ad_group[:changed_ads].pretty_inspect.chomp - puts "\t\tCriteria changed: '%s'" % - ad_group[:changed_criteria].pretty_inspect.chomp - puts "\t\tCriteria deleted: '%s'" % - ad_group[:deleted_criteria].pretty_inspect.chomp - end - end - end - end - puts - end - else - puts 'No account changes were found.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - get_account_changes() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/account_management/get_account_hierarchy.rb b/adwords_api/examples/v201306/account_management/get_account_hierarchy.rb deleted file mode 100755 index 94ff3294b..000000000 --- a/adwords_api/examples/v201306/account_management/get_account_hierarchy.rb +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve the account hierarchy under an -# account. -# -# Note: This code example uses MCC-level calls and won't work with Test -# Accounts, see: https://developers.google.com/adwords/api/docs/test-accounts -# -# Tags: ManagedCustomerService.get - -require 'adwords_api' -require 'adwords_api/utils' - -def get_account_hierarchy() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - managed_customer_srv = adwords.service(:ManagedCustomerService, API_VERSION) - - # Get the account hierarchy for this account. - selector = { - :fields => ['Login', 'CustomerId', 'Name'] - } - - # Run the request at the MCC level. - graph = adwords.use_mcc() {managed_customer_srv.get(selector)} - - if graph and graph[:entries] - puts 'Accounts under this hierarchy: %d' % graph[:total_num_entries] - graph[:entries].each_with_index do |account, index| - puts "%d) Customer ID: %s" % - [index + 1, AdwordsApi::Utils.format_id(account[:customer_id])] - puts "\tLogin email: %s" % account[:login] - puts "\tName: %s" % account[:name] - end - - # Display the links. - if graph[:links] - puts 'Hierarchy links:' - graph[:links].each do |link| - puts "\tThere is a link from %s to %s" % - [AdwordsApi::Utils.format_id(link[:manager_customer_id]), - AdwordsApi::Utils.format_id(link[:client_customer_id])] - end - end - else - puts 'No accounts were found.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - get_account_hierarchy() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/advanced_operations/add_ad_group_bid_modifier.rb b/adwords_api/examples/v201306/advanced_operations/add_ad_group_bid_modifier.rb deleted file mode 100755 index d24e105f4..000000000 --- a/adwords_api/examples/v201306/advanced_operations/add_ad_group_bid_modifier.rb +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to add an ad group level mobile bid modifier -# override for a campaign. -# -# Tags: AdGroupBidModifierService.mutate - -require 'adwords_api' - -def add_ad_group_bid_modifier(ad_group_id, bid_modifier) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - bid_modifier_srv = adwords.service(:AdGroupBidModifierService, API_VERSION) - - # Mobile criterion ID. - criterion_id = 30001 - - # Prepare to add an ad group level override. - operation = { - # Use 'ADD' to add a new modifier and 'SET' to update an existing one. A - # modifier can be removed with the 'REMOVE' operator. - :operator => 'ADD', - :operand => { - :ad_group_id => adgroup_id, - :criterion => { - :xsi_type => 'Platform', - :id => criterion_id - }, - :bid_modifier => bid_modifier - } - } - - # Add ad group level mobile bid modifier. - response = bid_modifier_srv.mutate([operation]) - if response and response[:value] - modifier = response[:value].first - value = modifier[:bid_modifier] || 'unset' - puts ('Campaign ID %d, AdGroup ID %d, Criterion ID %d was updated with ' + - 'ad group level modifier: %s') % - [modifier[:campaign_id], modifier[:ad_group_id], - modifier[:criterion][:id], value] - else - puts 'No modifiers were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of an ad group to add an override for. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - # Bid modifier to override with. - bid_modifier = 1.5 - - add_ad_group_bid_modifier(ad_group_id, bid_modifier) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/advanced_operations/add_click_to_download_ad.rb b/adwords_api/examples/v201306/advanced_operations/add_click_to_download_ad.rb deleted file mode 100755 index 6d620edf9..000000000 --- a/adwords_api/examples/v201306/advanced_operations/add_click_to_download_ad.rb +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This code example creates a click-to-download ad, also known as an app -# promotion ad to a given ad group. To list ad groups, run get_ad_groups.rb. -# -# Tags: AdGroupAdService.mutate - -require 'adwords_api' - -def add_click_to_download_ad(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Create the template elements for the ad. You can refer to - # https://developers.google.com/adwords/api/docs/appendix/templateads - # for the list of available template fields. - ad_data = { - :unique_name => 'adData', - :fields => [ - { - :name => 'headline', - :field_text => 'Enjoy your drive in Mars', - :type => 'TEXT' - }, - { - :name => 'description1', - :field_text => 'Realistic physics simulation', - :type => 'TEXT' - }, - { - :name => 'description2', - :field_text => 'Race against players online', - :type => 'TEXT' - }, - { - :name => 'appId', - :field_text => 'com.example.demogame', - :type => 'TEXT' - }, - { - :name => 'appStore', - :field_text => '2', - :type => 'ENUM' - } - ] - } - - # Create click to download ad. - click_to_download_app_ad = { - :xsi_type => 'TemplateAd', - :name => 'Ad for demo game', - :template_id => 353, - :url => - 'http://play.google.com/store/apps/details?id=com.example.demogame', - :display_url => 'play.google.com', - :template_elements => [ad_data] - } - - # Create ad group ad. - ad_group_ad = { - :ad_group_id => ad_group_id, - :ad => click_to_download_app_ad, - # Optional. - :status => 'PAUSED' - } - - # Add ad. - response = ad_group_ad_srv.mutate([ - {:operator => 'ADD', :operand => ad_group_ad} - ]) - if response and response[:value] - response[:value].each do |ad| - puts "Added new click-to-download ad to ad group ID %d with url '%s'." % - [ad[:ad][:id], ad[:ad][:url]] - end - else - raise StandardError, 'No ads were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # Ad group ID to add text ads to. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - add_click_to_download_ad(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/advanced_operations/add_site_links.rb b/adwords_api/examples/v201306/advanced_operations/add_site_links.rb deleted file mode 100755 index 7102d8afb..000000000 --- a/adwords_api/examples/v201306/advanced_operations/add_site_links.rb +++ /dev/null @@ -1,244 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example adds a sitelinks feed and associates it with a campaign. -# -# Tags: CampaignFeedService.mutate, FeedItemService.mutate -# Tags: FeedMappingService.mutate, FeedService.mutate - -require 'adwords_api' - -def add_site_links(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - feed_srv = adwords.service(:FeedService, API_VERSION) - feed_item_srv = adwords.service(:FeedItemService, API_VERSION) - feed_mapping_srv = adwords.service(:FeedMappingService, API_VERSION) - campaign_feed_srv = adwords.service(:CampaignFeedService, API_VERSION) - - sitelinks_data = {} - - # Create site links feed first. - site_links_feed = { - :name => 'Feed For Site Links', - :attributes => [ - {:type => 'STRING', :name => 'Link Text'}, - {:type => 'URL', :name => 'Link URL'} - ] - } - - response = feed_srv.mutate([ - {:operator => 'ADD', :operand => site_links_feed} - ]) - if response and response[:value] - feed = response[:value].first - # Attribute of type STRING. - link_text_feed_attribute_id = feed[:attributes][0][:id] - # Attribute of type URL. - link_url_feed_attribute_id = feed[:attributes][1][:id] - puts "Feed with name '%s' and ID %d was added with" % - [feed[:name], feed[:id]] - puts "\tText attribute ID %d and URL attribute ID %d." % - [link_text_feed_attribute_id, link_url_feed_attribute_id] - sitelinks_data[:feed_id] = feed[:id] - sitelinks_data[:link_text_feed_id] = link_text_feed_attribute_id - sitelinks_data[:link_url_feed_id] = link_url_feed_attribute_id - else - raise new StandardError, 'No feeds were added.' - end - - # Create site links feed items. - items_data = [ - {:text => 'Home', :url => 'http://www.example.com'}, - {:text => 'Stores', :url => 'http://www.example.com/stores'}, - {:text => 'On Sale', :url => 'http://www.example.com/sale'}, - {:text => 'Support', :url => 'http://www.example.com/support'}, - {:text => 'Products', :url => 'http://www.example.com/products'}, - {:text => 'About', :url => 'http://www.example.com/about'} - ] - - feed_items = items_data.map do |item| - { - :feed_id => sitelinks_data[:feed_id], - :attribute_values => [ - { - :feed_attribute_id => sitelinks_data[:link_text_feed_id], - :string_value => item[:text] - }, - { - :feed_attribute_id => sitelinks_data[:link_url_feed_id], - :string_value => item[:url] - } - ] - } - end - - feed_items_operations = feed_items.map do |item| - {:operator => 'ADD', :operand => item} - end - - response = feed_item_srv.mutate(feed_items_operations) - if response and response[:value] - sitelinks_data[:feed_item_ids] = [] - response[:value].each do |feed_item| - puts 'Feed item with ID %d was added.' % feed_item[:feed_item_id] - sitelinks_data[:feed_item_ids] << feed_item[:feed_item_id] - end - else - raise new StandardError, 'No feed items were added.' - end - - # Create site links feed mapping. - feed_mapping = { - :placeholder_type => PLACEHOLDER_SITELINKS, - :feed_id => sitelinks_data[:feed_id], - :attribute_field_mappings => [ - { - :feed_attribute_id => sitelinks_data[:link_text_feed_id], - :field_id => PLACEHOLDER_FIELD_SITELINK_LINK_TEXT - }, - { - :feed_attribute_id => sitelinks_data[:link_url_feed_id], - :field_id => PLACEHOLDER_FIELD_SITELINK_LINK_URL - } - ] - } - - response = feed_mapping_srv.mutate([ - {:operator => 'ADD', :operand => feed_mapping} - ]) - if response and response[:value] - feed_mapping = response[:value].first - puts ('Feed mapping with ID %d and placeholder type %d was saved for feed' + - ' with ID %d.') % [ - feed_mapping[:feed_mapping_id], - feed_mapping[:placeholder_type], - feed_mapping[:feed_id] - ] - else - raise new StandardError, 'No feed mappings were added.' - end - - # Create site links campaign feed. - operands = sitelinks_data[:feed_item_ids].map do |feed_item_id| - { - :xsi_type => 'ConstantOperand', - :type => 'LONG', - :long_value => feed_item_id - } - end - - feed_item_function = { - :operator => 'IN', - :lhs_operand => [ - {:xsi_type => 'RequestContextOperand', :context_type => 'FEED_ITEM_ID'} - ], - :rhs_operand => operands - } - - # Optional: to target to a platform, define a function and 'AND' it with the - # feed item ID link: - platform_function = { - :operator => 'EQUALS', - :lhs_operand => [ - {:xsi_type => 'RequestContextOperand', :context_type => 'DEVICE_PLATFORM'} - ], - :rhs_operand => [ - { - :xsi_type => 'ConstantOperand', - :type => 'STRING', - :string_value => 'Mobile' - } - ] - } - combined_function = { - :operator => 'AND', - :lhs_operand => [ - {:xsi_type => 'FunctionOperand', :value => feed_item_function}, - {:xsi_type => 'FunctionOperand', :value => platform_function} - ] - } - - campaign_feed = { - :feed_id => sitelinks_data[:feed_id], - :campaign_id => campaign_id, - :matching_function => combined_function, - # Specifying placeholder types on the CampaignFeed allows the same feed - # to be used for different placeholders in different Campaigns. - :placeholder_types => [PLACEHOLDER_SITELINKS] - } - - response = campaign_feed_srv.mutate([ - {:operator => 'ADD', :operand => campaign_feed} - ]) - if response and response[:value] - campaign_feed = response[:value].first - puts 'Campaign with ID %d was associated with feed with ID %d.' % - [campaign_feed[:campaign_id], campaign_feed[:feed_id]] - else - raise new StandardError, 'No campaign feeds were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - # See the Placeholder reference page for a list of all the placeholder types - # and fields, see: - # https://developers.google.com/adwords/api/docs/appendix/placeholders - PLACEHOLDER_SITELINKS = 1 - PLACEHOLDER_FIELD_SITELINK_LINK_TEXT = 1 - PLACEHOLDER_FIELD_SITELINK_LINK_URL = 2 - - begin - # Campaign ID to add site link to. Campaign must be enhanced. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - add_site_links(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/advanced_operations/create_and_attach_shared_keyword_set.rb b/adwords_api/examples/v201306/advanced_operations/create_and_attach_shared_keyword_set.rb deleted file mode 100755 index d6ed0d2cf..000000000 --- a/adwords_api/examples/v201306/advanced_operations/create_and_attach_shared_keyword_set.rb +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example creates a shared list of negative broad match keywords, it then -# attaches them to a campaign. -# -# Note: Shared sets is a Beta feature. -# -# Tags: SharedSetService.mutate, CampaignSharedSetService.mutate - -require 'adwords_api' -require 'date' - -def create_and_attach_shared_keyword_set(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - shared_set_srv = adwords.service(:SharedSetService, API_VERSION) - shared_criterion_srv = adwords.service(:SharedCriterionService, API_VERSION) - campaign_shared_set_srv = - adwords.service(:CampaignSharedSetService, API_VERSION) - - # Keywords to create a shared set of. - keywords = ['mars cruise', 'mars hotels'] - - # Create shared negative keyword set. - shared_set = { - :name => 'API Negative keyword list - %d' % (Time.new.to_f * 1000).to_i, - :type => 'NEGATIVE_KEYWORDS' - } - - # Add shared set. - response = shared_set_srv.mutate([ - {:operator => 'ADD', :operand => shared_set} - ]) - - if response and response[:value] - shared_set = response[:value].first - shared_set_id = shared_set[:shared_set_id] - puts "Shared set with ID %d and name '%s' was successfully added." % - [shared_set_id, shared_set[:name]] - else - raise StandardError, 'No shared set was added' - end - - # Add negative keywords to shared set. - shared_criteria = keywords.map do |keyword| - { - :criterion => { - :xsi_type => 'Keyword', - :text => keyword, - :match_type => 'BROAD' - }, - :negative => true, - :shared_set_id => shared_set_id - } - end - - operations = shared_criteria.map do |criterion| - {:operator => 'ADD', :operand => criterion} - end - - response = shared_criterion_srv.mutate(operations) - if response and response[:value] - response[:value].each do |shared_criterion| - puts "Added shared criterion ID %d '%s' to shared set with ID %d." % - [shared_criterion[:criterion][:id], - shared_criterion[:criterion][:text], - shared_criterion[:shared_set_id]] - end - else - raise StandardError, 'No shared keyword was added' - end - - # Attach the articles to the campaign. - campaign_set = { - :campaign_id => campaign_id, - :shared_set_id => shared_set_id - } - - response = campaign_shared_set_srv.mutate([ - {:operator => 'ADD', :operand => campaign_set} - ]) - if response and response[:value] - campaign_shared_set = response[:value].first - puts 'Shared set ID %d was attached to campaign ID %d' % - [campaign_shared_set[:shared_set_id], campaign_shared_set[:campaign_id]] - else - raise StandardError, 'No campaign shared set was added' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # Campaign ID to attach shared keyword set to. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - - create_and_attach_shared_keyword_set(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/advanced_operations/find_and_remove_criteria_from_shared_set.rb b/adwords_api/examples/v201306/advanced_operations/find_and_remove_criteria_from_shared_set.rb deleted file mode 100755 index e77b680ca..000000000 --- a/adwords_api/examples/v201306/advanced_operations/find_and_remove_criteria_from_shared_set.rb +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example demonstrates how to find shared sets, shared set criterions and -# how to remove them. -# -# Note: Shared sets is a Beta feature. -# -# Tags: CampaignSharedSetService.get -# Tags: SharedCriterionService.get, SharedCriterionService.mutate - -require 'adwords_api' - -def find_and_remove_criteria_from_shared_set(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_shared_set_srv = - adwords.service(:CampaignSharedSetService, API_VERSION) - shared_criterion_srv = adwords.service(:SharedCriterionService, API_VERSION) - - shared_set_ids = [] - criterion_ids = [] - - # First, retrieve all shared sets associated with the campaign. - - # Create selector for shared sets to: - # - filter by campaign ID, - # - filter by shared set type. - selector = { - :fields => ['SharedSetId', 'CampaignId', 'SharedSetName', 'SharedSetType', - 'Status'], - :predicates => [ - {:field => 'CampaignId', :operator => 'EQUALS', :values => [campaign_id]}, - {:field => 'SharedSetType', :operator => 'IN', :values => - ['NEGATIVE_KEYWORDS', 'NEGATIVE_PLACEMENTS']} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = campaign_shared_set_srv.get(selector) - if page[:entries] - page[:entries].each do |shared_set| - puts "Campaign shared set ID %d and name '%s'" % - [shared_set[:shared_set_id], shared_set[:shared_set_name]] - shared_set_ids << shared_set[:shared_set_id] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - # Next, Retrieve criterion IDs for all found shared sets. - selector = { - :fields => ['SharedSetId', 'Id', 'KeywordText', 'KeywordMatchType', - 'PlacementUrl'], - :predicates => [ - {:field => 'SharedSetId', :operator => 'IN', :values => shared_set_ids} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = shared_criterion_srv.get(selector) - if page[:entries] - page[:entries].each do |shared_criterion| - if shared_criterion[:criterion][:type] == 'KEYWORD' - puts "Shared negative keyword with ID %d and text '%s' was found." % - [shared_criterion[:criterion][:id], - shared_criterion[:criterion][:text]] - elsif shared_criterion[:criterion][:type] == 'PLACEMENT' - puts "Shared negative placement with ID %d and url '%s' was found." % - [shared_criterion[:criterion][:id], - shared_criterion[:criterion][:url]] - else - puts 'Shared criterion with ID %d was found.' % - [shared_criterion[:criterion][:id]] - end - criterion_ids << { - :shared_set_id => shared_criterion[:shared_set_id], - :criterion_id => shared_criterion[:criterion][:id] - } - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - # Finally, remove the criteria. - operations = criterion_ids.map do |criterion| - { - :operator => 'REMOVE', - :operand => { - :criterion => {:id => criterion[:criterion_id]}, - :shared_set_id => criterion[:shared_set_id] - } - } - end - - response = shared_criterion_srv.mutate(operations) - if response and response[:value] - response[:value].each do |criterion| - puts "Criterion ID %d was successfully removed from shared set ID %d." % - [criterion[:criterion][:id], criterion[:shared_set_id]] - end - else - puts 'No shared criteria were removed.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - # ID of a campaign to remove shared criteria from. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - - find_and_remove_criteria_from_shared_set(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/advanced_operations/get_ad_group_bid_modifiers.rb b/adwords_api/examples/v201306/advanced_operations/get_ad_group_bid_modifiers.rb deleted file mode 100755 index 0a3cabcdd..000000000 --- a/adwords_api/examples/v201306/advanced_operations/get_ad_group_bid_modifiers.rb +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve ad group level bid modifiers for a -# campaign. -# -# Tags: AdGroupBidModifierService.get - -require 'adwords_api' - -def get_ad_group_bid_modifiers(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - bid_modifier_srv = adwords.service(:AdGroupBidModifierService, API_VERSION) - - # Get all ad group bid modifiers for the campaign. - selector = { - :fields => ['CampaignId', 'AdGroupId', 'Id', 'BidModifier'], - :predicates => [ - {:field => 'CampaignId', :operator => 'EQUALS', :values => [campaign_id]} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = bid_modifier_srv.get(selector) - if page[:entries] - page[:entries].each do |modifier| - value = modifier[:bid_modifier] || 'unset' - puts ('Campaign ID %d, AdGroup ID %d, Criterion ID %d has ad group ' + - 'level modifier: %s') % - [modifier[:campaign_id], modifier[:ad_group_id], - modifier[:criterion][:id], value] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - else - puts 'No ad group level bid overrides returned.' - end - end while page[:total_num_entries] > offset -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - # ID of a campaign to pull overrides for. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - - get_ad_group_bid_modifiers(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/add_ad_groups.rb b/adwords_api/examples/v201306/basic_operations/add_ad_groups.rb deleted file mode 100755 index 151171d9d..000000000 --- a/adwords_api/examples/v201306/basic_operations/add_ad_groups.rb +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to create ad groups. To get a list of existing -# campaigns run get_campaigns.rb. -# -# Tags: AdGroupService.mutate - -require 'adwords_api' - -def add_ad_groups(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_srv = adwords.service(:AdGroupService, API_VERSION) - - ad_groups = [ - { - :name => "Earth to Mars Cruises #%d" % (Time.new.to_f * 1000).to_i, - :status => 'ENABLED', - :campaign_id => campaign_id, - :bidding_strategy_configuration => { - :bids => [ - { - # The 'xsi_type' field allows you to specify the xsi:type of the - # object being created. It's only necessary when you must provide - # an explicit type that the client library can't infer. - :xsi_type => 'CpcBid', - :bid => {:micro_amount => 10000000}, - :content_bid => {:micro_amount => 2000000} - } - ] - }, - :settings => [ - # Targetting restriction settings - these setting only affect serving - # for the Display Network. - { - :xsi_type => 'TargetingSetting', - :details => [ - # Restricting to serve ads that match your ad group placements. - { - :xsi_type => 'TargetingSettingDetail', - :criterion_type_group => 'PLACEMENT', - :target_all => true - }, - # Using your ad group verticals only for bidding. - { - :xsi_type => 'TargetingSettingDetail', - :criterion_type_group => 'VERTICAL', - :target_all => false - } - ] - } - ] - }, - { - :name => 'Earth to Pluto Cruises #%d' % (Time.new.to_f * 1000).to_i, - :status => 'ENABLED', - :campaign_id => campaign_id, - :bidding_strategy_configuration => { - :bids => [ - { - # The 'xsi_type' field allows you to specify the xsi:type of the - # object being created. It's only necessary when you must provide - # an explicit type that the client library can't infer. - :xsi_type => 'CpcBid', - :bid => {:micro_amount => 10000000} - } - ] - } - } - ] - - # Prepare operations for adding ad groups. - operations = ad_groups.map do |ad_group| - {:operator => 'ADD', :operand => ad_group} - end - - # Add ad groups. - response = ad_group_srv.mutate(operations) - if response and response[:value] - response[:value].each do |ad_group| - puts "Ad group ID %d was successfully added." % ad_group[:id] - end - else - raise StandardError, 'No ad group was added' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # Campaign ID to add ad group to. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - add_ad_groups(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/add_campaigns.rb b/adwords_api/examples/v201306/basic_operations/add_campaigns.rb deleted file mode 100755 index 3a817a771..000000000 --- a/adwords_api/examples/v201306/basic_operations/add_campaigns.rb +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to create campaigns. -# -# Tags: CampaignService.mutate, BudgetService.mutate - -require 'adwords_api' -require 'date' - -def add_campaigns() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - budget_srv = adwords.service(:BudgetService, API_VERSION) - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Create a budget, which can be shared by multiple campaigns. - budget = { - :name => 'Interplanetary budget #%d' % (Time.new.to_f * 1000).to_i, - :amount => {:micro_amount => 50000000}, - :delivery_method => 'STANDARD', - :period => 'DAILY' - } - budget_operation = {:operator => 'ADD', :operand => budget} - - # Add budget. - return_budget = budget_srv.mutate([budget_operation]) - budget_id = return_budget[:value].first[:budget_id] - - # Create campaigns. - campaigns = [ - { - :name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i, - :status => 'PAUSED', - :bidding_strategy_configuration => { - :bidding_strategy_type => 'MANUAL_CPC', - # Optional: provide BiddingScheme. - :bidding_scheme => { - :xsi_type => 'ManualCpcBiddingScheme', - :enhanced_cpc_enabled => false - } - }, - # Budget (required) - note only the budget ID is required. - :budget => {:budget_id => budget_id}, - # Set the campaign network options to Search, Content and Search Network. - :network_setting => { - :target_google_search => true, - :target_search_network => true, - :target_content_network => true - }, - # Optional fields: - :start_date => - DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d'), - :ad_serving_optimization_status => 'ROTATE', - :settings => [ - { - :xsi_type => 'GeoTargetTypeSetting', - :positive_geo_target_type => 'DONT_CARE', - :negative_geo_target_type => 'DONT_CARE' - }, - { - :xsi_type => 'KeywordMatchSetting', - :opt_in => true - } - ], - :frequency_cap => { - :impressions => '5', - :time_unit => 'DAY', - :level => 'ADGROUP' - } - }, - { - :name => "Interplanetary Cruise banner #%d" % (Time.new.to_f * 1000).to_i, - :status => 'PAUSED', - :bidding_strategy_configuration => { - :bidding_strategy_type => 'MANUAL_CPC' - }, - :budget => {:budget_id => budget_id}, - :settings => [ - { - :xsi_type => 'KeywordMatchSetting', - :opt_in => true - } - ], - :network_setting => { - :target_google_search => false, - :target_search_network => false, - :target_content_network => true - } - } - ] - - # Prepare for adding campaign. - operations = campaigns.map do |campaign| - {:operator => 'ADD', :operand => campaign} - end - - # Add campaign. - response = campaign_srv.mutate(operations) - if response and response[:value] - response[:value].each do |campaign| - puts "Campaign with name '%s' and ID %d was added." % - [campaign[:name], campaign[:id]] - end - else - raise new StandardError, 'No campaigns were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - add_campaigns() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/add_keywords.rb b/adwords_api/examples/v201306/basic_operations/add_keywords.rb deleted file mode 100755 index d1f7d76ed..000000000 --- a/adwords_api/examples/v201306/basic_operations/add_keywords.rb +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to add multiple keywords to a given ad group. To -# create an ad group, run add_ad_group.rb. -# -# Tags: AdGroupCriterionService.mutate - -require 'adwords_api' - -def add_keywords(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Create keywords. - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - keywords = [ - {:xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :xsi_type => 'Keyword', - :text => 'mars cruise', - :match_type => 'BROAD' - }, - # Optional fields: - :user_status => 'PAUSED', - :destination_url => 'http://example.com/mars' - }, - {:xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :xsi_type => 'Keyword', - :text => 'space hotel', - :match_type => 'BROAD'}} - ] - - # Create 'ADD' operations. - operations = keywords.map do |keyword| - {:operator => 'ADD', :operand => keyword} - end - - # Add keywords. - response = ad_group_criterion_srv.mutate(operations) - if response and response[:value] - ad_group_criteria = response[:value] - puts "Added %d keywords to ad group ID %d:" % - [ad_group_criteria.length, ad_group_id] - ad_group_criteria.each do |ad_group_criterion| - puts "\tKeyword ID is %d and type is '%s'" % - [ad_group_criterion[:criterion][:id], - ad_group_criterion[:criterion][:type]] - end - else - raise StandardError, 'No keywords were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # Ad group ID to add keywords to. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - add_keywords(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/add_text_ads.rb b/adwords_api/examples/v201306/basic_operations/add_text_ads.rb deleted file mode 100755 index 63da42e45..000000000 --- a/adwords_api/examples/v201306/basic_operations/add_text_ads.rb +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to add text ads to a given ad group. To create an -# ad group, run add_ad_group.rb. -# -# Tags: AdGroupAdService.mutate - -require 'adwords_api' - -def add_text_ads(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Create text ads. - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - text_ads = [ - { - :xsi_type => 'TextAd', - :headline => 'Luxury Cruise to Mars', - :description1 => 'Visit the Red Planet in style.', - :description2 => 'Low-gravity fun for everyone!', - :url => 'http://www.example.com', - :display_url => 'www.example.com' - }, - { - :xsi_type => 'TextAd', - :headline => 'Luxury Cruise to Mars', - :description1 => 'Enjoy your stay at Red Planet.', - :description2 => 'Buy your tickets now!', - :url => 'http://www.example.com', - :display_url => 'www.example.com' - } - ] - - # Create ad 'ADD' operations. - text_ad_operations = text_ads.map do |text_ad| - {:operator => 'ADD', - :operand => {:ad_group_id => ad_group_id, :ad => text_ad}} - end - - # Add ads. - response = ad_group_ad_srv.mutate(text_ad_operations) - if response and response[:value] - ads = response[:value] - puts "Added %d ad(s) to ad group ID %d:" % [ads.length, ad_group_id] - ads.each do |ad| - puts "\tAd ID %d, type '%s' and status '%s'" % - [ad[:ad][:id], ad[:ad][:ad_type], ad[:status]] - end - else - raise StandardError, 'No ads were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # Ad group ID to add text ads to. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - add_text_ads(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/delete_ad.rb b/adwords_api/examples/v201306/basic_operations/delete_ad.rb deleted file mode 100755 index d8aad07a8..000000000 --- a/adwords_api/examples/v201306/basic_operations/delete_ad.rb +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example deletes an ad using the 'REMOVE' operator. To get ads, run -# get_text_ads.rb. -# -# Tags: AdGroupAdService.mutate - -require 'adwords_api' - -def delete_ad(ad_group_id, ad_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Prepare for deleting ad. - operation = { - :operator => 'REMOVE', - :operand => { - :ad_group_id => ad_group_id, - :ad => { - :xsi_type => 'Ad', - :id => ad_id - } - } - } - - # Delete ad. - response = ad_group_ad_srv.mutate([operation]) - if response and response[:value] - ad = response[:value].first - puts "Ad ID %d was successfully deleted." % ad[:ad][:id] - else - puts 'No ads were deleted.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of an ad to delete and its ad group. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - ad_id = 'INSERT_AD_ID_HERE'.to_i - delete_ad(ad_group_id, ad_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/delete_ad_group.rb b/adwords_api/examples/v201306/basic_operations/delete_ad_group.rb deleted file mode 100755 index 57fe8cc70..000000000 --- a/adwords_api/examples/v201306/basic_operations/delete_ad_group.rb +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example deletes an ad group by setting the status to 'DELETED'. To get ad -# groups, run get_ad_groups.rb. -# -# Tags: AdGroupService.mutate - -require 'adwords_api' - -def delete_ad_group(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_srv = adwords.service(:AdGroupService, API_VERSION) - - # Retrieve the ad group to obtain its name. This is optional but recommended - # to keep deleted objects searchable. In production the name is already known - # in most cases. - selector = { - :fields => ['Id', 'Name'], - :predicates => [ - {:field => 'Id', :operator => 'EQUALS', :values => [ad_group_id]} - ] - } - result = ad_group_srv.get(selector) - - if result.nil? or result[:entries].empty? - raise StandardError, "Ad group with ID %d was not found." % ad_group_id - end - - # We recommend renaming object on delete to avoid name conflicts later. - ad_group_name = result[:entries].first[:name] - ad_group_name += Time.now.strftime(" (deleted on %Y-%m-%d %H:%M:%S)") - - # Prepare for deleting ad group. - operation = { - :operator => 'SET', - :operand => { - :id => ad_group_id, - :name => ad_group_name, - :status => 'DELETED' - } - } - - # Delete ad group. - response = ad_group_srv.mutate([operation]) - if response and response[:value] - ad_group = response[:value].first - puts "Ad group ID %d was successfully deleted and renamed to '%s'." % - [ad_group[:id], ad_group[:name]] - else - puts 'No ad group was updated.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of an ad group to delete. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - delete_ad_group(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/delete_campaign.rb b/adwords_api/examples/v201306/basic_operations/delete_campaign.rb deleted file mode 100755 index f79f714ed..000000000 --- a/adwords_api/examples/v201306/basic_operations/delete_campaign.rb +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example deletes a campaign by setting the status to 'DELETED'. To get -# campaigns, run get_campaigns.rb. -# -# Tags: CampaignService.mutate - -require 'adwords_api' - -def delete_campaign(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Retrieve the campaign to obtain its name. This is optional but recommended - # to keep deleted objects searchable. In production the name is already known - # in most cases. - selector = { - :fields => ['Id', 'Name'], - :predicates => [ - {:field => 'Id', :operator => 'EQUALS', :values => [campaign_id]} - ] - } - result = campaign_srv.get(selector) - - if result.nil? or result[:entries].empty? - raise StandardError, "Campaign with ID %d was not found." % campaign_id - end - - # We recommend renaming object on delete to avoid name conflicts later. - campaign_name = result[:entries].first[:name] - campaign_name += Time.now.strftime(" (deleted on %Y-%m-%d %H:%M:%S)") - - # Prepare for deleting campaign. - operation = { - :operator => 'SET', - :operand => { - :id => campaign_id, - :name => campaign_name, - :status => 'DELETED', - } - } - - # Delete campaign. - response = campaign_srv.mutate([operation]) - - if response and response[:value] - campaign = response[:value].first - puts "Campaign ID %d was renamed to '%s' and deleted." % - [campaign[:id], campaign[:name]] - else - puts 'No campaign was updated.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of a campaign to delete. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - delete_campaign(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/delete_keyword.rb b/adwords_api/examples/v201306/basic_operations/delete_keyword.rb deleted file mode 100755 index 366facfeb..000000000 --- a/adwords_api/examples/v201306/basic_operations/delete_keyword.rb +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example deletes a keyword using the 'REMOVE' operator. To get list of -# keywords, run get_keywords.rb. -# -# Tags: AdGroupCriterionService.mutate - -require 'adwords_api' - -def delete_keyword(ad_group_id, criterion_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Prepare for deleting keyword. - operation = { - :operator => 'REMOVE', - :operand => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :id => criterion_id - } - } - } - - # Delete keyword. - response = ad_group_criterion_srv.mutate([operation]) - ad_group_criterion = response[:value].first - if ad_group_criterion - puts "Keyword ID %d was successfully deleted." % - ad_group_criterion[:criterion][:id] - else - puts 'No keywords were deleted.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of criterion to delete and its ad group. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i - delete_keyword(ad_group_id, criterion_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/get_ad_groups.rb b/adwords_api/examples/v201306/basic_operations/get_ad_groups.rb deleted file mode 100755 index 0851073b8..000000000 --- a/adwords_api/examples/v201306/basic_operations/get_ad_groups.rb +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all the ad groups for a campaign. To -# create an ad group, run add_ad_group.rb. -# -# Tags: AdGroupService.get - -require 'adwords_api' - -def get_ad_groups(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_srv = adwords.service(:AdGroupService, API_VERSION) - - # Get all the ad groups for this campaign. - selector = { - :fields => ['Id', 'Name'], - :ordering => [{:field => 'Name', :sort_order => 'ASCENDING'}], - :predicates => [ - {:field => 'CampaignId', :operator => 'IN', :values => [campaign_id]} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = ad_group_srv.get(selector) - if page[:entries] - page[:entries].each do |ad_group| - puts "Ad group name is '%s' and ID is %d" % - [ad_group[:name], ad_group[:id]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tCampaign ID %d has %d ad group(s)." % - [campaign_id, page[:total_num_entries]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - # Campaign ID to get ad groups for. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - get_ad_groups(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/get_campaigns.rb b/adwords_api/examples/v201306/basic_operations/get_campaigns.rb deleted file mode 100755 index 9cfbdd671..000000000 --- a/adwords_api/examples/v201306/basic_operations/get_campaigns.rb +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all the campaigns for an account. -# -# Tags: CampaignService.get - -require 'adwords_api' - -def get_campaigns() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Get all the campaigns for this account. - selector = { - :fields => ['Id', 'Name', 'Status'], - :ordering => [ - {:field => 'Name', :sort_order => 'ASCENDING'} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = campaign_srv.get(selector) - if page[:entries] - page[:entries].each do |campaign| - puts "Campaign ID %d, name '%s' and status '%s'" % - [campaign[:id], campaign[:name], campaign[:status]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tTotal number of campaigns found: %d." % [page[:total_num_entries]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - get_campaigns() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/get_campaigns_with_awql.rb b/adwords_api/examples/v201306/basic_operations/get_campaigns_with_awql.rb deleted file mode 100755 index 8e5703b60..000000000 --- a/adwords_api/examples/v201306/basic_operations/get_campaigns_with_awql.rb +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all the campaigns for an account with -# AWQL. -# -# Tags: CampaignService.query - -require 'adwords_api' - -def get_campaigns_with_awql() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Get all the campaigns for this account. - query = 'SELECT Id, Name, Status ORDER BY Name' - - # Set initial values. - offset, page = 0, {} - - begin - page_query = query + ' LIMIT %d,%d' % [offset, PAGE_SIZE] - page = campaign_srv.query(page_query) - if page[:entries] - page[:entries].each do |campaign| - puts "Campaign ID %d, name '%s' and status '%s'" % - [campaign[:id], campaign[:name], campaign[:status]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tTotal number of campaigns found: %d." % page[:total_num_entries] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - get_campaigns_with_awql() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts 'HTTP Error: %s' % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts 'Message: %s' % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/get_keywords.rb b/adwords_api/examples/v201306/basic_operations/get_keywords.rb deleted file mode 100755 index 8dfaf2186..000000000 --- a/adwords_api/examples/v201306/basic_operations/get_keywords.rb +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all keywords for an ad group. To add -# keywords to an existing ad group, run add_keywords.rb. -# -# Tags: AdGroupCriterionService.get - -require 'adwords_api' - -def get_keywords(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Get all keywords for this ad group. - selector = { - :fields => ['Id', 'CriteriaType', 'KeywordText'], - :ordering => [ - {:field => 'Id', :sort_order => 'ASCENDING'} - ], - :predicates => [ - {:field => 'AdGroupId', :operator => 'EQUALS', :values => [ad_group_id]}, - {:field => 'CriteriaType', :operator => 'EQUALS', :values => ['KEYWORD']} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = ad_group_criterion_srv.get(selector) - if page[:entries] - page[:entries].each do |keyword| - puts "Keyword ID %d, type '%s' and text '%s'" % - [keyword[:criterion][:id], - keyword[:criterion][:type], - keyword[:criterion][:text]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tAd group ID %d has %d keyword(s)." % - [ad_group_id, page[:total_num_entries]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - # Ad group ID to get keywords for. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - get_keywords(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/get_text_ads.rb b/adwords_api/examples/v201306/basic_operations/get_text_ads.rb deleted file mode 100755 index fe0fbd2a8..000000000 --- a/adwords_api/examples/v201306/basic_operations/get_text_ads.rb +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all text ads for an ad group. To add -# ads to an existing ad group, run add_text_ads.rb. -# -# Tags: AdGroupAdService.get - -require 'adwords_api' - -def get_text_ads(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Get all the ads for this ad group. - selector = { - :fields => ['Id', 'Status', 'AdType'], - :ordering => [{:field => 'Id', :sort_order => 'ASCENDING'}], - # By default, disabled ads aren't returned by the selector. To return them, - # include the DISABLED status in a predicate. - :predicates => [ - {:field => 'AdGroupId', :operator => 'IN', :values => [ad_group_id]}, - {:field => 'Status', - :operator => 'IN', - :values => ['ENABLED', 'PAUSED', 'DISABLED']}, - {:field => 'AdType', - :operator => 'EQUALS', - :values => ['TEXT_AD']} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = ad_group_ad_srv.get(selector) - if page[:entries] - page[:entries].each do |ad| - puts "Ad ID is %d, type is '%s' and status is '%s'" % - [ad[:ad][:id], ad[:ad][:ad_type], ad[:status]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tAd group ID %d has %d ad(s)." % - [ad_group_id, page[:total_num_entries]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - # Ad group ID to get text ads for. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - get_text_ads(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/pause_ad.rb b/adwords_api/examples/v201306/basic_operations/pause_ad.rb deleted file mode 100755 index ecf618714..000000000 --- a/adwords_api/examples/v201306/basic_operations/pause_ad.rb +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to update an ad, setting its status to 'PAUSED'. -# To create ads, run add_text_ads.rb. -# -# Tags: AdGroupAdService.mutate - -require 'adwords_api' - -def pause_ad(ad_group_id, ad_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Prepare operation for updating ad. - operation = { - :operator => 'SET', - :operand => { - :ad_group_id => ad_group_id, - :status => 'PAUSED', - :ad => {:id => ad_id} - } - } - - # Update ad. - response = ad_group_ad_srv.mutate([operation]) - if response and response[:value] - ad = response[:value].first - puts "Ad ID %d was successfully updated, status set to '%s'." % - [ad[:ad][:id], ad[:status]] - else - puts 'No ads were updated.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of ad to pause and its ad group. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - ad_id = 'INSERT_AD_ID_HERE'.to_i - pause_ad(ad_group_id, ad_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/update_ad_group.rb b/adwords_api/examples/v201306/basic_operations/update_ad_group.rb deleted file mode 100755 index 366d92c11..000000000 --- a/adwords_api/examples/v201306/basic_operations/update_ad_group.rb +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to update an ad group, setting its status to -# 'PAUSED'. To create an ad group, run add_ad_group.rb. -# -# Tags: AdGroupService.mutate - -require 'adwords_api' - -def update_ad_group(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_srv = adwords.service(:AdGroupService, API_VERSION) - - # Prepare for updating ad group. - operation = { - :operator => 'SET', - :operand => { - :status => 'PAUSED', - :id => ad_group_id - } - } - - # Update ad group. - response = ad_group_srv.mutate([operation]) - if response and response[:value] - ad_group = response[:value].first - puts 'Ad group id %d was successfully updated.' % ad_group[:id] - else - puts 'No ad groups were updated.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of an ad group to update. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - update_ad_group(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/update_campaign.rb b/adwords_api/examples/v201306/basic_operations/update_campaign.rb deleted file mode 100755 index b70a83ed4..000000000 --- a/adwords_api/examples/v201306/basic_operations/update_campaign.rb +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to update a campaign, setting its status to -# 'PAUSED'. To create a campaign, run add_campaigns.rb. -# -# Tags: CampaignService.mutate - -require 'adwords_api' - -def update_campaign(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Prepare for updating campaign. - operation = { - :operator => 'SET', - :operand => { - :id => campaign_id, - :status => 'PAUSED' - } - } - - # Update campaign. - response = campaign_srv.mutate([operation]) - if response and response[:value] - campaign = response[:value].first - puts "Campaign ID %d was successfully updated, status was set to '%s'." % - [campaign[:id], campaign[:status]] - else - puts 'No campaigns were updated.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of a campaign to update. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - update_campaign(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/basic_operations/update_keyword.rb b/adwords_api/examples/v201306/basic_operations/update_keyword.rb deleted file mode 100755 index f8848bdb4..000000000 --- a/adwords_api/examples/v201306/basic_operations/update_keyword.rb +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example updates the bid of a keyword. To create a keyword, run -# add_keywords.rb. -# -# Tags: AdGroupCriterionService.mutate - -require 'adwords_api' - -def update_keyword(ad_group_id, criterion_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Prepare for updating a keyword. - operation = { - :operator => 'SET', - :operand => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :id => criterion_id - }, - :bidding_strategy_configuration => { - :bids => [ - { - :xsi_type => 'CpcBid', - :bid => {:micro_amount => 1000000} - } - ] - } - } - } - - # Update criterion. - response = ad_group_criterion_srv.mutate([operation]) - if response and response[:value] - ad_group_criterion = response[:value].first - puts "Keyword ID %d was successfully updated, current bids are:" % - ad_group_criterion[:criterion][:id] - ad_group_criterion[:bidding_strategy_configuration][:bids].each do |bid| - puts "\tType: '%s', value: %d" % - [bid[:bids_type], bid[:bid][:micro_amount]] - end - else - puts 'No keywords were updated.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of a criterion to update and its ad group. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i - update_keyword(ad_group_id, criterion_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/add_experiment.rb b/adwords_api/examples/v201306/campaign_management/add_experiment.rb deleted file mode 100755 index 07542fff4..000000000 --- a/adwords_api/examples/v201306/campaign_management/add_experiment.rb +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example creates an experiment using a query percentage of 10, which -# defines what fraction of auctions should go to the control split (90%) vs. -# the experiment split (10%), then adds experimental bid changes for criteria -# and ad groups. To get campaigns, run get_campaigns.rb. To get ad groups, -# run get_ad_groups.rb. To get keywords, run get_keywords.rb. -# -# Tags: ExperimentService.mutate - -require 'adwords_api' -require 'date' - -def add_experiment(campaign_id, ad_group_id, criterion_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - experiment_srv = adwords.service(:ExperimentService, API_VERSION) - ad_group_srv = adwords.service(:AdGroupService, API_VERSION) - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Prepare for adding experiment. - operation = { - :operator => 'ADD', - :operand => { - :campaign_id => campaign_id, - :name => "Interplanetary Experiment #%d" % (Time.new.to_f * 1000).to_i, - :query_percentage => 10, - :start_date_time => Time.now.strftime('%Y%m%d %H%M%S'), - # Optional fields: - :status => 'ACTIVE', - :end_date_time => - DateTime.parse((Date.today + 30).to_s).strftime('%Y%m%d %H%M%S') - } - } - - # Add experiment. - response = experiment_srv.mutate([operation]) - experiment = response[:value].first - puts "Experiment with name '%s' and ID %d was added." % - [experiment[:name], experiment[:id]] - - experiment_id = experiment[:id] - - # Setup ad group for the experiment. - ad_group = { - :id => ad_group_id, - # Set experiment data for the ad group. - :experiment_data => { - :experiment_id => experiment_id, - :experiment_delta_status => 'MODIFIED', - # Bid multiplier rule that will modify ad group bid for the experiment. - :experiment_bid_multipliers => { - :xsi_type => 'ManualCPCAdGroupExperimentBidMultipliers', - :max_cpc_multiplier => { - :multiplier => 1.5 - } - } - } - } - - # Prepare for updating ad group. - operation = { - :operator => 'SET', - :operand => ad_group - } - - # Update ad group. - response = ad_group_srv.mutate([operation]) - ad_group = response[:value].first - puts "Ad group ID %d was updated for the experiment." % ad_group[:id] - - # Setup ad group criterion for the experiment. - ad_group_criterion = { - :xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :id => criterion_id - }, - # Set experiment data for the criterion. - :experiment_data => { - :xsi_type => 'BiddableAdGroupCriterionExperimentData', - :experiment_id => experiment_id, - :experiment_delta_status => 'MODIFIED', - # Bid multiplier rule that will modify criterion bid for the experiment. - :experiment_bid_multiplier => { - :xsi_type => 'ManualCPCAdGroupCriterionExperimentBidMultiplier', - :max_cpc_multiplier => { - :multiplier => 1.5 - } - } - } - } - - # Prepare for updating ad group criterion. - operation = { - :operator => 'SET', - :operand => ad_group_criterion - } - - # Update criterion. - response = ad_group_criterion_srv.mutate([operation]) - criterion = response[:value].first - puts "Criterion ID %d was successfully updated for the experiment." % - [criterion[:criterion][:id]] - -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of the required objects. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i - add_experiment(campaign_id, ad_group_id, criterion_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/add_keywords_in_bulk.rb b/adwords_api/examples/v201306/campaign_management/add_keywords_in_bulk.rb deleted file mode 100755 index d9a0e2b3c..000000000 --- a/adwords_api/examples/v201306/campaign_management/add_keywords_in_bulk.rb +++ /dev/null @@ -1,158 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This code sample illustrates how to add many keywords using asynchronous -# requests and MutateJobService. -# -# Tags: MutateJobService.mutate, MutateJobService.get -# Tags: MutateJobService.getResult - -require 'adwords_api' - -def add_keywords_in_bulk() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - mutate_job_srv = adwords.service(:MutateJobService, API_VERSION) - - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - - # Create AdGroupCriterionOperations to add keywords. - operations = (1..KEYWORD_NUMBER).map do |index| - {:xsi_type => 'AdGroupCriterionOperation', - :operator => 'ADD', - :operand => { - :xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :xsi_type => 'Keyword', - :match_type => 'BROAD', - :text => "mars%d" % index}}} - end - - # You can specify up to 3 job IDs that must successfully complete before - # this job can be processed. - policy = {:prerequisite_job_ids => []} - - # Call mutate to create a new job. - response = mutate_job_srv.mutate(operations, policy) - - raise StandardError, 'Failed to submit a job; aborting.' unless response - - job_id = response[:id] - puts "Job ID %d was successfully created." % job_id - - # Creating selector to retrive hob status and wait for it to complete. - selector = { - :xsi_type => 'BulkMutateJobSelector', - :job_ids => [job_id] - } - - status = nil - - # Poll for job status until it's finished. - puts 'Retrieving job status...' - RETRIES_COUNT.times do |retry_attempt| - job_status_response = mutate_job_srv.get(selector) - if job_status_response - status = job_status_response.first[:status] - case status - when 'FAILED' - raise StandardError, "Job failed with reason: '%s'" % - job_status_response.first[:failure_reason] - when 'COMPLETED' - puts "[%d] Job finished with status '%s'" % [retry_attempt, status] - break - else - puts "[%d] Current status is '%s', waiting %d seconds to retry..." % - [retry_attempt, status, RETRY_INTERVAL] - sleep(RETRY_INTERVAL) - end - else - raise StandardError, 'Error retrieving job status; aborting.' - end - end - - if status == 'COMPLETED' - # Get the job result. Here we re-use the same selector. - result_response = mutate_job_srv.get_result(selector) - - if result_response and result_response[:simple_mutate_result] - results = result_response[:simple_mutate_result][:results] - if results - results.each_with_index do |result, index| - result_message = result.include?(:place_holder) ? - 'FAILED' : 'SUCCEEDED' - puts "Operation [%d] - %s" % [index, result_message] - end - end - errors = result_response[:simple_mutate_result][:errors] - if errors - errors.each do |error| - puts "Error, reason: '%s', trigger: '%s', field path: '%s'" % - [error[:reason], error[:trigger], error[:field_path]] - end - end - else - raise StandardError, 'Error retrieving job results; aborting.' - end - else - puts "Job failed to complete after %d retries." % RETRY_COUNT - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - RETRY_INTERVAL = 30 - RETRIES_COUNT = 30 - KEYWORD_NUMBER = 100 - - begin - add_keywords_in_bulk() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/add_location_extension.rb b/adwords_api/examples/v201306/campaign_management/add_location_extension.rb deleted file mode 100755 index 0d5c34cb2..000000000 --- a/adwords_api/examples/v201306/campaign_management/add_location_extension.rb +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to create a location ad extension for an existing -# campaign. To create a campaign, run add_campaign.rb. -# -# Tags: GeoLocationService.get, CampaignAdExtensionService.mutate - -require 'adwords_api' - -def add_location_extension(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_ad_ext_srv = - adwords.service(:CampaignAdExtensionService, API_VERSION) - geo_location_srv = adwords.service(:GeoLocationService, API_VERSION) - - selector = { - :addresses => [ - { - :street_address => '1600 Amphitheatre Parkway', - :city_name => 'Mountain View', - :province_code => 'CA', - :postal_code => '94043', - :country_code => 'US' - }, - { - :street_address => "38 Avenue de l'Opéra", - :city_name => 'Paris', - :postal_code => '75002', - :country_code => 'FR' - } - ] - } - - # Get the geo location info for the various addresses and build a list of - # operations with that information. - locations = geo_location_srv.get(selector) - raise StandardError, 'Unable to retrieve geo locations.' if locations.nil? - - operations = locations.map do |location| - {:operator => 'ADD', - :operand => { - :campaign_id => campaign_id, - :status => 'ACTIVE', - :ad_extension => { - # The 'xsi_type' field allows you to specify the xsi:type of the - # object being created. It's only necessary when you must provide an - # explicit type that the client library can't infer. - :xsi_type => 'LocationExtension', - :address => location[:address], - :geo_point => location[:geo_point], - :encoded_location => location[:encoded_location], - :source => 'ADWORDS_FRONTEND', - # Optional fields: - #:company_name => 'ACME Inc.', - #:phone_number => '+1-650-253-0000' - } - } - } - end - - # Add location ad extensions. - response = campaign_ad_ext_srv.mutate(operations) - response[:value].each do |extension| - puts "Location extension ID %d and status '%s' successfully added." % - [extension[:ad_extension][:id], extension[:status]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of campaign to add location extension to. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - add_location_extension(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/add_location_extension_override.rb b/adwords_api/examples/v201306/campaign_management/add_location_extension_override.rb deleted file mode 100755 index ffaabc98a..000000000 --- a/adwords_api/examples/v201306/campaign_management/add_location_extension_override.rb +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates override an ad extension for a specific ad, by -# creating a location extension override. To create a campaign, run -# add_campaign.rb, to create an ad, run add_text_ads.rb. -# -# Tags: AdExtensionOverrideService.mutate - -require 'adwords_api' - -def add_location_extension_override(ad_id, location_extension_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_ext_override_srv = - adwords.service(:AdExtensionOverrideService, API_VERSION) - - # Create operation. - operation = { - :operator => 'ADD', - :operand => { - :ad_id => ad_id, - :ad_extension => { - :id => location_extension_id - } - } - } - - # Add override. - response = ad_ext_override_srv.mutate([operation]) - location_extension_override = response[:value].first - puts "Location extension override with ID %d was successfully added." % - location_extension_override[:ad_extension][:id] -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of ad and location extension override to add. - ad_id = 'INSERT_AD_ID_HERE'.to_i - location_extension_id = 'INSERT_LOCATION_EXTENSION_ID_HERE'.to_i - add_location_extension_override(ad_id, location_extension_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads.rb b/adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads.rb deleted file mode 100755 index ef015f930..000000000 --- a/adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads.rb +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all the disapproved ads in a given -# ad group. To add ads, run add_text_ads.rb. -# -# Tags: AdGroupAdService.get - -require 'adwords_api' - -def get_all_disapproved_ads(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Get all the disapproved ads for this campaign. - selector = { - :fields => ['Id', 'DisapprovalReasons'], - :ordering => [{:field => 'Id', :sort_order => 'ASCENDING'}], - :predicates => [ - {:field => 'AdGroupId', :operator => 'IN', :values => [ad_group_id]}, - { - :field => 'AdGroupCreativeApprovalStatus', - :operator => 'IN', - :values => ['DISAPPROVED'] - } - ] - } - response = ad_group_ad_srv.get(selector) - if response and response[:entries] - ad_group_ads = response[:entries] - puts "Ad group ##{ad_group_id} has #{ad_group_ads.length} " + - "disapproved ad(s)." - ad_group_ads.each do |ad_group_ad| - puts " Ad with id #{ad_group_ad[:ad][:id]} and type " + - "#{ad_group_ad[:ad][:xsi_type]} was disapproved for the following " + - "reasons:" - ad_group_ad[:ad][:disapproval_reasons].each do |reason| - puts " #{reason}" - end - end - else - puts "No disapproved ads found for ad group ##{ad_group_id}." - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of an ad group to get disapproved ads for. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - get_all_disapproved_ads(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads_with_awql.rb b/adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads_with_awql.rb deleted file mode 100755 index 4eabcb59e..000000000 --- a/adwords_api/examples/v201306/campaign_management/get_all_disapproved_ads_with_awql.rb +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all the disapproved ads in a given -# ad group with AWQL. To add ads, run add_text_ads.rb. -# -# Tags: AdGroupAdService.query - -require 'adwords_api' - -def get_all_disapproved_ads_with_awql(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Get all the disapproved ads for this campaign. - query = ('SELECT Id, DisapprovalReasons ' + - 'WHERE AdGroupId = %d AND AdGroupCreativeApprovalStatus = DISAPPROVED ' + - 'ORDER BY Id') % ad_group_id - - response = ad_group_ad_srv.query(query) - if response and response[:entries] - ad_group_ads = response[:entries] - puts 'Ad group ID %d has %d disapproved ad(s).' % - [ad_group_id, ad_group_ads.length] - ad_group_ads.each do |ad_group_ad| - puts ("\tAd with ID %d and type '%s' was disapproved for the following " + - + 'reasons:') % [ad_group_ad[:ad][:id], ad_group_ad[:ad][:xsi_type]] - ad_group_ad[:ad][:disapproval_reasons].each do |reason| - puts "\t\t%s" % reason - end - end - else - puts 'No disapproved ads found for ad group ID %d.' % ad_group_id - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of an ad group to get disapproved ads for. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - get_all_disapproved_ads_with_awql(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts 'HTTP Error: %s' % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts 'Message: %s' % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/promote_experiment.rb b/adwords_api/examples/v201306/campaign_management/promote_experiment.rb deleted file mode 100755 index b96e49bf1..000000000 --- a/adwords_api/examples/v201306/campaign_management/promote_experiment.rb +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example promotes an experiment, which permanently applies all the -# experiment changes made to its related ad groups, criteria and ads. -# -# Tags: ExperimentService.mutate - -require 'adwords_api' - -def promote_experiment(experiment_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - experiment_srv = adwords.service(:ExperimentService, API_VERSION) - - # Prepare for updating experiment. - operation = { - :operator => 'SET', - :operand => { - :id => experiment_id, - :status => 'PROMOTED', - } - } - - # Update experiment. - response = experiment_srv.mutate([operation]) - experiment = response[:value].first - puts "Experiment with name '%s' and ID %d was promoted." % - [experiment[:name], experiment[:id]] -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - experiment_id = 'INSERT_EXPERIMENT_ID_HERE'.to_i - promote_experiment(experiment_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/set_ad_parameters.rb b/adwords_api/examples/v201306/campaign_management/set_ad_parameters.rb deleted file mode 100755 index ee7355472..000000000 --- a/adwords_api/examples/v201306/campaign_management/set_ad_parameters.rb +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to create a text ad with ad parameters. To add an -# ad group, run add_ad_group.rb. To add a keyword, run add_keywords.rb. -# -# Tags: AdGroupAdService.mutate, AdParamService.mutate - -require 'adwords_api' - -def set_ad_parameters(ad_group_id, criterion_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - ad_param_srv = adwords.service(:AdParamService, API_VERSION) - - # Prepare for adding ad. - ad_operation = { - :operator => 'ADD', - :operand => { - :ad_group_id => ad_group_id, - :ad => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'TextAd', - :headline => 'Luxury Mars Cruises', - :description1 => 'Low-gravity fun for {param1:cheap}.', - :description2 => 'Only {param2:a few} seats left!', - :url => 'http://www.example.com', - :display_url => 'www.example.com' - } - } - } - - # Add ad. - response = ad_group_ad_srv.mutate([ad_operation]) - ad = response[:value].first[:ad] - puts "Text ad ID %d was successfully added." % ad[:id] - - # Prepare for setting ad parameters. - price_operation = { - :operator => 'SET', - :operand => { - :ad_group_id => ad_group_id, - :criterion_id => criterion_id, - :param_index => 1, - :insertion_text => '$100' - } - } - - seat_operation = { - :operator => 'SET', - :operand => { - :ad_group_id => ad_group_id, - :criterion_id => criterion_id, - :param_index => 2, - :insertion_text => '50' - } - } - - # Set ad parameters. - response = ad_param_srv.mutate([price_operation, seat_operation]) - puts 'Parameters were successfully updated.' -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # IDs of ad group and criterion to set ad parameter for. - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i - set_ad_parameters(ad_group_id, criterion_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/set_criterion_bid_modifier.rb b/adwords_api/examples/v201306/campaign_management/set_criterion_bid_modifier.rb deleted file mode 100755 index aef0f181a..000000000 --- a/adwords_api/examples/v201306/campaign_management/set_criterion_bid_modifier.rb +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example sets a bid modifier for the mobile platform on given campaign. -# -# NOTE: the campaign must be an enhanced type of campaign. To get campaigns, run -# get_campaigns.rb. To enhance a campaign, run set_campaign_enhanced.rb. -# -# Tags: CampaignCriterionService.mutate - -require 'adwords_api' - -def set_criterion_bid_modifier(campaign_id, bid_modifier) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_criterion_srv = - adwords.service(:CampaignCriterionService, API_VERSION) - - # Create campaign criterion with modified bid. - campaign_criterion = { - :campaign_id => campaign_id, - # Mobile platform. The ID can be found in the documentation. - # https://developers.google.com/adwords/api/docs/appendix/platforms - :criterion => { - :xsi_type => 'Platform', - :id => 30001 - }, - :bid_modifier => bid_modifier - } - - # Create operation. - operation = { - :operator => 'SET', - :operand => campaign_criterion - } - - response = campaign_criterion_srv.mutate([operation]) - - if response and response[:value] - criteria = response[:value] - criteria.each do |campaign_criterion| - criterion = campaign_criterion[:criterion] - puts ("Campaign criterion with campaign ID %d, criterion ID %d was " + - "updated with bid modifier %f.") % [campaign_criterion[:campaign_id], - criterion[:id], campaign_criterion[:bid_modifier]] - end - else - puts 'No criteria were returned.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # ID of a campaign to be updated with the enhanced value. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - - # Bid modifier to set. - bid_modifier = 1.5 - - set_criterion_bid_modifier(campaign_id, bid_modifier) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/campaign_management/validate_text_ad.rb b/adwords_api/examples/v201306/campaign_management/validate_text_ad.rb deleted file mode 100755 index 8a1ed6bdc..000000000 --- a/adwords_api/examples/v201306/campaign_management/validate_text_ad.rb +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example shows how to use the 'validate only' header. No objects will be -# created, but exceptions will still be thrown. -# -# Tags: CampaignService.mutate - -require 'adwords_api' - -def validate_text_ad(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Enable 'validate only' option. - adwords.validate_only = true - - # Prepare for adding text ad. - operation = { - :operator => 'ADD', - :operand => { - :ad_group_id => ad_group_id, - :ad => { - :xsi_type => 'TextAd', - :headline => 'Luxury Cruise to Mars', - :description1 => 'Visit the Red Planet in style.', - :description2 => 'Low-gravity fun for everyone!', - :url => 'http://www.example.com', - :display_url => 'www.example.com' - } - } - } - - # Validate text ad add operation. - response = ad_group_ad_srv.mutate([operation]) - if response and response[:value] - ad = response[:value].first - puts "Unexpected ad creation! Name '%s', ID %d and status '%s'." % - [campaign[:name], campaign[:id], campaign[:status]] - else - puts 'Text ad validated, no error thrown and no ad created.' - end - - # Now let's check an invalid ad using extra punctuation to trigger an error. - operation[:operand][:ad][:headline] = 'Luxury Cruise to Mars!!!!!' - - # Validate text ad add operation. - begin - response = ad_group_ad_srv.mutate([operation]) - if response and response[:value] - ad = response[:value].first - raise StandardError, ("Unexpected ad creation! Name '%s', ID %d and " + - "status '%s'.") % [campaign[:name], campaign[:id], campaign[:status]] - end - rescue AdwordsApi::Errors::ApiException => e - puts "Validation correctly failed with an exception: %s" % e.class - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - validate_text_ad(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/error_handling/handle_captcha_challenge.rb b/adwords_api/examples/v201306/error_handling/handle_captcha_challenge.rb deleted file mode 100755 index 2ac0ed1b0..000000000 --- a/adwords_api/examples/v201306/error_handling/handle_captcha_challenge.rb +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to handle 'CAPTCHA required' authorization -# errors. Refer to the best practices guide on how to avoid this error: -# -# http://code.google.com/apis/adwords/docs/guides/bestpractices.html#auth_tokens - -require 'adwords_api' - -def handle_captcha_challenge() - # Initialize token variable. - logintoken = nil - - # This code will repeatedly request authToken from the server until it gets - # a CAPTCHA challenge request. It is here for illustration purposes only - # and should never be used in a real application. - begin - MAX_RETRIES.times do |retry_number| - puts "Running request %d of %d..." % [retry_number + 1, MAX_RETRIES] - # Forcing library to request a new authorization token. - adwords = AdwordsApi::Api.new - auth_token = adwords.authorize() - end - # Still no challenge, make sure ClientLogin authorization is used. - raise StandardError, "Failed to get challenge after %d requests." % - MAX_RETRIES - rescue AdsCommon::Errors::CaptchaRequiredError => e - logintoken = e.captcha_token - end - - puts "CaptchaRequiredError occurred. To recover download the image and type" + - " the CAPTCHA below: %s\n" % e.captcha_url - puts 'Enter code or ENTER to retry: ' - logincaptcha = gets.chomp - - # Initialize variable for extra parameters. - credentials = {} - if logincaptcha and !logincaptcha.empty? - credentials[:logincaptcha] = logincaptcha - credentials[:logintoken] = logintoken - end - - begin - adwords = AdwordsApi::Api.new - auth_token = adwords.authorize(credentials) - puts "Successfully retrieved authToken: " + auth_token - rescue AdsCommon::Errors::CaptchaRequiredError => e - puts 'Invalid CAPTCHA text entered.' - raise e - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - MAX_RETRIES = 500 - - begin - handle_captcha_challenge() - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/error_handling/handle_partial_failures.rb b/adwords_api/examples/v201306/error_handling/handle_partial_failures.rb deleted file mode 100755 index 6c406f63a..000000000 --- a/adwords_api/examples/v201306/error_handling/handle_partial_failures.rb +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example demonstrates how to handle partial failures. -# -# Tags: AdGroupCriterionService.mutate - -require 'adwords_api' -require 'adwords_api/utils' - -def handle_partial_failures(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Set partial failures flag. - adwords.partial_failure = true - - # Create keywords. - keyword_text = ['mars cruise', 'inv@lid cruise', 'venus cruise', - 'b(a)d keyword cruise'] - keywords = [] - keyword_text.each do |text| - keyword = { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'Keyword', - :match_type => 'BROAD', - :text => text - } - keywords << keyword - end - - # Create biddable ad group criteria and operations. - operations = [] - keywords.each do |kwd| - operation = { - :operator => 'ADD', - :operand => { - :xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => kwd - } - } - operations << operation - end - - # Add criteria. - response = ad_group_criterion_srv.mutate(operations) - if response and response[:value] - ad_group_criteria = response[:value] - ad_group_criteria.each do |ad_group_criterion| - if ad_group_criterion[:criterion] - puts "Ad group criterion with ad group id " + - "#{ad_group_criterion[:ad_group_id]}, criterion id "+ - "#{ad_group_criterion[:criterion][:id]} and keyword \"" + - "#{ad_group_criterion[:criterion][:text]}\" was added." - end - end - else - puts "No criteria were added." - end - - # Check partial failures. - if response and response[:partial_failure_errors] - response[:partial_failure_errors].each do |error| - operation_index = AdwordsApi::Utils.operation_index_for_error(error) - if operation_index - ad_group_criterion = operations[operation_index][:operand] - puts "Ad group criterion with ad group id " + - "#{ad_group_criterion[:ad_group_id]} and keyword \"" + - "#{ad_group_criterion[:criterion][:text]}\" triggered an error " + - "for the following reason: \"#{error[:error_string]}\"." - end - end - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - handle_partial_failures(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/error_handling/handle_policy_violation_error.rb b/adwords_api/examples/v201306/error_handling/handle_policy_violation_error.rb deleted file mode 100755 index 6bbf25f4d..000000000 --- a/adwords_api/examples/v201306/error_handling/handle_policy_violation_error.rb +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example demonstrates how to handle policy violation errors. To create -# an ad group, run add_ad_group.rb. -# -# Tags: AdGroupAdService.mutate - -require 'adwords_api' -require 'adwords_api/utils' - -def handle_policy_violation_error(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION) - - # Create text ad. - text_ad_operation = { - :operator => 'ADD', - :operand => { - :ad_group_id => ad_group_id, - :ad => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'TextAd', - :headline => 'Mars Cruise!!!', - :description1 => 'Visit the Red Planet in style.', - :description2 => 'Low-gravity fun for everyone!', - :url => 'http://www.example.com', - :display_url => 'www.example.com', - } - } - } - - operations = [text_ad_operation] - - # Validate ad. - begin - # Enable "validate only" for the length of this block - adwords.validate_only do - ad_group_ad_srv.mutate(operations) - end - puts 'Validation successful, no errors returned.' - rescue AdwordsApi::Errors::ApiException => e - e.errors.each do |error| - if error[:xsi_type] == 'PolicyViolationError' - operation_index = AdwordsApi::Utils.operation_index_for_error(error) - operation = operations[operation_index] - puts "Ad with headline '%s' violated %s policy '%s'." % - [operation[:operand][:ad][:headline], - error[:is_exemptable] ? 'exemptable' : 'non-exemptable', - error[:external_policy_name]] - if error[:is_exemptable] - # Add exemption request to the operation. - puts "Adding exemption request for policy name '%s' on text '%s'." % - [error[:key][:policy_name], error[:key][:violating_text]] - unless operation[:exemption_requests] - operation[:exemption_requests] = [] - end - operation[:exemption_requests] << { - :key => error[:key] - } - else - # Remove non-exemptable operation - puts "Removing the operation from the request." - operations.delete(operation) - end - else - # Non-policy error returned, re-throw exception. - raise e - end - end - end - - # Add ads. - if operations.size > 0 - response = ad_group_ad_srv.mutate(operations) - if response and response[:value] - ads = response[:value] - puts "Added #{ads.length} ad(s) to ad group #{ad_group_id}." - ads.each do |ad| - puts " Ad id is #{ad[:ad][:id]}, type is #{ad[:ad][:xsi_type]} and " + - "status is \"#{ad[:status]}\"." - end - else - puts "No ads were added." - end - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i - handle_policy_violation_error(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/error_handling/handle_two_factor_authorization_error.rb b/adwords_api/examples/v201306/error_handling/handle_two_factor_authorization_error.rb deleted file mode 100755 index 5350ecb51..000000000 --- a/adwords_api/examples/v201306/error_handling/handle_two_factor_authorization_error.rb +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to handle 'two factor' authorization error. - -require 'adwords_api' - -def handle_two_factor_authorization_error() - # Set up credentials with an account that has 2Factor enabled. - config = { - :authentication => { - :method => 'ClientLogin', - :email => '2steptester@gmail.com', - :password => 'testaccount', - :user_agent => 'Ruby 2 Factor Sample', - :developer_token => 'qwerty' - }, - :service => { - :environment => 'PRODUCTION' - } - } - adwords = AdwordsApi::Api.new(config) - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - begin - # Forcing library to request authorization token. - auth_token = adwords.authorize() - puts 'Successfully retrieved the token.' - - # Second factor error is one of AuthErrors. - rescue AdsCommon::Errors::AuthError => e - puts "Authorization failed with message:" - puts "\t%s" % e.message - # Checking 'Info' field for particular auth error type. - if e.info and e.info.casecmp('InvalidSecondFactor') == 0 - puts "The user has enabled two factor authentication in this account." + - " Please use OAuth authentication method or have the user generate an" + - " application-specific password to make calls against the AdWords" + - " API. See \n" + - " http://adwordsapi.blogspot.com/2011/02/authentication-changes-with" + - "-2-step.html\n" + - "for more details." - end - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - handle_two_factor_authorization_error() - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/migration/upgrade_legacy_sitelinks.rb b/adwords_api/examples/v201306/migration/upgrade_legacy_sitelinks.rb deleted file mode 100755 index bbf4773dc..000000000 --- a/adwords_api/examples/v201306/migration/upgrade_legacy_sitelinks.rb +++ /dev/null @@ -1,313 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example migrates legacy sitelinks to upgraded sitelinks for a given list -# of campaigns. The campaigns must be upgraded to enhanced campaigns before you -# can run this example. To upgrade a campaign to enhanced, run -# set_campaign_enhanced.rb. To get all campaigns, run get_campaigns.rb. -# -# Tags: CampaignAdExtensionService.get, CampaignAdExtensionService.mutate -# Tags: FeedService.mutate, FeedItemService.mutate, FeedMappingService.mutate -# Tags: CampaignFeedService.mutate - -require 'adwords_api' - -def upgrade_legacy_sitelinks(campaign_ids) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - # Obtain the required services. - campaign_ad_extension_srv = - adwords.service(:CampaignAdExtensionService, API_VERSION) - feed_mapping_srv = adwords.service(:FeedMappingService, API_VERSION) - feed_srv = adwords.service(:FeedService, API_VERSION) - feed_item_srv = adwords.service(:FeedItemService, API_VERSION) - campaign_feed_srv = adwords.service(:CampaignFeedService, API_VERSION) - - # Try to retrieve an existing feed that has been mapped for use with - # sitelinks. If multiple such feeds exist, the first matching feed is - # retrieved. You could modify this code example to retrieve all the feeds - # and pick the appropriate feed based on user input. - site_links_feed = get_existing_feed(feed_mapping_srv) - if site_links_feed.nil? - # Create a feed for storing sitelinks. - site_links_feed = create_site_links_feed(feed_srv) - # Map the feed for using with sitelinks. - create_site_links_feed_mapping(feed_mapping_srv, site_links_feed) - end - - campaign_ids.each do |campaign_id| - # Get legacy extensions for the campaign. - legacy_extensions = get_legacy_extensions_for_campaign( - campaign_ad_extension_srv, campaign_id) - legacy_extensions.each do |extension| - # Get the sitelinks. - legacy_site_links = extension[:ad_extension][:sitelinks] - - # Add the sitelinks to the feed. - site_link_feed_item_ids = create_site_link_feed_items(feed_item_srv, - site_links_feed, - legacy_site_links) - - # Associate feeditems to the campaign. - associate_sitelink_feed_items_with_campaign(campaign_feed_srv, - site_links_feed, - site_link_feed_item_ids, - campaign_id) - - # Once the upgraded sitelinks are added to a campaign, the legacy - # sitelinks will stop serving. You can delete the legacy sitelinks - # once you have verified that the migration went fine. In case the - # migration didn't succeed, you can roll back the migration by deleting - # the campaign feed you created in the previous step. - campaign_ad_extension_srv.mutate([ - {:operator => 'REMOVE', :operand => extension} - ]) - end - end -end - -# Create a feed for holding upgraded sitelinks. -def create_site_links_feed(feed_srv) - # Create the feed. - site_links_feed = { - :name => 'Feed For Sitelinks', - :attributes => [ - {:type => 'STRING', :name => 'Link Text'}, - {:type => 'URL', :name => 'Link URL'} - ], - :origin => 'USER' - } - - # Add the feed. - response = feed_srv.mutate([ - {:operator => 'ADD', :operand => site_links_feed} - ]) - - saved_feed = response[:value].first - return { - :site_links_feed_id => saved_feed[:id], - :saved_attributes => saved_feed[:attributes], - :link_text_feed_attribute_id => saved_feed[:attributes][0][:id], - :link_url_feed_attribute_id => saved_feed[:attributes][1][:id] - } -end - -# Map the feed for use with Sitelinks. -def create_site_links_feed_mapping(feed_mapping_srv, site_links_feed) - # Map the feedAttributeIds to the fieldId constants. - link_text_field_mapping = { - :feed_attribute_id => site_links_feed[:link_text_feed_attribute_id], - :field_id => PLACEHOLDER_FIELD_SITELINK_TEXT - } - link_url_field_mapping = { - :feed_attribute_id => site_links_feed[:link_url_feed_attribute_id], - :field_id => PLACEHOLDER_FIELD_SITELINK_URL - } - - # Create the field mapping. - feed_mapping = { - :placeholder_type => PLACEHOLDER_SITELINKS, - :feed_id => site_links_feed[:site_links_feed_id], - :attribute_field_mappings => - [link_text_field_mapping, link_url_field_mapping] - } - - # Save the field mapping. - feed_mapping_srv.mutate([{:operator => 'ADD', :operand => feed_mapping}]) -end - -# Retrieves an existing feed that is mapped to hold sitelinks. The first active -# sitelinks feed is retrieved by this method. -def get_existing_feed(feed_mapping_srv) - selector = { - :fields => ['FeedId', 'FeedMappingId', 'PlaceholderType', 'Status', - 'AttributeFieldMappings'], - :predicates => [ - { - :field => 'PlaceholderType', - :operator => 'EQUALS', - :values => [PLACEHOLDER_SITELINKS] - }, - {:field => 'Status', :operator => 'EQUALS', :values => ['ACTIVE']} - ] - } - - response = feed_mapping_srv.get(selector) - if response and response[:entries] - response[:entries].each do |feed_mapping| - feed_id = feed_mapping[:feed_id] - text_attribute_id = nil - url_attribute_id = nil - feed_mapping[:attribute_field_mappings].each do |attribute_mapping| - case attribute_mapping[:field_id].to_i - when PLACEHOLDER_FIELD_SITELINK_TEXT - text_attribute_id = attribute_mapping[:feed_attribute_id] - when PLACEHOLDER_FIELD_SITELINK_URL - url_attribute_id = attribute_mapping[:feed_attribute_id] - end - end - unless feed_id.nil? or text_attribute_id.nil? or url_attribute_id.nil? - return { - :site_links_feed_id => feed_id, - :link_text_feed_attribute_id => text_attribute_id, - :link_url_feed_attribute_id => url_attribute_id - } - end - end - end - return nil -end - -# Gets legacy sitelink extensions for a campaign. -def get_legacy_extensions_for_campaign(campaign_ad_extension_srv, campaign_id) - # Create the selector. - selector = { - :fields => ['CampaignId', 'AdExtensionId', - 'Status', 'DisplayText', 'DestinationUrl'], - :predicates => [ - # Filter the results for specified campaign id. - {:field => 'CampaignId', :operator => 'EQUALS', :values => [campaign_id]}, - # Filter the results for active campaign ad extensions. You may add - # additional filtering conditions here as required. - {:field => 'Status', :operator => 'EQUALS', :values => ['ACTIVE']}, - { - :field => 'AdExtensionType', - :operator => 'EQUALS', - :values => ['SITELINKS_EXTENSION'] - } - ] - } - response = campaign_ad_extension_srv.get(selector) - return (response and response[:entries]) ? response[:entries] : [] -end - -# Adds legacy sitelinks to the sitelinks feed. -def create_site_link_feed_items(feed_item_srv, site_links_feed, site_links) - # Create operation for adding each legacy sitelink to the sitelinks feed. - feed_item_operations = site_links.map do |site_link| - { - :operator => 'ADD', - :operand => { - :feed_id => site_links_feed[:site_links_feed_id], - :attribute_values => [ - { - :feed_attribute_id => site_links_feed[:link_text_feed_attribute_id], - :string_value => site_link[:display_text] - }, - { - :feed_attribute_id => site_links_feed[:link_url_feed_attribute_id], - :string_value => site_link[:destination_url] - } - ] - } - } - end - - response = feed_item_srv.mutate(feed_item_operations); - # Retrieve the feed item ids. - site_link_feed_item_ids = response[:value].map {|item| item[:feed_item_id]} - return site_link_feed_item_ids -end - -# Associates sitelink feed items with a campaign. -def associate_sitelink_feed_items_with_campaign(campaign_feed_srv, - site_links_feed, site_link_feed_item_ids, campaign_id) - # Create a custom matching function that matches the given feed items to the - # campaign. - request_context_operand = { - :xsi_type => 'RequestContextOperand', - :context_type => 'FEED_ITEM_ID' - } - - operands = site_link_feed_item_ids.map do |feed_item_id| - { - :xsi_type => 'ConstantOperand', - :long_value => feed_item_id, - :type => 'LONG' - } - end - - function = { - :operator => 'IN', - :lhs_operand => [request_context_operand], - :rhs_operand => operands - } - - # Create upgraded sitelinks for the campaign. Use the sitelinks feed we - # created, and restrict feed items by matching function. - campaign_feed = { - :feed_id => site_links_feed[:site_links_feed_id], - :campaign_id => campaign_id, - :matching_function => function, - :placeholder_types => [PLACEHOLDER_SITELINKS] - } - - campaign_feed_srv.mutate([{:operator => 'ADD', :operand => campaign_feed}]) -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - # See the Placeholder reference page for a list of all the placeholder types - # and fields, see: - # https://developers.google.com/adwords/api/docs/appendix/placeholders - PLACEHOLDER_SITELINKS = 1 - PLACEHOLDER_FIELD_SITELINK_TEXT = 1 - PLACEHOLDER_FIELD_SITELINK_URL = 2 - - begin - # IDs of campaigns to add upgrade legacy sitelinks for. - campaign_ids = [ - 'INSERT_CAMPAIGN_ID_HERE'.to_i, - 'INSERT_CAMPAIGN_ID_HERE'.to_i - ] - - upgrade_legacy_sitelinks(campaign_ids) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/misc/get_all_images_and_videos.rb b/adwords_api/examples/v201306/misc/get_all_images_and_videos.rb deleted file mode 100755 index e426bc33a..000000000 --- a/adwords_api/examples/v201306/misc/get_all_images_and_videos.rb +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all images and videos. To upload an -# image, run upload_image.rb. To upload video, see: -# http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=39454. -# -# Tags: MediaService.get - -require 'adwords_api' - -def get_all_images_and_videos() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - media_srv = adwords.service(:MediaService, API_VERSION) - - # Get all the images and videos. - selector = { - :fields => ['MediaId', 'Height', 'Width', 'MimeType', 'Urls'], - :ordering => [ - {:field => 'MediaId', :sort_order => 'ASCENDING'} - ], - :predicates => [ - {:field => 'Type', :operator => 'IN', :values => ['IMAGE', 'VIDEO']} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = media_srv.get(selector) - if page[:entries] - page[:entries].each do |entry| - full_dimensions = entry[:dimensions]['FULL'] - puts "Entry ID %d with dimensions %dx%d and MIME type is '%s'" % - [entry[:media_id], full_dimensions[:height], - full_dimensions[:width], entry[:mime_type]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tFound %d entries." % page[:total_num_entries] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - get_all_images_and_videos() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/misc/setup_oauth2.rb b/adwords_api/examples/v201306/misc/setup_oauth2.rb deleted file mode 100755 index 09aa55e63..000000000 --- a/adwords_api/examples/v201306/misc/setup_oauth2.rb +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2013, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to set up OAuth2.0 authentication credentials. -# -# Tags: CampaignService.get - -require 'adwords_api' - -def setup_oauth2() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - # You can call authorize explicitly to obtain the access token. Otherwise, it - # will be invoked automatically on the first API call. - # There are two ways to provide verification code, first one is via the block: - token = adwords.authorize() do |auth_url| - puts "Hit Auth error, please navigate to URL:\n\t%s" % auth_url - print 'log in and type the verification code: ' - verification_code = gets.chomp - verification_code - end - if token - print "\nWould you like to update your adwords_api.yml to save " + - "OAuth2 credentials? (y/N): " - response = gets.chomp - if ('y'.casecmp(response) == 0) or ('yes'.casecmp(response) == 0) - adwords.save_oauth2_token(token) - puts 'OAuth2 token is now saved to ~/adwords_api.yml and will be ' + - 'automatically used by the library.' - end - end - - # Alternatively, you can provide one within the parameters: - # token = adwords.authorize({:oauth2_verification_code => verification_code}) - - # Note, 'token' is a Hash. Its value is not used in this example. If you need - # to be able to access the API in offline mode, with no user present, you - # should persist it to be used in subsequent invocations like this: - # adwords.authorize({:oauth2_token => token}) - - # No exception thrown - we are good to make a request. -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - setup_oauth2() - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/misc/upload_image.rb b/adwords_api/examples/v201306/misc/upload_image.rb deleted file mode 100755 index 3788c9e3f..000000000 --- a/adwords_api/examples/v201306/misc/upload_image.rb +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example uploads an image. To get images, run get_all_images.rb. -# -# Tags: MediaService.upload - -require 'adwords_api' -require 'base64' - -def upload_image() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - media_srv = adwords.service(:MediaService, API_VERSION) - - # Create image. - image_url = - 'http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg' - # This utility method retrieves the contents of a URL using all of the config - # options provided to the Api object. - image_data = AdsCommon::Http.get(image_url, adwords.config) - base64_image_data = Base64.encode64(image_data) - image = { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'Image', - :data => base64_image_data, - :type => 'IMAGE' - } - - # Upload image. - response = media_srv.upload([image]) - if response and !response.empty? - ret_image = response.first - full_dimensions = ret_image[:dimensions]['FULL'] - puts ("Image with ID %d, dimensions %dx%d and MIME type '%s' uploaded " + - "successfully.") % [ret_image[:media_id], full_dimensions[:height], - full_dimensions[:width], ret_image[:mime_type]] - else - puts 'No images uploaded.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - upload_image() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/misc/use_oauth2_jwt.rb b/adwords_api/examples/v201306/misc/use_oauth2_jwt.rb deleted file mode 100755 index 1d91bf134..000000000 --- a/adwords_api/examples/v201306/misc/use_oauth2_jwt.rb +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to use OAuth2.0 authentication method with -# Service Account (JWT). For this example to work, your Service Account must be -# a Google Apps for Business Account. -# -# See https://developers.google.com/adwords/api/docs/guides/service-accounts -# for more information. -# -# Tags: CampaignService.get - -require 'adwords_api' - -def use_oauth2_jwt() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - # Option 1: provide key filename as authentication -> oauth2_keyfile in the - # configuration file. No additional code is necessary. - # To provide a file name at runtime, use authorize: - # adwords.authorize({:oauth2_keyfile => key_filename}) - - # Option 2: retrieve key manually and create OpenSSL::PKCS12 object. - # key_filename = 'INSERT_FILENAME_HERE' - # key_secret = 'INSERT_SECRET_HERE' - # key_file_data = File.read(key_filename) - # key = OpenSSL::PKCS12.new(key_file_data, key_secret).key - # adwords.authorize({:oauth2_key => key}) - - # Now you can make API calls. - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Get all the campaigns for this account; empty selector. - selector = { - :fields => ['Id', 'Name', 'Status'], - :ordering => [ - {:field => 'Name', :sort_order => 'ASCENDING'} - ] - } - - response = campaign_srv.get(selector) - if response and response[:entries] - campaigns = response[:entries] - campaigns.each do |campaign| - puts "Campaign ID %d, name '%s' and status '%s'" % - [campaign[:id], campaign[:name], campaign[:status]] - end - else - puts 'No campaigns were found.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - use_oauth2_jwt() - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/optimization/estimate_keyword_traffic.rb b/adwords_api/examples/v201306/optimization/estimate_keyword_traffic.rb deleted file mode 100755 index 20f4c14aa..000000000 --- a/adwords_api/examples/v201306/optimization/estimate_keyword_traffic.rb +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets keyword traffic estimates. -# -# Tags: TrafficEstimatorService.get - -require 'adwords_api' - -def estimate_keyword_traffic() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - traffic_estimator_srv = adwords.service(:TrafficEstimatorService, API_VERSION) - - # Create keywords. Up to 2000 keywords can be passed in a single request. - keywords = [ - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - {:xsi_type => 'Keyword', :text => 'mars cruise', :match_type => 'BROAD'}, - {:xsi_type => 'Keyword', :text => 'cheap cruise', :match_type => 'PHRASE'}, - {:xsi_type => 'Keyword', :text => 'cruise', :match_type => 'EXACT'}, - {:xsi_type => 'Keyword', :text => 'moon walk', :match_type => 'BROAD'} - ] - - # Create a keyword estimate request for each keyword. - keyword_requests = keywords.map {|keyword| {:keyword => keyword}} - - # Negative keywords don't return estimates, but adjust the estimates of the - # other keywords in the hypothetical ad group. To specify a negative keyword - # set the is_negative field to true. - keyword_requests[3][:is_negative] = true - - # Create ad group estimate requests. - ad_group_request = { - :keyword_estimate_requests => keyword_requests, - :max_cpc => { - :micro_amount => 1000000 - } - } - - # Create campaign estimate requests. - campaign_request = { - :ad_group_estimate_requests => [ad_group_request], - # Set targeting criteria. Only locations and languages are supported. - :criteria => [ - {:xsi_type => 'Location', :id => 2840}, # United States - {:xsi_type => 'Language', :id => 1000} # English - ] - } - - # Create selector and retrieve reults. - selector = {:campaign_estimate_requests => [campaign_request]} - response = traffic_estimator_srv.get(selector) - - if response and response[:campaign_estimates] - campaign_estimates = response[:campaign_estimates] - keyword_estimates = - campaign_estimates.first[:ad_group_estimates].first[:keyword_estimates] - keyword_estimates.each_with_index do |estimate, index| - keyword = keyword_requests[index][:keyword] - - # Find the mean of the min and max values. - mean_avg_cpc = (estimate[:min][:average_cpc][:micro_amount] + - estimate[:max][:average_cpc][:micro_amount]) / 2 - mean_avg_position = (estimate[:min][:average_position] + - estimate[:max][:average_position]) / 2 - mean_clicks = (estimate[:min][:clicks_per_day] + - estimate[:max][:clicks_per_day]) / 2 - mean_total_cost = (estimate[:min][:total_cost][:micro_amount] + - estimate[:max][:total_cost][:micro_amount]) / 2 - - puts "Results for the keyword with text '%s' and match type %s:" % - [keyword[:text], keyword[:match_type]] - puts "\tEstimated average CPC: %d" % mean_avg_cpc - puts "\tEstimated ad position: %.2f" % mean_avg_position - puts "\tEstimated daily clicks: %d" % mean_clicks - puts "\tEstimated daily cost: %d" % mean_total_cost - end - else - puts 'No traffic estimates were returned.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - estimate_keyword_traffic() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/optimization/get_keyword_bid_simulations.rb b/adwords_api/examples/v201306/optimization/get_keyword_bid_simulations.rb deleted file mode 100755 index 2ced7e8d3..000000000 --- a/adwords_api/examples/v201306/optimization/get_keyword_bid_simulations.rb +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets bid landscapes for a keyword. To get keywords, run -# get_keywords.rb. -# -# Tags: DataService.getCriterionBidLandscape - -require 'adwords_api' - -def get_criterion_bid_landscapes(ad_group_id, keyword_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - data_srv = adwords.service(:DataService, API_VERSION) - - # Get keyword bid landscape. - selector = { - :fields => ['AdGroupId', 'CriterionId', 'StartDate', 'EndDate', 'Bid', - 'LocalClicks', 'LocalCost', 'MarginalCpc', 'LocalImpressions'], - :predicates => [ - {:field => 'AdGroupId', :operator => 'IN', :values => [ad_group_id]}, - {:field => 'CriterionId', :operator => 'IN', :values => [keyword_id]}, - ] - } - page = data_srv.get_criterion_bid_landscape(selector) - if page and page[:entries] - puts "Bid landscape(s) retrieved: %d." % [page[:entries].length] - page[:entries].each do |bid_landscape| - puts ("Retrieved keyword bid landscape with ad group ID %d" + - ", keyword ID %d, start date '%s', end date '%s'" + - ", with landscape points:") % - [bid_landscape[:ad_group_id], bid_landscape[:criterion_id], - bid_landscape[:start_date], bid_landscape[:end_date]] - bid_landscape[:landscape_points].each do |point| - puts "\t%d => clicks: %d, cost: %d, marginalCpc: %d, impressions: %d" % - [point[:bid][:micro_amount], point.clicks, - point[:cost][:micro_amount], point[:marginal_cpc][:micro_amount], - point[:impressions]] - end - end - else - puts 'No bid landscapes retrieved.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - ad_group_id = 'INSERT_ADGROUP_ID_HERE'.to_i - keyword_id = 'INSERT_KEYWORD_ID_HERE'.to_i - get_criterion_bid_landscapes(ad_group_id, keyword_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/optimization/get_keyword_ideas.rb b/adwords_api/examples/v201306/optimization/get_keyword_ideas.rb deleted file mode 100755 index 534624d55..000000000 --- a/adwords_api/examples/v201306/optimization/get_keyword_ideas.rb +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example retrieves keywords that are related to a given keyword. -# -# Tags: TargetingIdeaService.get - -require 'adwords_api' - -def get_keyword_ideas(keyword_text) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - targeting_idea_srv = adwords.service(:TargetingIdeaService, API_VERSION) - - # Construct selector object. - selector = { - :idea_type => 'KEYWORD', - :request_type => 'IDEAS', - :requested_attribute_types => - ['KEYWORD_TEXT', 'SEARCH_VOLUME', 'CATEGORY_PRODUCTS_AND_SERVICES'], - :search_parameters => [ - { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'RelatedToQuerySearchParameter', - :queries => [keyword_text] - }, - { - # Language setting (optional). - # The ID can be found in the documentation: - # https://developers.google.com/adwords/api/docs/appendix/languagecodes - # Only one LanguageSearchParameter is allowed per request. - :xsi_type => 'LanguageSearchParameter', - :languages => [{:id => 1000}] - } - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Define initial values. - offset = 0 - results = [] - - begin - # Perform request. - page = targeting_idea_srv.get(selector) - results += page[:entries] if page and page[:entries] - - # Prepare next page request. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end while offset < page[:total_num_entries] - - # Display results. - results.each do |result| - data = result[:data] - keyword = data['KEYWORD_TEXT'][:value] - puts "Found keyword with text '%s'" % keyword - products_and_services = data['CATEGORY_PRODUCTS_AND_SERVICES'][:value] - if products_and_services - puts "\tWith Products and Services categories: [%s]" % - products_and_services.join(', ') - end - average_monthly_searches = data['SEARCH_VOLUME'][:value] - if average_monthly_searches - puts "\tand average monthly search volume: %d" % average_monthly_searches - end - end - puts "Total keywords related to '%s': %d." % [keyword_text, results.length] -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 100 - - begin - keyword_text = 'INSERT_KEYWORD_TEXT_HERE' - get_keyword_ideas(keyword_text) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/optimization/get_placement_ideas.rb b/adwords_api/examples/v201306/optimization/get_placement_ideas.rb deleted file mode 100755 index 73680ce01..000000000 --- a/adwords_api/examples/v201306/optimization/get_placement_ideas.rb +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example retrieves URLs that have content keywords related to a given -# website. -# -# Tags: TargetingIdeaService.get - -require 'adwords_api' - -def get_placement_ideas(url) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - targeting_idea_srv = adwords.service(:TargetingIdeaService, API_VERSION) - - # Construct selector. - selector = { - :idea_type => 'PLACEMENT', - :request_type => 'IDEAS', - :requested_attribute_types => ['CRITERION'], - :search_parameters => [{ - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'RelatedToUrlSearchParameter', - :urls => [url], - :include_sub_urls => false - }], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Define initial values. - offset = 0 - results = [] - - begin - # Perform request. - page = targeting_idea_srv.get(selector) - results += page[:entries] if page and page[:entries] - - # Prepare next page request. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end while offset < page[:total_num_entries] - - # Display results. - results.each do |result| - placement = result[:data]['CRITERION'][:value] - puts "Related placement found at URL [%s]" % placement[:url] - end - puts "Total URLs found with keywords related to keywords at [%s]: %d." % - [url, results.length] -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 100 - - begin - url = 'INSERT_PLACEMENT_URL_HERE' - get_placement_ideas(url) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/remarketing/add_audience.rb b/adwords_api/examples/v201306/remarketing/add_audience.rb deleted file mode 100755 index e77d61fb5..000000000 --- a/adwords_api/examples/v201306/remarketing/add_audience.rb +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to create a user list (a.k.a. Audience) and shows -# its associated conversion tracker code snippet. -# -# Tags: UserListService.mutate, ConversionTrackerService.get - -require 'adwords_api' - -def add_audience() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - user_list_srv = adwords.service(:AdwordsUserListService, API_VERSION) - conv_tracker_srv = adwords.service(:ConversionTrackerService, API_VERSION) - - # Prepare for adding remarketing user list. - name = "Mars cruise customers #%d" % (Time.new.to_f * 1000).to_i - operation = { - :operator => 'ADD', - :operand => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'BasicUserList', - :name => name, - :description => 'A list of mars cruise customers in the last year', - :status => 'OPEN', - :membership_life_span => 365, - :conversion_types => [{:name => name}], - # Optional field. - :status => 'OPEN' - } - } - - # Add user list. - response = user_list_srv.mutate([operation]) - if response and response[:value] - user_list = response[:value].first - - # Get conversion snippets. - if user_list and user_list[:conversion_types] - conversion_ids = user_list[:conversion_types].map {|type| type[:id]} - selector = { - # We're actually interested in the 'Snippet' field, which is returned - # automatically. - :fields => ['Id'], - :predicates => [ - {:field => 'Id', :operator => 'IN', :values => conversion_ids} - ] - } - conv_tracker_response = conv_tracker_srv.get(selector) - if conv_tracker_response and conv_tracker_response[:entries] - conversions = conv_tracker_response[:entries] - end - end - puts "User list with name '%s' and ID %d was added." % - [user_list[:name], user_list[:id]] - # Display user list associated conversion code snippets. - if conversions - conversions.each do |conversion| - puts "Conversion type code snipped associated to the list:\n\t\t%s\n" % - conversion[:snippet] - end - end - else - puts 'No user lists were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - add_audience() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/remarketing/add_conversion_tracker.rb b/adwords_api/examples/v201306/remarketing/add_conversion_tracker.rb deleted file mode 100755 index 4726927b0..000000000 --- a/adwords_api/examples/v201306/remarketing/add_conversion_tracker.rb +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to add an AdWords conversion tracker. -# -# Tags: ConversionTrackerService.mutate - -require 'adwords_api' - -def add_conversion_tracker() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - conv_tracker_srv = adwords.service(:ConversionTrackerService, API_VERSION) - - # Prepare for adding conversion. - operation = { - :operator => 'ADD', - :operand => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'AdWordsConversionTracker', - :name => "Earth to Mars Cruises Conversion #%d" % - (Time.new.to_f * 1000).to_i, - :category => 'DEFAULT', - :markup_language => 'HTML', - :text_format => 'HIDDEN', - # Optional fields: - :status => 'ENABLED', - :viewthrough_lookback_window => 15, - :viewthrough_conversion_de_dup_search => true, - :is_product_ads_chargeable => true, - :product_ads_chargeable_conversion_window => 15, - :conversion_page_language => 'en', - :background_color => '#0000FF', - :user_revenue_value => 'someJavascriptVariable' - } - } - - # Add conversion. - response = conv_tracker_srv.mutate([operation]) - if response and response[:value] - conversion = response[:value].first - puts ("Conversion with ID %d, name '%s', status '%s' and category '%s'" + - " was added.") % [conversion[:id], conversion[:name], - conversion[:status], conversion[:category]] - else - puts 'No conversions were added.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - add_conversion_tracker() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/reporting/download_criteria_report.rb b/adwords_api/examples/v201306/reporting/download_criteria_report.rb deleted file mode 100755 index e044f618c..000000000 --- a/adwords_api/examples/v201306/reporting/download_criteria_report.rb +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets and downloads an Ad Hoc report from a XML report definition. - -require 'adwords_api' - -def download_criteria_report(file_name) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - # Get report utilities for the version. - report_utils = adwords.report_utils(API_VERSION) - - # Define report definition. You can also pass your own XML text as a string. - report_definition = { - :selector => { - :fields => ['CampaignId', 'AdGroupId', 'Id', 'Criteria', 'CriteriaType', - 'Impressions', 'Clicks', 'Cost'], - # Predicates are optional. - :predicates => { - :field => 'Status', - :operator => 'IN', - :values => ['ACTIVE', 'PAUSED'] - } - }, - :report_name => 'Last 7 days CRITERIA_PERFORMANCE_REPORT', - :report_type => 'CRITERIA_PERFORMANCE_REPORT', - :download_format => 'CSV', - :date_range_type => 'LAST_7_DAYS', - # Enable to get rows with zero impressions. - :include_zero_impressions => false - } - - # Download report, using "download_report_as_file" utility method. - # To retrieve the report as return value, use "download_report" method. - report_utils.download_report_as_file(report_definition, file_name) - puts "Report was downloaded to '%s'." % file_name -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # File name to write report to. - file_name = 'INSERT_OUTPUT_FILE_NAME_HERE' - download_criteria_report(file_name) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ReportError => e - puts "Reporting Error: %s" % e.message - end -end diff --git a/adwords_api/examples/v201306/reporting/download_criteria_report_with_awql.rb b/adwords_api/examples/v201306/reporting/download_criteria_report_with_awql.rb deleted file mode 100755 index f1c5644e6..000000000 --- a/adwords_api/examples/v201306/reporting/download_criteria_report_with_awql.rb +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets an Ad Hoc report using AdWords Query Language. -# See AWQL guide for more details: -# https://developers.google.com/adwords/api/docs/guides/awql - -require 'date' - -require 'adwords_api' - -def download_criteria_report_with_awql(file_name, report_format) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - # Get report utilities for the version. - report_utils = adwords.report_utils(API_VERSION) - - # Prepare a date range for the last week. Instead you can use 'LAST_7_DAYS'. - date_range = '%s,%s' % [ - DateTime.parse((Date.today - 7).to_s).strftime('%Y%m%d'), - DateTime.parse((Date.today - 1).to_s).strftime('%Y%m%d') - ] - - # Define report definition. You can also pass your own XML text as a string. - report_query = 'SELECT CampaignId, AdGroupId, Id, Criteria, CriteriaType, ' + - 'Impressions, Clicks, Cost FROM CRITERIA_PERFORMANCE_REPORT ' + - 'WHERE Status IN [ACTIVE, PAUSED] ' + - 'DURING %s' % date_range - - # Download report, using "download_report_as_file_with_awql" utility method. - # To retrieve the report as return value, use "download_report_with_awql" - # method. - report_utils.download_report_as_file_with_awql(report_query, report_format, - file_name) - puts "Report was downloaded to '%s'." % file_name -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - # File name to write report to. - file_name = 'INSERT_OUTPUT_FILE_NAME_HERE' - report_format = 'CSV' - download_criteria_report_with_awql(file_name, report_format) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts 'HTTP Error: %s' % e - - # API errors. - rescue AdwordsApi::Errors::ReportError => e - puts 'Reporting Error: %s' % e.message - end -end diff --git a/adwords_api/examples/v201306/reporting/get_campaign_stats.rb b/adwords_api/examples/v201306/reporting/get_campaign_stats.rb deleted file mode 100755 index 173a1fd0a..000000000 --- a/adwords_api/examples/v201306/reporting/get_campaign_stats.rb +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets various statistics for campaigns that received at least one -# impression during the last week. To get campaigns, run get_campaigns.rb. -# -# Tags: CampaignService.get - -require 'adwords_api' -require 'date' - -def get_campaign_stats() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_srv = adwords.service(:CampaignService, API_VERSION) - - # Prepare start and end date for the last week. - start_date = DateTime.parse((Date.today - 7).to_s).strftime("%Y%m%d") - end_date = DateTime.parse((Date.today - 1).to_s).strftime("%Y%m%d") - - # Get all the campaigns for this account. - selector = { - :fields => ['Id', 'Name', 'Impressions', 'Clicks', 'Cost', 'Ctr'], - :predicates => [ - {:field => 'Impressions', :operator => 'GREATER_THAN', :values => [0]} - ], - :date_range => {:min => start_date, :max => end_date}, - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = campaign_srv.get(selector) - if page[:entries] - page[:entries].each do |campaign| - puts ("Campaign with ID %d, name '%s' had the following stats during" + - " the last week: ") % [campaign[:id], campaign[:name]] - stats = campaign[:campaign_stats] - puts "\tImpressions: %d" % stats[:impressions] - puts "\tClicks: %d" % stats[:clicks] - puts "\tCost: %.2f" % (stats[:cost][:micro_amount] / 1000000) - puts "\tCTR: %.2f%%" % (stats[:ctr] * 100) - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "Total number of campaigns found: %d." % [page[:total_num_entries]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - get_campaign_stats() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/reporting/get_report_fields.rb b/adwords_api/examples/v201306/reporting/get_report_fields.rb deleted file mode 100755 index c4c9cc594..000000000 --- a/adwords_api/examples/v201306/reporting/get_report_fields.rb +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.sgomes@gmail.com (Sérgio Gomes) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets the list of possible report fields for a report type. -# -# Tags: ReportDefinitionService.getReportFields - -require 'adwords_api' - -def get_report_fields(report_type) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - report_def_srv = adwords.service(:ReportDefinitionService, API_VERSION) - - # Get report fields. - fields = report_def_srv.get_report_fields(report_type) - if fields - puts "Report type '%s' contains the following fields:" % report_type - fields.each do |field| - puts ' - %s (%s)' % [field[:field_name], field[:field_type]] - puts ' := [%s]' % field[:enum_values].join(', ') if field[:enum_values] - end - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - report_type = 'INSERT_REPORT_TYPE_HERE' - get_report_fields(report_type) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/reporting/parallel_report_download.rb b/adwords_api/examples/v201306/reporting/parallel_report_download.rb deleted file mode 100755 index 4c7b4556b..000000000 --- a/adwords_api/examples/v201306/reporting/parallel_report_download.rb +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets and downloads an Ad Hoc report from a XML report definition -# for all accounts in hierarchy in multiple parallel threads. -# -# Note: This code example uses MCC-level calls and won't work with Test -# Accounts, see: https://developers.google.com/adwords/api/docs/test-accounts - -require 'thread' - -require 'adwords_api' -require 'adwords_api/utils' - -def parallel_report_download() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - # Determine list of customer IDs to retrieve report for. For this example we - # will use ManagedCustomerService to get all IDs in hierarchy. - - managed_customer_srv = adwords.service(:ManagedCustomerService, API_VERSION) - - # Get the account hierarchy for this account. - selector = {:fields => ['CustomerId']} - - # Run the request at the MCC level. - graph = adwords.use_mcc() {managed_customer_srv.get(selector)} - - # Using queue to balance load between threads. - queue = Queue.new() - - if graph and graph[:entries] and !graph[:entries].empty? - graph[:entries].each {|account| queue << account[:customer_id]} - else - raise StandardError, 'Can not retrieve any customer ID' - end - - # Get report utilities for the version. - report_utils = adwords.report_utils(API_VERSION) - - # Define report definition. You can also pass your own XML text as a string. - report_definition = { - :selector => { - :fields => ['CampaignId', 'Id', 'Impressions', 'Clicks', 'Cost'], - # Predicates are optional. - :predicates => { - :field => 'Status', - :operator => 'IN', - :values => ['ENABLED', 'PAUSED'] - } - }, - :report_name => 'Custom ADGROUP_PERFORMANCE_REPORT', - :report_type => 'ADGROUP_PERFORMANCE_REPORT', - :download_format => 'CSV', - :date_range_type => 'LAST_7_DAYS', - # Enable to get rows with zero impressions. - :include_zero_impressions => false - } - - puts 'Retrieving %d reports with %d threads:' % [queue.size, THREADS] - - reports_succeeded = Queue.new() - reports_failed = Queue.new() - - # Creating a mutex to control access to the queue. - queue_mutex = Mutex.new - - # Start all the threads. - threads = (1..THREADS).map do |thread_id| - Thread.new(report_definition) do |local_def| - cid = nil - begin - cid = queue_mutex.synchronize {(queue.empty?) ? nil : queue.pop(true)} - if cid - retry_count = 0 - file_name = 'adgroup_%010d.csv' % cid - puts "[%2d/%d] Loading report for customer ID %s into '%s'..." % - [thread_id, retry_count, - AdwordsApi::Utils.format_id(cid), file_name] - begin - report_utils.download_report_as_file(local_def, file_name, cid) - reports_succeeded << {:cid => cid, :file_name => file_name} - rescue AdwordsApi::Errors::ReportError => e - if e.http_code == 500 && retry_count < MAX_RETRIES - retry_count += 1 - sleep(retry_count * BACKOFF_FACTOR) - retry - else - puts(('Report failed for customer ID %s with code %d after %d ' + - 'retries.') % [cid, e.http_code, retry_count + 1]) - reports_failed << - {:cid => cid, :http_code => e.http_code, :message => e.message} - end - end - end - end while (cid != nil) - end - end - - # Wait for all threads to finish. - threads.each { |aThread| aThread.join } - - puts 'Download completed, results:' - puts 'Successful reports:' - while !reports_succeeded.empty? do - result = reports_succeeded.pop() - puts "\tClient ID %s => '%s'" % - [AdwordsApi::Utils.format_id(result[:cid]), result[:file_name]] - end - puts 'Failed reports:' - while !reports_failed.empty? do - result = reports_failed.pop() - puts "\tClient ID %s => Code: %d, Message: '%s'" % - [AdwordsApi::Utils.format_id(result[:cid]), - result[:http_code], result[:message]] - end - puts 'End of results.' -end - -if __FILE__ == $0 - API_VERSION = :v201306 - # Number of parallel threads to spawn. - THREADS = 10 - # Maximum number of retries for 500 errors. - MAX_RETRIES = 5 - # Timeout between retries in seconds. - BACKOFF_FACTOR = 5 - - begin - parallel_report_download() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts 'HTTP Error: %s' % e - - # API errors. - rescue AdwordsApi::Errors::ReportError => e - puts 'Reporting Error: %s' % e.message - end -end diff --git a/adwords_api/examples/v201306/targeting/add_campaign_targeting_criteria.rb b/adwords_api/examples/v201306/targeting/add_campaign_targeting_criteria.rb deleted file mode 100755 index 2d773a4a4..000000000 --- a/adwords_api/examples/v201306/targeting/add_campaign_targeting_criteria.rb +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example adds various types of targeting criteria to a campaign. To get -# campaigns list, run get_campaigns.rb. -# -# Tags: CampaignCriterionService.mutate - -require 'adwords_api' - -def add_campaign_targeting_criteria(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_criterion_srv = - adwords.service(:CampaignCriterionService, API_VERSION) - - # Create campaign criteria. - campaign_criteria = [ - # Location criteria. The IDs can be found in the documentation or retrieved - # with the LocationCriterionService. - {:xsi_type => 'Location', :id => 21137}, # California, USA - {:xsi_type => 'Location', :id => 2484}, # Mexico - # Language criteria. The IDs can be found in the documentation or retrieved - # with the ConstantDataService. - {:xsi_type => 'Language', :id => 1000}, # English - {:xsi_type => 'Language', :id => 1003} # Spanish - ] - - # Create operations. - operations = campaign_criteria.map do |criterion| - {:operator => 'ADD', - :operand => { - :campaign_id => campaign_id, - :criterion => criterion} - } - end - - # Add negative campaign criterion. - operations << { - :operator => 'ADD', - :operand => { - # The 'xsi_type' field allows you to specify the xsi:type of the object - # being created. It's only necessary when you must provide an explicit - # type that the client library can't infer. - :xsi_type => 'NegativeCampaignCriterion', - :campaign_id => campaign_id, - :criterion => { - :xsi_type => 'Keyword', - :text => 'jupiter cruise', - :match_type => 'BROAD' - } - } - } - - response = campaign_criterion_srv.mutate(operations) - - if response and response[:value] - criteria = response[:value] - criteria.each do |campaign_criterion| - criterion = campaign_criterion[:criterion] - puts ("Campaign criterion with campaign ID %d, criterion ID %d and " + - "type '%s' was added.") % [campaign_criterion[:campaign_id], - criterion[:id], criterion[:criterion_type]] - end - else - puts 'No criteria were returned.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - campaign_id = 'INSERT_CAMPAIGN_ID_HERE' - add_campaign_targeting_criteria(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/targeting/add_demographic_targeting_criteria.rb b/adwords_api/examples/v201306/targeting/add_demographic_targeting_criteria.rb deleted file mode 100755 index 82e5d15f1..000000000 --- a/adwords_api/examples/v201306/targeting/add_demographic_targeting_criteria.rb +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example adds demographic criteria to an ad group. To get ad groups list, -# run get_ad_groups.rb. -# -# Tags: AdGroupCriterionService.mutate - -require 'adwords_api' - -def add_demographic_targeting_criteria(ad_group_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - ad_group_criterion_srv = - adwords.service(:AdGroupCriterionService, API_VERSION) - - # Create ad group criteria. - ad_group_criteria = [ - # Targeting criterion. - { - :xsi_type => 'BiddableAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :xsi_type => 'Gender', - # See system codes section for IDs: - # https://developers.google.com/adwords/api/docs/appendix/genders - :id => 11 - } - }, - # Exclusion criterion. - { - :xsi_type => 'NegativeAdGroupCriterion', - :ad_group_id => ad_group_id, - :criterion => { - :xsi_type => 'AgeRange', - # See system codes section for IDs: - # https://developers.google.com/adwords/api/docs/appendix/ages - :id => 503999 - } - } - ] - - # Create operations. - operations = ad_group_criteria.map do |criterion| - {:operator => 'ADD', :operand => criterion} - end - - response = ad_group_criterion_srv.mutate(operations) - - if response and response[:value] - criteria = response[:value] - criteria.each do |ad_group_criterion| - criterion = ad_group_criterion[:criterion] - puts ("Ad group criterion with ad group ID %d, criterion ID %d and " + - "type '%s' was added.") % [ad_group_criterion[:ad_group_id], - criterion[:id], criterion[:criterion_type]] - end - else - puts 'No criteria were returned.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - ad_group_id = 'INSERT_AD_GROUP_ID_HERE' - add_demographic_targeting_criteria(ad_group_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/targeting/get_campaign_targeting_criteria.rb b/adwords_api/examples/v201306/targeting/get_campaign_targeting_criteria.rb deleted file mode 100755 index ba4b6b0d8..000000000 --- a/adwords_api/examples/v201306/targeting/get_campaign_targeting_criteria.rb +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all the campaign targets. To set -# campaign targets, run add_campaign_targeting_criteria.rb. -# -# Tags: CampaignCriterionService.get - -require 'adwords_api' - -def get_campaign_targeting_criteria(campaign_id) - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - campaign_criterion_srv = - adwords.service(:CampaignCriterionService, API_VERSION) - - # Selector to get all the targeting for this campaign. - selector = { - :fields => ['Id', 'CriteriaType', 'KeywordText'], - :predicates => [ - {:field => 'CampaignId', :operator => 'EQUALS', :values => [campaign_id]} - ], - :paging => { - :start_index => 0, - :number_results => PAGE_SIZE - } - } - - # Set initial values. - offset, page = 0, {} - - begin - page = campaign_criterion_srv.get(selector) - if page[:entries] - page[:entries].each do |typed_criterion| - negative = typed_criterion[:xsi_type] == 'NegativeCampaignCriterion' ? - ' (negative)' : '' - criterion = typed_criterion[:criterion] - puts ("Campaign criterion%s with ID %d, type '%s' and text '%s'" + - " was found.") % - [negative, criterion[:id], criterion[:type], criterion[:text]] - end - # Increment values to request the next page. - offset += PAGE_SIZE - selector[:paging][:start_index] = offset - end - end while page[:total_num_entries] > offset - - if page.include?(:total_num_entries) - puts "\tCampaign ID %d has %d criteria." % - [campaign_id, page[:total_num_entries]] - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - PAGE_SIZE = 500 - - begin - # Specify campaign ID to get targeting for. - campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i - get_campaign_targeting_criteria(campaign_id) - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/targeting/get_targetable_languages_and_carriers.rb b/adwords_api/examples/v201306/targeting/get_targetable_languages_and_carriers.rb deleted file mode 100755 index 382771924..000000000 --- a/adwords_api/examples/v201306/targeting/get_targetable_languages_and_carriers.rb +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example illustrates how to retrieve all languages and carriers available -# for targeting. -# -# Tags: ConstantDataService.getLanguageCriterion -# Tags: ConstantDataService.getCarrierCriterion - -require 'adwords_api' - -def get_targetable_languages_and_carriers() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - constant_data_srv = adwords.service(:ConstantDataService, API_VERSION) - - # Get all languages from ConstantDataService. - languages = constant_data_srv.get_language_criterion() - - if languages - languages.each do |language| - puts "Language name is '%s', ID is %d and code is '%s'." % - [language[:name], language[:id], language[:code]] - end - else - puts 'No languages were found.' - end - - # Get all carriers from ConstantDataService. - carriers = constant_data_srv.get_carrier_criterion() - - if carriers - carriers.each do |carrier| - puts "Carrier name is '%s', ID is %d and country code is '%s'." % - [carrier[:name], carrier[:id], carrier[:country_code]] - end - else - puts 'No carriers were retrieved.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - get_targetable_languages_and_carriers() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/examples/v201306/targeting/lookup_location.rb b/adwords_api/examples/v201306/targeting/lookup_location.rb deleted file mode 100755 index eac0849fb..000000000 --- a/adwords_api/examples/v201306/targeting/lookup_location.rb +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env ruby -# Encoding: utf-8 -# -# Author:: api.dklimkin@gmail.com (Danial Klimkin) -# -# Copyright:: Copyright 2011, Google Inc. All Rights Reserved. -# -# License:: Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This example gets location criteria by name. -# -# Tags: LocationCriterionService.get - -require 'adwords_api' - -def lookup_location() - # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml - # when called without parameters. - adwords = AdwordsApi::Api.new - - # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in - # the configuration file or provide your own logger: - # adwords.logger = Logger.new('adwords_xml.log') - - location_criterion_srv = - adwords.service(:LocationCriterionService, API_VERSION) - - # List of locations to look up. - location_names = ['Paris', 'Quebec', 'Spain', 'Deutschland'] - # Locale to retrieve names in. - locale = 'en' - - # Get the criteria by names. - selector = { - :fields => ['Id', 'LocationName', 'CanonicalName', 'DisplayType', - 'ParentLocations', 'Reach', 'TargetingStatus'], - :predicates => [ - # Location names must match exactly, only EQUALS and IN are supported. - {:field => 'LocationName', - :operator => 'IN', - :values => location_names}, - # Set the locale of the returned location names. - {:field => 'Locale', :operator => 'EQUALS', :values => [locale]} - ] - } - criteria = location_criterion_srv.get(selector) - - if criteria - criteria.each do |criterion| - # Extract all parent location names as one comma-separated string. - parent_location = if criterion[:location][:parent_locations] and - !criterion[:location][:parent_locations].empty? - locations_array = criterion[:location][:parent_locations].map do |loc| - loc[:location_name] - end - locations_array.join(', ') - else - 'N/A' - end - puts ("The search term '%s' returned the location '%s' of type '%s' " + - "with ID %d, parent locations '%s' and reach %d (%s)") % - [criterion[:search_term], criterion[:location][:location_name], - criterion[:location][:criterion_type], criterion[:location][:id], - parent_location, criterion[:reach], - criterion[:location][:targeting_status]] - end - else - puts 'No criteria were returned.' - end -end - -if __FILE__ == $0 - API_VERSION = :v201306 - - begin - lookup_location() - - # Authorization error. - rescue AdsCommon::Errors::OAuth2VerificationRequired => e - puts "Authorization credentials are not valid. Edit adwords_api.yml for " + - "OAuth2 client ID and secret and run misc/setup_oauth2.rb example " + - "to retrieve and store OAuth2 tokens." - puts "See this wiki page for more details:\n\n " + - 'http://code.google.com/p/google-api-ads-ruby/wiki/OAuth2' - - # HTTP errors. - rescue AdsCommon::Errors::HttpError => e - puts "HTTP Error: %s" % e - - # API errors. - rescue AdwordsApi::Errors::ApiException => e - puts "Message: %s" % e.message - puts 'Errors:' - e.errors.each_with_index do |error, index| - puts "\tError [%d]:" % (index + 1) - error.each do |field, value| - puts "\t\t%s: %s" % [field, value] - end - end - end -end diff --git a/adwords_api/lib/adwords_api/api_config.rb b/adwords_api/lib/adwords_api/api_config.rb index 16137f202..fe228ba4a 100644 --- a/adwords_api/lib/adwords_api/api_config.rb +++ b/adwords_api/lib/adwords_api/api_config.rb @@ -45,44 +45,6 @@ class << ApiConfig # Configure the services available to each version @@service_config = { - :v201306 => [ - :AdExtensionOverrideService, - :AdGroupAdService, - :AdGroupBidModifierService, - :AdGroupCriterionService, - :AdGroupFeedService, - :AdGroupService, - :AdParamService, - :AdwordsUserListService, - :AlertService, - :BiddingStrategyService, - :BudgetOrderService, - :BudgetService, - :CampaignAdExtensionService, - :CampaignCriterionService, - :CampaignFeedService, - :CampaignService, - :CampaignSharedSetService, - :ConstantDataService, - :ConversionTrackerService, - :CustomerService, - :CustomerSyncService, - :DataService, - :ExperimentService, - :FeedItemService, - :FeedMappingService, - :FeedService, - :GeoLocationService, - :LocationCriterionService, - :ManagedCustomerService, - :MediaService, - :MutateJobService, - :ReportDefinitionService, - :SharedCriterionService, - :SharedSetService, - :TargetingIdeaService, - :TrafficEstimatorService - ], :v201309 => [ :AdGroupAdService, :AdGroupBidModifierService, @@ -164,7 +126,6 @@ class << ApiConfig :PRODUCTION => { :oauth_scope => 'https://adwords.google.com/api/adwords/', :header_ns => 'https://adwords.google.com/api/adwords/cm/', - :v201306 => 'https://adwords.google.com/api/adwords/', :v201309 => 'https://adwords.google.com/api/adwords/', :v201402 => 'https://adwords.google.com/api/adwords/' } @@ -173,43 +134,6 @@ class << ApiConfig # Configure the subdirectories for each version / service pair. # A missing pair means that only the base URL is used. @@subdir_config = { - # v201306 - [:v201306, :AdExtensionOverrideService] => 'cm/', - [:v201306, :AdGroupAdService] => 'cm/', - [:v201306, :AdGroupBidModifierService] => 'cm/', - [:v201306, :AdGroupCriterionService] => 'cm/', - [:v201306, :AdGroupFeedService] => 'cm/', - [:v201306, :AdGroupService] => 'cm/', - [:v201306, :AdParamService] => 'cm/', - [:v201306, :AlertService] => 'mcm/', - [:v201306, :BudgetOrderService] => 'billing/', - [:v201306, :CampaignAdExtensionService] => 'cm/', - [:v201306, :CampaignCriterionService] => 'cm/', - [:v201306, :CampaignFeedService] => 'cm/', - [:v201306, :CampaignService] => 'cm/', - [:v201306, :CampaignSharedSetService] => 'cm/', - [:v201306, :ConstantDataService] => 'cm/', - [:v201306, :ConversionTrackerService] => 'cm/', - [:v201306, :CustomerSyncService] => 'ch/', - [:v201306, :DataService] => 'cm/', - [:v201306, :ExperimentService] => 'cm/', - [:v201306, :FeedItemService] => 'cm/', - [:v201306, :FeedMappingService] => 'cm/', - [:v201306, :FeedService] => 'cm/', - [:v201306, :GeoLocationService] => 'cm/', - [:v201306, :LocationCriterionService] => 'cm/', - [:v201306, :MediaService] => 'cm/', - [:v201306, :MutateJobService] => 'cm/', - [:v201306, :ReportDefinitionService] => 'cm/', - [:v201306, :SharedCriterionService] => 'cm/', - [:v201306, :SharedSetService] => 'cm/', - [:v201306, :TargetingIdeaService] => 'o/', - [:v201306, :TrafficEstimatorService] => 'o/', - [:v201306, :ManagedCustomerService] => 'mcm/', - [:v201306, :CustomerService] => 'mcm/', - [:v201306, :BudgetService] => 'cm/', - [:v201306, :BiddingStrategyService] => 'cm/', - [:v201306, :AdwordsUserListService] => 'rm/', # v201309 [:v201309, :AdGroupAdService] => 'cm/', [:v201309, :AdGroupBidModifierService] => 'cm/', diff --git a/adwords_api/lib/adwords_api/v201306/ad_extension_override_service.rb b/adwords_api/lib/adwords_api/v201306/ad_extension_override_service.rb deleted file mode 100644 index 7741a7513..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_extension_override_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:49. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_extension_override_service_registry' - -module AdwordsApi; module V201306; module AdExtensionOverrideService - class AdExtensionOverrideService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return AdExtensionOverrideServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdExtensionOverrideService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_extension_override_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_extension_override_service_registry.rb deleted file mode 100644 index 20eec3d9f..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_extension_override_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:50. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdExtensionOverrideService - class AdExtensionOverrideServiceRegistry - ADEXTENSIONOVERRIDESERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"AdExtensionOverrideSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdExtensionOverridePage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdExtensionOverrideOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdExtensionOverrideReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - ADEXTENSIONOVERRIDESERVICE_TYPES = {:AdExtensionOverrideError=>{:fields=>[{:name=>:reason, :type=>"AdExtensionOverrideError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdExtensionOverrideStats=>{:fields=>[], :base=>"Stats"}, :Address=>{:fields=>[{:name=>:street_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:street_address2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:city_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:postal_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DomainInfoExtension=>{:fields=>[{:name=>:domain_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoPoint=>{:fields=>[{:name=>:latitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:longitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InAppLinkExtension=>{:fields=>[{:name=>:in_app_link_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:in_app_link_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_store, :type=>"InAppLinkExtension.AppStore", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LocationOverrideInfo=>{:fields=>[{:name=>:radius, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_units, :type=>"LocationOverrideInfo.RadiusUnits", :min_occurs=>0, :max_occurs=>1}]}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :MobileExtension=>{:fields=>[{:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_tracking_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OAuthInfo=>{:fields=>[{:name=>:http_method, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_request_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_authorization_header, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OverrideInfo=>{:fields=>[], :choices=>[{:name=>:location_override_info, :original_name=>"LocationOverrideInfo", :type=>"LocationOverrideInfo", :min_occurs=>1, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Sitelink=>{:fields=>[{:name=>:display_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :SitelinksExtension=>{:fields=>[{:name=>:sitelinks, :type=>"Sitelink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"AdExtension"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdExtensionOverrideSelector=>{:fields=>[{:name=>:campaign_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_extension_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:statuses, :type=>"AdExtensionOverride.Status", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LocationExtension=>{:fields=>[{:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:encoded_location, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:company_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:source, :type=>"LocationExtension.Source", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :LocationSyncExtension=>{:fields=>[{:name=>:email, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:o_auth_info, :type=>"OAuthInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:should_sync_url, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdExtension=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension_type, :original_name=>"AdExtension.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionOverride=>{:fields=>[{:name=>:ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension, :type=>"AdExtension", :min_occurs=>0, :max_occurs=>1}, {:name=>:override_info, :type=>"OverrideInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdExtensionOverride.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"AdExtensionOverride.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"AdExtensionOverrideStats", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionOverrideOperation=>{:fields=>[{:name=>:operand, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdExtensionOverridePage=>{:fields=>[{:name=>:entries, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdExtensionOverrideReturnValue=>{:fields=>[{:name=>:value, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdExtensionOverride.ApprovalStatus"=>{:fields=>[]}, :"AdExtensionOverride.Status"=>{:fields=>[]}, :"AdExtensionOverrideError.Reason"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InAppLinkExtension.AppStore"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"LocationExtension.Source"=>{:fields=>[]}, :"LocationOverrideInfo.RadiusUnits"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - ADEXTENSIONOVERRIDESERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADEXTENSIONOVERRIDESERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADEXTENSIONOVERRIDESERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADEXTENSIONOVERRIDESERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdExtensionOverrideServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_ad_service.rb b/adwords_api/lib/adwords_api/v201306/ad_group_ad_service.rb deleted file mode 100644 index d1e5df2fd..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_ad_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:52. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_group_ad_service_registry' - -module AdwordsApi; module V201306; module AdGroupAdService - class AdGroupAdService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - def query(*args, &block) - return execute_action('query', args, &block) - end - - private - - def get_service_registry() - return AdGroupAdServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdGroupAdService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_ad_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_group_ad_service_registry.rb deleted file mode 100644 index ae0470a79..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_ad_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:52. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdGroupAdService - class AdGroupAdServiceRegistry - ADGROUPADSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdGroupAdPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdGroupAdOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdGroupAdReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"AdGroupAdPage", :min_occurs=>0, :max_occurs=>1}]}}} - ADGROUPADSERVICE_TYPES = {:Ad=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:disapproval_reasons, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_type, :original_name=>"Ad.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdExtensionOverrideStats=>{:fields=>[], :base=>"Stats"}, :AdGroupAd=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad, :type=>"Ad", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"AdGroupAdExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdGroupAd.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"AdGroupAd.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:trademark_disapproved, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"AdStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AdGroupAdCountLimitExceeded=>{:fields=>[], :base=>"EntityCountLimitExceeded"}, :AdGroupAdError=>{:fields=>[{:name=>:reason, :type=>"AdGroupAdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupAdExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAdOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupAdPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupAdReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :AdStats=>{:fields=>[{:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Stats"}, :AdUnionId=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_union_id_type, :original_name=>"AdUnionId.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Audio=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DeprecatedAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"DeprecatedAd.Type", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :Dimensions=>{:fields=>[{:name=>:width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:height, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Image=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :ImageAd=>{:fields=>[{:name=>:image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_to_copy_image_from, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ImageError=>{:fields=>[{:name=>:reason, :type=>"ImageError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :Media=>{:fields=>[{:name=>:media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Media.MediaType", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimensions, :type=>"Media_Size_DimensionsMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:urls, :type=>"Media_Size_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mime_type, :type=>"Media.MimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:creation_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_type, :original_name=>"Media.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MediaError=>{:fields=>[{:name=>:reason, :type=>"MediaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Media_Size_DimensionsMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}]}, :Media_Size_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MobileAd=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:markup_languages, :type=>"MarkupLanguageType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mobile_carriers, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :MobileImageAd=>{:fields=>[{:name=>:markup_languages, :type=>"MarkupLanguageType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mobile_carriers, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError"}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ProductAd=>{:fields=>[{:name=>:promotion_line, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :QueryError=>{:fields=>[{:name=>:reason, :type=>"QueryError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RichMediaAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimensions, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}, {:name=>:snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:impression_beacon_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:certified_vendor_format_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rich_media_ad_type, :type=>"RichMediaAd.RichMediaAdType", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_attributes, :type=>"RichMediaAd.AdAttribute", :min_occurs=>0, :max_occurs=>:unbounded}], :abstract=>true, :base=>"Ad"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :String_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TempAdUnionId=>{:fields=>[], :base=>"AdUnionId"}, :TemplateAd=>{:fields=>[{:name=>:template_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_union_id, :type=>"AdUnionId", :min_occurs=>0, :max_occurs=>1}, {:name=>:template_elements, :type=>"TemplateElement", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:dimensions, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :TemplateElement=>{:fields=>[{:name=>:unique_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"TemplateElementField", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TemplateElementField=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"TemplateElementField.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_media, :type=>"Media", :min_occurs=>0, :max_occurs=>1}]}, :TextAd=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ThirdPartyRedirectAd=>{:fields=>[{:name=>:is_cookie_targeted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_user_interest_targeted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_tagged, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_types, :type=>"VideoType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:expanding_directions, :type=>"ThirdPartyRedirectAd.ExpandingDirection", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"RichMediaAd"}, :Video=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:industry_standard_commercial_identifier, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertising_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:you_tube_video_id_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :DynamicSearchAd=>{:fields=>[{:name=>:description1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :"AdError.Reason"=>{:fields=>[]}, :"AdGroupAd.ApprovalStatus"=>{:fields=>[]}, :"AdGroupAd.Status"=>{:fields=>[]}, :"AdGroupAdError.Reason"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DeprecatedAd.Type"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :MarkupLanguageType=>{:fields=>[]}, :"Media.MediaType"=>{:fields=>[]}, :"Media.MimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"RichMediaAd.AdAttribute"=>{:fields=>[]}, :"RichMediaAd.RichMediaAdType"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"TemplateElementField.Type"=>{:fields=>[]}, :"ThirdPartyRedirectAd.ExpandingDirection"=>{:fields=>[]}, :VideoType=>{:fields=>[]}} - ADGROUPADSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADGROUPADSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADGROUPADSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADGROUPADSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdGroupAdServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service.rb b/adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service.rb deleted file mode 100644 index bf4bde473..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:56. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_group_bid_modifier_service_registry' - -module AdwordsApi; module V201306; module AdGroupBidModifierService - class AdGroupBidModifierService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return AdGroupBidModifierServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdGroupBidModifierService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service_registry.rb deleted file mode 100644 index 30b814acf..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_bid_modifier_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:57. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdGroupBidModifierService - class AdGroupBidModifierServiceRegistry - ADGROUPBIDMODIFIERSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdGroupBidModifierPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdGroupBidModifierOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdGroupBidModifierReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - ADGROUPBIDMODIFIERSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Platform=>{:fields=>[{:name=>:platform_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupBidModifier=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier_source, :type=>"BidModifierSource", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupBidModifierOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupBidModifier", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupBidModifierPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupBidModifier", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupBidModifierReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupBidModifier", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :BidModifierSource=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - ADGROUPBIDMODIFIERSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADGROUPBIDMODIFIERSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADGROUPBIDMODIFIERSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADGROUPBIDMODIFIERSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdGroupBidModifierServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_criterion_service.rb b/adwords_api/lib/adwords_api/v201306/ad_group_criterion_service.rb deleted file mode 100644 index f530fbfd0..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_criterion_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:59. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_group_criterion_service_registry' - -module AdwordsApi; module V201306; module AdGroupCriterionService - class AdGroupCriterionService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - def query(*args, &block) - return execute_action('query', args, &block) - end - - private - - def get_service_registry() - return AdGroupCriterionServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdGroupCriterionService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_group_criterion_service_registry.rb deleted file mode 100644 index 03a194f22..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_criterion_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:02:59. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdGroupCriterionService - class AdGroupCriterionServiceRegistry - ADGROUPCRITERIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdGroupCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdGroupCriterionOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdGroupCriterionReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"AdGroupCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}} - ADGROUPCRITERIONSERVICE_TYPES = {:AdGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"AdGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"AdGroupCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded"}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AgeRange=>{:fields=>[{:name=>:age_range_type, :type=>"AgeRange.AgeRangeType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingError=>{:fields=>[{:name=>:reason, :type=>"BiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConversionOptimizerBiddingScheme=>{:fields=>[{:name=>:pricing_mode, :type=>"ConversionOptimizerBiddingScheme.PricingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_type, :type=>"ConversionOptimizerBiddingScheme.BidType", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionPolicyError=>{:fields=>[], :base=>"PolicyViolationError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EnhancedCpcBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :EntityAccessDenied=>{:fields=>[{:name=>:reason, :type=>"EntityAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Gender=>{:fields=>[{:name=>:gender_type, :type=>"Gender.GenderType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NegativeAdGroupCriterion=>{:fields=>[], :base=>"AdGroupCriterion"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PercentCpaBid=>{:fields=>[{:name=>:bid, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_cpa_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :PercentCpaBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :QualityInfo=>{:fields=>[{:name=>:is_keyword_ad_relevance_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_landing_page_quality_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_landing_page_latency_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_score, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :QueryError=>{:fields=>[{:name=>:reason, :type=>"QueryError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :String_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CpaBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:content_bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpc_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpmBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpm_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :PageOnePromotedBiddingScheme=>{:fields=>[{:name=>:strategy_goal, :type=>"PageOnePromotedBiddingScheme.StrategyGoal", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_budget_constained, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_low_quality_score, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetSpendBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Bid=>{:fields=>[{:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :BidMultiplier=>{:fields=>[{:name=>:multiplier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplied_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}]}, :Bids=>{:fields=>[{:name=>:bids_type, :original_name=>"Bids.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BudgetOptimizerBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCPCAdGroupCriterionExperimentBidMultiplier=>{:fields=>[{:name=>:max_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplier_source, :type=>"MultiplierSource", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionExperimentBidMultiplier"}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupCriterionExperimentBidMultiplier=>{:fields=>[{:name=>:ad_group_criterion_experiment_bid_multiplier_type, :original_name=>"AdGroupCriterionExperimentBidMultiplier.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BiddableAdGroupCriterionExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_bid_multiplier, :type=>"AdGroupCriterionExperimentBidMultiplier", :min_occurs=>0, :max_occurs=>1}]}, :BiddingScheme=>{:fields=>[{:name=>:bidding_scheme_type, :original_name=>"BiddingScheme.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BiddingStrategyConfiguration=>{:fields=>[{:name=>:bidding_strategy_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_type, :type=>"BiddingStrategyType", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_source, :type=>"BiddingStrategySource", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_scheme, :type=>"BiddingScheme", :min_occurs=>0, :max_occurs=>1}, {:name=>:bids, :type=>"Bids", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :BiddableAdGroupCriterion=>{:fields=>[{:name=>:user_status, :type=>"UserStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:system_serving_status, :type=>"SystemServingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:disapproval_reasons, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"BiddableAdGroupCriterionExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:first_page_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:top_of_page_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_info, :type=>"QualityInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"Stats", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterion"}, :AdGroupCriterion=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_use, :type=>"CriterionUse", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_group_criterion_type, :original_name=>"AdGroupCriterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupCriterionPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupCriterionReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdGroupCriterionError.Reason"=>{:fields=>[]}, :"AdGroupCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :ApprovalStatus=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.BidType"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.PricingMode"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :CriterionUse=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"Gender.GenderType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :MultiplierSource=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :SystemServingStatus=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :UserStatus=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}} - ADGROUPCRITERIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADGROUPCRITERIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADGROUPCRITERIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADGROUPCRITERIONSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdGroupCriterionServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_feed_service.rb b/adwords_api/lib/adwords_api/v201306/ad_group_feed_service.rb deleted file mode 100644 index eca91efd0..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_feed_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:03. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_group_feed_service_registry' - -module AdwordsApi; module V201306; module AdGroupFeedService - class AdGroupFeedService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return AdGroupFeedServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdGroupFeedService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_group_feed_service_registry.rb deleted file mode 100644 index 50e586c7a..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_feed_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:04. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdGroupFeedService - class AdGroupFeedServiceRegistry - ADGROUPFEEDSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdGroupFeedPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdGroupFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdGroupFeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - ADGROUPFEEDSERVICE_TYPES = {:AdGroupFeed=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:matching_function, :type=>"Function", :min_occurs=>0, :max_occurs=>1}, {:name=>:placeholder_types, :type=>"int", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:status, :type=>"AdGroupFeed.Status", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupFeedError=>{:fields=>[{:name=>:reason, :type=>"AdGroupFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupFeedOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupFeedPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :AdGroupFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConstantOperand=>{:fields=>[{:name=>:type, :type=>"ConstantOperand.ConstantType", :min_occurs=>0, :max_occurs=>1}, {:name=>:long_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:boolean_value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:double_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:string_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedAttributeOperand=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_attribute_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :Function=>{:fields=>[{:name=>:operator, :type=>"Function.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:lhs_operand, :type=>"FunctionArgumentOperand", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:rhs_operand, :type=>"FunctionArgumentOperand", :min_occurs=>0, :max_occurs=>:unbounded}]}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionOperand=>{:fields=>[{:name=>:value, :type=>"Function", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :FunctionArgumentOperand=>{:fields=>[{:name=>:function_argument_operand_type, :original_name=>"FunctionArgumentOperand.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestContextOperand=>{:fields=>[{:name=>:context_type, :type=>"RequestContextOperand.ContextType", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AdGroupFeed.Status"=>{:fields=>[]}, :"AdGroupFeedError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"ConstantOperand.ConstantType"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Function.Operator"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestContextOperand.ContextType"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - ADGROUPFEEDSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADGROUPFEEDSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADGROUPFEEDSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADGROUPFEEDSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdGroupFeedServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_service.rb b/adwords_api/lib/adwords_api/v201306/ad_group_service.rb deleted file mode 100644 index f13d0b2c5..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:06. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_group_service_registry' - -module AdwordsApi; module V201306; module AdGroupService - class AdGroupService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - def query(*args, &block) - return execute_action('query', args, &block) - end - - private - - def get_service_registry() - return AdGroupServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdGroupService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_group_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_group_service_registry.rb deleted file mode 100644 index c3874de52..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_group_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:07. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdGroupService - class AdGroupServiceRegistry - ADGROUPSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdGroupPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdGroupOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdGroupReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"AdGroupPage", :min_occurs=>0, :max_occurs=>1}]}}} - ADGROUPSERVICE_TYPES = {:AdGroupServiceError=>{:fields=>[{:name=>:reason, :type=>"AdGroupServiceError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingError=>{:fields=>[{:name=>:reason, :type=>"BiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConversionOptimizerBiddingScheme=>{:fields=>[{:name=>:pricing_mode, :type=>"ConversionOptimizerBiddingScheme.PricingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_type, :type=>"ConversionOptimizerBiddingScheme.BidType", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EnhancedCpcBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PercentCpaBid=>{:fields=>[{:name=>:bid, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_cpa_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :PercentCpaBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QueryError=>{:fields=>[{:name=>:reason, :type=>"QueryError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaError=>{:fields=>[{:name=>:reason, :type=>"QuotaError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SettingError=>{:fields=>[{:name=>:reason, :type=>"SettingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :String_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetingSettingDetail=>{:fields=>[{:name=>:criterion_type_group, :type=>"CriterionTypeGroup", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_all, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :TargetingSetting=>{:fields=>[{:name=>:details, :type=>"TargetingSettingDetail", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Setting"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CpaBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:content_bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpc_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpmBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpm_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PageOnePromotedBiddingScheme=>{:fields=>[{:name=>:strategy_goal, :type=>"PageOnePromotedBiddingScheme.StrategyGoal", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_budget_constained, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_low_quality_score, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :Setting=>{:fields=>[{:name=>:setting_type, :original_name=>"Setting.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetSpendBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Bid=>{:fields=>[{:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :BidMultiplier=>{:fields=>[{:name=>:multiplier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplied_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}]}, :Bids=>{:fields=>[{:name=>:bids_type, :original_name=>"Bids.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BudgetOptimizerBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCPCAdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:max_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_content_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupExperimentBidMultipliers"}, :ManualCPMAdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:max_cpm_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupExperimentBidMultipliers"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:ad_group_experiment_bid_multipliers_type, :original_name=>"AdGroupExperimentBidMultipliers.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdGroupExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_bid_multipliers, :type=>"AdGroupExperimentBidMultipliers", :min_occurs=>0, :max_occurs=>1}]}, :BiddingScheme=>{:fields=>[{:name=>:bidding_scheme_type, :original_name=>"BiddingScheme.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BiddingStrategyConfiguration=>{:fields=>[{:name=>:bidding_strategy_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_type, :type=>"BiddingStrategyType", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_source, :type=>"BiddingStrategySource", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_scheme, :type=>"BiddingScheme", :min_occurs=>0, :max_occurs=>1}, {:name=>:bids, :type=>"Bids", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AdGroup=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdGroup.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:settings, :type=>"Setting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:experiment_data, :type=>"AdGroupExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"Stats", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:content_bid_criterion_type_group, :type=>"CriterionTypeGroup", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupPage=>{:fields=>[{:name=>:entries, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdGroupServiceError.Reason"=>{:fields=>[]}, :"AdGroup.Status"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.BidType"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.PricingMode"=>{:fields=>[]}, :CriterionTypeGroup=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"QuotaError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - ADGROUPSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADGROUPSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADGROUPSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADGROUPSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdGroupServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_param_service.rb b/adwords_api/lib/adwords_api/v201306/ad_param_service.rb deleted file mode 100644 index 4e1b1d10e..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_param_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:10. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/ad_param_service_registry' - -module AdwordsApi; module V201306; module AdParamService - class AdParamService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return AdParamServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdParamService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/ad_param_service_registry.rb b/adwords_api/lib/adwords_api/v201306/ad_param_service_registry.rb deleted file mode 100644 index 37054dff8..000000000 --- a/adwords_api/lib/adwords_api/v201306/ad_param_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:11. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdParamService - class AdParamServiceRegistry - ADPARAMSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdParamPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdParamOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdParam", :min_occurs=>0, :max_occurs=>:unbounded}]}}} - ADPARAMSERVICE_TYPES = {:AdParam=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:insertion_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:param_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :AdParamError=>{:fields=>[{:name=>:reason, :type=>"AdParamError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdParamOperation=>{:fields=>[{:name=>:operand, :type=>"AdParam", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdParamPage=>{:fields=>[{:name=>:entries, :type=>"AdParam", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :AdParamPolicyError=>{:fields=>[], :base=>"PolicyViolationError"}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AdParamError.Reason"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - ADPARAMSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return ADPARAMSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADPARAMSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADPARAMSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdParamServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/adwords_user_list_service.rb b/adwords_api/lib/adwords_api/v201306/adwords_user_list_service.rb deleted file mode 100644 index 3de5de9f2..000000000 --- a/adwords_api/lib/adwords_api/v201306/adwords_user_list_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:13. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/adwords_user_list_service_registry' - -module AdwordsApi; module V201306; module AdwordsUserListService - class AdwordsUserListService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/rm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return AdwordsUserListServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AdwordsUserListService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/adwords_user_list_service_registry.rb b/adwords_api/lib/adwords_api/v201306/adwords_user_list_service_registry.rb deleted file mode 100644 index aaf4056c5..000000000 --- a/adwords_api/lib/adwords_api/v201306/adwords_user_list_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:13. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AdwordsUserListService - class AdwordsUserListServiceRegistry - ADWORDSUSERLISTSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"UserListPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"UserListOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"UserListReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - ADWORDSUSERLISTSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"EntityNotFound.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"Predicate.Operator"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SelectorError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :SortOrder=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :ExternalRemarketingUserList=>{:fields=>[], :base=>"UserList"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UserListConversionType=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:category, :type=>"UserListConversionType.Category", :min_occurs=>0, :max_occurs=>1}]}, :LogicalUserList=>{:fields=>[{:name=>:rules, :type=>"UserListLogicalRule", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"UserList"}, :LogicalUserListOperand=>{:fields=>[], :choices=>[{:name=>:user_interest, :original_name=>"UserInterest", :type=>"UserInterest", :min_occurs=>1, :max_occurs=>1}, {:name=>:user_list, :original_name=>"UserList", :type=>"UserList", :min_occurs=>1, :max_occurs=>1}]}, :BasicUserList=>{:fields=>[{:name=>:conversion_types, :type=>"UserListConversionType", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"UserList"}, :UserInterest=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:size_range, :type=>"SizeRange", :min_occurs=>0, :max_occurs=>1}]}, :UserList=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_read_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"UserListMembershipStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:integration_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:access_reason, :type=>"AccessReason", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_user_list_status, :type=>"AccountUserListStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:membership_life_span, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:size_range, :type=>"SizeRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_type, :original_name=>"UserList.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :UserListError=>{:fields=>[{:name=>:reason, :type=>"UserListError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UserListLogicalRule=>{:fields=>[{:name=>:operator, :type=>"UserListLogicalRule.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:rule_operands, :type=>"LogicalUserListOperand", :min_occurs=>0, :max_occurs=>:unbounded}]}, :UserListOperation=>{:fields=>[{:name=>:operand, :type=>"UserList", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :UserListPage=>{:fields=>[{:name=>:entries, :type=>"UserList", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :UserListReturnValue=>{:fields=>[{:name=>:value, :type=>"UserList", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :AccessReason=>{:fields=>[]}, :AccountUserListStatus=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"UserListConversionType.Category"=>{:fields=>[]}, :SizeRange=>{:fields=>[]}, :"UserListError.Reason"=>{:fields=>[]}, :"UserListLogicalRule.Operator"=>{:fields=>[]}, :UserListMembershipStatus=>{:fields=>[]}} - ADWORDSUSERLISTSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return ADWORDSUSERLISTSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ADWORDSUSERLISTSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ADWORDSUSERLISTSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AdwordsUserListServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/alert_service.rb b/adwords_api/lib/adwords_api/v201306/alert_service.rb deleted file mode 100644 index dcdfd75bf..000000000 --- a/adwords_api/lib/adwords_api/v201306/alert_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:16. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/alert_service_registry' - -module AdwordsApi; module V201306; module AlertService - class AlertService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/mcm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - private - - def get_service_registry() - return AlertServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::AlertService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/alert_service_registry.rb b/adwords_api/lib/adwords_api/v201306/alert_service_registry.rb deleted file mode 100644 index 6e5ee19c1..000000000 --- a/adwords_api/lib/adwords_api/v201306/alert_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:16. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module AlertService - class AlertServiceRegistry - ALERTSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"AlertSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AlertPage", :min_occurs=>0, :max_occurs=>1}]}}} - ALERTSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AlertError=>{:fields=>[{:name=>:reason, :type=>"AlertError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AlertQuery=>{:fields=>[{:name=>:client_spec, :type=>"ClientSpec", :min_occurs=>0, :max_occurs=>1}, {:name=>:filter_spec, :type=>"FilterSpec", :min_occurs=>0, :max_occurs=>1}, {:name=>:types, :type=>"AlertType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:severities, :type=>"AlertSeverity", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:trigger_time_spec, :type=>"TriggerTimeSpec", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Detail=>{:fields=>[{:name=>:trigger_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Alert=>{:fields=>[{:name=>:alert_severity, :type=>"AlertSeverity", :min_occurs=>0, :max_occurs=>1}, {:name=>:alert_type, :type=>"AlertType", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:details, :type=>"Detail", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AlertPage=>{:fields=>[{:name=>:entries, :type=>"Alert", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :AlertSelector=>{:fields=>[{:name=>:query, :type=>"AlertQuery", :min_occurs=>0, :max_occurs=>1}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :"AlertError.Reason"=>{:fields=>[]}, :AlertSeverity=>{:fields=>[]}, :AlertType=>{:fields=>[]}, :ClientSpec=>{:fields=>[]}, :FilterSpec=>{:fields=>[]}, :TriggerTimeSpec=>{:fields=>[]}} - ALERTSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return ALERTSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return ALERTSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return ALERTSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, AlertServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/bidding_strategy_service.rb b/adwords_api/lib/adwords_api/v201306/bidding_strategy_service.rb deleted file mode 100644 index 3258ec7ac..000000000 --- a/adwords_api/lib/adwords_api/v201306/bidding_strategy_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:23. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/bidding_strategy_service_registry' - -module AdwordsApi; module V201306; module BiddingStrategyService - class BiddingStrategyService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return BiddingStrategyServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::BiddingStrategyService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/bidding_strategy_service_registry.rb b/adwords_api/lib/adwords_api/v201306/bidding_strategy_service_registry.rb deleted file mode 100644 index 470da827f..000000000 --- a/adwords_api/lib/adwords_api/v201306/bidding_strategy_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:24. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module BiddingStrategyService - class BiddingStrategyServiceRegistry - BIDDINGSTRATEGYSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"BiddingStrategyPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"BiddingStrategyOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"BiddingStrategyReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - BIDDINGSTRATEGYSERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingStrategyError=>{:fields=>[{:name=>:reason, :type=>"BiddingStrategyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConversionOptimizerBiddingScheme=>{:fields=>[{:name=>:pricing_mode, :type=>"ConversionOptimizerBiddingScheme.PricingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_type, :type=>"ConversionOptimizerBiddingScheme.BidType", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EnhancedCpcBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PercentCpaBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PageOnePromotedBiddingScheme=>{:fields=>[{:name=>:strategy_goal, :type=>"PageOnePromotedBiddingScheme.StrategyGoal", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_budget_constained, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_low_quality_score, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetSpendBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOptimizerBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :BiddingScheme=>{:fields=>[{:name=>:bidding_scheme_type, :original_name=>"BiddingScheme.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :SharedBiddingStrategy=>{:fields=>[{:name=>:bidding_scheme, :type=>"BiddingScheme", :min_occurs=>0, :max_occurs=>1}, {:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"SharedBiddingStrategy.BiddingStrategyStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"BiddingStrategyType", :min_occurs=>0, :max_occurs=>1}]}, :BiddingStrategyOperation=>{:fields=>[{:name=>:operand, :type=>"SharedBiddingStrategy", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :BiddingStrategyPage=>{:fields=>[{:name=>:entries, :type=>"SharedBiddingStrategy", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :BiddingStrategyReturnValue=>{:fields=>[{:name=>:value, :type=>"SharedBiddingStrategy", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"SharedBiddingStrategy.BiddingStrategyStatus"=>{:fields=>[]}, :"BiddingStrategyError.Reason"=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.BidType"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.PricingMode"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - BIDDINGSTRATEGYSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return BIDDINGSTRATEGYSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return BIDDINGSTRATEGYSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return BIDDINGSTRATEGYSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, BiddingStrategyServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/budget_order_service.rb b/adwords_api/lib/adwords_api/v201306/budget_order_service.rb deleted file mode 100644 index 5eb38e831..000000000 --- a/adwords_api/lib/adwords_api/v201306/budget_order_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:27. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/budget_order_service_registry' - -module AdwordsApi; module V201306; module BudgetOrderService - class BudgetOrderService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/billing/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def get_billing_accounts(*args, &block) - return execute_action('get_billing_accounts', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return BudgetOrderServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::BudgetOrderService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/budget_order_service_registry.rb b/adwords_api/lib/adwords_api/v201306/budget_order_service_registry.rb deleted file mode 100644 index a651f7e43..000000000 --- a/adwords_api/lib/adwords_api/v201306/budget_order_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:28. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module BudgetOrderService - class BudgetOrderServiceRegistry - BUDGETORDERSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"BudgetOrderPage", :min_occurs=>0, :max_occurs=>1}]}}, :get_billing_accounts=>{:input=>[], :output=>{:name=>"get_billing_accounts_response", :fields=>[{:name=>:rval, :type=>"BillingAccount", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"BudgetOrderOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"BudgetOrderReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - BUDGETORDERSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"EntityNotFound.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NewEntityCreationError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"PagingError.Reason"=>{:fields=>[], :ns=>0}, :"Predicate.Operator"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SelectorError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :SortOrder=>{:fields=>[], :ns=>0}, :"StatsQueryError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :BillingAccount=>{:fields=>[{:name=>:id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:primary_billing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:secondary_billing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOrderError=>{:fields=>[{:name=>:reason, :type=>"BudgetOrderError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CustomerOrderLineError=>{:fields=>[{:name=>:reason, :type=>"CustomerOrderLineError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BudgetOrderRequest=>{:fields=>[{:name=>:status, :type=>"BudgetOrderRequest.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:billing_account_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:po_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:budget_order_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:spending_limit, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOrder=>{:fields=>[{:name=>:billing_account_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:billing_account_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:po_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:budget_order_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:primary_billing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:secondary_billing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:spending_limit, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:last_request, :type=>"BudgetOrderRequest", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOrderOperation=>{:fields=>[{:name=>:operand, :type=>"BudgetOrder", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :BudgetOrderPage=>{:fields=>[{:name=>:entries, :type=>"BudgetOrder", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :BudgetOrderReturnValue=>{:fields=>[{:name=>:value, :type=>"BudgetOrder", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :"BudgetOrderError.Reason"=>{:fields=>[]}, :"BudgetOrderRequest.Status"=>{:fields=>[]}, :"CustomerOrderLineError.Reason"=>{:fields=>[]}} - BUDGETORDERSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return BUDGETORDERSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return BUDGETORDERSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return BUDGETORDERSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, BudgetOrderServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/budget_service.rb b/adwords_api/lib/adwords_api/v201306/budget_service.rb deleted file mode 100644 index 135a7fcca..000000000 --- a/adwords_api/lib/adwords_api/v201306/budget_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:30. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/budget_service_registry' - -module AdwordsApi; module V201306; module BudgetService - class BudgetService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return BudgetServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::BudgetService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/budget_service_registry.rb b/adwords_api/lib/adwords_api/v201306/budget_service_registry.rb deleted file mode 100644 index e1caa9e17..000000000 --- a/adwords_api/lib/adwords_api/v201306/budget_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:30. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module BudgetService - class BudgetServiceRegistry - BUDGETSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"BudgetPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"BudgetOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"BudgetReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - BUDGETSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BudgetError=>{:fields=>[{:name=>:reason, :type=>"BudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Budget=>{:fields=>[{:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:period, :type=>"Budget.BudgetPeriod", :min_occurs=>0, :max_occurs=>1}, {:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:delivery_method, :type=>"Budget.BudgetDeliveryMethod", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_explicitly_shared, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Budget.BudgetStatus", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOperation=>{:fields=>[{:name=>:operand, :type=>"Budget", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :BudgetPage=>{:fields=>[{:name=>:entries, :type=>"Budget", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :BudgetReturnValue=>{:fields=>[{:name=>:value, :type=>"Budget", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"Budget.BudgetDeliveryMethod"=>{:fields=>[]}, :"Budget.BudgetPeriod"=>{:fields=>[]}, :"Budget.BudgetStatus"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - BUDGETSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return BUDGETSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return BUDGETSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return BUDGETSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, BudgetServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service.rb b/adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service.rb deleted file mode 100644 index 1eb263496..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:33. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/campaign_ad_extension_service_registry' - -module AdwordsApi; module V201306; module CampaignAdExtensionService - class CampaignAdExtensionService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return CampaignAdExtensionServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CampaignAdExtensionService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service_registry.rb b/adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service_registry.rb deleted file mode 100644 index 05a198b11..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_ad_extension_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:34. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CampaignAdExtensionService - class CampaignAdExtensionServiceRegistry - CAMPAIGNADEXTENSIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignAdExtensionPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignAdExtensionOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignAdExtensionReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - CAMPAIGNADEXTENSIONSERVICE_TYPES = {:AdExtensionError=>{:fields=>[{:name=>:reason, :type=>"AdExtensionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Address=>{:fields=>[{:name=>:street_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:street_address2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:city_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:postal_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignAdExtensionError=>{:fields=>[{:name=>:reason, :type=>"CampaignAdExtensionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignAdExtensionStats=>{:fields=>[], :base=>"Stats"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DomainInfoExtension=>{:fields=>[{:name=>:domain_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoPoint=>{:fields=>[{:name=>:latitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:longitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InAppLinkExtension=>{:fields=>[{:name=>:in_app_link_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:in_app_link_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_store, :type=>"InAppLinkExtension.AppStore", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :MobileExtension=>{:fields=>[{:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_tracking_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OAuthInfo=>{:fields=>[{:name=>:http_method, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_request_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_authorization_header, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Sitelink=>{:fields=>[{:name=>:display_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :SitelinksExtension=>{:fields=>[{:name=>:sitelinks, :type=>"Sitelink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"AdExtension"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LocationExtension=>{:fields=>[{:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:encoded_location, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:company_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:source, :type=>"LocationExtension.Source", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :LocationSyncExtension=>{:fields=>[{:name=>:email, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:o_auth_info, :type=>"OAuthInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:should_sync_url, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdExtension=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension_type, :original_name=>"AdExtension.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CampaignAdExtension=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension, :type=>"AdExtension", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CampaignAdExtension.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"CampaignAdExtension.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"CampaignAdExtensionStats", :min_occurs=>0, :max_occurs=>1}]}, :CampaignAdExtensionOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignAdExtension", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignAdExtensionPage=>{:fields=>[{:name=>:entries, :type=>"CampaignAdExtension", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignAdExtensionReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignAdExtension", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdExtensionError.Reason"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"CampaignAdExtension.ApprovalStatus"=>{:fields=>[]}, :"CampaignAdExtension.Status"=>{:fields=>[]}, :"CampaignAdExtensionError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InAppLinkExtension.AppStore"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"LocationExtension.Source"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RegionCodeError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - CAMPAIGNADEXTENSIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CAMPAIGNADEXTENSIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CAMPAIGNADEXTENSIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CAMPAIGNADEXTENSIONSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CampaignAdExtensionServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_criterion_service.rb b/adwords_api/lib/adwords_api/v201306/campaign_criterion_service.rb deleted file mode 100644 index 2cc4ce58b..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_criterion_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:36. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/campaign_criterion_service_registry' - -module AdwordsApi; module V201306; module CampaignCriterionService - class CampaignCriterionService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - def query(*args, &block) - return execute_action('query', args, &block) - end - - private - - def get_service_registry() - return CampaignCriterionServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CampaignCriterionService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201306/campaign_criterion_service_registry.rb deleted file mode 100644 index 1bf185da1..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_criterion_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:37. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CampaignCriterionService - class CampaignCriterionServiceRegistry - CAMPAIGNCRITERIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignCriterionOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignCriterionReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"CampaignCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}} - CAMPAIGNCRITERIONSERVICE_TYPES = {:AdSchedule=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Address=>{:fields=>[{:name=>:street_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:street_address2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:city_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:postal_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AgeRange=>{:fields=>[{:name=>:age_range_type, :type=>"AgeRange.AgeRangeType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignCriterion=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_negative, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:campaign_criterion_type, :original_name=>"CampaignCriterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CampaignCriterionError=>{:fields=>[{:name=>:reason, :type=>"CampaignCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"CampaignCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded"}, :CampaignCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignCriterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignCriterionPage=>{:fields=>[{:name=>:entries, :type=>"CampaignCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignCriterionReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignCriterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :Carrier=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ContentLabel=>{:fields=>[{:name=>:content_label_type, :type=>"ContentLabelType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Gender=>{:fields=>[{:name=>:gender_type, :type=>"Gender.GenderType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :GeoPoint=>{:fields=>[{:name=>:latitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:longitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileDevice=>{:fields=>[{:name=>:device_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:manufacturer_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_type, :type=>"MobileDevice.DeviceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:operating_system_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :NegativeCampaignCriterion=>{:fields=>[], :base=>"CampaignCriterion"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatingSystemVersion=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_major_version, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_minor_version, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator_type, :type=>"OperatingSystemVersion.OperatorType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Platform=>{:fields=>[{:name=>:platform_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Proximity=>{:fields=>[{:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_distance_units, :type=>"Proximity.DistanceUnits", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_in_units, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :QueryError=>{:fields=>[{:name=>:reason, :type=>"QueryError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :String_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter"}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"CampaignCriterionError.Reason"=>{:fields=>[]}, :"CampaignCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :ContentLabelType=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Gender.GenderType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"MobileDevice.DeviceType"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperatingSystemVersion.OperatorType"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"Proximity.DistanceUnits"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RegionCodeError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}} - CAMPAIGNCRITERIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CAMPAIGNCRITERIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CAMPAIGNCRITERIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CAMPAIGNCRITERIONSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CampaignCriterionServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_feed_service.rb b/adwords_api/lib/adwords_api/v201306/campaign_feed_service.rb deleted file mode 100644 index 825943c60..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_feed_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:40. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/campaign_feed_service_registry' - -module AdwordsApi; module V201306; module CampaignFeedService - class CampaignFeedService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return CampaignFeedServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CampaignFeedService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201306/campaign_feed_service_registry.rb deleted file mode 100644 index 449e71efe..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_feed_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:41. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CampaignFeedService - class CampaignFeedServiceRegistry - CAMPAIGNFEEDSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignFeedPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignFeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - CAMPAIGNFEEDSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignFeed=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:matching_function, :type=>"Function", :min_occurs=>0, :max_occurs=>1}, {:name=>:placeholder_types, :type=>"int", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:status, :type=>"CampaignFeed.Status", :min_occurs=>0, :max_occurs=>1}]}, :CampaignFeedError=>{:fields=>[{:name=>:reason, :type=>"CampaignFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignFeedOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignFeedPage=>{:fields=>[{:name=>:entries, :type=>"CampaignFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :CampaignFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConstantOperand=>{:fields=>[{:name=>:type, :type=>"ConstantOperand.ConstantType", :min_occurs=>0, :max_occurs=>1}, {:name=>:long_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:boolean_value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:double_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:string_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedAttributeOperand=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_attribute_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :Function=>{:fields=>[{:name=>:operator, :type=>"Function.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:lhs_operand, :type=>"FunctionArgumentOperand", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:rhs_operand, :type=>"FunctionArgumentOperand", :min_occurs=>0, :max_occurs=>:unbounded}]}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionOperand=>{:fields=>[{:name=>:value, :type=>"Function", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :FunctionArgumentOperand=>{:fields=>[{:name=>:function_argument_operand_type, :original_name=>"FunctionArgumentOperand.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestContextOperand=>{:fields=>[{:name=>:context_type, :type=>"RequestContextOperand.ContextType", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"CampaignFeed.Status"=>{:fields=>[]}, :"CampaignFeedError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"ConstantOperand.ConstantType"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Function.Operator"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestContextOperand.ContextType"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - CAMPAIGNFEEDSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CAMPAIGNFEEDSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CAMPAIGNFEEDSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CAMPAIGNFEEDSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CampaignFeedServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_service.rb b/adwords_api/lib/adwords_api/v201306/campaign_service.rb deleted file mode 100644 index 6b87ff28e..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:43. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/campaign_service_registry' - -module AdwordsApi; module V201306; module CampaignService - class CampaignService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - def query(*args, &block) - return execute_action('query', args, &block) - end - - private - - def get_service_registry() - return CampaignServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CampaignService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_service_registry.rb b/adwords_api/lib/adwords_api/v201306/campaign_service_registry.rb deleted file mode 100644 index 2c3f5b5d9..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:43. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CampaignService - class CampaignServiceRegistry - CAMPAIGNSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"CampaignPage", :min_occurs=>0, :max_occurs=>1}]}}} - CAMPAIGNSERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingError=>{:fields=>[{:name=>:reason, :type=>"BiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingTransitionError=>{:fields=>[{:name=>:reason, :type=>"BiddingTransitionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BudgetError=>{:fields=>[{:name=>:reason, :type=>"BudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignError=>{:fields=>[{:name=>:reason, :type=>"CampaignError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignStats=>{:fields=>[], :base=>"Stats"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConversionOptimizerBiddingScheme=>{:fields=>[{:name=>:pricing_mode, :type=>"ConversionOptimizerBiddingScheme.PricingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_type, :type=>"ConversionOptimizerBiddingScheme.BidType", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ConversionOptimizerEligibility=>{:fields=>[{:name=>:eligible, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:rejection_reasons, :type=>"ConversionOptimizerEligibility.RejectionReason", :min_occurs=>0, :max_occurs=>:unbounded}]}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EnhancedCpcBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FrequencyCap=>{:fields=>[{:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:time_unit, :type=>"TimeUnit", :min_occurs=>0, :max_occurs=>1}, {:name=>:level, :type=>"Level", :min_occurs=>0, :max_occurs=>1}]}, :GeoTargetTypeSetting=>{:fields=>[{:name=>:positive_geo_target_type, :type=>"GeoTargetTypeSetting.PositiveGeoTargetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:negative_geo_target_type, :type=>"GeoTargetTypeSetting.NegativeGeoTargetType", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :KeywordMatchSetting=>{:fields=>[{:name=>:opt_in, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NetworkSetting=>{:fields=>[{:name=>:target_google_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_content_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_partner_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PercentCpaBid=>{:fields=>[{:name=>:bid, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_cpa_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :PercentCpaBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QueryError=>{:fields=>[{:name=>:reason, :type=>"QueryError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaError=>{:fields=>[{:name=>:reason, :type=>"QuotaError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RealTimeBiddingSetting=>{:fields=>[{:name=>:opt_in, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SettingError=>{:fields=>[{:name=>:reason, :type=>"SettingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :String_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetError=>{:fields=>[{:name=>:reason, :type=>"TargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TrackingSetting=>{:fields=>[{:name=>:tracking_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CpaBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:content_bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpc_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpmBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpm_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PageOnePromotedBiddingScheme=>{:fields=>[{:name=>:strategy_goal, :type=>"PageOnePromotedBiddingScheme.StrategyGoal", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_budget_constained, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_low_quality_score, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :Setting=>{:fields=>[{:name=>:setting_type, :original_name=>"Setting.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetSpendBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Bids=>{:fields=>[{:name=>:bids_type, :original_name=>"Bids.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Budget=>{:fields=>[{:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:period, :type=>"Budget.BudgetPeriod", :min_occurs=>0, :max_occurs=>1}, {:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:delivery_method, :type=>"Budget.BudgetDeliveryMethod", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_explicitly_shared, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Budget.BudgetStatus", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOptimizerBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :BiddingScheme=>{:fields=>[{:name=>:bidding_scheme_type, :original_name=>"BiddingScheme.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BiddingStrategyConfiguration=>{:fields=>[{:name=>:bidding_strategy_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_type, :type=>"BiddingStrategyType", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_source, :type=>"BiddingStrategySource", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_scheme, :type=>"BiddingScheme", :min_occurs=>0, :max_occurs=>1}, {:name=>:bids, :type=>"Bids", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Campaign=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CampaignStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:serving_status, :type=>"ServingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:budget, :type=>"Budget", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_optimizer_eligibility, :type=>"ConversionOptimizerEligibility", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_stats, :type=>"CampaignStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_serving_optimization_status, :type=>"AdServingOptimizationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:frequency_cap, :type=>"FrequencyCap", :min_occurs=>0, :max_occurs=>1}, {:name=>:settings, :type=>"Setting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:enhanced, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CampaignOperation=>{:fields=>[{:name=>:operand, :type=>"Campaign", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignPage=>{:fields=>[{:name=>:entries, :type=>"Campaign", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignReturnValue=>{:fields=>[{:name=>:value, :type=>"Campaign", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdServingOptimizationStatus=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"BiddingTransitionError.Reason"=>{:fields=>[]}, :"Budget.BudgetDeliveryMethod"=>{:fields=>[]}, :"Budget.BudgetPeriod"=>{:fields=>[]}, :"Budget.BudgetStatus"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"CampaignError.Reason"=>{:fields=>[]}, :CampaignStatus=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.BidType"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.PricingMode"=>{:fields=>[]}, :"ConversionOptimizerEligibility.RejectionReason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"GeoTargetTypeSetting.NegativeGeoTargetType"=>{:fields=>[]}, :"GeoTargetTypeSetting.PositiveGeoTargetType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :Level=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"QuotaError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :ServingStatus=>{:fields=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"TargetError.Reason"=>{:fields=>[]}, :TimeUnit=>{:fields=>[]}} - CAMPAIGNSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CAMPAIGNSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CAMPAIGNSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CAMPAIGNSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CampaignServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_shared_set_service.rb b/adwords_api/lib/adwords_api/v201306/campaign_shared_set_service.rb deleted file mode 100644 index 7a1c38aab..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_shared_set_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:47. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/campaign_shared_set_service_registry' - -module AdwordsApi; module V201306; module CampaignSharedSetService - class CampaignSharedSetService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return CampaignSharedSetServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CampaignSharedSetService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/campaign_shared_set_service_registry.rb b/adwords_api/lib/adwords_api/v201306/campaign_shared_set_service_registry.rb deleted file mode 100644 index 5e073387c..000000000 --- a/adwords_api/lib/adwords_api/v201306/campaign_shared_set_service_registry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:48. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CampaignSharedSetService - class CampaignSharedSetServiceRegistry - CAMPAIGNSHAREDSETSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignSharedSetPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignSharedSetOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignSharedSetReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - CAMPAIGNSHAREDSETSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignSharedSet=>{:fields=>[{:name=>:shared_set_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:shared_set_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:shared_set_type, :type=>"SharedSetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CampaignSharedSet.Status", :min_occurs=>0, :max_occurs=>1}]}, :CampaignSharedSetError=>{:fields=>[{:name=>:reason, :type=>"CampaignSharedSetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignSharedSetOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignSharedSet", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignSharedSetPage=>{:fields=>[{:name=>:entries, :type=>"CampaignSharedSet", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :CampaignSharedSetReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignSharedSet", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"CampaignSharedSet.Status"=>{:fields=>[]}, :"CampaignSharedSetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :SharedSetType=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - CAMPAIGNSHAREDSETSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CAMPAIGNSHAREDSETSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CAMPAIGNSHAREDSETSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CAMPAIGNSHAREDSETSERVICE_NAMESPACES[index] - end - end - - # Indicates that this instance is a subtype of ApplicationException. - # Although this field is returned in the response, it is ignored on input - # and cannot be selected. Specify xsi:type instead. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CampaignSharedSetServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/constant_data_service.rb b/adwords_api/lib/adwords_api/v201306/constant_data_service.rb deleted file mode 100644 index 22efe14ed..000000000 --- a/adwords_api/lib/adwords_api/v201306/constant_data_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:50. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/constant_data_service_registry' - -module AdwordsApi; module V201306; module ConstantDataService - class ConstantDataService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get_age_range_criterion(*args, &block) - return execute_action('get_age_range_criterion', args, &block) - end - - def get_carrier_criterion(*args, &block) - return execute_action('get_carrier_criterion', args, &block) - end - - def get_gender_criterion(*args, &block) - return execute_action('get_gender_criterion', args, &block) - end - - def get_language_criterion(*args, &block) - return execute_action('get_language_criterion', args, &block) - end - - def get_mobile_device_criterion(*args, &block) - return execute_action('get_mobile_device_criterion', args, &block) - end - - def get_operating_system_version_criterion(*args, &block) - return execute_action('get_operating_system_version_criterion', args, &block) - end - - def get_user_interest_criterion(*args, &block) - return execute_action('get_user_interest_criterion', args, &block) - end - - def get_vertical_criterion(*args, &block) - return execute_action('get_vertical_criterion', args, &block) - end - - private - - def get_service_registry() - return ConstantDataServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::ConstantDataService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/constant_data_service_registry.rb b/adwords_api/lib/adwords_api/v201306/constant_data_service_registry.rb deleted file mode 100644 index cb738652c..000000000 --- a/adwords_api/lib/adwords_api/v201306/constant_data_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:50. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module ConstantDataService - class ConstantDataServiceRegistry - CONSTANTDATASERVICE_METHODS = {:get_age_range_criterion=>{:input=>[], :output=>{:name=>"get_age_range_criterion_response", :fields=>[{:name=>:rval, :type=>"AgeRange", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_carrier_criterion=>{:input=>[], :output=>{:name=>"get_carrier_criterion_response", :fields=>[{:name=>:rval, :type=>"Carrier", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_gender_criterion=>{:input=>[], :output=>{:name=>"get_gender_criterion_response", :fields=>[{:name=>:rval, :type=>"Gender", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_language_criterion=>{:input=>[], :output=>{:name=>"get_language_criterion_response", :fields=>[{:name=>:rval, :type=>"Language", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_mobile_device_criterion=>{:input=>[], :output=>{:name=>"get_mobile_device_criterion_response", :fields=>[{:name=>:rval, :type=>"MobileDevice", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_operating_system_version_criterion=>{:input=>[], :output=>{:name=>"get_operating_system_version_criterion_response", :fields=>[{:name=>:rval, :type=>"OperatingSystemVersion", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_user_interest_criterion=>{:input=>[], :output=>{:name=>"get_user_interest_criterion_response", :fields=>[{:name=>:rval, :type=>"CriterionUserInterest", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_vertical_criterion=>{:input=>[], :output=>{:name=>"get_vertical_criterion_response", :fields=>[{:name=>:rval, :type=>"Vertical", :min_occurs=>0, :max_occurs=>:unbounded}]}}} - CONSTANTDATASERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AgeRange=>{:fields=>[{:name=>:age_range_type, :type=>"AgeRange.AgeRangeType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Carrier=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Gender=>{:fields=>[{:name=>:gender_type, :type=>"Gender.GenderType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileDevice=>{:fields=>[{:name=>:device_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:manufacturer_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_type, :type=>"MobileDevice.DeviceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:operating_system_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatingSystemVersion=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_major_version, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_minor_version, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator_type, :type=>"OperatingSystemVersion.OperatorType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter"}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"Gender.GenderType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :"MobileDevice.DeviceType"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperatingSystemVersion.OperatorType"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}} - CONSTANTDATASERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CONSTANTDATASERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CONSTANTDATASERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CONSTANTDATASERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, ConstantDataServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/conversion_tracker_service.rb b/adwords_api/lib/adwords_api/v201306/conversion_tracker_service.rb deleted file mode 100644 index ac6d7ddb6..000000000 --- a/adwords_api/lib/adwords_api/v201306/conversion_tracker_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:54. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/conversion_tracker_service_registry' - -module AdwordsApi; module V201306; module ConversionTrackerService - class ConversionTrackerService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return ConversionTrackerServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::ConversionTrackerService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/conversion_tracker_service_registry.rb b/adwords_api/lib/adwords_api/v201306/conversion_tracker_service_registry.rb deleted file mode 100644 index 362f9671f..000000000 --- a/adwords_api/lib/adwords_api/v201306/conversion_tracker_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:54. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module ConversionTrackerService - class ConversionTrackerServiceRegistry - CONVERSIONTRACKERSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"ConversionTrackerPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"ConversionTrackerOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"ConversionTrackerReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - CONVERSIONTRACKERSERVICE_TYPES = {:AdWordsConversionTracker=>{:fields=>[{:name=>:snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:markup_language, :type=>"AdWordsConversionTracker.MarkupLanguage", :min_occurs=>0, :max_occurs=>1}, {:name=>:text_format, :type=>"AdWordsConversionTracker.TextFormat", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_page_language, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:background_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_revenue_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_code_type, :type=>"AdWordsConversionTracker.TrackingCodeType", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :AppConversion=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_platform, :type=>"AppConversion.AppPlatform", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_revenue_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_conversion_type, :type=>"AppConversion.AppConversionType", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ConversionTrackingError=>{:fields=>[{:name=>:reason, :type=>"ConversionTrackingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ConversionTrackerStats=>{:fields=>[{:name=>:num_conversion_events, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_value, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:most_recent_conversion_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_converted_clicks, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :ConversionTracker=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"ConversionTracker.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:category, :type=>"ConversionTracker.Category", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"ConversionTrackerStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:viewthrough_lookback_window, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_product_ads_chargeable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:product_ads_chargeable_conversion_window, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_tracker_type, :original_name=>"ConversionTracker.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ConversionTrackerOperation=>{:fields=>[{:name=>:operand, :type=>"ConversionTracker", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :ConversionTrackerReturnValue=>{:fields=>[{:name=>:value, :type=>"ConversionTracker", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ConversionTrackerPage=>{:fields=>[{:name=>:entries, :type=>"ConversionTracker", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AdWordsConversionTracker.MarkupLanguage"=>{:fields=>[]}, :"AdWordsConversionTracker.TextFormat"=>{:fields=>[]}, :"AdWordsConversionTracker.TrackingCodeType"=>{:fields=>[]}, :"AppConversion.AppConversionType"=>{:fields=>[]}, :"AppConversion.AppPlatform"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConversionTracker.Category"=>{:fields=>[]}, :"ConversionTracker.Status"=>{:fields=>[]}, :"ConversionTrackingError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - CONVERSIONTRACKERSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return CONVERSIONTRACKERSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CONVERSIONTRACKERSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CONVERSIONTRACKERSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, ConversionTrackerServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/customer_service.rb b/adwords_api/lib/adwords_api/v201306/customer_service.rb deleted file mode 100644 index 2c14d870b..000000000 --- a/adwords_api/lib/adwords_api/v201306/customer_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:56. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/customer_service_registry' - -module AdwordsApi; module V201306; module CustomerService - class CustomerService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/mcm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - private - - def get_service_registry() - return CustomerServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CustomerService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/customer_service_registry.rb b/adwords_api/lib/adwords_api/v201306/customer_service_registry.rb deleted file mode 100644 index 6c6dde78f..000000000 --- a/adwords_api/lib/adwords_api/v201306/customer_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:57. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CustomerService - class CustomerServiceRegistry - CUSTOMERSERVICE_METHODS = {:get=>{:input=>[], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"Customer", :min_occurs=>0, :max_occurs=>1}]}}} - CUSTOMERSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :Customer=>{:fields=>[{:name=>:customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:date_time_zone, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:descriptive_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:can_manage_clients, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:test_account, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}} - CUSTOMERSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return CUSTOMERSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CUSTOMERSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CUSTOMERSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CustomerServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/customer_sync_service.rb b/adwords_api/lib/adwords_api/v201306/customer_sync_service.rb deleted file mode 100644 index da50cc284..000000000 --- a/adwords_api/lib/adwords_api/v201306/customer_sync_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:03:59. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/customer_sync_service_registry' - -module AdwordsApi; module V201306; module CustomerSyncService - class CustomerSyncService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/ch/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - private - - def get_service_registry() - return CustomerSyncServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::CustomerSyncService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/customer_sync_service_registry.rb b/adwords_api/lib/adwords_api/v201306/customer_sync_service_registry.rb deleted file mode 100644 index 4a2419a01..000000000 --- a/adwords_api/lib/adwords_api/v201306/customer_sync_service_registry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:00. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module CustomerSyncService - class CustomerSyncServiceRegistry - CUSTOMERSYNCSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"CustomerSyncSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CustomerChangeData", :min_occurs=>0, :max_occurs=>1}]}}} - CUSTOMERSYNCSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateTimeRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AdGroupChangeData=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_change_status, :type=>"ChangeStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:changed_ads, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_feeds, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_feeds, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_ad_group_bid_modifier_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_ad_group_bid_modifier_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CampaignChangeData=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_change_status, :type=>"ChangeStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:changed_ad_groups, :type=>"AdGroupChangeData", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:added_campaign_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_campaign_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:added_ad_extensions, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_ad_extensions, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_feeds, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_feeds, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:campaign_targeting_changed, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomerSyncError=>{:fields=>[{:name=>:reason, :type=>"CustomerSyncError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedChangeData=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_change_status, :type=>"ChangeStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:changed_feed_items, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:deleted_feed_items, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CustomerChangeData=>{:fields=>[{:name=>:changed_campaigns, :type=>"CampaignChangeData", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_feeds, :type=>"FeedChangeData", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:last_change_timestamp, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CustomerSyncSelector=>{:fields=>[{:name=>:date_time_range, :type=>"DateTimeRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:feed_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ChangeStatus=>{:fields=>[]}, :"CustomerSyncError.Reason"=>{:fields=>[]}} - CUSTOMERSYNCSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return CUSTOMERSYNCSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return CUSTOMERSYNCSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return CUSTOMERSYNCSERVICE_NAMESPACES[index] - end - end - - # Indicates that this instance is a subtype of ApplicationException. - # Although this field is returned in the response, it is ignored on input - # and cannot be selected. Specify xsi:type instead. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, CustomerSyncServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/data_service.rb b/adwords_api/lib/adwords_api/v201306/data_service.rb deleted file mode 100644 index 94dee44e1..000000000 --- a/adwords_api/lib/adwords_api/v201306/data_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:01. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/data_service_registry' - -module AdwordsApi; module V201306; module DataService - class DataService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get_ad_group_bid_landscape(*args, &block) - return execute_action('get_ad_group_bid_landscape', args, &block) - end - - def get_criterion_bid_landscape(*args, &block) - return execute_action('get_criterion_bid_landscape', args, &block) - end - - private - - def get_service_registry() - return DataServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::DataService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/data_service_registry.rb b/adwords_api/lib/adwords_api/v201306/data_service_registry.rb deleted file mode 100644 index 981006230..000000000 --- a/adwords_api/lib/adwords_api/v201306/data_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:02. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module DataService - class DataServiceRegistry - DATASERVICE_METHODS = {:get_ad_group_bid_landscape=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_ad_group_bid_landscape_response", :fields=>[{:name=>:rval, :type=>"AdGroupBidLandscapePage", :min_occurs=>0, :max_occurs=>1}]}}, :get_criterion_bid_landscape=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_criterion_bid_landscape_response", :fields=>[{:name=>:rval, :type=>"CriterionBidLandscapePage", :min_occurs=>0, :max_occurs=>1}]}}} - DATASERVICE_TYPES = {:AdGroupBidLandscape=>{:fields=>[{:name=>:type, :type=>"AdGroupBidLandscape.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:landscape_current, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape"}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionBidLandscape=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DataError=>{:fields=>[{:name=>:reason, :type=>"DataError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"BidLandscape.LandscapePoint"=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:marginal_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:promoted_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :BidLandscape=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:landscape_points, :type=>"BidLandscape.LandscapePoint", :min_occurs=>0, :max_occurs=>:unbounded}], :abstract=>true, :base=>"DataEntry"}, :DataEntry=>{:fields=>[{:name=>:data_entry_type, :original_name=>"DataEntry.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdGroupBidLandscapePage=>{:fields=>[{:name=>:entries, :type=>"AdGroupBidLandscape", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :CriterionBidLandscapePage=>{:fields=>[{:name=>:entries, :type=>"CriterionBidLandscape", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdGroupBidLandscape.Type"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"DataError.Reason"=>{:fields=>[]}} - DATASERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return DATASERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return DATASERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return DATASERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, DataServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/experiment_service.rb b/adwords_api/lib/adwords_api/v201306/experiment_service.rb deleted file mode 100644 index 0936dd1f4..000000000 --- a/adwords_api/lib/adwords_api/v201306/experiment_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:04. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/experiment_service_registry' - -module AdwordsApi; module V201306; module ExperimentService - class ExperimentService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return ExperimentServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::ExperimentService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/experiment_service_registry.rb b/adwords_api/lib/adwords_api/v201306/experiment_service_registry.rb deleted file mode 100644 index 71185666e..000000000 --- a/adwords_api/lib/adwords_api/v201306/experiment_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:04. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module ExperimentService - class ExperimentServiceRegistry - EXPERIMENTSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"ExperimentPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"ExperimentOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"ExperimentReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - EXPERIMENTSERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BudgetError=>{:fields=>[{:name=>:reason, :type=>"BudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ExperimentServiceError=>{:fields=>[{:name=>:reason, :type=>"ExperimentServiceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ExperimentSummaryStats=>{:fields=>[{:name=>:ad_groups_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_criteria_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_ads_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaError=>{:fields=>[{:name=>:reason, :type=>"QuotaError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Experiment=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:control_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"ExperimentStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:serving_status, :type=>"ExperimentServingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:query_percentage, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:last_modified_date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_summary_stats, :type=>"ExperimentSummaryStats", :min_occurs=>0, :max_occurs=>1}]}, :ExperimentOperation=>{:fields=>[{:name=>:operand, :type=>"Experiment", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :ExperimentReturnValue=>{:fields=>[{:name=>:value, :type=>"Experiment", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ExperimentPage=>{:fields=>[{:name=>:entries, :type=>"Experiment", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ExperimentServiceError.Reason"=>{:fields=>[]}, :ExperimentServingStatus=>{:fields=>[]}, :ExperimentStatus=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"QuotaError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - EXPERIMENTSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return EXPERIMENTSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return EXPERIMENTSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return EXPERIMENTSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, ExperimentServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/feed_item_service.rb b/adwords_api/lib/adwords_api/v201306/feed_item_service.rb deleted file mode 100644 index 42240018c..000000000 --- a/adwords_api/lib/adwords_api/v201306/feed_item_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:07. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/feed_item_service_registry' - -module AdwordsApi; module V201306; module FeedItemService - class FeedItemService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return FeedItemServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::FeedItemService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/feed_item_service_registry.rb b/adwords_api/lib/adwords_api/v201306/feed_item_service_registry.rb deleted file mode 100644 index f10bf5c51..000000000 --- a/adwords_api/lib/adwords_api/v201306/feed_item_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:08. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module FeedItemService - class FeedItemServiceRegistry - FEEDITEMSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"FeedItemPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"FeedItemOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"FeedItemReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - FEEDITEMSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemAttributeError=>{:fields=>[{:name=>:feed_attribute_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:validation_error_code, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemAttributeValue=>{:fields=>[{:name=>:feed_attribute_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:integer_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:double_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:boolean_value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:string_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemDevicePreference=>{:fields=>[{:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemError=>{:fields=>[{:name=>:reason, :type=>"FeedItemError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemSchedule=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemScheduling=>{:fields=>[{:name=>:feed_item_schedules, :type=>"FeedItemSchedule", :min_occurs=>0, :max_occurs=>:unbounded}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemValidationDetail=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_status, :type=>"FeedItemValidationDetail.ValidationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_errors, :type=>"FeedItemAttributeError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:approval_status, :type=>"FeedItemValidationDetail.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}]}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FeedItem=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_item_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"FeedItem.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute_values, :type=>"FeedItemAttributeValue", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:validation_details, :type=>"FeedItemValidationDetail", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:device_preference, :type=>"FeedItemDevicePreference", :min_occurs=>0, :max_occurs=>1}, {:name=>:scheduling, :type=>"FeedItemScheduling", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemOperation=>{:fields=>[{:name=>:operand, :type=>"FeedItem", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :FeedItemPage=>{:fields=>[{:name=>:entries, :type=>"FeedItem", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :FeedItemReturnValue=>{:fields=>[{:name=>:value, :type=>"FeedItem", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedItem.Status"=>{:fields=>[]}, :"FeedItemError.Reason"=>{:fields=>[]}, :"FeedItemValidationDetail.ApprovalStatus"=>{:fields=>[]}, :"FeedItemValidationDetail.ValidationStatus"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - FEEDITEMSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return FEEDITEMSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return FEEDITEMSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return FEEDITEMSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, FeedItemServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/feed_mapping_service.rb b/adwords_api/lib/adwords_api/v201306/feed_mapping_service.rb deleted file mode 100644 index a72bc9bbc..000000000 --- a/adwords_api/lib/adwords_api/v201306/feed_mapping_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:10. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/feed_mapping_service_registry' - -module AdwordsApi; module V201306; module FeedMappingService - class FeedMappingService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return FeedMappingServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::FeedMappingService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/feed_mapping_service_registry.rb b/adwords_api/lib/adwords_api/v201306/feed_mapping_service_registry.rb deleted file mode 100644 index e83e2ca15..000000000 --- a/adwords_api/lib/adwords_api/v201306/feed_mapping_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:10. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module FeedMappingService - class FeedMappingServiceRegistry - FEEDMAPPINGSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"FeedMappingPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"FeedMappingOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"FeedMappingReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - FEEDMAPPINGSERVICE_TYPES = {:AttributeFieldMapping=>{:fields=>[{:name=>:feed_attribute_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedMapping=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:placeholder_type, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"FeedMapping.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute_field_mappings, :type=>"AttributeFieldMapping", :min_occurs=>0, :max_occurs=>:unbounded}]}, :FeedMappingError=>{:fields=>[{:name=>:reason, :type=>"FeedMappingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedMappingOperation=>{:fields=>[{:name=>:operand, :type=>"FeedMapping", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :FeedMappingPage=>{:fields=>[{:name=>:entries, :type=>"FeedMapping", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :FeedMappingReturnValue=>{:fields=>[{:name=>:value, :type=>"FeedMapping", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedMapping.Status"=>{:fields=>[]}, :"FeedMappingError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - FEEDMAPPINGSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return FEEDMAPPINGSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return FEEDMAPPINGSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return FEEDMAPPINGSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, FeedMappingServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/feed_service.rb b/adwords_api/lib/adwords_api/v201306/feed_service.rb deleted file mode 100644 index 37798c87c..000000000 --- a/adwords_api/lib/adwords_api/v201306/feed_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:12. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/feed_service_registry' - -module AdwordsApi; module V201306; module FeedService - class FeedService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return FeedServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::FeedService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/feed_service_registry.rb b/adwords_api/lib/adwords_api/v201306/feed_service_registry.rb deleted file mode 100644 index a1f123f1b..000000000 --- a/adwords_api/lib/adwords_api/v201306/feed_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:13. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module FeedService - class FeedServiceRegistry - FEEDSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"FeedPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"FeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"FeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - FEEDSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedAttribute=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"FeedAttribute.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_part_of_key, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :FeedError=>{:fields=>[{:name=>:reason, :type=>"FeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Feed=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:attributes, :type=>"FeedAttribute", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:status, :type=>"Feed.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:origin, :type=>"Feed.Origin", :min_occurs=>0, :max_occurs=>1}]}, :FeedOperation=>{:fields=>[{:name=>:operand, :type=>"Feed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :FeedPage=>{:fields=>[{:name=>:entries, :type=>"Feed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :FeedReturnValue=>{:fields=>[{:name=>:value, :type=>"Feed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Feed.Origin"=>{:fields=>[]}, :"Feed.Status"=>{:fields=>[]}, :"FeedAttribute.Type"=>{:fields=>[]}, :"FeedError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - FEEDSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return FEEDSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return FEEDSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return FEEDSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, FeedServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/geo_location_service.rb b/adwords_api/lib/adwords_api/v201306/geo_location_service.rb deleted file mode 100644 index 4e5b29390..000000000 --- a/adwords_api/lib/adwords_api/v201306/geo_location_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:15. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/geo_location_service_registry' - -module AdwordsApi; module V201306; module GeoLocationService - class GeoLocationService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - private - - def get_service_registry() - return GeoLocationServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::GeoLocationService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/geo_location_service_registry.rb b/adwords_api/lib/adwords_api/v201306/geo_location_service_registry.rb deleted file mode 100644 index d5faced28..000000000 --- a/adwords_api/lib/adwords_api/v201306/geo_location_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:15. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module GeoLocationService - class GeoLocationServiceRegistry - GEOLOCATIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"GeoLocationSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"GeoLocation", :min_occurs=>0, :max_occurs=>:unbounded}]}}} - GEOLOCATIONSERVICE_TYPES = {:Address=>{:fields=>[{:name=>:street_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:street_address2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:city_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:postal_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoLocationError=>{:fields=>[{:name=>:reason, :type=>"GeoLocationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoLocationSelector=>{:fields=>[{:name=>:addresses, :type=>"Address", :min_occurs=>0, :max_occurs=>:unbounded}]}, :GeoPoint=>{:fields=>[{:name=>:latitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:longitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InvalidGeoLocation=>{:fields=>[], :base=>"GeoLocation"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoLocation=>{:fields=>[{:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}, {:name=>:encoded_location, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_location_type, :original_name=>"GeoLocation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"GeoLocationError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RegionCodeError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - GEOLOCATIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return GEOLOCATIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return GEOLOCATIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return GEOLOCATIONSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, GeoLocationServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/location_criterion_service.rb b/adwords_api/lib/adwords_api/v201306/location_criterion_service.rb deleted file mode 100644 index be7c3070c..000000000 --- a/adwords_api/lib/adwords_api/v201306/location_criterion_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:17. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/location_criterion_service_registry' - -module AdwordsApi; module V201306; module LocationCriterionService - class LocationCriterionService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - private - - def get_service_registry() - return LocationCriterionServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::LocationCriterionService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/location_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201306/location_criterion_service_registry.rb deleted file mode 100644 index 847e5300a..000000000 --- a/adwords_api/lib/adwords_api/v201306/location_criterion_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:18. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module LocationCriterionService - class LocationCriterionServiceRegistry - LOCATIONCRITERIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"LocationCriterion", :min_occurs=>0, :max_occurs=>:unbounded}]}}} - LOCATIONCRITERIONSERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Date=>{:fields=>[{:name=>:year, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:month, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:day, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"Date", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"Date", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :LocationCriterion=>{:fields=>[{:name=>:location, :type=>"Location", :min_occurs=>0, :max_occurs=>1}, {:name=>:canonical_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:reach, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:locale, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:search_term, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :LocationCriterionServiceError=>{:fields=>[{:name=>:reason, :type=>"LocationCriterionServiceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter"}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :"LocationCriterionServiceError.Reason"=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}} - LOCATIONCRITERIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return LOCATIONCRITERIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return LOCATIONCRITERIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return LOCATIONCRITERIONSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, LocationCriterionServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/managed_customer_service.rb b/adwords_api/lib/adwords_api/v201306/managed_customer_service.rb deleted file mode 100644 index 26e7685ea..000000000 --- a/adwords_api/lib/adwords_api/v201306/managed_customer_service.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:20. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/managed_customer_service_registry' - -module AdwordsApi; module V201306; module ManagedCustomerService - class ManagedCustomerService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/mcm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def get_pending_invitations(*args, &block) - return execute_action('get_pending_invitations', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - def mutate_link(*args, &block) - return execute_action('mutate_link', args, &block) - end - - def mutate_manager(*args, &block) - return execute_action('mutate_manager', args, &block) - end - - private - - def get_service_registry() - return ManagedCustomerServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::ManagedCustomerService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/managed_customer_service_registry.rb b/adwords_api/lib/adwords_api/v201306/managed_customer_service_registry.rb deleted file mode 100644 index 199e95920..000000000 --- a/adwords_api/lib/adwords_api/v201306/managed_customer_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:20. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module ManagedCustomerService - class ManagedCustomerServiceRegistry - MANAGEDCUSTOMERSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"ManagedCustomerPage", :min_occurs=>0, :max_occurs=>1}]}}, :get_pending_invitations=>{:input=>[{:name=>:selector, :type=>"PendingInvitationSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_pending_invitations_response", :fields=>[{:name=>:rval, :type=>"PendingInvitation", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"ManagedCustomerOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"ManagedCustomerReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :mutate_link=>{:input=>[{:name=>:operations, :type=>"LinkOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_link_response", :fields=>[{:name=>:rval, :type=>"MutateLinkResults", :min_occurs=>0, :max_occurs=>1}]}}, :mutate_manager=>{:input=>[{:name=>:operations, :type=>"MoveOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_manager_response", :fields=>[{:name=>:rval, :type=>"MutateManagerResults", :min_occurs=>0, :max_occurs=>1}]}}} - MANAGEDCUSTOMERSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"Predicate.Operator"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SelectorError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :SortOrder=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :ManagedCustomerServiceError=>{:fields=>[{:name=>:reason, :type=>"ManagedCustomerServiceError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:customer_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError"}, :PendingInvitationSelector=>{:fields=>[{:name=>:manager_customer_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:client_customer_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ManagedCustomerLink=>{:fields=>[{:name=>:manager_customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:link_status, :type=>"LinkStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:pending_descriptive_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :LinkOperation=>{:fields=>[{:name=>:operand, :type=>"ManagedCustomerLink", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :MoveOperation=>{:fields=>[{:name=>:operand, :type=>"ManagedCustomerLink", :min_occurs=>0, :max_occurs=>1}, {:name=>:old_manager_customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :MutateLinkResults=>{:fields=>[{:name=>:links, :type=>"ManagedCustomerLink", :min_occurs=>0, :max_occurs=>:unbounded}]}, :MutateManagerResults=>{:fields=>[{:name=>:links, :type=>"ManagedCustomerLink", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ManagedCustomer=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:login, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:company_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:can_manage_clients, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:date_time_zone, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:test_account, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :ManagedCustomerOperation=>{:fields=>[{:name=>:operand, :type=>"ManagedCustomer", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :ManagedCustomerPage=>{:fields=>[{:name=>:entries, :type=>"ManagedCustomer", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:links, :type=>"ManagedCustomerLink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :ManagedCustomerReturnValue=>{:fields=>[{:name=>:value, :type=>"ManagedCustomer", :min_occurs=>0, :max_occurs=>:unbounded}]}, :PendingInvitation=>{:fields=>[{:name=>:manager, :type=>"ManagedCustomer", :min_occurs=>0, :max_occurs=>1}, {:name=>:client, :type=>"ManagedCustomer", :min_occurs=>0, :max_occurs=>1}, {:name=>:creation_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:expiration_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :LinkStatus=>{:fields=>[]}, :"ManagedCustomerServiceError.Reason"=>{:fields=>[]}} - MANAGEDCUSTOMERSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return MANAGEDCUSTOMERSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return MANAGEDCUSTOMERSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return MANAGEDCUSTOMERSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, ManagedCustomerServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/media_service.rb b/adwords_api/lib/adwords_api/v201306/media_service.rb deleted file mode 100644 index c1ccdb504..000000000 --- a/adwords_api/lib/adwords_api/v201306/media_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:23. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/media_service_registry' - -module AdwordsApi; module V201306; module MediaService - class MediaService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def upload(*args, &block) - return execute_action('upload', args, &block) - end - - private - - def get_service_registry() - return MediaServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::MediaService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/media_service_registry.rb b/adwords_api/lib/adwords_api/v201306/media_service_registry.rb deleted file mode 100644 index 7fdc81f9c..000000000 --- a/adwords_api/lib/adwords_api/v201306/media_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:24. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module MediaService - class MediaServiceRegistry - MEDIASERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"MediaPage", :min_occurs=>0, :max_occurs=>1}]}}, :upload=>{:input=>[{:name=>:media, :type=>"Media", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"upload_response", :fields=>[{:name=>:rval, :type=>"Media", :min_occurs=>0, :max_occurs=>:unbounded}]}}} - MEDIASERVICE_TYPES = {:Audio=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :AudioError=>{:fields=>[{:name=>:reason, :type=>"AudioError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Dimensions=>{:fields=>[{:name=>:width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:height, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Image=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :ImageError=>{:fields=>[{:name=>:reason, :type=>"ImageError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MediaError=>{:fields=>[{:name=>:reason, :type=>"MediaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Media_Size_DimensionsMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}]}, :Media_Size_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Video=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:industry_standard_commercial_identifier, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertising_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:you_tube_video_id_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :VideoError=>{:fields=>[{:name=>:reason, :type=>"VideoError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Media=>{:fields=>[{:name=>:media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Media.MediaType", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimensions, :type=>"Media_Size_DimensionsMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:urls, :type=>"Media_Size_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mime_type, :type=>"Media.MimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:creation_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_type, :original_name=>"Media.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MediaPage=>{:fields=>[{:name=>:entries, :type=>"Media", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AudioError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"Media.MediaType"=>{:fields=>[]}, :"Media.MimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"VideoError.Reason"=>{:fields=>[]}} - MEDIASERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return MEDIASERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return MEDIASERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return MEDIASERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, MediaServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/mutate_job_service.rb b/adwords_api/lib/adwords_api/v201306/mutate_job_service.rb deleted file mode 100644 index 3a8edfa44..000000000 --- a/adwords_api/lib/adwords_api/v201306/mutate_job_service.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:26. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/mutate_job_service_registry' - -module AdwordsApi; module V201306; module MutateJobService - class MutateJobService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def get_result(*args, &block) - return execute_action('get_result', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return MutateJobServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::MutateJobService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/mutate_job_service_registry.rb b/adwords_api/lib/adwords_api/v201306/mutate_job_service_registry.rb deleted file mode 100644 index 72b692456..000000000 --- a/adwords_api/lib/adwords_api/v201306/mutate_job_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:27. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module MutateJobService - class MutateJobServiceRegistry - MUTATEJOBSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"JobSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"Job", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_result=>{:input=>[{:name=>:selector, :type=>"JobSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_result_response", :fields=>[{:name=>:rval, :type=>"JobResult", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"Operation", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy, :type=>"BulkMutateJobPolicy", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"SimpleMutateJob", :min_occurs=>0, :max_occurs=>1}]}}} - MUTATEJOBSERVICE_TYPES = {:Ad=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:disapproval_reasons, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_type, :original_name=>"Ad.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdExtension=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension_type, :original_name=>"AdExtension.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionError=>{:fields=>[{:name=>:reason, :type=>"AdExtensionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdExtensionOverride=>{:fields=>[{:name=>:ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension, :type=>"AdExtension", :min_occurs=>0, :max_occurs=>1}, {:name=>:override_info, :type=>"OverrideInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdExtensionOverride.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"AdExtensionOverride.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"AdExtensionOverrideStats", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionOverrideError=>{:fields=>[{:name=>:reason, :type=>"AdExtensionOverrideError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdExtensionOverrideOperation=>{:fields=>[{:name=>:operand, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdExtensionOverrideStats=>{:fields=>[], :base=>"Stats"}, :AdGroup=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdGroup.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:settings, :type=>"Setting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:experiment_data, :type=>"AdGroupExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"Stats", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:content_bid_criterion_type_group, :type=>"CriterionTypeGroup", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAd=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad, :type=>"Ad", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"AdGroupAdExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdGroupAd.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"AdGroupAd.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:trademark_disapproved, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"AdStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AdGroupAdCountLimitExceeded=>{:fields=>[], :base=>"EntityCountLimitExceeded"}, :AdGroupAdError=>{:fields=>[{:name=>:reason, :type=>"AdGroupAdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupAdExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAdOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupBidModifier=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier_source, :type=>"BidModifierSource", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupBidModifierOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupBidModifier", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupCriterion=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_use, :type=>"CriterionUse", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_group_criterion_type, :original_name=>"AdGroupCriterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"AdGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupCriterionExperimentBidMultiplier=>{:fields=>[{:name=>:ad_group_criterion_experiment_bid_multiplier_type, :original_name=>"AdGroupCriterionExperimentBidMultiplier.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdGroupCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"AdGroupCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded"}, :AdGroupCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:ad_group_experiment_bid_multipliers_type, :original_name=>"AdGroupExperimentBidMultipliers.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdGroupExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_bid_multipliers, :type=>"AdGroupExperimentBidMultipliers", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupServiceError=>{:fields=>[{:name=>:reason, :type=>"AdGroupServiceError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdSchedule=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :AdScheduleTarget=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_multiplier, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Target"}, :AdScheduleTargetList=>{:fields=>[{:name=>:targets, :type=>"AdScheduleTarget", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"TargetList"}, :AdStats=>{:fields=>[{:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Stats"}, :AdUnionId=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_union_id_type, :original_name=>"AdUnionId.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Address=>{:fields=>[{:name=>:street_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:street_address2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:city_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:postal_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AgeRange=>{:fields=>[{:name=>:age_range_type, :type=>"AgeRange.AgeRangeType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiErrorReason=>{:fields=>[], :choices=>[{:name=>:ad_error_reason, :original_name=>"AdErrorReason", :type=>"AdError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_extension_error_reason, :original_name=>"AdExtensionErrorReason", :type=>"AdExtensionError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_extension_override_error_reason, :original_name=>"AdExtensionOverrideErrorReason", :type=>"AdExtensionOverrideError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group_ad_error_reason, :original_name=>"AdGroupAdErrorReason", :type=>"AdGroupAdError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group_criterion_error_reason, :original_name=>"AdGroupCriterionErrorReason", :type=>"AdGroupCriterionError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group_service_error_reason, :original_name=>"AdGroupServiceErrorReason", :type=>"AdGroupServiceError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:adx_error_reason, :original_name=>"AdxErrorReason", :type=>"AdxError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:authentication_error_reason, :original_name=>"AuthenticationErrorReason", :type=>"AuthenticationError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:authorization_error_reason, :original_name=>"AuthorizationErrorReason", :type=>"AuthorizationError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:beta_error_reason, :original_name=>"BetaErrorReason", :type=>"BetaError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:bidding_error_reason, :original_name=>"BiddingErrorReason", :type=>"BiddingError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:bidding_errors_reason, :original_name=>"BiddingErrorsReason", :type=>"BiddingErrors.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:bidding_transition_error_reason, :original_name=>"BiddingTransitionErrorReason", :type=>"BiddingTransitionError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:budget_error_reason, :original_name=>"BudgetErrorReason", :type=>"BudgetError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:bulk_mutate_job_error_reason, :original_name=>"BulkMutateJobErrorReason", :type=>"BulkMutateJobError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:campaign_ad_extension_error_reason, :original_name=>"CampaignAdExtensionErrorReason", :type=>"CampaignAdExtensionError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:campaign_criterion_error_reason, :original_name=>"CampaignCriterionErrorReason", :type=>"CampaignCriterionError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:campaign_error_reason, :original_name=>"CampaignErrorReason", :type=>"CampaignError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:client_terms_error_reason, :original_name=>"ClientTermsErrorReason", :type=>"ClientTermsError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:criterion_error_reason, :original_name=>"CriterionErrorReason", :type=>"CriterionError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:database_error_reason, :original_name=>"DatabaseErrorReason", :type=>"DatabaseError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:date_error_reason, :original_name=>"DateErrorReason", :type=>"DateError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:distinct_error_reason, :original_name=>"DistinctErrorReason", :type=>"DistinctError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:entity_access_denied_reason, :original_name=>"EntityAccessDeniedReason", :type=>"EntityAccessDenied.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:entity_count_limit_exceeded_reason, :original_name=>"EntityCountLimitExceededReason", :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:entity_not_found_reason, :original_name=>"EntityNotFoundReason", :type=>"EntityNotFound.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:feed_item_error_reason, :original_name=>"FeedItemErrorReason", :type=>"FeedItemError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:forward_compatibility_error_reason, :original_name=>"ForwardCompatibilityErrorReason", :type=>"ForwardCompatibilityError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:id_error_reason, :original_name=>"IdErrorReason", :type=>"IdError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:image_error_reason, :original_name=>"ImageErrorReason", :type=>"ImageError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:internal_api_error_reason, :original_name=>"InternalApiErrorReason", :type=>"InternalApiError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:job_error_reason, :original_name=>"JobErrorReason", :type=>"JobError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:media_error_reason, :original_name=>"MediaErrorReason", :type=>"MediaError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:new_entity_creation_error_reason, :original_name=>"NewEntityCreationErrorReason", :type=>"NewEntityCreationError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:not_empty_error_reason, :original_name=>"NotEmptyErrorReason", :type=>"NotEmptyError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:not_whitelisted_error_reason, :original_name=>"NotWhitelistedErrorReason", :type=>"NotWhitelistedError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:null_error_reason, :original_name=>"NullErrorReason", :type=>"NullError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:operation_access_denied_reason, :original_name=>"OperationAccessDeniedReason", :type=>"OperationAccessDenied.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:operator_error_reason, :original_name=>"OperatorErrorReason", :type=>"OperatorError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:paging_error_reason, :original_name=>"PagingErrorReason", :type=>"PagingError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:policy_violation_error_reason, :original_name=>"PolicyViolationErrorReason", :type=>"PolicyViolationError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:query_error_reason, :original_name=>"QueryErrorReason", :type=>"QueryError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:quota_check_error_reason, :original_name=>"QuotaCheckErrorReason", :type=>"QuotaCheckError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:quota_error_reason, :original_name=>"QuotaErrorReason", :type=>"QuotaError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:range_error_reason, :original_name=>"RangeErrorReason", :type=>"RangeError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:rate_exceeded_error_reason, :original_name=>"RateExceededErrorReason", :type=>"RateExceededError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:read_only_error_reason, :original_name=>"ReadOnlyErrorReason", :type=>"ReadOnlyError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_code_error_reason, :original_name=>"RegionCodeErrorReason", :type=>"RegionCodeError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:rejected_error_reason, :original_name=>"RejectedErrorReason", :type=>"RejectedError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:request_error_reason, :original_name=>"RequestErrorReason", :type=>"RequestError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:required_error_reason, :original_name=>"RequiredErrorReason", :type=>"RequiredError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:selector_error_reason, :original_name=>"SelectorErrorReason", :type=>"SelectorError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:setting_error_reason, :original_name=>"SettingErrorReason", :type=>"SettingError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:size_limit_error_reason, :original_name=>"SizeLimitErrorReason", :type=>"SizeLimitError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:stats_query_error_reason, :original_name=>"StatsQueryErrorReason", :type=>"StatsQueryError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:string_length_error_reason, :original_name=>"StringLengthErrorReason", :type=>"StringLengthError.Reason", :min_occurs=>1, :max_occurs=>1}, {:name=>:target_error_reason, :original_name=>"TargetErrorReason", :type=>"TargetError.Reason", :min_occurs=>1, :max_occurs=>1}]}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Audio=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BatchFailureResult=>{:fields=>[{:name=>:operation_index_in_batch, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"OperationResult"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Bid=>{:fields=>[{:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :BidMultiplier=>{:fields=>[{:name=>:multiplier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplied_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}]}, :BiddableAdGroupCriterion=>{:fields=>[{:name=>:user_status, :type=>"UserStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:system_serving_status, :type=>"SystemServingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:disapproval_reasons, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"BiddableAdGroupCriterionExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:first_page_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:top_of_page_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_info, :type=>"QualityInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"Stats", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterion"}, :BiddableAdGroupCriterionExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_bid_multiplier, :type=>"AdGroupCriterionExperimentBidMultiplier", :min_occurs=>0, :max_occurs=>1}]}, :BiddingError=>{:fields=>[{:name=>:reason, :type=>"BiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BiddingScheme=>{:fields=>[{:name=>:bidding_scheme_type, :original_name=>"BiddingScheme.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BiddingStrategyConfiguration=>{:fields=>[{:name=>:bidding_strategy_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_type, :type=>"BiddingStrategyType", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_source, :type=>"BiddingStrategySource", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_scheme, :type=>"BiddingScheme", :min_occurs=>0, :max_occurs=>1}, {:name=>:bids, :type=>"Bids", :min_occurs=>0, :max_occurs=>:unbounded}]}, :BiddingTransitionError=>{:fields=>[{:name=>:reason, :type=>"BiddingTransitionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Bids=>{:fields=>[{:name=>:bids_type, :original_name=>"Bids.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BillingSummary=>{:fields=>[{:name=>:num_operations, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_units, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :Budget=>{:fields=>[{:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:period, :type=>"Budget.BudgetPeriod", :min_occurs=>0, :max_occurs=>1}, {:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:delivery_method, :type=>"Budget.BudgetDeliveryMethod", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_explicitly_shared, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Budget.BudgetStatus", :min_occurs=>0, :max_occurs=>1}]}, :BudgetError=>{:fields=>[{:name=>:reason, :type=>"BudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BudgetOperation=>{:fields=>[{:name=>:operand, :type=>"Budget", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :BudgetOptimizerBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :BulkMutateJob=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy, :type=>"BulkMutateJobPolicy", :min_occurs=>0, :max_occurs=>1}, {:name=>:request, :type=>"BulkMutateRequest", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"BasicJobStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:history, :type=>"BulkMutateJobEvent", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:result, :type=>"BulkMutateResult", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_request_parts, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_request_parts_received, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"Job"}, :BulkMutateJobError=>{:fields=>[{:name=>:reason, :type=>"BulkMutateJobError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BulkMutateJobEvent=>{:fields=>[{:name=>:status, :type=>"BasicJobStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"JobEvent"}, :BulkMutateJobPolicy=>{:fields=>[{:name=>:prerequisite_job_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :BulkMutateJobSelector=>{:fields=>[{:name=>:job_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:result_part_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"JobSelector"}, :BulkMutateJobStats=>{:fields=>[{:name=>:num_operations, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_failed_operations, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_unprocessed_operations, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"JobStats"}, :BulkMutateRequest=>{:fields=>[{:name=>:part_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_streams, :type=>"OperationStream", :min_occurs=>0, :max_occurs=>:unbounded}]}, :BulkMutateResult=>{:fields=>[{:name=>:part_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_stream_results, :type=>"OperationStreamResult", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Campaign=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CampaignStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:serving_status, :type=>"ServingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:budget, :type=>"Budget", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_optimizer_eligibility, :type=>"ConversionOptimizerEligibility", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_stats, :type=>"CampaignStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_serving_optimization_status, :type=>"AdServingOptimizationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:frequency_cap, :type=>"FrequencyCap", :min_occurs=>0, :max_occurs=>1}, {:name=>:settings, :type=>"Setting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:enhanced, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CampaignAdExtension=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension, :type=>"AdExtension", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CampaignAdExtension.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"CampaignAdExtension.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"CampaignAdExtensionStats", :min_occurs=>0, :max_occurs=>1}]}, :CampaignAdExtensionError=>{:fields=>[{:name=>:reason, :type=>"CampaignAdExtensionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignAdExtensionOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignAdExtension", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignAdExtensionStats=>{:fields=>[], :base=>"Stats"}, :CampaignCriterion=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_negative, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:campaign_criterion_type, :original_name=>"CampaignCriterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CampaignCriterionError=>{:fields=>[{:name=>:reason, :type=>"CampaignCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"CampaignCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded"}, :CampaignCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignCriterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignError=>{:fields=>[{:name=>:reason, :type=>"CampaignError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignOperation=>{:fields=>[{:name=>:operand, :type=>"Campaign", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignStats=>{:fields=>[], :base=>"Stats"}, :CampaignTargetOperation=>{:fields=>[{:name=>:operand, :type=>"TargetList", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :Carrier=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ContentLabel=>{:fields=>[{:name=>:content_label_type, :type=>"ContentLabelType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ConversionOptimizerBiddingScheme=>{:fields=>[{:name=>:pricing_mode, :type=>"ConversionOptimizerBiddingScheme.PricingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_type, :type=>"ConversionOptimizerBiddingScheme.BidType", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ConversionOptimizerEligibility=>{:fields=>[{:name=>:eligible, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:rejection_reasons, :type=>"ConversionOptimizerEligibility.RejectionReason", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CpaBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:content_bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpc_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpmBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:cpm_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CriterionPolicyError=>{:fields=>[], :base=>"PolicyViolationError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DeprecatedAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"DeprecatedAd.Type", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :Dimensions=>{:fields=>[{:name=>:width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:height, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DomainInfoExtension=>{:fields=>[{:name=>:domain_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EnhancedCpcBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :EntityAccessDenied=>{:fields=>[{:name=>:reason, :type=>"EntityAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityId=>{:fields=>[{:name=>:type, :type=>"EntityId.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :FailureResult=>{:fields=>[{:name=>:cause, :type=>"ApiException", :min_occurs=>0, :max_occurs=>1}], :base=>"OperationResult"}, :FeedItem=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_item_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"FeedItem.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute_values, :type=>"FeedItemAttributeValue", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:validation_details, :type=>"FeedItemValidationDetail", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:device_preference, :type=>"FeedItemDevicePreference", :min_occurs=>0, :max_occurs=>1}, {:name=>:scheduling, :type=>"FeedItemScheduling", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemAttributeError=>{:fields=>[{:name=>:feed_attribute_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:validation_error_code, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemAttributeValue=>{:fields=>[{:name=>:feed_attribute_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:integer_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:double_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:boolean_value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:string_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemDevicePreference=>{:fields=>[{:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemError=>{:fields=>[{:name=>:reason, :type=>"FeedItemError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemOperation=>{:fields=>[{:name=>:operand, :type=>"FeedItem", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :FeedItemSchedule=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_hour, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_minute, :type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemScheduling=>{:fields=>[{:name=>:feed_item_schedules, :type=>"FeedItemSchedule", :min_occurs=>0, :max_occurs=>:unbounded}]}, :FeedItemValidationDetail=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_status, :type=>"FeedItemValidationDetail.ValidationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_errors, :type=>"FeedItemAttributeError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:approval_status, :type=>"FeedItemValidationDetail.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}]}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FrequencyCap=>{:fields=>[{:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:time_unit, :type=>"TimeUnit", :min_occurs=>0, :max_occurs=>1}, {:name=>:level, :type=>"Level", :min_occurs=>0, :max_occurs=>1}]}, :Gender=>{:fields=>[{:name=>:gender_type, :type=>"Gender.GenderType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :GeoPoint=>{:fields=>[{:name=>:latitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:longitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :GeoTargetTypeSetting=>{:fields=>[{:name=>:positive_geo_target_type, :type=>"GeoTargetTypeSetting.PositiveGeoTargetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:negative_geo_target_type, :type=>"GeoTargetTypeSetting.NegativeGeoTargetType", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Image=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :ImageAd=>{:fields=>[{:name=>:image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_to_copy_image_from, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ImageError=>{:fields=>[{:name=>:reason, :type=>"ImageError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InAppLinkExtension=>{:fields=>[{:name=>:in_app_link_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:in_app_link_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_store, :type=>"InAppLinkExtension.AppStore", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Job=>{:fields=>[{:name=>:failure_reason, :type=>"ApiErrorReason", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"JobStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:billing_summary, :type=>"BillingSummary", :min_occurs=>0, :max_occurs=>1}, {:name=>:job_type, :original_name=>"Job.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :JobError=>{:fields=>[{:name=>:reason, :type=>"JobError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :JobEvent=>{:fields=>[{:name=>:date_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:job_event_type, :original_name=>"JobEvent.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :JobResult=>{:fields=>[], :choices=>[{:name=>:bulk_mutate_result, :original_name=>"BulkMutateResult", :type=>"BulkMutateResult", :min_occurs=>1, :max_occurs=>1}, {:name=>:simple_mutate_result, :original_name=>"SimpleMutateResult", :type=>"SimpleMutateResult", :min_occurs=>1, :max_occurs=>1}]}, :JobSelector=>{:fields=>[{:name=>:include_history, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:include_stats, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:job_selector_type, :original_name=>"JobSelector.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :JobStats=>{:fields=>[{:name=>:progress_percent, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:pending_time_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:processing_time_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:job_stats_type, :original_name=>"JobStats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :KeywordMatchSetting=>{:fields=>[{:name=>:opt_in, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :LocationExtension=>{:fields=>[{:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:encoded_location, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:company_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:source, :type=>"LocationExtension.Source", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :LocationOverrideInfo=>{:fields=>[{:name=>:radius, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_units, :type=>"LocationOverrideInfo.RadiusUnits", :min_occurs=>0, :max_occurs=>1}]}, :LocationSyncExtension=>{:fields=>[{:name=>:email, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:o_auth_info, :type=>"OAuthInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:should_sync_url, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :LostResult=>{:fields=>[], :base=>"OperationResult"}, :ManualCPCAdGroupCriterionExperimentBidMultiplier=>{:fields=>[{:name=>:max_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplier_source, :type=>"MultiplierSource", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionExperimentBidMultiplier"}, :ManualCPCAdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:max_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_content_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupExperimentBidMultipliers"}, :ManualCPMAdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:max_cpm_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupExperimentBidMultipliers"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Media=>{:fields=>[{:name=>:media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Media.MediaType", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimensions, :type=>"Media_Size_DimensionsMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:urls, :type=>"Media_Size_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mime_type, :type=>"Media.MimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:creation_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_type, :original_name=>"Media.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MediaError=>{:fields=>[{:name=>:reason, :type=>"MediaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Media_Size_DimensionsMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}]}, :Media_Size_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MobileAd=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:markup_languages, :type=>"MarkupLanguageType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mobile_carriers, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileDevice=>{:fields=>[{:name=>:device_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:manufacturer_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_type, :type=>"MobileDevice.DeviceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:operating_system_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileExtension=>{:fields=>[{:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_tracking_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :MobileImageAd=>{:fields=>[{:name=>:markup_languages, :type=>"MarkupLanguageType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mobile_carriers, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NegativeAdGroupCriterion=>{:fields=>[], :base=>"AdGroupCriterion"}, :NegativeCampaignCriterion=>{:fields=>[], :base=>"CampaignCriterion"}, :NetworkSetting=>{:fields=>[{:name=>:target_google_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_content_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_partner_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OAuthInfo=>{:fields=>[{:name=>:http_method, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_request_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_authorization_header, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Operand=>{:fields=>[], :choices=>[{:name=>:ad_extension_override, :original_name=>"AdExtensionOverride", :type=>"AdExtensionOverride", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group_ad, :original_name=>"AdGroupAd", :type=>"AdGroupAd", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group_bid_modifier, :original_name=>"AdGroupBidModifier", :type=>"AdGroupBidModifier", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group_criterion, :original_name=>"AdGroupCriterion", :type=>"AdGroupCriterion", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad_group, :original_name=>"AdGroup", :type=>"AdGroup", :min_occurs=>1, :max_occurs=>1}, {:name=>:ad, :original_name=>"Ad", :type=>"Ad", :min_occurs=>1, :max_occurs=>1}, {:name=>:budget, :original_name=>"Budget", :type=>"Budget", :min_occurs=>1, :max_occurs=>1}, {:name=>:campaign_ad_extension, :original_name=>"CampaignAdExtension", :type=>"CampaignAdExtension", :min_occurs=>1, :max_occurs=>1}, {:name=>:campaign_criterion, :original_name=>"CampaignCriterion", :type=>"CampaignCriterion", :min_occurs=>1, :max_occurs=>1}, {:name=>:campaign, :original_name=>"Campaign", :type=>"Campaign", :min_occurs=>1, :max_occurs=>1}, {:name=>:feed_item, :original_name=>"FeedItem", :type=>"FeedItem", :min_occurs=>1, :max_occurs=>1}, {:name=>:job, :original_name=>"Job", :type=>"Job", :min_occurs=>1, :max_occurs=>1}, {:name=>:media, :original_name=>"Media", :type=>"Media", :min_occurs=>1, :max_occurs=>1}, {:name=>:place_holder, :original_name=>"PlaceHolder", :type=>"PlaceHolder", :min_occurs=>1, :max_occurs=>1}, {:name=>:target_list, :original_name=>"TargetList", :type=>"TargetList", :min_occurs=>1, :max_occurs=>1}, {:name=>:target, :original_name=>"Target", :type=>"Target", :min_occurs=>1, :max_occurs=>1}]}, :OperatingSystemVersion=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_major_version, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_minor_version, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator_type, :type=>"OperatingSystemVersion.OperatorType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationResult=>{:fields=>[{:name=>:operation_result_type, :original_name=>"OperationResult.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OperationStream=>{:fields=>[{:name=>:scoping_entity_id, :type=>"EntityId", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"Operation", :min_occurs=>0, :max_occurs=>:unbounded}]}, :OperationStreamResult=>{:fields=>[{:name=>:operation_results, :type=>"OperationResult", :min_occurs=>0, :max_occurs=>:unbounded}]}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OverrideInfo=>{:fields=>[], :choices=>[{:name=>:location_override_info, :original_name=>"LocationOverrideInfo", :type=>"LocationOverrideInfo", :min_occurs=>1, :max_occurs=>1}]}, :PageOnePromotedBiddingScheme=>{:fields=>[{:name=>:strategy_goal, :type=>"PageOnePromotedBiddingScheme.StrategyGoal", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_budget_constained, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:raise_bid_when_low_quality_score, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PercentCpaBid=>{:fields=>[{:name=>:bid, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_cpa_bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :PercentCpaBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :PlaceHolder=>{:fields=>[]}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Platform=>{:fields=>[{:name=>:platform_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError"}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ProductAd=>{:fields=>[{:name=>:promotion_line, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Proximity=>{:fields=>[{:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_distance_units, :type=>"Proximity.DistanceUnits", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_in_units, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :QualityInfo=>{:fields=>[{:name=>:is_keyword_ad_relevance_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_landing_page_quality_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_landing_page_latency_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_score, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :QueryError=>{:fields=>[{:name=>:reason, :type=>"QueryError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaError=>{:fields=>[{:name=>:reason, :type=>"QuotaError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RealTimeBiddingSetting=>{:fields=>[{:name=>:opt_in, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReturnValueResult=>{:fields=>[{:name=>:return_value, :type=>"Operand", :min_occurs=>0, :max_occurs=>1}], :base=>"OperationResult"}, :RichMediaAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimensions, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}, {:name=>:snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:impression_beacon_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:certified_vendor_format_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rich_media_ad_type, :type=>"RichMediaAd.RichMediaAdType", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_attributes, :type=>"RichMediaAd.AdAttribute", :min_occurs=>0, :max_occurs=>:unbounded}], :abstract=>true, :base=>"Ad"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Setting=>{:fields=>[{:name=>:setting_type, :original_name=>"Setting.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :SettingError=>{:fields=>[{:name=>:reason, :type=>"SettingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SimpleMutateJob=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"BasicJobStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:history, :type=>"JobEvent", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Job"}, :SimpleMutateResult=>{:fields=>[{:name=>:results, :type=>"Operand", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}]}, :Sitelink=>{:fields=>[{:name=>:display_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :SitelinksExtension=>{:fields=>[{:name=>:sitelinks, :type=>"Sitelink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"AdExtension"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :original_name=>"Stats.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :String_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Target=>{:fields=>[{:name=>:target_type, :original_name=>"Target.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetError=>{:fields=>[{:name=>:reason, :type=>"TargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TargetList=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_list_type, :original_name=>"TargetList.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :TargetingSettingDetail=>{:fields=>[{:name=>:criterion_type_group, :type=>"CriterionTypeGroup", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_all, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :TargetSpendBiddingScheme=>{:fields=>[{:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetingSetting=>{:fields=>[{:name=>:details, :type=>"TargetingSettingDetail", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Setting"}, :TempAdUnionId=>{:fields=>[], :base=>"AdUnionId"}, :TemplateAd=>{:fields=>[{:name=>:template_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_union_id, :type=>"AdUnionId", :min_occurs=>0, :max_occurs=>1}, {:name=>:template_elements, :type=>"TemplateElement", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:dimensions, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :TemplateElement=>{:fields=>[{:name=>:unique_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"TemplateElementField", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TemplateElementField=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"TemplateElementField.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_media, :type=>"Media", :min_occurs=>0, :max_occurs=>1}]}, :TextAd=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ThirdPartyRedirectAd=>{:fields=>[{:name=>:is_cookie_targeted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_user_interest_targeted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_tagged, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_types, :type=>"VideoType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:expanding_directions, :type=>"ThirdPartyRedirectAd.ExpandingDirection", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"RichMediaAd"}, :TrackingSetting=>{:fields=>[{:name=>:tracking_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :UnprocessedResult=>{:fields=>[], :base=>"OperationResult"}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :Video=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:industry_standard_commercial_identifier, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertising_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:you_tube_video_id_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter"}, :DynamicSearchAd=>{:fields=>[{:name=>:description1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :"AdError.Reason"=>{:fields=>[]}, :"AdExtensionError.Reason"=>{:fields=>[]}, :"AdExtensionOverride.ApprovalStatus"=>{:fields=>[]}, :"AdExtensionOverride.Status"=>{:fields=>[]}, :"AdExtensionOverrideError.Reason"=>{:fields=>[]}, :"AdGroupAd.ApprovalStatus"=>{:fields=>[]}, :"AdGroupAd.Status"=>{:fields=>[]}, :"AdGroupAdError.Reason"=>{:fields=>[]}, :"AdGroupCriterionError.Reason"=>{:fields=>[]}, :"AdGroupCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[]}, :"AdGroupServiceError.Reason"=>{:fields=>[]}, :"AdGroup.Status"=>{:fields=>[]}, :AdServingOptimizationStatus=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :ApprovalStatus=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :BasicJobStatus=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :BidModifierSource=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"BiddingTransitionError.Reason"=>{:fields=>[]}, :"Budget.BudgetDeliveryMethod"=>{:fields=>[]}, :"Budget.BudgetPeriod"=>{:fields=>[]}, :"Budget.BudgetStatus"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"BulkMutateJobError.Reason"=>{:fields=>[]}, :"CampaignAdExtension.ApprovalStatus"=>{:fields=>[]}, :"CampaignAdExtension.Status"=>{:fields=>[]}, :"CampaignAdExtensionError.Reason"=>{:fields=>[]}, :"CampaignCriterionError.Reason"=>{:fields=>[]}, :"CampaignCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[]}, :"CampaignError.Reason"=>{:fields=>[]}, :CampaignStatus=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :ContentLabelType=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.BidType"=>{:fields=>[]}, :"ConversionOptimizerBiddingScheme.PricingMode"=>{:fields=>[]}, :"ConversionOptimizerEligibility.RejectionReason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :CriterionTypeGroup=>{:fields=>[]}, :CriterionUse=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DeprecatedAd.Type"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityId.Type"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :"FeedItem.Status"=>{:fields=>[]}, :"FeedItemError.Reason"=>{:fields=>[]}, :"FeedItemValidationDetail.ApprovalStatus"=>{:fields=>[]}, :"FeedItemValidationDetail.ValidationStatus"=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"Gender.GenderType"=>{:fields=>[]}, :"GeoTargetTypeSetting.NegativeGeoTargetType"=>{:fields=>[]}, :"GeoTargetTypeSetting.PositiveGeoTargetType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InAppLinkExtension.AppStore"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"JobError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :Level=>{:fields=>[]}, :"LocationExtension.Source"=>{:fields=>[]}, :"LocationOverrideInfo.RadiusUnits"=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MarkupLanguageType=>{:fields=>[]}, :"Media.MediaType"=>{:fields=>[]}, :"Media.MimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"MobileDevice.DeviceType"=>{:fields=>[]}, :MultiplierSource=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperatingSystemVersion.OperatorType"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"PolicyViolationError.Reason"=>{:fields=>[]}, :"Proximity.DistanceUnits"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"QuotaError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RegionCodeError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"RichMediaAd.AdAttribute"=>{:fields=>[]}, :"RichMediaAd.RichMediaAdType"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :ServingStatus=>{:fields=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :SystemServingStatus=>{:fields=>[]}, :"TargetError.Reason"=>{:fields=>[]}, :"TemplateElementField.Type"=>{:fields=>[]}, :"ThirdPartyRedirectAd.ExpandingDirection"=>{:fields=>[]}, :TimeUnit=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :UserStatus=>{:fields=>[]}, :VideoType=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}} - MUTATEJOBSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return MUTATEJOBSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return MUTATEJOBSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return MUTATEJOBSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, MutateJobServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/report_definition_service.rb b/adwords_api/lib/adwords_api/v201306/report_definition_service.rb deleted file mode 100644 index f80585660..000000000 --- a/adwords_api/lib/adwords_api/v201306/report_definition_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:34. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/report_definition_service_registry' - -module AdwordsApi; module V201306; module ReportDefinitionService - class ReportDefinitionService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get_report_fields(*args, &block) - return execute_action('get_report_fields', args, &block) - end - - private - - def get_service_registry() - return ReportDefinitionServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::ReportDefinitionService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/report_definition_service_registry.rb b/adwords_api/lib/adwords_api/v201306/report_definition_service_registry.rb deleted file mode 100644 index 71506685f..000000000 --- a/adwords_api/lib/adwords_api/v201306/report_definition_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:35. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module ReportDefinitionService - class ReportDefinitionServiceRegistry - REPORTDEFINITIONSERVICE_METHODS = {:get_report_fields=>{:input=>[{:name=>:report_type, :type=>"ReportDefinition.ReportType", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_report_fields_response", :fields=>[{:name=>:rval, :type=>"ReportDefinitionField", :min_occurs=>0, :max_occurs=>:unbounded}]}}} - REPORTDEFINITIONSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EnumValuePair=>{:fields=>[{:name=>:enum_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:enum_display_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReportDefinitionError=>{:fields=>[{:name=>:reason, :type=>"ReportDefinitionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReportDefinitionField=>{:fields=>[{:name=>:field_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_field_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:xml_attribute_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:enum_values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:can_select, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:can_filter, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_enum_type, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_beta, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:enum_value_pairs, :type=>"EnumValuePair", :min_occurs=>0, :max_occurs=>:unbounded}]}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"ReportDefinition.ReportType"=>{:fields=>[]}, :"ReportDefinitionError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - REPORTDEFINITIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return REPORTDEFINITIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return REPORTDEFINITIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return REPORTDEFINITIONSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, ReportDefinitionServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/shared_criterion_service.rb b/adwords_api/lib/adwords_api/v201306/shared_criterion_service.rb deleted file mode 100644 index 9e4a9020f..000000000 --- a/adwords_api/lib/adwords_api/v201306/shared_criterion_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:37. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/shared_criterion_service_registry' - -module AdwordsApi; module V201306; module SharedCriterionService - class SharedCriterionService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return SharedCriterionServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::SharedCriterionService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/shared_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201306/shared_criterion_service_registry.rb deleted file mode 100644 index 0907cf1ea..000000000 --- a/adwords_api/lib/adwords_api/v201306/shared_criterion_service_registry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:38. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module SharedCriterionService - class SharedCriterionServiceRegistry - SHAREDCRITERIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"SharedCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"SharedCriterionOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"SharedCriterionReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - SHAREDCRITERIONSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SharedCriterionError=>{:fields=>[{:name=>:reason, :type=>"SharedCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter"}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :SharedCriterion=>{:fields=>[{:name=>:shared_set_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:negative, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SharedCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"SharedCriterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :SharedCriterionPage=>{:fields=>[{:name=>:entries, :type=>"SharedCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :SharedCriterionReturnValue=>{:fields=>[{:name=>:value, :type=>"SharedCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SharedCriterionError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}} - SHAREDCRITERIONSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return SHAREDCRITERIONSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return SHAREDCRITERIONSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return SHAREDCRITERIONSERVICE_NAMESPACES[index] - end - end - - # Indicates that this instance is a subtype of ApplicationException. - # Although this field is returned in the response, it is ignored on input - # and cannot be selected. Specify xsi:type instead. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, SharedCriterionServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/shared_set_service.rb b/adwords_api/lib/adwords_api/v201306/shared_set_service.rb deleted file mode 100644 index f144c2f07..000000000 --- a/adwords_api/lib/adwords_api/v201306/shared_set_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:45. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/shared_set_service_registry' - -module AdwordsApi; module V201306; module SharedSetService - class SharedSetService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/cm/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def mutate(*args, &block) - return execute_action('mutate', args, &block) - end - - private - - def get_service_registry() - return SharedSetServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::SharedSetService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/shared_set_service_registry.rb b/adwords_api/lib/adwords_api/v201306/shared_set_service_registry.rb deleted file mode 100644 index 88e4deb71..000000000 --- a/adwords_api/lib/adwords_api/v201306/shared_set_service_registry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:46. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module SharedSetService - class SharedSetServiceRegistry - SHAREDSETSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"SharedSetPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"SharedSetOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"SharedSetReturnValue", :min_occurs=>0, :max_occurs=>1}]}}} - SHAREDSETSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SharedSet=>{:fields=>[{:name=>:shared_set_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"SharedSetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:member_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:reference_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"SharedSet.Status", :min_occurs=>0, :max_occurs=>1}]}, :SharedSetError=>{:fields=>[{:name=>:reason, :type=>"SharedSetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SharedSetOperation=>{:fields=>[{:name=>:operand, :type=>"SharedSet", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :SharedSetPage=>{:fields=>[{:name=>:entries, :type=>"SharedSet", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :SharedSetReturnValue=>{:fields=>[{:name=>:value, :type=>"SharedSet", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BetaError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NotWhitelistedError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SharedSet.Status"=>{:fields=>[]}, :"SharedSetError.Reason"=>{:fields=>[]}, :SharedSetType=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}} - SHAREDSETSERVICE_NAMESPACES = [] - - def self.get_method_signature(method_name) - return SHAREDSETSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return SHAREDSETSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return SHAREDSETSERVICE_NAMESPACES[index] - end - end - - # Indicates that this instance is a subtype of ApplicationException. - # Although this field is returned in the response, it is ignored on input - # and cannot be selected. Specify xsi:type instead. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, SharedSetServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/targeting_idea_service.rb b/adwords_api/lib/adwords_api/v201306/targeting_idea_service.rb deleted file mode 100644 index 41595896a..000000000 --- a/adwords_api/lib/adwords_api/v201306/targeting_idea_service.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:48. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/targeting_idea_service_registry' - -module AdwordsApi; module V201306; module TargetingIdeaService - class TargetingIdeaService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/o/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - def get_bulk_keyword_ideas(*args, &block) - return execute_action('get_bulk_keyword_ideas', args, &block) - end - - private - - def get_service_registry() - return TargetingIdeaServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::TargetingIdeaService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/targeting_idea_service_registry.rb b/adwords_api/lib/adwords_api/v201306/targeting_idea_service_registry.rb deleted file mode 100644 index f0b5e66be..000000000 --- a/adwords_api/lib/adwords_api/v201306/targeting_idea_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:49. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module TargetingIdeaService - class TargetingIdeaServiceRegistry - TARGETINGIDEASERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"TargetingIdeaSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"TargetingIdeaPage", :min_occurs=>0, :max_occurs=>1}]}}, :get_bulk_keyword_ideas=>{:input=>[{:name=>:selector, :type=>"TargetingIdeaSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_bulk_keyword_ideas_response", :fields=>[{:name=>:rval, :type=>"TargetingIdeaPage", :min_occurs=>0, :max_occurs=>1}]}}} - TARGETINGIDEASERVICE_TYPES = {:AdGroupBidLandscape=>{:fields=>[{:name=>:type, :type=>"AdGroupBidLandscape.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:landscape_current, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape", :ns=>0}, :AdGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"AdGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AdGroupCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"AdGroupCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded", :ns=>0}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BidLandscape=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:landscape_points, :type=>"BidLandscape.LandscapePoint", :min_occurs=>0, :max_occurs=>:unbounded}], :abstract=>true, :base=>"DataEntry", :ns=>0}, :"BidLandscape.LandscapePoint"=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:marginal_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:promoted_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :BiddingError=>{:fields=>[{:name=>:reason, :type=>"BiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BudgetError=>{:fields=>[{:name=>:reason, :type=>"BudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :CriterionBidLandscape=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape", :ns=>0}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :CriterionPolicyError=>{:fields=>[], :base=>"PolicyViolationError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NetworkSetting=>{:fields=>[{:name=>:target_google_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_content_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_partner_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Platform=>{:fields=>[{:name=>:platform_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError", :ns=>0}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DataEntry=>{:fields=>[{:name=>:data_entry_type, :original_name=>"DataEntry.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :TargetError=>{:fields=>[{:name=>:reason, :type=>"TargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter", :ns=>0}, :"AdGroupBidLandscape.Type"=>{:fields=>[], :ns=>0}, :"AdGroupCriterionError.Reason"=>{:fields=>[], :ns=>0}, :"AdGroupCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[], :ns=>0}, :"AdxError.Reason"=>{:fields=>[], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"BiddingError.Reason"=>{:fields=>[], :ns=>0}, :"BudgetError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"Criterion.Type"=>{:fields=>[], :ns=>0}, :"CriterionError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[], :ns=>0}, :"EntityNotFound.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :KeywordMatchType=>{:fields=>[], :ns=>0}, :LocationTargetingStatus=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StatsQueryError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"TargetError.Reason"=>{:fields=>[], :ns=>0}, :"CriterionUserList.MembershipStatus"=>{:fields=>[], :ns=>0}, :WebpageConditionOperand=>{:fields=>[], :ns=>0}, :AdFormatSpec=>{:fields=>[{:name=>:format, :type=>"SiteConstants.AdFormat", :min_occurs=>0, :max_occurs=>1}]}, :AdFormatSpecListAttribute=>{:fields=>[{:name=>:value, :type=>"AdFormatSpec", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :AdSpec=>{:fields=>[], :choices=>[{:name=>:display_ad_spec, :original_name=>"DisplayAdSpec", :type=>"DisplayAdSpec", :min_occurs=>1, :max_occurs=>1}, {:name=>:in_stream_ad_spec, :original_name=>"InStreamAdSpec", :type=>"InStreamAdSpec", :min_occurs=>1, :max_occurs=>1}, {:name=>:text_ad_spec, :original_name=>"TextAdSpec", :type=>"TextAdSpec", :min_occurs=>1, :max_occurs=>1}]}, :AdSpecListAttribute=>{:fields=>[{:name=>:value, :type=>"AdSpec", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :AdSpecListSearchParameter=>{:fields=>[{:name=>:ad_specs, :type=>"AdSpec", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :Attribute=>{:fields=>[{:name=>:attribute_type, :original_name=>"Attribute.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BidLandscapeAttribute=>{:fields=>[{:name=>:value, :type=>"BidLandscape", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :BooleanAttribute=>{:fields=>[{:name=>:value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :CategoryProductsAndServicesSearchParameter=>{:fields=>[{:name=>:category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :CompetitionSearchParameter=>{:fields=>[{:name=>:levels, :type=>"CompetitionSearchParameter.Level", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :CriterionAttribute=>{:fields=>[{:name=>:value, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DisplayAdSpec=>{:fields=>[{:name=>:display_types, :type=>"DisplayType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:activation_options, :type=>"DisplayAdSpec.ActivationOption", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_size_specs, :type=>"DisplayAdSpec.AdSizeSpec", :min_occurs=>0, :max_occurs=>:unbounded}]}, :"DisplayAdSpec.AdSizeSpec"=>{:fields=>[{:name=>:width, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:height, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:activation_option_filter, :type=>"DisplayAdSpec.ActivationOption", :min_occurs=>0, :max_occurs=>:unbounded}]}, :DisplayType=>{:fields=>[], :choices=>[{:name=>:flash_display_type, :original_name=>"FlashDisplayType", :type=>"FlashDisplayType", :min_occurs=>1, :max_occurs=>1}, {:name=>:html_display_type, :original_name=>"HtmlDisplayType", :type=>"HtmlDisplayType", :min_occurs=>1, :max_occurs=>1}, {:name=>:image_display_type, :original_name=>"ImageDisplayType", :type=>"ImageDisplayType", :min_occurs=>1, :max_occurs=>1}]}, :DoubleAttribute=>{:fields=>[{:name=>:value, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :ExcludedKeywordSearchParameter=>{:fields=>[{:name=>:keywords, :type=>"Keyword", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :FlashDisplayType=>{:fields=>[]}, :HtmlDisplayType=>{:fields=>[{:name=>:html_option, :type=>"HtmlDisplayType.HtmlOption", :min_occurs=>0, :max_occurs=>1}]}, :IdeaTextFilterSearchParameter=>{:fields=>[{:name=>:included, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:excluded, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :IdeaTypeAttribute=>{:fields=>[{:name=>:value, :type=>"IdeaType", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :ImageDisplayType=>{:fields=>[]}, :InStreamAdInfo=>{:fields=>[{:name=>:max_ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:min_ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:median_ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:pre_roll_percent, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:mid_roll_percent, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:post_roll_percent, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :InStreamAdInfoAttribute=>{:fields=>[{:name=>:value, :type=>"InStreamAdInfo", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :InStreamAdSpec=>{:fields=>[{:name=>:in_stream_types, :type=>"InStreamAdSpec.InStreamType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:durations, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :IncludeAdultContentSearchParameter=>{:fields=>[], :base=>"SearchParameter"}, :IntegerAttribute=>{:fields=>[{:name=>:value, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :IntegerSetAttribute=>{:fields=>[{:name=>:value, :type=>"int", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :KeywordAttribute=>{:fields=>[{:name=>:value, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :LanguageSearchParameter=>{:fields=>[{:name=>:languages, :type=>"Language", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :LocationSearchParameter=>{:fields=>[{:name=>:locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :LongAttribute=>{:fields=>[{:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :LongComparisonOperation=>{:fields=>[{:name=>:minimum, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:maximum, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :LongRangeAttribute=>{:fields=>[{:name=>:value, :type=>"Range", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MoneyAttribute=>{:fields=>[{:name=>:value, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :MonthlySearchVolume=>{:fields=>[{:name=>:year, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:month, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:count, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :MonthlySearchVolumeAttribute=>{:fields=>[{:name=>:value, :type=>"MonthlySearchVolume", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :NetworkSearchParameter=>{:fields=>[{:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :OpportunityIdeaTypeAttribute=>{:fields=>[{:name=>:value, :type=>"OpportunityIdeaType", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :PlacementAttribute=>{:fields=>[{:name=>:value, :type=>"Placement", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :PlacementTypeAttribute=>{:fields=>[{:name=>:value, :type=>"SiteConstants.PlacementType", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :PlacementTypeSearchParameter=>{:fields=>[{:name=>:placement_types, :type=>"SiteConstants.PlacementType", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :Range=>{:fields=>[{:name=>:min, :type=>"ComparableValue", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"ComparableValue", :min_occurs=>0, :max_occurs=>1}]}, :RelatedToQuerySearchParameter=>{:fields=>[{:name=>:queries, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :RelatedToUrlSearchParameter=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:include_sub_urls, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :SearchParameter=>{:fields=>[{:name=>:search_parameter_type, :original_name=>"SearchParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :SearchVolumeSearchParameter=>{:fields=>[{:name=>:operation, :type=>"LongComparisonOperation", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :SeedAdGroupIdSearchParameter=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :StringAttribute=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :TargetingIdea=>{:fields=>[{:name=>:data, :type=>"Type_AttributeMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TargetingIdeaError=>{:fields=>[{:name=>:reason, :type=>"TargetingIdeaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TargetingIdeaPage=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:entries, :type=>"TargetingIdea", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TargetingIdeaSelector=>{:fields=>[{:name=>:search_parameters, :type=>"SearchParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:idea_type, :type=>"IdeaType", :min_occurs=>0, :max_occurs=>1}, {:name=>:request_type, :type=>"RequestType", :min_occurs=>0, :max_occurs=>1}, {:name=>:requested_attribute_types, :type=>"AttributeType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}, {:name=>:locale_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TextAdSpec=>{:fields=>[]}, :TrafficEstimatorError=>{:fields=>[{:name=>:reason, :type=>"TrafficEstimatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Type_AttributeMapEntry=>{:fields=>[{:name=>:key, :type=>"AttributeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Attribute", :min_occurs=>0, :max_occurs=>1}]}, :WebpageDescriptor=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:title, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageDescriptorAttribute=>{:fields=>[{:name=>:value, :type=>"WebpageDescriptor", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :AttributeType=>{:fields=>[]}, :"CompetitionSearchParameter.Level"=>{:fields=>[]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"DisplayAdSpec.ActivationOption"=>{:fields=>[]}, :"HtmlDisplayType.HtmlOption"=>{:fields=>[]}, :IdeaType=>{:fields=>[]}, :"InStreamAdSpec.InStreamType"=>{:fields=>[]}, :"MatchesRegexError.Reason"=>{:fields=>[]}, :OpportunityIdeaType=>{:fields=>[]}, :RequestType=>{:fields=>[]}, :"SiteConstants.AdFormat"=>{:fields=>[]}, :"SiteConstants.PlacementType"=>{:fields=>[]}, :"TargetingIdeaError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}} - TARGETINGIDEASERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return TARGETINGIDEASERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return TARGETINGIDEASERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return TARGETINGIDEASERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, TargetingIdeaServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/traffic_estimator_service.rb b/adwords_api/lib/adwords_api/v201306/traffic_estimator_service.rb deleted file mode 100644 index b2d909d46..000000000 --- a/adwords_api/lib/adwords_api/v201306/traffic_estimator_service.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:52. - -require 'ads_common/savon_service' -require 'adwords_api/v201306/traffic_estimator_service_registry' - -module AdwordsApi; module V201306; module TrafficEstimatorService - class TrafficEstimatorService < AdsCommon::SavonService - def initialize(config, endpoint) - namespace = 'https://adwords.google.com/api/adwords/o/v201306' - super(config, endpoint, namespace, :v201306) - end - - def get(*args, &block) - return execute_action('get', args, &block) - end - - private - - def get_service_registry() - return TrafficEstimatorServiceRegistry - end - - def get_module() - return AdwordsApi::V201306::TrafficEstimatorService - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/v201306/traffic_estimator_service_registry.rb b/adwords_api/lib/adwords_api/v201306/traffic_estimator_service_registry.rb deleted file mode 100644 index b8f87d4e7..000000000 --- a/adwords_api/lib/adwords_api/v201306/traffic_estimator_service_registry.rb +++ /dev/null @@ -1,46 +0,0 @@ -# Encoding: utf-8 -# -# This is auto-generated code, changes will be overwritten. -# -# Copyright:: Copyright 2012, Google Inc. All Rights Reserved. -# License:: Licensed under the Apache License, Version 2.0. -# -# Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:53. - -require 'adwords_api/errors' - -module AdwordsApi; module V201306; module TrafficEstimatorService - class TrafficEstimatorServiceRegistry - TRAFFICESTIMATORSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"TrafficEstimatorSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"TrafficEstimatorResult", :min_occurs=>0, :max_occurs=>1}]}}} - TRAFFICESTIMATORSERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :EntityAccessDenied=>{:fields=>[{:name=>:reason, :type=>"EntityAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NetworkSetting=>{:fields=>[{:name=>:target_google_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_content_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_partner_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :TargetError=>{:fields=>[{:name=>:reason, :type=>"TargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter", :ns=>0}, :"AdxError.Reason"=>{:fields=>[], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"Criterion.Type"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"EntityAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"EntityNotFound.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :KeywordMatchType=>{:fields=>[], :ns=>0}, :LocationTargetingStatus=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"TargetError.Reason"=>{:fields=>[], :ns=>0}, :"CriterionUserList.MembershipStatus"=>{:fields=>[], :ns=>0}, :WebpageConditionOperand=>{:fields=>[], :ns=>0}, :AdGroupEstimate=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_estimates, :type=>"KeywordEstimate", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Estimate"}, :AdGroupEstimateRequest=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_estimate_requests, :type=>"KeywordEstimateRequest", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:max_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"EstimateRequest"}, :CampaignEstimate=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_estimates, :type=>"AdGroupEstimate", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Estimate"}, :CampaignEstimateRequest=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_estimate_requests, :type=>"AdGroupEstimateRequest", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:criteria, :type=>"Criterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}, {:name=>:daily_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"EstimateRequest"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Estimate=>{:fields=>[{:name=>:estimate_type, :original_name=>"Estimate.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :EstimateRequest=>{:fields=>[{:name=>:estimate_request_type, :original_name=>"EstimateRequest.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :KeywordEstimate=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:min, :type=>"StatsEstimate", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"StatsEstimate", :min_occurs=>0, :max_occurs=>1}], :base=>"Estimate"}, :KeywordEstimateRequest=>{:fields=>[{:name=>:keyword, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_negative, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"EstimateRequest"}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StatsEstimate=>{:fields=>[{:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks_per_day, :type=>"float", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions_per_day, :type=>"float", :min_occurs=>0, :max_occurs=>1}, {:name=>:click_through_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :TrafficEstimatorError=>{:fields=>[{:name=>:reason, :type=>"TrafficEstimatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TrafficEstimatorResult=>{:fields=>[{:name=>:campaign_estimates, :type=>"CampaignEstimate", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TrafficEstimatorSelector=>{:fields=>[{:name=>:campaign_estimate_requests, :type=>"CampaignEstimateRequest", :min_occurs=>0, :max_occurs=>:unbounded}]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"MatchesRegexError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}} - TRAFFICESTIMATORSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"] - - def self.get_method_signature(method_name) - return TRAFFICESTIMATORSERVICE_METHODS[method_name.to_sym] - end - - def self.get_type_signature(type_name) - return TRAFFICESTIMATORSERVICE_TYPES[type_name.to_sym] - end - - def self.get_namespace(index) - return TRAFFICESTIMATORSERVICE_NAMESPACES[index] - end - end - - # Base class for exceptions. - class ApplicationException < AdwordsApi::Errors::ApiException - attr_reader :message # string - attr_reader :application_exception_type # string - end - - # Exception class for holding a list of service errors. - class ApiException < ApplicationException - attr_reader :errors # ApiError - def initialize(exception_fault) - @array_fields ||= [] - @array_fields << 'errors' - super(exception_fault, TrafficEstimatorServiceRegistry) - end - end -end; end; end diff --git a/adwords_api/lib/adwords_api/version.rb b/adwords_api/lib/adwords_api/version.rb index 2d72a9298..3dfe7a7f7 100644 --- a/adwords_api/lib/adwords_api/version.rb +++ b/adwords_api/lib/adwords_api/version.rb @@ -21,6 +21,6 @@ module AdwordsApi module ApiConfig - CLIENT_LIB_VERSION = '0.11.1' + CLIENT_LIB_VERSION = '0.12.0' end end diff --git a/adwords_api/test/templates/v201306/basic_operations_get_campaigns.def b/adwords_api/test/templates/v201306/basic_operations_get_campaigns.def deleted file mode 100644 index 3faed4f1d..000000000 --- a/adwords_api/test/templates/v201306/basic_operations_get_campaigns.def +++ /dev/null @@ -1,114 +0,0 @@ -def setup_mocks() - $api_config = { - :service => {:environment => 'PRODUCTION'}, - :authentication => { - :method => 'ClientLogin', - :email => 'noreply@google.com', - :password => 'noreply_password', - :developer_token => 'dev_token123', - :client_customer_id => '123-456-7890', - :user_agent => 'ruby-tests' - } - } - - stub_request(:post, "https://www.google.com/accounts/ClientLogin"). - with(:body => {"Email"=>"noreply@google.com", "Passwd"=>"noreply_password", "accountType"=>"GOOGLE", "service"=>"adwords"}). - to_return(:status => 200, :body => "SID=abcSIDbcd\nLSID=abcLSIDbcd\nAuth=abcAuthbcd\n", :headers => {}) - - stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201306/CampaignService"). - with( - :body => - # autogenerated code - {"env:Envelope"=> - {"env:Header"=> - {"wsdl:RequestHeader"=> - {"userAgent"=>"ruby-tests (AwApi-Ruby/0.11.1, Common-Ruby/0.9.6, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)", - "developerToken"=>"dev_token123", - "clientCustomerId"=>"123-456-7890", - "authToken"=>"abcAuthbcd", - "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}}, - "env:Body"=> - {"get"=> - {"serviceSelector"=> - {"fields"=>["Id", "Name", "Status"], - "ordering"=>{"field"=>"Name", "sortOrder"=>"ASCENDING"}, - "paging"=>{"startIndex"=>"0", "numberResults"=>"5"}}, - "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}}, - "xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema", - "xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance", - "xmlns:wsdl"=>"https://adwords.google.com/api/adwords/cm/v201306", - "xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}}, - # end of auto-generated code. - :headers => { - 'SOAPAction' => '"get"', - 'Content-Type' => 'text/xml;charset=UTF-8' - } - ). - to_return( - :status => 200, - :body => ' - - - 0004c - CampaignService - get - 42 - 84 - 42 - - - - - - 2 - CampaignPage - - DAILYMoney - 0 - - - 15Campaign name 1PAUSEDALL - CampaignStats0 - - - 16Campaign name 2ACTIVEALL - CampaignStats150 - - - - - ', - :headers => {'content-type' => 'text/xml;'} - ) -end - -def run_asserts() - assert_equal(2, $latest_result[:total_num_entries]) - assert_equal('CampaignPage', $latest_result[:page_type]) - entries = $latest_result[:entries] - assert_equal(2, entries.size) - - if entries[0][:id] == 15 - assert_campaign_15(entries[0]) - assert_campaign_16(entries[1]) - else - assert_campaign_15(entries[1]) - assert_campaign_16(entries[0]) - end -end - -def assert_campaign_15(entry) - assert_equal(15, entry[:id]) - assert_equal('Campaign name 1', entry[:name]) - assert_equal('PAUSED', entry[:status]) - assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats]) - assert_equal({:impressions=>0}, entry[:frequency_cap]) -end - -def assert_campaign_16(entry) - assert_equal(16, entry[:id]) - assert_equal('Campaign name 2', entry[:name]) - assert_equal('ACTIVE', entry[:status]) - assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats]) - assert_equal({:impressions=>150}, entry[:frequency_cap]) -end diff --git a/adwords_api/test/templates/v201306/misc_use_oauth2_jwt.def b/adwords_api/test/templates/v201306/misc_use_oauth2_jwt.def deleted file mode 100644 index 1a21725d7..000000000 --- a/adwords_api/test/templates/v201306/misc_use_oauth2_jwt.def +++ /dev/null @@ -1,131 +0,0 @@ -def setup_mocks() - file_name = 'privatekey.p12' - file_contents = 'file contents' - key_secret = 'not-secret' - - $api_config = { - :service => {:environment => 'PRODUCTION'}, - :authentication => { - :method => 'OAUTH2_JWT', - :oauth2_issuer => 'not-valid@developer.gserviceaccount.com', - :oauth2_secret => key_secret, - :oauth2_keyfile => file_name, - :developer_token => 'dev_token123', - :client_customer_id => '123-456-7890', - :user_agent => 'ruby-tests' - } - } - - stub(File).file?(file_name) { true } - stub.proxy(File).file? - - stub(File).read(file_name) { file_contents } - stub.proxy(File).read - - key = mock!.key { 'pkcs12 key' } - stub(OpenSSL::PKCS12).new.with(file_contents, key_secret) { key } - - stub_request(:post, "https://accounts.google.com/o/oauth2/token"). - with(:body => hash_including({"grant_type"=>"urn:ietf:params:oauth:grant-type:jwt-bearer"}), - :headers => {'Accept'=>'*/*', 'Cache-Control'=>'no-store', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Ruby'}). - with(:body => /assertion=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9/). - to_return(:status => 200, - :body => "{\n \"access_token\" : \"ab01.CBEF2GHi3JKlMnOpqRstUvW4X-YzaBcdEFG5IjKLMNPPqRStuV\",\n \"token_type\" : \"Bearer\",\n \"expires_in\" : 3600\n}", - :headers => {"Content-Type"=>"application/json"}) - - stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201306/CampaignService"). - with( - :body => - # autogenerated code - {"env:Envelope"=> - {"env:Header"=> - {"wsdl:RequestHeader"=> - {"userAgent"=>"ruby-tests (AwApi-Ruby/0.11.1, Common-Ruby/0.9.6, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)", - "developerToken"=>"dev_token123", - "clientCustomerId"=>"123-456-7890", - "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}}, - "env:Body"=> - {"get"=> - {"serviceSelector"=> - {"fields"=>["Id", "Name", "Status"], - "ordering"=>{"field"=>"Name", "sortOrder"=>"ASCENDING"}}, - "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}}, - "xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema", - "xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance", - "xmlns:wsdl"=>"https://adwords.google.com/api/adwords/cm/v201306", - "xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}}, - # end of auto-generated code. - :headers => { - 'SOAPAction' => '"get"', - 'Content-Type' => 'text/xml;charset=UTF-8', - 'Authorization' => 'Bearer ab01.CBEF2GHi3JKlMnOpqRstUvW4X-YzaBcdEFG5IjKLMNPPqRStuV' - } - ). - to_return( - :status => 200, - :body => ' - - - 0004c - CampaignService - get - 42 - 84 - 42 - - - - - - 2 - CampaignPage - - DAILYMoney - 0 - - - 15Campaign name 1PAUSEDALL - CampaignStats0 - - - 16Campaign name 2ACTIVEALL - CampaignStats150 - - - - - ', - :headers => {'content-type' => 'text/xml;'} - ) -end - -def run_asserts() - assert_equal(2, $latest_result[:total_num_entries]) - assert_equal('CampaignPage', $latest_result[:page_type]) - entries = $latest_result[:entries] - assert_equal(2, entries.size) - - if entries[0][:id] == 15 - assert_campaign_15(entries[0]) - assert_campaign_16(entries[1]) - else - assert_campaign_15(entries[1]) - assert_campaign_16(entries[0]) - end -end - -def assert_campaign_15(entry) - assert_equal(15, entry[:id]) - assert_equal('Campaign name 1', entry[:name]) - assert_equal('PAUSED', entry[:status]) - assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats]) - assert_equal({:impressions=>0}, entry[:frequency_cap]) -end - -def assert_campaign_16(entry) - assert_equal(16, entry[:id]) - assert_equal('Campaign name 2', entry[:name]) - assert_equal('ACTIVE', entry[:status]) - assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats]) - assert_equal({:impressions=>150}, entry[:frequency_cap]) -end