diff --git a/adwords_api/ChangeLog b/adwords_api/ChangeLog
index c87b4eb89..0be5baafc 100644
--- a/adwords_api/ChangeLog
+++ b/adwords_api/ChangeLog
@@ -1,3 +1,6 @@
+1.3.1:
+ - Support and examples for v201809.
+
1.3.0:
- Remove deprecated API version v201710.
- Minor fix to paging through landscape pages using ServiceQuery.
diff --git a/adwords_api/examples/v201802/account_management/create_account.rb b/adwords_api/examples/v201802/account_management/create_account.rb
index 16b8071ad..d2b8b6271 100755
--- a/adwords_api/examples/v201802/account_management/create_account.rb
+++ b/adwords_api/examples/v201802/account_management/create_account.rb
@@ -43,13 +43,7 @@ def create_account()
# Prepare operation to create an account.
operation = {
:operator => 'ADD',
- :operand => customer,
- # For whitelisted users only, uncomment the invitee_email and invitee_role
- # to invite a user to have access to an account on an ADD. An email
- # will be sent inviting the user to have access to the newly created
- # account.
- # :invitee_email => 'invited_user1@example.com',
- # :invitee_role => 'ADMINISTRATIVE'
+ :operand => customer
}
# Create the account. It is possible to create multiple accounts with one
diff --git a/adwords_api/examples/v201806/account_management/create_account.rb b/adwords_api/examples/v201806/account_management/create_account.rb
index fc5416e79..9705b3302 100755
--- a/adwords_api/examples/v201806/account_management/create_account.rb
+++ b/adwords_api/examples/v201806/account_management/create_account.rb
@@ -43,13 +43,7 @@ def create_account()
# Prepare operation to create an account.
operation = {
:operator => 'ADD',
- :operand => customer,
- # For whitelisted users only, uncomment the invitee_email and invitee_role
- # to invite a user to have access to an account on an ADD. An email
- # will be sent inviting the user to have access to the newly created
- # account.
- # :invitee_email => 'invited_user1@example.com',
- # :invitee_role => 'ADMINISTRATIVE'
+ :operand => customer
}
# Create the account. It is possible to create multiple accounts with one
diff --git a/adwords_api/examples/v201809/account_management/accept_service_link.rb b/adwords_api/examples/v201809/account_management/accept_service_link.rb
new file mode 100755
index 000000000..0eca3c136
--- /dev/null
+++ b/adwords_api/examples/v201809/account_management/accept_service_link.rb
@@ -0,0 +1,91 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 accepts a pending invitation to link your AdWords account to a
+# Google Merchant Center account.
+
+require 'adwords_api'
+
+def accept_service_link(service_link_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')
+
+ # Get the CustomerService.
+ customer_srv = adwords.service(:CustomerService, API_VERSION)
+
+ # Create the operation to set the status to ACTIVE.
+ operation = {
+ :operator => 'SET',
+ :operand => {
+ :service_link_id => service_link_id,
+ :service_type => 'MERCHANT_CENTER',
+ :link_status => 'ACTIVE'
+ }
+ }
+
+ # Update the service link.
+ mutated_service_links = customer_srv.mutate_service_links([operation])
+
+ # Display the results.
+ mutated_service_links.each do |mutated_service_link|
+ puts ("Service link with service link ID %d, type '%s' updated to status:" +
+ "%s.") % [
+ mutated_service_link[:service_link_id],
+ mutated_service_link[:service_type],
+ mutated_service_link[:link_status]
+ ]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ service_link_id = 'INSERT_SERVICE_LINK_ID_HERE'.to_i
+
+ accept_service_link(service_link_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 " +
+ 'https://github.com/googleads/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/v201809/account_management/create_account.rb b/adwords_api/examples/v201809/account_management/create_account.rb
new file mode 100755
index 000000000..97bf52263
--- /dev/null
+++ b/adwords_api/examples/v201809/account_management/create_account.rb
@@ -0,0 +1,88 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 AdWords manager account.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/account_management/get_account_changes.rb b/adwords_api/examples/v201809/account_management/get_account_changes.rb
new file mode 100755
index 000000000..c008b494f
--- /dev/null
+++ b/adwords_api/examples/v201809/account_management/get_account_changes.rb
@@ -0,0 +1,135 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 campaign criteria: '%s'" %
+ campaign[:added_campaign_criteria].pretty_inspect.chomp
+ puts "\tRemoved campaign criteria: '%s'" %
+ campaign[:removed_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 removed: '%s'" %
+ ad_group[:removed_criteria].pretty_inspect.chomp
+ end
+ end
+ end
+ end
+ puts
+ end
+ else
+ puts 'No account changes were found.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/account_management/get_account_hierarchy.rb b/adwords_api/examples/v201809/account_management/get_account_hierarchy.rb
new file mode 100755
index 000000000..519f23528
--- /dev/null
+++ b/adwords_api/examples/v201809/account_management/get_account_hierarchy.rb
@@ -0,0 +1,132 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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. This example needs to be run against an AdWords manager account.
+
+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 => ['CustomerId', 'Name'],
+ :paging => {
+ :start_index => 0,
+ :number_results => PAGE_SIZE
+ }
+ }
+
+ # Set initial values
+ offset, page = 0, {}
+
+ accounts = {}
+ child_links = {}
+ parent_links = {}
+ root_account = nil
+
+ begin
+ page = managed_customer_srv.get(selector)
+
+ if page and page[:entries]
+ if page[:links]
+ page[:links].each do |link|
+ unless child_links.include?(link[:manager_customer_id])
+ child_links[link[:manager_customer_id]] = []
+ end
+ child_links[link[:manager_customer_id]] << link
+ unless parent_links.include?(link[:client_customer_id])
+ parent_links[link[:client_customer_id]] = []
+ end
+ parent_links[link[:client_customer_id]] << link
+ end
+ end
+
+ page[:entries].each do |account|
+ accounts[account[:customer_id]] = account
+ unless parent_links.include?(account[:customer_id])
+ root_account = account
+ 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 root_account.nil?
+ puts "Unable to determine a root account."
+ else
+ puts "CustomerId, Name"
+ display_account_tree(root_account, accounts, child_links, 0)
+ end
+end
+
+def display_account_tree(account, accounts, links, depth)
+ prefix = '-' * depth * 2
+ puts '%s%s, %s' % [prefix, account[:customer_id], account[:name]]
+ if links.include?(account[:customer_id])
+ links[account[:customer_id]].each do |child_link|
+ child_account = accounts[child_link[:client_customer_id]]
+ display_account_tree(child_account, accounts, links, depth + 1)
+ end
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 500
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_ad_customizers.rb b/adwords_api/examples/v201809/advanced_operations/add_ad_customizers.rb
new file mode 100755
index 000000000..d5a1f0300
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_ad_customizers.rb
@@ -0,0 +1,211 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 an ad customizer feed using Extension Services. Then it adds
+# an ad that uses the feed to populate dynamic data.
+
+require 'adwords_api'
+require 'date'
+
+def add_ad_customizers(feed_name, ad_group_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')
+
+ feed_item_srv = adwords.service(:FeedItemService, API_VERSION)
+ ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ # Create a customizer feed. One feed per account can be used for all ads.
+ feed_data = create_customizer_feed(adwords, feed_name)
+
+ # Now adding feed items -- the values we'd like to place.
+ now_date = Date.today()
+
+ items_data = [
+ {
+ :name => 'Mars',
+ :price => '$1234.56',
+ :date => now_date.strftime('%Y%m01 000000'),
+ :ad_group_id => ad_group_ids[0]
+ },
+ {
+ :name => 'Venus',
+ :price => '$1450.00',
+ :date => now_date.strftime('%Y%m15 000000'),
+ :ad_group_id => ad_group_ids[1]
+ }
+ ]
+
+ feed_items = items_data.map do |item|
+ {
+ :feed_id => feed_data[:feed_id],
+ :attribute_values => [
+ {
+ :feed_attribute_id => feed_data[:name_id],
+ :string_value => item[:name]
+ },
+ {
+ :feed_attribute_id => feed_data[:price_id],
+ :string_value => item[:price]
+ },
+ {
+ :feed_attribute_id => feed_data[:date_id],
+ :string_value => item[:date]
+ }
+ ]
+ }
+ 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]
+ response[:value].each do |feed_item|
+ puts 'Feed item with ID %d was added.' % feed_item[:feed_item_id]
+ end
+ else
+ raise new StandardError, 'No feed items were added.'
+ end
+
+ restrict_feed_item_to_ad_group(adwords, response[:value][0], ad_group_ids[0])
+ restrict_feed_item_to_ad_group(adwords, response[:value][1], ad_group_ids[1])
+
+ # All set! We can now create ads with customizations.
+ expanded_text_ad = {
+ :xsi_type => 'ExpandedTextAd',
+ :headline_part1 => 'Luxury Cruise to {=%s.Name}' % feed_name,
+ :headline_part2 => 'Only {=%s.Price}' % feed_name,
+ :description => 'Offer ends in {=countdown(%s.Date)}!' % feed_name,
+ :final_urls => ['http://www.example.com']
+ }
+
+ # We add the same ad to both ad groups. When they serve, they will show
+ # different values, since they match different feed items.
+ operations = ad_group_ids.map do |ad_group_id|
+ {
+ :operator => 'ADD',
+ :operand => {
+ :ad_group_id => ad_group_id,
+ :ad => expanded_text_ad.dup()
+ }
+ }
+ end
+
+ response = ad_group_ad_srv.mutate(operations)
+ if response and response[:value]
+ ads = response[:value]
+ ads.each do |ad|
+ puts "\tCreated an ad with 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
+
+def create_customizer_feed(adwords, feed_name)
+ ad_customizer_srv = adwords.service(:AdCustomizerFeedService, API_VERSION)
+ feed = {
+ :feed_name => feed_name,
+ :feed_attributes => [
+ {:name => 'Name', :type => 'STRING'},
+ {:name => 'Price', :type => 'PRICE'},
+ {:name => 'Date', :type => 'DATE_TIME'}
+ ]
+ }
+ operation = {:operand => feed, :operator => 'ADD'}
+ added_feed = ad_customizer_srv.mutate([operation])[:value].first()
+ puts "Created ad customizer feed with ID = %d and name = '%s'." %
+ [added_feed[:feed_id], added_feed[:feed_name]]
+ added_feed[:feed_attributes].each do |feed_attribute|
+ puts " ID: %d, name: '%s', type: %s" %
+ [feed_attribute[:id], feed_attribute[:name], feed_attribute[:type]]
+ end
+ return {
+ :feed_id => added_feed[:feed_id],
+ :name_id => added_feed[:feed_attributes][0][:id],
+ :price_id => added_feed[:feed_attributes][1][:id],
+ :date_id => added_feed[:feed_attributes][2][:id]
+ }
+end
+
+def restrict_feed_item_to_ad_group(adwords, feed_item, ad_group_id)
+ # Optional: Restrict this feed item to only serve with ads for the
+ # specified ad group ID.
+ feed_item_target_srv = adwords.service(:FeedItemTargetService, API_VERSION)
+
+ ad_group_target = {
+ :xsi_type => 'FeedItemAdGroupTarget',
+ :feed_id => feed_item[:feed_id],
+ :feed_item_id => feed_item[:feed_item_id],
+ :ad_group_id => ad_group_id
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_target
+ }
+
+ retval = feed_item_target_srv.mutate([operation])
+ new_ad_group_target = retval[:value].first
+ puts ('Feed item target for feed ID %d and feed item ID %d was created to ' +
+ 'restrict serving to ad group ID %d') % [new_ad_group_target[:feed_id],
+ new_ad_group_target[:feed_item_id], new_ad_group_target[:ad_group_id]]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ feed_name = 'INSERT_FEED_NAME_HERE'.to_s
+ ad_group_ids = [
+ 'INSERT_AD_GROUP_ID_HERE'.to_i,
+ 'INSERT_AD_GROUP_ID_HERE'.to_i
+ ]
+ add_ad_customizers(feed_name, ad_group_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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_ad_group_bid_modifier.rb b/adwords_api/examples/v201809/advanced_operations/add_ad_group_bid_modifier.rb
new file mode 100755
index 000000000..3a5660568
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_ad_group_bid_modifier.rb
@@ -0,0 +1,101 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 => ad_group_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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_dynamic_page_feed.rb b/adwords_api/examples/v201809/advanced_operations/add_dynamic_page_feed.rb
new file mode 100755
index 000000000..61d830792
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_dynamic_page_feed.rb
@@ -0,0 +1,328 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2017, 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 adds a page feed to specify precisely which URLs to use with
+# your Dynamic Search Ads campaign. To use a Dynamic Search Ads campaign, run
+# add_dynamic_search_ads_campaign.rb. To get campaigns, run get_campaigns.rb.
+
+require 'adwords_api'
+
+def add_dynamic_page_feed(campaign_id, 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')
+
+ dsa_page_url_label = "discounts"
+
+ # Get the page feed details. This code example creates a new feed, but you can
+ # fetch and re-use an existing feed.
+ feed_details = create_feed(adwords)
+ create_feed_mapping(adwords, feed_details)
+ create_feed_items(adwords, feed_details, dsa_page_url_label)
+
+ # Associate the page feed with the campaign.
+ update_campaign_dsa_setting(adwords, campaign_id, feed_details)
+
+ # Optional: Target web pages matching the feed's label in the ad group.
+ add_dsa_targeting(adwords, ad_group_id, dsa_page_url_label)
+
+ puts "Dynamic page feed setup is complete for campaign ID %d." % campaign_id
+end
+
+def create_feed(adwords)
+ feed_srv = adwords.service(:FeedService, API_VERSION)
+
+ url_attribute = {
+ :type => 'URL_LIST',
+ :name => 'Page URL'
+ }
+
+ label_attribute = {
+ :type => 'STRING_LIST',
+ :name => 'Label'
+ }
+
+ dsa_page_feed = {
+ :name => 'DSA Feed #%s' % (Time.now.to_f * 1000).to_i,
+ :attributes => [url_attribute, label_attribute],
+ :origin => 'USER'
+ }
+
+ operation = {
+ :operand => dsa_page_feed,
+ :operator => 'ADD'
+ }
+
+ new_feed = feed_srv.mutate([operation])[:value].first
+
+ feed_details = {
+ :feed_id => new_feed[:id],
+ :url_attribute_id => new_feed[:attributes][0][:id],
+ :label_attribute_id => new_feed[:attributes][1][:id]
+ }
+ puts ("Feed with name '%s' and ID %d with urlAttributeId %d and " +
+ "labelAttributeId %d was created.") % [
+ new_feed[:name],
+ feed_details[:feed_id],
+ feed_details[:url_attribute_id],
+ feed_details[:label_attribute_id]
+ ]
+
+ return feed_details
+end
+
+def create_feed_mapping(adwords, feed_details)
+ feed_mapping_srv = adwords.service(:FeedMappingService, API_VERSION)
+
+ url_field_mapping = {
+ :feed_attribute_id => feed_details[:url_attribute_id],
+ :field_id => DSA_PAGE_URLS_FIELD_ID
+ }
+
+ label_field_mapping = {
+ :feed_attribute_id => feed_details[:label_attribute_id],
+ :field_id => DSA_LABEL_FIELD_ID
+ }
+
+ feed_mapping = {
+ :criterion_type => DSA_PAGE_FEED_CRITERION_TYPE,
+ :feed_id => feed_details[:feed_id],
+ :attribute_field_mappings => [url_field_mapping, label_field_mapping]
+ }
+
+ operation = {
+ :operand => feed_mapping,
+ :operator => 'ADD'
+ }
+
+ new_feed_mapping = feed_mapping_srv.mutate([operation])[:value].first
+ puts ("Feed mapping with ID %d and criterionType %d was saved for feed " +
+ "with ID %d.") % [
+ new_feed_mapping[:feed_mapping_id],
+ new_feed_mapping[:criterion_type],
+ new_feed_mapping[:feed_id]
+ ]
+end
+
+def create_feed_items(adwords, feed_details, label_name)
+ feed_item_srv = adwords.service(:FeedItemService, API_VERSION)
+
+ operations = [
+ create_dsa_url_add_operation(
+ feed_details,
+ 'http://www.example.com/discounts/rental-cars',
+ label_name
+ ),
+ create_dsa_url_add_operation(
+ feed_details,
+ 'http://www.example.com/discounts/hotel-deals',
+ label_name
+ ),
+ create_dsa_url_add_operation(
+ feed_details,
+ 'http://www.example.com/discounts/flight-deals',
+ label_name
+ )
+ ]
+
+ result = feed_item_srv.mutate(operations)
+ result[:value].each do |item|
+ puts "Feed item with feed item ID %d was added." % item[:feed_item_id]
+ end
+end
+
+def create_dsa_url_add_operation(feed_details, url, label_name)
+ # Optional: Add the {feeditem} valuetrack parameter to track which page
+ # feed items lead to each click.
+ url = url + '?id={feeditem}'
+
+ url_attribute_value = {
+ :feed_attribute_id => feed_details[:url_attribute_id],
+ # See https://support.google.com/adwords/answer/7166527 for page feed URL
+ # recommendations and rules.
+ :string_values => [url]
+ }
+
+ label_attribute_value = {
+ :feed_attribute_id => feed_details[:label_attribute_id],
+ :string_values => [label_name]
+ }
+
+ feed_item = {
+ :feed_id => feed_details[:feed_id],
+ :attribute_values => [url_attribute_value, label_attribute_value]
+ }
+
+ operation = {
+ :operand => feed_item,
+ :operator => 'ADD'
+ }
+
+ return operation
+end
+
+def update_campaign_dsa_setting(adwords, campaign_id, feed_details)
+ campaign_srv = adwords.service(:CampaignService, API_VERSION)
+
+ selector = {
+ :fields => ['Id', 'Settings'],
+ :predicates => [
+ {:field => 'CampaignId', :operator => 'IN', :values => [campaign_id]}
+ ]
+ }
+
+ campaign_page = campaign_srv.get(selector)
+ if campaign_page.nil? or campaign_page[:entries].nil? or
+ campaign_page[:total_num_entries] == 0
+ raise 'No campaign found with ID: %d' % campaign_id
+ end
+
+ campaign = campaign_page[:entries].first
+
+ if campaign[:settings].nil?
+ raise 'Campaign with ID %d is not a DSA campaign.' % campaign_id
+ end
+
+ dsa_setting = nil
+ campaign[:settings].each do |setting|
+ if setting[:setting_type] == 'DynamicSearchAdsSetting'
+ dsa_setting = setting
+ break
+ end
+ end
+
+ if dsa_setting.nil?
+ raise 'Campaign with ID %d is not a DSA campaign.' % campaign_id
+ end
+
+ # Use a page feed to specify precisely which URLs to use with your Dynamic
+ # Search Ads.
+ page_feed = {
+ :feed_ids => [feed_details[:feed_id]]
+ }
+ dsa_setting[:page_feed] = page_feed
+
+ # Optional: Specify whether only the supplied URLs should be used with your
+ # Dynamic Search Ads.
+ dsa_setting[:use_supplied_urls_only] = true
+
+ updated_campaign = {
+ :id => campaign_id,
+ :settings => campaign[:settings]
+ }
+
+ operation = {
+ :operand => updated_campaign,
+ :operator => 'SET'
+ }
+
+ updated_campaign = campaign_srv.mutate([operation])[:value].first
+ puts "DSA page feed for campaign ID %d was updated with feed ID %d." % [
+ updated_campaign[:id], feed_details[:feed_id]
+ ]
+end
+
+def add_dsa_targeting(adwords, ad_group_id, dsa_page_url_label)
+ ad_group_criterion_srv =
+ adwords.service(:AdGroupCriterionService, API_VERSION)
+
+ webpage = {
+ :xsi_type => 'Webpage',
+ :parameter => {
+ :criterion_name => 'Test criterion',
+ :conditions => [{
+ :operand => 'CUSTOM_LABEL',
+ :argument => dsa_page_url_label
+ }]
+ }
+ }
+
+ bidding_strategy_configuration = {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {
+ :micro_amount => 1_500_000
+ }
+ }]
+ }
+
+ criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :ad_group_id => ad_group_id,
+ :criterion => webpage,
+ :bidding_strategy_configuration => bidding_strategy_configuration
+ }
+
+ operation = {
+ :operand => criterion,
+ :operator => 'ADD'
+ }
+
+ new_criterion = ad_group_criterion_srv.mutate([operation])[:value].first
+ puts "Web page criterion with ID %d and status '%s' was created." %
+ [new_criterion[:criterion][:id], new_criterion[:user_status]]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ # The criterion type to be used for DSA page feeds. DSA page feeds use
+ # criterionType field instead of the placeholderType field unlike most other
+ # feed types.
+ DSA_PAGE_FEED_CRITERION_TYPE = 61
+
+ # ID that corresponds to the page URLs.
+ DSA_PAGE_URLS_FIELD_ID = 1
+
+ # ID that corresponds to the labels.
+ DSA_LABEL_FIELD_ID = 2
+
+ begin
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+
+ add_dynamic_page_feed(campaign_id, 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_dynamic_search_ads_campaign.rb b/adwords_api/examples/v201809/advanced_operations/add_dynamic_search_ads_campaign.rb
new file mode 100755
index 000000000..88bce8e95
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_dynamic_search_ads_campaign.rb
@@ -0,0 +1,249 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2017, 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 adds a Dynamic Search Ads campaign. To get campaigns, run
+# get_campaigns.rb.
+
+require 'date'
+
+require 'adwords_api'
+
+def add_dynamic_search_ads_campaign()
+ # 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 = create_budget(adwords)
+
+ campaign = create_campaign(adwords, budget)
+ ad_group = create_ad_group(adwords, campaign)
+ create_expanded_dsa(adwords, ad_group)
+ add_web_page_criteria(adwords, ad_group)
+end
+
+def create_budget(adwords)
+ budget_srv = adwords.service(:BudgetService, API_VERSION)
+
+ shared_budget = {
+ :name => "Interplanetary Cruise #%d" % (Time.now.to_f * 1000).to_i,
+ :amount => {
+ :micro_amount => 50_000_000
+ },
+ :delivery_method => 'STANDARD'
+ }
+
+ budget_operation = {
+ :operand => shared_budget,
+ :operator => 'ADD'
+ }
+
+ budget = budget_srv.mutate([budget_operation])[:value].first
+
+ return budget
+end
+
+def create_campaign(adwords, budget)
+ campaign_srv = adwords.service(:CampaignService, API_VERSION)
+
+ campaign = {
+ :name => "Interplanetary Cruise #%d" % (Time.now.to_f * 1000).to_i,
+ :advertising_channel_type => 'SEARCH',
+ # Recommendation: Set the campaign to PAUSED when creating it to prevent the
+ # ads from immediately serving. Set to ENABLED once you've added targeting
+ # and the ads are ready to serve.
+ :status => 'PAUSED',
+ :bidding_strategy_configuration => {
+ :bidding_strategy_type => 'MANUAL_CPC'
+ },
+ # Only the budgetId should be sent; all other fields will be ignored by
+ # CampaignService.
+ :budget => {
+ :budget_id => budget[:budget_id]
+ },
+ :settings => [
+ :xsi_type => 'DynamicSearchAdsSetting',
+ :domain_name => 'example.com',
+ :language_code => 'en'
+ ],
+ # Optional: Set the start and end dates.
+ :start_date => DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d'),
+ :end_date => DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')
+ }
+
+ operation = {
+ :operand => campaign,
+ :operator => 'ADD'
+ }
+
+ new_campaign = campaign_srv.mutate([operation])[:value].first
+ puts "Campaign with name '%s' and ID %d was added." %
+ [new_campaign[:name], new_campaign[:id]]
+
+ return new_campaign
+end
+
+def create_ad_group(adwords, campaign)
+ ad_group_srv = adwords.service(:AdGroupService, API_VERSION)
+
+ ad_group = {
+ # Required: Set the ad group's tpe to Dynamic Search Ads.
+ :ad_group_type => 'SEARCH_DYNAMIC_ADS',
+ :name => "Earth to Mars Cruises #%d" % (Time.now.to_f * 1000).to_i,
+ :campaign_id => campaign[:id],
+ :status => 'PAUSED',
+ # Recommended: Set a tracking URL template for your ad group if you want to
+ # use URL tracking software.
+ :tracking_url_template =>
+ 'http://tracker.example.com/traveltracker/{escapedlpurl}',
+ :bidding_strategy_configuration => {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {
+ :micro_amount => 3_000_000
+ }
+ }]
+ }
+ }
+
+ operation = {
+ :operand => ad_group,
+ :operator => 'ADD'
+ }
+
+ new_ad_group = ad_group_srv.mutate([operation])[:value].first
+ puts "Ad group with name '%s' and ID %d was added." %
+ [new_ad_group[:name], new_ad_group[:id]]
+
+ return new_ad_group
+end
+
+def create_expanded_dsa(adwords, ad_group)
+ ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ # Create the expanded Dynamic Search Ad. This ad will have its headline and
+ # final URL auto-generated at serving time according to domain name specific
+ # information provided by DynamicSearchAdsSetting at the campaign level.
+ expanded_dsa = {
+ :xsi_type => 'ExpandedDynamicSearchAd',
+ :description => 'Buy your tickets now!',
+ :description2 => 'Discount ends soon'
+ }
+
+ ad_group_ad = {
+ :ad_group_id => ad_group[:id],
+ :ad => expanded_dsa,
+ # Optional: Set the status.
+ :status => 'PAUSED'
+ }
+
+ operation = {
+ :operand => ad_group_ad,
+ :operator => 'ADD'
+ }
+
+ new_ad_group_ad = ad_group_ad_srv.mutate([operation])[:value].first
+ new_expanded_dsa = new_ad_group_ad[:ad]
+ puts ("Expanded Dynamic Search Ad with ID %d, description '%s', and " +
+ "description 2 '%s' was added.") % [new_expanded_dsa[:id],
+ new_expanded_dsa[:description], new_expanded_dsa[:description2]]
+end
+
+def add_web_page_criteria(adwords, ad_group)
+ ad_group_criterion_srv =
+ adwords.service(:AdGroupCriterionService, API_VERSION)
+
+ webpage = {
+ :xsi_type => 'Webpage',
+ :parameter => {
+ :criterion_name => 'Special offers',
+ :conditions => [
+ {
+ :operand => 'URL',
+ :argument => '/specialoffers'
+ },
+ {
+ :operand => 'PAGE_TITLE',
+ :argument => 'Special Offer'
+ }
+ ]
+ }
+ }
+
+ biddable_ad_group_criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :ad_group_id => ad_group[:id],
+ :criterion => webpage,
+ :user_status => 'PAUSED',
+ # Optional: set a custom bid.
+ :bidding_strategy_configuration => {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {
+ :micro_amount => 10_000_000
+ }
+ }]
+ }
+ }
+
+ operation = {
+ :operand => biddable_ad_group_criterion,
+ :operator => 'ADD'
+ }
+
+ new_ad_group_criterion =
+ ad_group_criterion_srv.mutate([operation])[:value].first
+ puts "Webpage criterion with ID %d was added to ad group ID %d." % [
+ new_ad_group_criterion[:criterion][:id],
+ new_ad_group_criterion[:ad_group_id]
+ ]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ add_dynamic_search_ads_campaign()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_expanded_text_ad_with_upgraded_urls.rb b/adwords_api/examples/v201809/advanced_operations/add_expanded_text_ad_with_upgraded_urls.rb
new file mode 100755
index 000000000..cf683aabf
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_expanded_text_ad_with_upgraded_urls.rb
@@ -0,0 +1,134 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 adds an expanded text ad that uses advanced features of
+# upgraded URLs.
+
+require 'adwords_api'
+
+def add_text_ad_with_upgraded_urls(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)
+
+ expanded_text_ad = {
+ :xsi_type => 'ExpandedTextAd',
+ :headline_part1 => 'Luxury Cruise to Mars',
+ :headline_part2 => 'Visit the Red Planet in style.',
+ :description => 'Low-gravity fun for everyone!',
+ # Specify a list of final URLs. This field cannot be set if :url field
+ # is set. This may be specified at ad, criterion, and feed item levels.
+ :final_urls => [
+ 'http://www.example.com/cruise/space/',
+ 'http://www.example.com/locations/mars/'
+ ],
+ # Specify a list of final mobile URLs. This field cannot be set if :url
+ # field is set. This may be specificed at ad, criterion, and
+ # feed item levels.
+ :final_mobile_urls => [
+ 'http://mobile.example.com/cruise/space/',
+ 'http://mobile.example.com/locations/mars/'
+ ]
+ }
+
+ # Specify a tracking URL for 3rd party tracking provider. You may specify
+ # one at customer, campaign, ad group, ad, criterion, or feed item levels.
+ expanded_text_ad[:tracking_url_template] = 'http://tracker.example.com/' +
+ '?season={_season}&promocode={_promocode}&u={lpurl}'
+
+ # Since your tracking URL will have two custom parameters, provide their
+ # values too. This can be provided at campaign, ad group, ad, criterion, or
+ # feed item levels.
+ season_parameter = {
+ :key => 'season',
+ :value => 'christmas'
+ }
+
+ promo_code_parameter = {
+ :key => 'promocode',
+ :value => 'NYC123'
+ }
+
+ tracking_url_parameters = {
+ :parameters => [season_parameter, promo_code_parameter]
+ }
+
+ expanded_text_ad[:url_custom_parameters] = tracking_url_parameters
+
+ operation = {
+ :operator => 'ADD',
+ :operand => {:ad_group_id => ad_group_id, :ad => expanded_text_ad}
+ }
+
+ # Add ads.
+ response = ad_group_ad_srv.mutate([operation])
+ if response and response[:value]
+ response[:value].each do |ad|
+ text_ad = ad[:ad]
+ puts "Ad with ID %d was added." % [text_ad[:id]]
+ puts "\tFinal URLs: %s" % [text_ad[:final_urls].join(', ')]
+ puts "\tFinal Mobile URLs: %s" % [text_ad[:final_mobile_urls].join(', ')]
+ puts "\tTracking URL template: %s" % [text_ad[:tracking_url_template]]
+ custom_parameters =
+ text_ad[:url_custom_parameters][:parameters].map do |custom_parameter|
+ "%s=%s" % [custom_parameter[:key], custom_parameter[:value]]
+ end
+ puts "\tCustom parameters: %s" % [custom_parameters.join(', ')]
+ end
+ else
+ raise StandardError, 'No ads were added.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ add_text_ad_with_upgraded_urls(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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_gmail_ad.rb b/adwords_api/examples/v201809/advanced_operations/add_gmail_ad.rb
new file mode 100644
index 000000000..52c7bbe21
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_gmail_ad.rb
@@ -0,0 +1,135 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2018, 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 Gmail ad to a given ad group. The ad group's campaign
+# needs to have an AdvertisingChannelType of DISPLAY and
+# AdvertisingChannelSubType of DISPLAY_GMAIL_AD. To get ad groups, run
+# get_ad_groups.rb.
+
+require 'adwords_api'
+require 'base64'
+
+def add_gmail_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)
+
+ # This ad format does not allow the creation of an image using the
+ # Image.data field. An image must first be created using the MediaService,
+ # and Image.mediaId must be populated when creating the ad.
+ logo_image_id = upload_image(adwords, 'https://goo.gl/mtt54n')
+ logo_image = {
+ :xsi_type => 'Image',
+ :media_id => logo_image_id
+ }
+
+ marketing_image_id = upload_image(adwords, 'http://goo.gl/3b9Wfh')
+ ad_image = {
+ :xsi_type => 'Image',
+ :media_id => marketing_image_id
+ }
+
+ teaser = {
+ :headline => 'Dream',
+ :description => 'Create your own adventure',
+ :business_name => 'Interplanetary Ships',
+ :logo_image => logo_image
+ }
+
+ gmail_ad = {
+ :xsi_type => 'GmailAd',
+ :teaser => teaser,
+ :marketing_image => ad_image,
+ :marketing_image_headline => 'Travel',
+ :marketing_image_description => 'Take to the skies!',
+ :final_urls => ['http://www.example.com']
+ }
+
+ ad_group_ad = {
+ :ad_group_id => ad_group_id,
+ :ad => gmail_ad,
+ :status => 'PAUSED'
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_ad
+ }
+
+ result = ad_group_ad_srv.mutate([operation])
+ result[:value].each do |ad_group_ad|
+ puts 'A Gmail ad with id %d and short headline "%s" was added.' %
+ [ad_group_ad[:ad][:id], ad_group_ad[:ad][:teaser][:headline]]
+ end
+end
+
+def upload_image(adwords, url)
+ media_srv = adwords.service(:MediaService, API_VERSION)
+
+ image_data = AdsCommon::Http.get(url, adwords.config)
+ base64_image_data = Base64.encode64(image_data)
+
+ image = {
+ :xsi_type => 'Image',
+ :data => base64_image_data,
+ :type => 'IMAGE'
+ }
+
+ response = media_srv.upload([image])
+
+ return response.first[:media_id]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+
+ add_gmail_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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_html5_ad.rb b/adwords_api/examples/v201809/advanced_operations/add_html5_ad.rb
new file mode 100755
index 000000000..5dfd9306f
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_html5_ad.rb
@@ -0,0 +1,137 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 adds an HTML5 ad to a given ad group.
+# To get ad groups, run basic_operations/get_ad_groups.rb.
+
+require 'adwords_api'
+require 'base64'
+
+def add_html5_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)
+
+ # The HTML5 zip file contains all the HTML, CSS, and images needed for the
+ # HTML5 ad. For help on creating an HTML5 zip file, check out Google Web
+ # Designer (https://www.google.com/webdesigner).
+ html5_url = 'http://goo.gl/9Y7qI2'
+ html5_data = AdsCommon::Http.get(html5_url, adwords.config)
+ html5_data_base64 = Base64.encode64(html5_data)
+
+ # Create a media bundle containing the zip file with all the HTML5
+ # components.
+ media_bundle = {
+ :xsi_type => 'MediaBundle',
+ :data => html5_data_base64,
+ :entry_point => 'carousel/index.html',
+ :type => 'MEDIA_BUNDLE'
+ }
+
+ # 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 => 'Custom_layout',
+ :field_media => media_bundle,
+ :type => 'MEDIA_BUNDLE'
+ },
+ {
+ :name => 'layout',
+ :field_text => 'Custom',
+ :type => 'ENUM'
+ }
+ ]
+ }
+
+ html5_ad = {
+ :xsi_type => 'TemplateAd',
+ :name => 'Ad for HTML5',
+ :template_id => 419,
+ :final_urls => ['http://example.com/html5'],
+ :display_url => 'www.example.com/html5',
+ :dimensions => {
+ :width => 300,
+ :height => 250
+ },
+ :template_elements => [ad_data]
+ }
+
+ ad_group_ad = {
+ :ad_group_id => ad_group_id,
+ :ad => html5_ad,
+ :status => 'PAUSED'
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_ad
+ }
+
+ response = ad_group_ad_srv.mutate([operation])
+ if response and !response.empty?
+ response[:value].each do |ad_group_ad|
+ puts "New HTML5 ad with ID %d and display url '%s' was added." %
+ [ad_group_ad[:ad][:id], ad_group_ad[:ad][:display_url]]
+ end
+ else
+ puts "No HTML5 ads were added."
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Ad group ID to add text ads to.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ add_html5_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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_multi_asset_responsive_display_ad.rb b/adwords_api/examples/v201809/advanced_operations/add_multi_asset_responsive_display_ad.rb
new file mode 100644
index 000000000..aee57baaa
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_multi_asset_responsive_display_ad.rb
@@ -0,0 +1,212 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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 adds a responsive display ad (MultiAssetResponsiveDisplayAd)
+# to an ad group. Image assets are uploaded using AssetService. To get
+# ad groups, run get_ad_groups.rb.
+
+
+require 'adwords_api'
+
+def add_multi_asset_responsive_display_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_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ # Create the ad.
+ ad = {
+ :xsi_type => 'MultiAssetResponsiveDisplayAd',
+ :headlines => [
+ {
+ # Text assets can be specified directly in the asset field
+ # when creating the ad.
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Travel to Mars'
+ }
+ },
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Travel to Jupiter'
+ }
+ },
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Travel to Pluto'
+ }
+ }
+ ],
+ :descriptions => [
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Visit the planet in a luxury spaceship.'
+ }
+ },
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'See the planet in style.'
+ }
+ }
+ ],
+ :business_name => 'Galactic Luxury Cruises',
+ :long_headline => {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Visit the planet in a luxury spaceship.'
+ }
+ },
+ # This ad format does not allow the creation of an image asset by setting
+ # the asset.imageData field. An image asset must first be created using the
+ # AssetService, and asset.assetId must be populated when creating the ad.
+ :marketing_images => [
+ {
+ :asset => {
+ :xsi_type => 'ImageAsset',
+ :asset_id => upload_image_asset('https://goo.gl/3b9Wfh')
+ }
+ }
+ ],
+ :square_marketing_images => [
+ {
+ :asset => {
+ :xsi_type => 'ImageAsset',
+ :asset_id => upload_image_asset('https://goo.gl/mtt54n')
+ }
+ }
+ ],
+ :final_urls => [
+ 'http://www.example.com'
+ ],
+ :call_to_action_text => 'Shop Now',
+ :main_color => '#0000ff',
+ :accent_color => '#ffff00',
+ :allow_flexible_color => false,
+ :format_setting => 'NON_NATIVE',
+ :dynamic_settings_price_prefix => 'as low as',
+ :dynamic_settings_promo_text => 'Free shipping!',
+ :logo_images => [
+ {
+ :asset => {
+ :xsi_type => 'ImageAsset',
+ :asset_id => upload_image_asset('https://goo.gl/mtt54n')
+ }
+ }
+ ],
+ }
+
+ # Create the ad group ad.
+ ad_group_ad = {
+ :xsi_type => 'AdGroupAd',
+ :ad => ad,
+ :ad_group_id => ad_group_id
+ };
+
+ # Create the operation.
+ ad_group_operation = {:operator => 'ADD', :operand => ad_group_ad}
+
+ begin
+ # Make the mutate request.
+ result = ad_group_srv.mutate([ad_group_operation])
+
+ # Display the results
+ if result[:value].length > 0
+ result[:value].each do |entry|
+ new_ad = entry[:ad]
+ puts ('Responsive display ad v2 with ID "%s" ' +
+ 'and short headline "%s" was added.') %
+ [new_ad[:id], new_ad[:long_headline][:asset][:asset_text]]
+ end
+ else
+ puts 'No responsive display ad v2 were created.'
+ end
+ rescue Exception => e
+ puts 'Failed to create responsive display ad v2.'
+ end
+end
+
+def upload_image_asset(image_url, adwords_api_instance)
+
+ asset_srv = adwords_api_instance.service(:AssetService, API_VERSION)
+
+ # The image needs to be in a BASE64 encoded form
+ image_data = AdsCommon::Http.get(image_url, adwords_api_instance.config)
+ image_data_base64 = Base64.encode64(image_data)
+
+ # Create the image asset
+ image_asset = {
+ :xsi_type => 'ImageAsset',
+ # Optional: Provide a unique friendly name to identify your asset. If you
+ # specify the assetName field, then both the asset name and the image being
+ # uploaded should be unique, and should not match another ACTIVE asset in
+ # this customer account.
+ # :asset_name => 'Image asset %s' % (Time.new.to_f * 1000).to_i,
+ :image_data => image_data_base64
+ }
+
+ # Create the operation.
+ asset_operation = {:operator => 'ADD', :operand => image_asset}
+
+ # Make the mutate request.
+ result = asset_srv.mutate([asset_operation])
+
+ # return the generated Id
+ result[:value].first[:asset_id]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+
+ add_multi_asset_responsive_display_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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_responsive_display_ad.rb b/adwords_api/examples/v201809/advanced_operations/add_responsive_display_ad.rb
new file mode 100755
index 000000000..d804f854e
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_responsive_display_ad.rb
@@ -0,0 +1,165 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 adds an image representing the ad using the MediaService and
+# then adds a responsive display ad to a given ad group.
+# To get ad groups, run basic_operations/get_ad_groups.rb.
+
+require 'adwords_api'
+require 'base64'
+
+def add_responsive_display_ad(adwords, ad_group_id)
+ ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ # This ad format does not allow the creation of an image using the Image.data
+ # field. An image must first be created using the MediaService, and
+ # Image.mediaId must be populated when creating the ad.
+ ad_image = upload_image(adwords, 'https://goo.gl/3b9Wfh')
+
+ # Create the responsive display ad.
+ responsive_display_ad = {
+ :xsi_type => 'ResponsiveDisplayAd',
+ # This ad format does not allow the creation of an image using the
+ # Image.data field. An image must first be created using the MediaService,
+ # and Image.mediaId must be populated when creating the ad.
+ :marketing_image => {:media_id => ad_image[:media_id]},
+ :short_headline => 'Travel',
+ :long_headline => 'Traver the World',
+ :description => 'Take to the air!',
+ :business_name => 'Interplanetary Cruises',
+ :final_urls => ['http://www.example.com/'],
+
+ # Optional: Set call to action text.
+ :call_to_action_text => 'Shop Now'
+
+ # Whitelisted accounts only: Set color settings using hexadecimal values.
+ # Set 'allow_flexible_color' to false if you want your ads to render by
+ # always using your colors strictly.
+ #:main_color => '#0000ff',
+ #:accent_color => '#ffff00',
+ #:allow_flexible_color => false,
+
+ # Whitelisted accounts only: Set the format setting that the ad will be
+ # served in.
+ #:format_setting => 'NON_NATIVE'
+ }
+
+ # Optional: Create a square marketing image using MediaService, and set it to
+ # the ad.
+ square_image = upload_image(adwords, 'https://goo.gl/mtt54n')
+ responsive_display_ad[:square_marketing_image] = {
+ :media_id => square_image[:media_id]
+ }
+
+ # Optional: Set dynamic display ad settings, composed of landscape logo image,
+ # promotion text, and price prefix.
+ logo_image = upload_image(adwords, 'https://goo.gl/dEvQeF')
+ responsive_display_ad[:dynamic_display_ad_settings] = {
+ :landscape_logo_image => {:media_id => logo_image[:media_id]},
+ :price_prefix => 'as low as',
+ :promo_text => 'Free shipping!'
+ }
+
+ # Create an ad group ad for the responsive display ad.
+ responsive_display_ad_group_ad = {
+ :ad_group_id => ad_group_id,
+ :ad => responsive_display_ad,
+ # Additional propertires (non-required).
+ :status => 'PAUSED'
+ }
+
+ # Create operation.
+ responsive_display_ad_group_ad_operations = {
+ :operator => 'ADD',
+ :operand => responsive_display_ad_group_ad
+ }
+
+ # Add the responsive display ad.
+ result = ad_group_ad_srv.mutate([responsive_display_ad_group_ad_operations])
+
+ # Display results.
+ if result && result[:value]
+ result[:value].each do |ad_group_ad|
+ puts ("New responsive display ad with id %d and short headline '%s' was" +
+ "added.") % [ad_group_ad[:ad][:id], ad_group_ad[:ad][:short_headline]]
+ end
+ else
+ puts 'No responsive display ads were added.'
+ end
+end
+
+def upload_image(adwords, image_url)
+ media_srv = adwords.service(:MediaService, API_VERSION)
+
+ # Create an image.
+ raw_image_data = AdsCommon::Http.get(image_url, adwords.config)
+ image = {
+ :xsi_type => 'Image',
+ :data => Base64.encode64(raw_image_data),
+ :type => 'IMAGE'
+ }
+
+ # Upload the image.
+ response = media_srv.upload([image])
+ if response and !response.empty?
+ return response.first
+ else
+ raise StandardError, 'Could not upload image, aborting.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # 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 ID to add text ads to.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ add_responsive_display_ad(adwords, 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_shopping_dynamic_remarketing_campaign.rb b/adwords_api/examples/v201809/advanced_operations/add_shopping_dynamic_remarketing_campaign.rb
new file mode 100755
index 000000000..7d1b8c142
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_shopping_dynamic_remarketing_campaign.rb
@@ -0,0 +1,265 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2018, 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 Shopping dynamic remarketing campaign for the Display
+# Network via the following steps:
+# * Creates a new Display Network campaign.
+# * Links the campaign with Merchant Center.
+# * Links the user list to the ad group.
+# * Creates a responsive display ad to render the dynamic text.
+
+require 'adwords_api'
+
+def add_shopping_dynamic_remarketing_campaign(merchant_id, budget_id,
+ user_list_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 = create_campaign(adwords, merchant_id, budget_id)
+ puts "Campaign with name '%s' and ID %d was added." %
+ [campaign[:name], campaign[:id]]
+
+ ad_group = create_ad_group(adwords, campaign)
+ puts "Ad group with name '%s' and ID :%d was added." %
+ [ad_group[:name], ad_group[:id]]
+
+ ad_group_ad = create_ad(adwords, ad_group)
+ puts "Responsive display ad with ID %d was added." % ad_group_ad[:ad][:id]
+
+ attach_user_list(adwords, ad_group, user_list_id)
+ puts "User list with ID %d was attached to ad group with ID %d." %
+ [user_list_id, ad_group[:id]]
+end
+
+def create_campaign(adwords, merchant_id, budget_id)
+ campaign_srv = adwords.service(:CampaignService, API_VERSION)
+
+ campaign = {
+ :name => 'Shopping campaign #%d' % (Time.new.to_f * 1000).to_i,
+ # Dynamic remarketing campaigns are only available on the Google Display
+ # Network
+ :advertising_channel_type => 'DISPLAY',
+ :status => 'PAUSED',
+ :budget => {
+ :budget_id => budget_id
+ },
+ # This example uses a Manual CPC bidding strategy, but you should select the
+ # strategy that best aligns with your sales goals. More details here:
+ # https://support.google.com/adwords/answer/2472725
+ :bidding_strategy_configuration => {
+ :bidding_strategy_type => 'MANUAL_CPC'
+ },
+ :settings => [{
+ :xsi_type => 'ShoppingSetting',
+ # Campaigns with numerically higher priorities take precedence over those
+ # with lower priorities.
+ :campaign_priority => 0,
+ # Set the Merchant Center account ID from which to source products.
+ :merchant_id => merchant_id,
+ # Display Network campaigns do not support partition by country. The only
+ # supported value is "ZZ". This signals that products from all countries
+ # are available in the campaign. The actual products which serve are based
+ # on the products tagged in the user list entry.
+ :sales_country => 'ZZ',
+ # Optional: Enable local inventory ads (items for sale in physical
+ # stores.)
+ :enable_local => true
+ }]
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => campaign
+ }
+
+ result = campaign_srv.mutate([operation])
+ return result[:value].first
+end
+
+def create_ad_group(adwords, campaign)
+ ad_group_srv = adwords.service(:AdGroupService, API_VERSION)
+
+ ad_group = {
+ :name => 'Dynamic remarketing ad group',
+ :campaign_id => campaign[:id],
+ :status => 'ENABLED'
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group
+ }
+
+ result = ad_group_srv.mutate([operation])
+ return result[:value].first
+end
+
+def create_ad(adwords, ad_group)
+ ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ optional_media_id = upload_image(adwords, 'https://goo.gl/mtt54n')
+
+ ad = {
+ :xsi_type => 'ResponsiveDisplayAd',
+ # This ad format does not allow the creation of an image using the
+ # Image.data field. An image must first be created using the MediaService,
+ # and Image.mediaId must be populated when creating the ad.
+ :marketing_image => {
+ :xsi_type => 'Image',
+ :media_id => upload_image(adwords, 'https://goo.gl/3b9Wfh')
+ },
+ :short_headline => 'Travel',
+ :long_headline => 'Travel the World',
+ :description => 'Take to the air!',
+ :business_name => 'Interplanetary Cruises',
+ :final_urls => ['http://www.example.com'],
+ # Optional: Call to action text.
+ # Valid texts: https://support.google.com/adwords/answer/7005917
+ :call_to_action_text => 'Apply Now',
+ # Optional: Set dynamic display ad settings, composed of landscape logo
+ # image, promotion text, and price prefix.
+ :dynamic_display_ad_settings => create_dynamic_display_ad_settings(adwords),
+ # Optional: Create a logo image and set it to the ad.
+ :logo_image => {
+ :xsi_type => 'Image',
+ :media_id => optional_media_id
+ },
+ # Optional: Create a square marketing image and set it to the ad.
+ :square_marketing_image => {
+ :xsi_type => 'Image',
+ :media_id => optional_media_id
+ },
+ # Whitelisted accounts only: Set color settings using hexadecimal values.
+ # Set allowFlexibleColor to false if you want your ads to render by always
+ # using your colors strictly.
+ # :main_color => '#0000ff',
+ # :accent_color => '#ffff00',
+ # :allow_flexible_color => false,
+ # Whitelisted accounts only: Set the format setting that the ad will be
+ # served in.
+ # :format_setting => 'NON_NATIVE'
+ }
+
+ ad_group_ad = {
+ :ad => ad,
+ :ad_group_id => ad_group[:id]
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_ad
+ }
+
+ result = ad_srv.mutate([operation])
+ return result[:value].first
+end
+
+def attach_user_list(adwords, ad_group, user_list_id)
+ ad_group_criterion_srv = adwords.service(:AdGroupCriterionService,
+ API_VERSION)
+
+ user_list = {
+ :xsi_type => 'CriterionUserList',
+ :user_list_id => user_list_id
+ }
+
+ ad_group_criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :criterion => user_list,
+ :ad_group_id => ad_group[:id]
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_criterion
+ }
+
+ result = ad_group_criterion_srv.mutate([operation])
+end
+
+def upload_image(adwords, url)
+ media_srv = adwords.service(:MediaService, API_VERSION)
+
+ image_data = AdsCommon::Http.get(url, adwords.config)
+ base64_image_data = Base64.encode64(image_data)
+
+ image = {
+ :xsi_type => 'Image',
+ :data => base64_image_data,
+ :type => 'IMAGE'
+ }
+
+ response = media_srv.upload([image])
+ return response.first[:media_id]
+end
+
+def create_dynamic_display_ad_settings(adwords)
+ logo = {
+ :xsi_type => 'Image',
+ :media_id => upload_image(adwords, 'https://goo.gl/dEvQeF')
+ }
+
+ dynamic_settings = {
+ :landscape_logo_image => logo,
+ :price_prefix => 'as low as',
+ :promo_text => 'Free shipping!'
+ }
+
+ return dynamic_settings
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ merchant_id = 'INSERT_MERCHANT_CENTER_ID_HERE'.to_i
+ budget_id = 'INSERT_BUDGET_ID_HERE'.to_i
+ user_list_id = 'INSERT_USER_LIST_ID_HERE'.to_i
+
+ add_shopping_dynamic_remarketing_campaign(merchant_id, budget_id,
+ user_list_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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/add_universal_app_campaign.rb b/adwords_api/examples/v201809/advanced_operations/add_universal_app_campaign.rb
new file mode 100755
index 000000000..5c13cd5a5
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/add_universal_app_campaign.rb
@@ -0,0 +1,219 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 universal app campaign.
+#
+# To get campaigns, run get_campaigns.rb. To upload image assets for this
+# campaign, run upload_image.rb.
+
+require 'adwords_api'
+require 'date'
+
+def add_universal_app_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)
+ budget_srv = adwords.service(:BudgetService, API_VERSION)
+
+ # Create a budget.
+ budget = {
+ :name => 'Interplanetary budget #%d' % (Time.new.to_f * 1000).to_i,
+ :amount => {:micro_amount => 50000000},
+ :delivery_method => 'STANDARD',
+ # Universal app campaigns don't support shared budgets.
+ :is_explicitly_shared => false
+ }
+ budget_operation = {:operator => 'ADD', :operand => budget}
+
+ # Add the budget.
+ return_budget = budget_srv.mutate([budget_operation])
+ budget_id = return_budget[:value].first[:budget_id]
+
+ # Create campaigns.
+ universal_app_campaign = {
+ :name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
+ # Recommendation: Set the campaign to PAUSED when creating it to stop the
+ # ads from immediately serving. Set it to ENABLED once you've added
+ # targeting and the ads are ready to serve.
+ :status => 'PAUSED',
+ # Set the advertising channel and subchannel types for universal app
+ # campaigns.
+ :advertising_channel_type => 'MULTI_CHANNEL',
+ :advertising_channel_sub_type => 'UNIVERSAL_APP_CAMPAIGN',
+ # Set the campaign's bidding strategy. Universal app campaigns only support
+ # the TARGET_CPA bidding strategy.
+ :bidding_strategy_configuration => {
+ :bidding_scheme => {
+ :xsi_type => 'TargetCpaBiddingScheme',
+ :target_cpa => {
+ :micro_amount => 1000000
+ }
+ }
+ },
+ # Budget (required) - note only the budget ID is required.
+ :budget => {:budget_id => budget_id},
+ # Optional fields:
+ :start_date =>
+ DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d'),
+ :end_date =>
+ DateTime.parse((Date.today + 365).to_s).strftime('%Y%m%d')
+ }
+
+ universal_app_setting = {
+ # Set the campaign's assets and ad text ideas. These values will be used to
+ # generate ads.
+ :xsi_type => 'UniversalAppCampaignSetting',
+ :app_id => 'com.labpixies.colordrips',
+ :app_vendor => 'VENDOR_GOOGLE_MARKET',
+ :description1 => 'A cool puzzle game',
+ :description2 => 'Remove connected blocks',
+ :description3 => '3 difficulty levels',
+ :description4 => '4 colorful fun skins'
+ # Optional: You can set up to 20 image assets for your campaign. See
+ # upload_image.rb for an example on how to upload images.
+ #
+ # :image_media_ids => [INSERT_IMGAGE_MEDIA_ID(s)_HERE]
+ }
+
+ # Optimize this campaign for getting new users for your app.
+ universal_app_setting[:universal_app_bidding_strategy_goal_type] =
+ 'OPTIMIZE_FOR_INSTALL_CONVERSION_VOLUME'
+
+ # Optional: If you select OPTIMIZE_FOR_IN_APP_CONVERSION_VOLUME goal type,
+ # then also specify your in-app conversion types so AdWords can focus your
+ # campaign on people who are most likely to complete the corresponding in-app
+ # actions.
+ # Conversion type IDs can be retrieved using ConversionTrackerService.get.
+ #
+ # universal_app_campaign[:selective_optimization] = {
+ # :conversion_type_ids => [INSERT_CONVERSION_TYPE_ID(s)_HERE]
+ # }
+
+ # Optional: Set the campaign settings for Advanced location options.
+ geo_setting = {
+ :xsi_type => 'GeoTargetTypeSetting',
+ :positive_geo_target_type => 'DONT_CARE',
+ :negative_geo_target_type => 'DONT_CARE'
+ }
+
+ universal_app_campaign[:settings] = [
+ universal_app_setting,
+ geo_setting
+ ]
+
+ # Construct the operation and add the campaign.
+ operations = [{
+ :operator => 'ADD',
+ :operand => universal_app_campaign
+ }]
+
+ campaigns = campaign_srv.mutate(operations)[:value]
+
+ if campaigns
+ campaigns.each do |campaign|
+ puts "Universal app campaign with name '%s' and ID %d was added." %
+ [campaign[:name], campaign[:id]]
+ set_campaign_targeting_criteria(adwords, campaign)
+ end
+ else
+ raise new StandardError, 'No universal app campaigns were added.'
+ end
+end
+
+def set_campaign_targeting_criteria(adwords, campaign)
+ campaign_criterion_service =
+ adwords.service(:CampaignCriterionService, API_VERSION)
+
+ criteria = [
+ {
+ :xsi_type => 'Location',
+ :id => 21137 # California
+ },
+ {
+ :xsi_type => 'Location',
+ :id => 2484 # Mexico
+ },
+ {
+ :xsi_type => 'Language',
+ :id => 1000 # English
+ },
+ {
+ :xsi_type => 'Language',
+ :id => 1003 # Spanish
+ }
+ ]
+
+ operations = criteria.map do |criterion|
+ {
+ :operator => 'ADD',
+ :operand => {
+ :campaign_id => campaign[:id],
+ :criterion => criterion
+ }
+ }
+ end
+
+ response = campaign_criterion_service.mutate(operations)
+
+ if response and response[:value]
+ # Display the added campaign targets.
+ response[:value].each do |criterion|
+ puts 'Campaign criteria of type "%s" and id %d was added.' % [
+ criterion[:criterion][:criterion_type],
+ criterion[:criterion][:id]
+ ]
+ end
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ add_universal_app_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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/create_and_attach_shared_keyword_set.rb b/adwords_api/examples/v201809/advanced_operations/create_and_attach_shared_keyword_set.rb
new file mode 100755
index 000000000..13360f668
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/create_and_attach_shared_keyword_set.rb
@@ -0,0 +1,141 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/find_and_remove_criteria_from_shared_set.rb b/adwords_api/examples/v201809/advanced_operations/find_and_remove_criteria_from_shared_set.rb
new file mode 100755
index 000000000..f6214cf9c
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/find_and_remove_criteria_from_shared_set.rb
@@ -0,0 +1,174 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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.
+
+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 = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/get_ad_group_bid_modifiers.rb b/adwords_api/examples/v201809/advanced_operations/get_ad_group_bid_modifiers.rb
new file mode 100755
index 000000000..3dde02900
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/get_ad_group_bid_modifiers.rb
@@ -0,0 +1,102 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/advanced_operations/use_portfolio_bidding_strategy.rb b/adwords_api/examples/v201809/advanced_operations/use_portfolio_bidding_strategy.rb
new file mode 100755
index 000000000..9d31deeb1
--- /dev/null
+++ b/adwords_api/examples/v201809/advanced_operations/use_portfolio_bidding_strategy.rb
@@ -0,0 +1,149 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 Portfolio Bidding Strategy and uses it to construct a
+# campaign.
+
+require 'adwords_api'
+require 'date'
+
+def use_portfolio_bidding_strategy()
+ # 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)
+ bidding_srv = adwords.service(:BiddingStrategyService, 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',
+ :is_explicitly_shared => true
+ }
+ return_budget = budget_srv.mutate([
+ {:operator => 'ADD', :operand => budget}])
+ budget_id = return_budget[:value].first[:budget_id]
+
+ # Create a portfolio bidding strategy.
+ portfolio_bidding_strategy = {
+ :name => 'Maximize Clicks #%d' % (Time.new.to_f * 1000).to_i,
+ :bidding_scheme => {
+ :xsi_type => 'TargetSpendBiddingScheme',
+ # Optionally set additional bidding scheme parameters.
+ :bid_ceiling => {:micro_amount => 20000000},
+ :spend_target => {:micro_amount => 40000000}
+ }
+ }
+ return_strategy = bidding_srv.mutate([
+ {:operator => 'ADD', :operand => portfolio_bidding_strategy}])
+
+ bidding_strategy = return_strategy[:value].first
+ puts ("Portfolio bidding strategy with name '%s' and ID %d of type '%s'" +
+ ' was created') %
+ [bidding_strategy[:name], bidding_strategy[:id], bidding_strategy[:type]]
+
+ # Create campaigns.
+ campaigns = [
+ {
+ :name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
+ # Recommendation: Set the campaign to PAUSED when creating it to stop the
+ # ads from immediately serving. Set to ENABLED once you've added
+ # targeting and the ads are ready to serve.
+ :status => 'PAUSED',
+ :bidding_strategy_configuration => {
+ :bidding_strategy_id => bidding_strategy[:id]
+ },
+ # Budget (required) - note only the budget ID is required.
+ :budget => {:budget_id => budget_id},
+ :advertising_channel_type => 'SEARCH',
+ :network_setting => {
+ :target_google_search => true,
+ :target_search_network => true,
+ :target_content_network => true
+ }
+ },
+ {
+ :name => "Interplanetary Cruise banner #%d" % (Time.new.to_f * 1000).to_i,
+ :status => 'PAUSED',
+ :bidding_strategy_configuration => {
+ :bidding_strategy_id => bidding_strategy[:id]
+ },
+ :budget => {:budget_id => budget_id},
+ :advertising_channel_type => 'DISPLAY',
+ :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 = :v201809
+
+ begin
+ use_portfolio_bidding_strategy()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/add_ad_groups.rb b/adwords_api/examples/v201809/basic_operations/add_ad_groups.rb
new file mode 100755
index 000000000..a14f3ac49
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/add_ad_groups.rb
@@ -0,0 +1,145 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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}
+ }
+ ]
+ },
+ :ad_group_ad_rotation_mode => {
+ :ad_rotation_mode => 'OPTIMIZE'
+ },
+ :settings => [
+ # Targeting restriction settings. Depending on the :criterion_type_group
+ # value, most TargetingSettingDetail only affect Display campaigns.
+ # However, the USER_INTEREST_AND_LIST value works for RLSA campaigns -
+ # Search campaigns targeting using a remarketing list.
+ {
+ :xsi_type => 'TargetingSetting',
+ :details => [
+ # Restricting to serve ads that match your ad group placements.
+ # This is equivalent to choosing "Target and bid" in the UI.
+ {
+ :xsi_type => 'TargetingSettingDetail',
+ :criterion_type_group => 'PLACEMENT',
+ :target_all => false
+ },
+ # Using your ad group verticals only for bidding. This is equivalent
+ # to choosing "Bid only" in the UI.
+ {
+ :xsi_type => 'TargetingSettingDetail',
+ :criterion_type_group => 'VERTICAL',
+ :target_all => true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ :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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/add_campaigns.rb b/adwords_api/examples/v201809/basic_operations/add_campaigns.rb
new file mode 100755
index 000000000..405a67738
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/add_campaigns.rb
@@ -0,0 +1,140 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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')
+
+ # Create a budget, which can be shared by multiple campaigns.
+ budget_srv = adwords.service(:BudgetService, API_VERSION)
+ budget = {
+ :name => 'Interplanetary budget #%d' % (Time.new.to_f * 1000).to_i,
+ :amount => {:micro_amount => 50000000},
+ :delivery_method => 'STANDARD'
+ }
+ budget_operation = {:operator => 'ADD', :operand => budget}
+
+ # Add budget.
+ return_budget = budget_srv.mutate([budget_operation])
+ budget_id = return_budget[:value].first[:budget_id]
+
+ campaign_srv = adwords.service(:CampaignService, API_VERSION)
+
+ # Create campaigns.
+ campaigns = [
+ {
+ :name => "Interplanetary Cruise #%d" % (Time.new.to_f * 1000).to_i,
+ # Recommendation: Set the campaign to PAUSED when creating it to stop the
+ # ads from immediately serving. Set to ENABLED once you've added
+ # targeting and the ads are ready to serve.
+ :status => 'PAUSED',
+ :bidding_strategy_configuration => {
+ :bidding_strategy_type => 'MANUAL_CPC'
+ },
+ # Budget (required) - note only the budget ID is required.
+ :budget => {:budget_id => budget_id},
+ :advertising_channel_type => 'SEARCH',
+ # Optional fields:
+ :start_date =>
+ DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d'),
+ :network_setting => {
+ :target_google_search => true,
+ :target_search_network => true,
+ :target_content_network => true
+ },
+ :settings => [
+ {
+ :xsi_type => 'GeoTargetTypeSetting',
+ :positive_geo_target_type => 'DONT_CARE',
+ :negative_geo_target_type => 'DONT_CARE'
+ }
+ ],
+ :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},
+ :advertising_channel_type => 'DISPLAY'
+ }
+ ]
+
+ # 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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/add_expanded_text_ads.rb b/adwords_api/examples/v201809/basic_operations/add_expanded_text_ads.rb
new file mode 100755
index 000000000..309732965
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/add_expanded_text_ads.rb
@@ -0,0 +1,119 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 expanded text ads to a given ad group.
+# To get ad groups, run get_ad_groups.rb.
+
+require 'adwords_api'
+require 'date'
+
+def add_expanded_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.
+ operations = 5.times.map do |i|
+ expanded_text_ad = {
+ :xsi_type => 'ExpandedTextAd',
+ :headline_part1 => 'Cruise to Mars #%d' % (Time.new.to_f * 1000).to_i,
+ :headline_part2 => 'Best Space Cruise Line',
+ :headline_part3 => 'For Your Loved Ones',
+ :description => 'Buy your tickets now!',
+ :description2 => 'Discount ends soon',
+ :final_urls => ['http://www.example.com/%d' % i],
+ :path1 => 'all-inclusive',
+ :path2 => 'deals'
+ }
+
+ ad_group_ad = {
+ :ad_group_id => ad_group_id,
+ :ad => expanded_text_ad,
+ # Additional properties (non-required).
+ :status => 'PAUSED'
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_ad
+ }
+ end
+
+ # Add ads.
+ response = ad_group_ad_srv.mutate(operations)
+ if response and response[:value]
+ response[:value].each do |ad_group_ad|
+ headline_part3 = ad_group_ad[:ad][:headline_part3]
+ headline_part3_string = ''
+ unless headline_part3.nil?
+ headline_part3_string = ' | %s' % headline_part3
+ end
+ puts ('New expanded text ad with id "%d" and headline "%s | %s%s" was ' +
+ 'added.') % [
+ ad_group_ad[:ad][:id],
+ ad_group_ad[:ad][:headline_part1],
+ ad_group_ad[:ad][:headline_part2],
+ headline_part3_string
+ ]
+ end
+ else
+ raise StandardError, 'No ads were added.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Ad group ID to add text ads to.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ add_expanded_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/add_keywords.rb b/adwords_api/examples/v201809/basic_operations/add_keywords.rb
new file mode 100755
index 000000000..2ef3bb84b
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/add_keywords.rb
@@ -0,0 +1,114 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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',
+ :final_urls => {
+ :urls => ['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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/add_responsive_search_ad.rb b/adwords_api/examples/v201809/basic_operations/add_responsive_search_ad.rb
new file mode 100644
index 000000000..727a9c726
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/add_responsive_search_ad.rb
@@ -0,0 +1,151 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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 responsive search ad to a given ad group.
+# To get ad groups, run get_ad_groups.rb.
+
+require 'adwords_api'
+require 'date'
+
+def add_responsive_search_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)
+
+ # 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.
+ responsive_search_ad = {
+ :xsi_type => 'ResponsiveSearchAd',
+ :headlines => [
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Cruise to Mars #%d' % (Time.new.to_f * 1000).to_i
+ },
+ # Set a pinning to always choose this asset for HEADLINE_1. Pinning is
+ # optional; if no pinning is set, then headlines and descriptions will
+ # be rotated and the ones that perform best will be used more often.
+ :pinned_field => 'HEADLINE_1'
+ },
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Best Space Cruise Line'
+ }
+ },
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Experience the Stars'
+ }
+ }
+ ],
+ :descriptions => [
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Buy your tickets now'
+ }
+ },
+ {
+ :asset => {
+ :xsi_type => 'TextAsset',
+ :asset_text => 'Visit the Red Planet'
+ }
+ }
+ ],
+ :final_urls => ['http://www.example.com/cruise'],
+ :path1 => 'all-inclusive',
+ :path2 => 'deals'
+ }
+
+ ad_group_ad = {
+ :ad_group_id => ad_group_id,
+ :ad => responsive_search_ad,
+ # Additional properties (non-required).
+ :status => 'PAUSED'
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_ad
+ }
+
+ # Add ad.
+ response = ad_group_ad_srv.mutate([operation])
+ if response and response[:value]
+ response[:value].each do |ad_group_ad|
+ ad = ad_group_ad[:ad]
+ puts 'New responsive search ad with ID %d was added.' % ad[:id]
+ puts ' Headlines:'
+ ad[:headlines].each do |headline|
+ pinning = headline[:pinned_field]
+ puts ' %s' % headline[:asset][:asset_text]
+ puts ' (pinned to %s)' % pinning unless pinning.nil?
+ end
+ puts ' Descriptions:'
+ ad[:descriptions].each do |description|
+ pinning = description[:pinned_field]
+ puts ' %s' % description[:asset][:asset_text]
+ puts ' (pinned to %s)' % pinning unless pinning.nil?
+ end
+ end
+ else
+ raise StandardError, 'No ads were added.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Ad group ID to add responsive search ads to.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ add_responsive_search_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/get_ad_groups.rb b/adwords_api/examples/v201809/basic_operations/get_ad_groups.rb
new file mode 100755
index 000000000..f6514af8f
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/get_ad_groups.rb
@@ -0,0 +1,102 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/get_campaigns.rb b/adwords_api/examples/v201809/basic_operations/get_campaigns.rb
new file mode 100755
index 000000000..71ec86a91
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/get_campaigns.rb
@@ -0,0 +1,97 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/get_campaigns_with_awql.rb b/adwords_api/examples/v201809/basic_operations/get_campaigns_with_awql.rb
new file mode 100755
index 000000000..6d51baffc
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/get_campaigns_with_awql.rb
@@ -0,0 +1,93 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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_builder = adwords.service_query_builder do |b|
+ b.select('Id', 'Name', 'Status')
+ b.order_by_asc('Name')
+ b.limit(0, PAGE_SIZE)
+ end
+ query = query_builder.build
+
+ page = nil
+
+ loop do
+ page_query = query.to_s
+ 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
+ end
+ break unless query.has_next(page)
+ query.next_page
+ end
+
+ if page.include?(:total_num_entries)
+ puts "\tTotal number of campaigns found: %d." % page[:total_num_entries]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/get_expanded_text_ads.rb b/adwords_api/examples/v201809/basic_operations/get_expanded_text_ads.rb
new file mode 100755
index 000000000..888bb11c5
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/get_expanded_text_ads.rb
@@ -0,0 +1,122 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 non-removed expanded text ads in an ad group. To add
+# expanded text ads, run add_expanded_text_ads.rb.
+# To get ad groups, run get_ad_groups.rb.
+
+require 'adwords_api'
+
+def get_expanded_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', 'HeadlinePart1', 'HeadlinePart2',
+ 'Description'],
+ :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']
+ },
+ {
+ :field => 'AdType',
+ :operator => 'EQUALS',
+ :values => ['EXPANDED_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_group_ad|
+ puts ('Expanded text ad with ID "%d", status "%s", and headline ' +
+ '"%s - %s" was found.') % [ad_group_ad[:ad][:id],
+ ad_group_ad[:status], ad_group_ad[:ad][:headline_part1],
+ ad_group_ad[:ad][:headline_part2]]
+ 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 expanded text ad(s)." %
+ [ad_group_id, page[:total_num_entries]]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 500
+
+ begin
+ # Ad group ID to get text ads for.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ get_expanded_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/get_keywords.rb b/adwords_api/examples/v201809/basic_operations/get_keywords.rb
new file mode 100755
index 000000000..179433ae1
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/get_keywords.rb
@@ -0,0 +1,109 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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', 'KeywordMatchType', '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', text '%s', and match type '%s'" %
+ [keyword[:criterion][:id],
+ keyword[:criterion][:type],
+ keyword[:criterion][:text],
+ keyword[:criterion][:match_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 "\tAd group ID %d has %d keyword(s)." %
+ [ad_group_id, page[:total_num_entries]]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/get_responsive_search_ads.rb b/adwords_api/examples/v201809/basic_operations/get_responsive_search_ads.rb
new file mode 100644
index 000000000..ca4048dff
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/get_responsive_search_ads.rb
@@ -0,0 +1,133 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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 non-removed responsive search ads in an ad group. To add
+# responsive search ads, run add_responsive_search_ad.rb.
+# To get ad groups, run get_ad_groups.rb.
+
+require 'adwords_api'
+
+def get_responsive_search_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', 'ResponsiveSearchAdHeadlines',
+ 'ResponsiveSearchAdDescriptions'],
+ :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']
+ },
+ {
+ :field => 'AdType',
+ :operator => 'EQUALS',
+ :values => ['RESPONSIVE_SEARCH_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_group_ad|
+ ad = ad_group_ad[:ad]
+ puts 'Responsive search ad with id %d and status %s was found.' %
+ [ad[:id], ad_group_ad[:status]]
+ puts ' Headlines:'
+ ad[:headlines].each do |headline|
+ pinning = headline[:pinned_field]
+ puts ' %s' % headline[:asset][:asset_text]
+ puts ' (pinned to %s)' % pinning unless pinning.nil?
+ end
+ puts ' Descriptions:'
+ ad[:descriptions].each do |description|
+ pinning = description[:pinned_field]
+ puts ' %s' % description[:asset][:asset_text]
+ puts ' (pinned to %s)' % pinning unless pinning.nil?
+ 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 "\nAd group ID %d has %d responsive search ad(s)." %
+ [ad_group_id, page[:total_num_entries]]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 500
+
+ begin
+ # Ad group ID to get text ads for.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ get_responsive_search_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/pause_ad.rb b/adwords_api/examples/v201809/basic_operations/pause_ad.rb
new file mode 100755
index 000000000..e33e87f37
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/pause_ad.rb
@@ -0,0 +1,87 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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'.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/remove_ad.rb b/adwords_api/examples/v201809/basic_operations/remove_ad.rb
new file mode 100755
index 000000000..a8120548b
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/remove_ad.rb
@@ -0,0 +1,89 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 removes an ad using the 'REMOVE' operator. To get ads, run
+# get_expanded_text_ads.rb.
+
+require 'adwords_api'
+
+def remove_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
+ }
+ }
+ }
+
+ # Remove ad.
+ response = ad_group_ad_srv.mutate([operation])
+ if response and response[:value]
+ ad = response[:value].first
+ puts "Ad ID %d was successfully removed." % ad[:ad][:id]
+ else
+ puts 'No ads were removed.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # IDs of an ad to remove and its ad group.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ ad_id = 'INSERT_AD_ID_HERE'.to_i
+ remove_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/remove_ad_group.rb b/adwords_api/examples/v201809/basic_operations/remove_ad_group.rb
new file mode 100755
index 000000000..0e49c74b2
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/remove_ad_group.rb
@@ -0,0 +1,85 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 removes an ad group by setting the status to 'REMOVED'. To get ad
+# groups, run get_ad_groups.rb.
+
+require 'adwords_api'
+
+def remove_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 deleting ad group.
+ operation = {
+ :operator => 'SET',
+ :operand => {
+ :id => ad_group_id,
+ :status => 'REMOVED'
+ }
+ }
+
+ # Remove 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 removed." % [ad_group[:id]]
+ else
+ puts 'No ad group was updated.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # ID of an ad group to remove.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ remove_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/remove_campaign.rb b/adwords_api/examples/v201809/basic_operations/remove_campaign.rb
new file mode 100755
index 000000000..7d15e5379
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/remove_campaign.rb
@@ -0,0 +1,87 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 removes a campaign by setting the status to 'REMOVED'. To get
+# campaigns, run get_campaigns.rb.
+
+require 'adwords_api'
+
+def remove_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 deleting campaign.
+ operation = {
+ :operator => 'SET',
+ :operand => {
+ :id => campaign_id,
+ :status => 'REMOVED'
+ }
+ }
+
+ # Remove campaign.
+ response = campaign_srv.mutate([operation])
+
+ if response and response[:value]
+ campaign = response[:value].first
+ puts "Campaign ID %d was removed." %
+ [campaign[:id]]
+ else
+ puts 'No campaign was updated.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # ID of a campaign to remove.
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
+ remove_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/remove_keyword.rb b/adwords_api/examples/v201809/basic_operations/remove_keyword.rb
new file mode 100755
index 000000000..904c80eb9
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/remove_keyword.rb
@@ -0,0 +1,94 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 removes a keyword using the 'REMOVE' operator. To get list of
+# keywords, run get_keywords.rb.
+
+require 'adwords_api'
+
+def remove_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
+ }
+ }
+ }
+
+ # Remove keyword.
+ response = ad_group_criterion_srv.mutate([operation])
+ ad_group_criterion = response[:value].first
+ if ad_group_criterion
+ puts "Keyword ID %d was successfully removed." %
+ ad_group_criterion[:criterion][:id]
+ else
+ puts 'No keywords were removed.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # IDs of criterion to remove and its ad group.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ criterion_id = 'INSERT_CRITERION_ID_HERE'.to_i
+ remove_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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/update_ad_group.rb b/adwords_api/examples/v201809/basic_operations/update_ad_group.rb
new file mode 100755
index 000000000..70fb66985
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/update_ad_group.rb
@@ -0,0 +1,115 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+require 'adwords_api'
+
+def update_ad_group(ad_group_id, cpc_bid_micro_amount)
+ # 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)
+
+ # Create an ad group with the specified ID.
+ ad_group = {
+ :status => 'PAUSED',
+ :id => ad_group_id
+ }
+
+ # Update the CPC bid if specified.
+ unless cpc_bid_micro_amount.nil?
+ ad_group[:bidding_strategy_configuration] = {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {
+ :micro_amount => cpc_bid_micro_amount
+ }
+ }]
+ }
+ end
+
+ operation = {
+ :operator => 'SET',
+ :operand => ad_group
+ }
+
+ # Update ad group.
+ response = ad_group_srv.mutate([operation])
+ if response and response[:value]
+ ad_group = response[:value].first
+ bidding_strategy_configuration = ad_group[:bidding_strategy_configuration]
+ cpc_bid_micros = nil
+ unless bidding_strategy_configuration.nil?
+ unless bidding_strategy_configuration[:bids].nil?
+ bidding_strategy_configuration[:bids].each do |bid|
+ if bid[:xsi_type] == 'CpcBid'
+ cpc_bid_micros = bid[:bid][:micro_amount]
+ end
+ end
+ end
+ end
+ puts ('Ad group id %d and name "%s" updated to have status "%s" and CPC ' +
+ 'bid %d.') % [ad_group[:id], ad_group[:name], ad_group[:status],
+ cpc_bid_micros]
+ else
+ puts 'No ad groups were updated.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # ID of an ad group to update.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ # Set this to nil if you do not want to update the CPC bid.
+ cpc_bid_micro_amount = 'INSERT_CPC_BID_MICRO_AMOUNT_HERE'.to_i
+
+ update_ad_group(ad_group_id, cpc_bid_micro_amount)
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/update_campaign.rb b/adwords_api/examples/v201809/basic_operations/update_campaign.rb
new file mode 100755
index 000000000..fb266223f
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/update_campaign.rb
@@ -0,0 +1,86 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/update_expanded_text_ad.rb b/adwords_api/examples/v201809/basic_operations/update_expanded_text_ad.rb
new file mode 100755
index 000000000..3284da71e
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/update_expanded_text_ad.rb
@@ -0,0 +1,106 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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 an expanded text ad. To get expanded text ads, run
+# get_expanded_text_ads.rb.
+
+require 'adwords_api'
+
+def update_expanded_text_ad(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_srv = adwords.service(:AdService, API_VERSION)
+
+ # Updates an expanded text ad using the provided ad ID.
+ trip_number = (Time.new.to_f * 1000).to_i
+ # Creates an expanded text ad using the provided ad ID and updates some
+ # properties of the expanded text ad.
+ expanded_text_ad = {
+ :id => ad_id,
+ :xsi_type => 'ExpandedTextAd',
+ :headline_part1 => 'Cruise to Mars #%d' % trip_number,
+ :headline_part2 => 'Best Space Cruise Line',
+ :description => 'Buy your tickets now!',
+ :final_urls => ['http://www.example.com/%d' % trip_number],
+ :final_mobile_urls => ['http://www.example.com/mobile/%d' % trip_number]
+ }
+
+ # Creates ad group ad operation.
+ operation = {
+ :operator => 'SET',
+ :operand => expanded_text_ad
+ }
+
+ # Updates the ad on the server.
+ response = ad_srv.mutate([operation])
+
+ # Prints out some information.
+ if response and response[:value]
+ updated_ad = response[:value].first
+ puts 'Expanded text ad with ID %d was successfully updated' %
+ updated_ad[:id]
+ puts ('Headline part 1 is "%s". Headline part 2 is "%s".' +
+ ' Description is "%s".') %
+ [updated_ad[:headline_part1],
+ updated_ad[:headline_part2],
+ updated_ad[:description]]
+ puts 'Final URL is "%s". Final mobile URL is "%s".' %
+ [updated_ad[:final_urls][0], updated_ad[:final_mobile_urls][0]]
+ else
+ raise StandardError, 'No ads were updated.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Ad ID to update.
+ ad_id = 'INSERT_AD_ID_HERE'.to_i
+ update_expanded_text_ad(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 " +
+ 'https://github.com/googleads/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/v201809/basic_operations/update_keyword.rb b/adwords_api/examples/v201809/basic_operations/update_keyword.rb
new file mode 100755
index 000000000..d4c560703
--- /dev/null
+++ b/adwords_api/examples/v201809/basic_operations/update_keyword.rb
@@ -0,0 +1,106 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/add_campaign_groups_and_performance_targets.rb b/adwords_api/examples/v201809/campaign_management/add_campaign_groups_and_performance_targets.rb
new file mode 100755
index 000000000..cf52200a6
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/add_campaign_groups_and_performance_targets.rb
@@ -0,0 +1,151 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2017, 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 adds a campaign group and sets a performance target for that
+# group. To get campaigns, run get_campaigns.rb. To download reports, run
+# download_criteria_report_with_awql.rb.
+
+require 'date'
+
+require 'adwords_api'
+
+def add_campaign_groups_and_performance_targets(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')
+
+ campaign_group = create_campaign_group(adwords)
+ add_campaigns_to_group(adwords, campaign_group, campaign_ids)
+ create_performance_target(adwords, campaign_group)
+end
+
+def create_campaign_group(adwords)
+ campaign_group_srv = adwords.service(:CampaignGroupService, API_VERSION)
+
+ campaign_group = {
+ :name => "Mars campaign group #%d" % (Time.new.to_f * 1000).to_i
+ }
+
+ operation = {
+ :operand => campaign_group,
+ :operator => 'ADD'
+ }
+
+ new_campaign_group = campaign_group_srv.mutate([operation])[:value].first
+ puts "Campaign group with ID %d and name '%s' was created." % [
+ new_campaign_group[:id],
+ new_campaign_group[:name]
+ ]
+
+ return new_campaign_group
+end
+
+def add_campaigns_to_group(adwords, campaign_group, campaign_ids)
+ campaign_srv = adwords.service(:CampaignService, API_VERSION)
+
+ operations = campaign_ids.map do |campaign_id|
+ {
+ :operand => {
+ :id => campaign_id,
+ :campaign_group_id => campaign_group[:id]
+ },
+ :operator => 'SET'
+ }
+ end
+
+ return_value = campaign_srv.mutate(operations)
+ puts ("The following campaign IDs were added to the campaign group with " +
+ " ID %d:") % campaign_group[:id]
+ return_value[:value].each do |campaign|
+ puts "\t%d" % campaign[:id]
+ end
+end
+
+def create_performance_target(adwords, campaign_group)
+ campaign_group_performance_target_srv = adwords.service(
+ :CampaignGroupPerformanceTargetService, API_VERSION)
+
+ campaign_group_performance_target = {
+ :campaign_group_id => campaign_group[:id],
+ :performance_target => {
+ # Keep the CPC for the campaigns <=$3.
+ :efficiency_target_type => 'CPC_LESS_THAN_OR_EQUAL_TO',
+ :efficiency_target_value => 3_000_000,
+ # Keep the maximum spend under $50.
+ :spend_target_type => 'MAXIMUM',
+ :spend_target => {
+ :micro_amount => 50_000_000
+ },
+ # Aim for at least 3000 clicks.
+ :volume_target_value => 3000,
+ :volume_goal_type => 'MAXIMIZE_CLICKS',
+ # Start the performance target today, and run it for the next 90 days.
+ :start_date => DateTime.parse((Date.today).to_s).strftime('%Y%m%d'),
+ :end_date => DateTime.parse((Date.today + 90).to_s).strftime('%Y%m%d')
+ }
+ }
+
+ operation = {
+ :operand => campaign_group_performance_target,
+ :operator => 'ADD'
+ }
+
+ new_campaign_group_performance_target =
+ campaign_group_performance_target_srv.mutate([operation])[:value].first
+
+ puts ("Campaign group performance target with ID %s was added for campaign " +
+ "group ID %d") % [new_campaign_group_performance_target[:id],
+ new_campaign_group_performance_target[:campaign_group_id]]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ campaign_id_1 = 'INSERT_CAMPAIGN_ID_1_HERE'.to_i
+ campaign_id_2 = 'INSERT_CAMPAIGN_ID_2_HERE'.to_i
+ add_campaign_groups_and_performance_targets([campaign_id_1, campaign_id_2])
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/add_campaign_labels.rb b/adwords_api/examples/v201809/campaign_management/add_campaign_labels.rb
new file mode 100755
index 000000000..1ae817801
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/add_campaign_labels.rb
@@ -0,0 +1,82 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 label to multiple campaigns.
+
+require 'adwords_api'
+
+def add_campaign_labels(campaign_ids, label_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)
+
+ operations = campaign_ids.map do |campaign_id|
+ {
+ :operator => 'ADD',
+ :operand => {:campaign_id => campaign_id, :label_id => label_id}
+ }
+ end
+
+ response = campaign_srv.mutate_label(operations)
+ if response and response[:value]
+ response[:value].each do |campaign_label|
+ puts "Campaign label for campaign ID %d and label ID %d was added.\n" %
+ [campaign_label[:campaign_id], campaign_label[:label_id]]
+ end
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ campaign_id_1 = 'INSERT_CAMPAIGN_ID_1_HERE'.to_i
+ campaign_id_2 = 'INSERT_CAMPAIGN_ID_2_HERE'.to_i
+ label_id = 'INSERT_LABEL_ID_HERE'.to_i
+ add_campaign_labels([campaign_id_1, campaign_id_2], label_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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/add_complete_campaigns_using_batch_job.rb b/adwords_api/examples/v201809/campaign_management/add_complete_campaigns_using_batch_job.rb
new file mode 100755
index 000000000..6bf59ae85
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/add_complete_campaigns_using_batch_job.rb
@@ -0,0 +1,356 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 use BatchJobService to create a complete
+# campaign, including ad groups and keywords.
+
+require 'adwords_api'
+
+def add_complete_campaigns_using_batch_job()
+ # 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')
+
+ batch_job_srv = adwords.service(:BatchJobService, API_VERSION)
+ batch_job_utils = adwords.batch_job_utils(API_VERSION)
+
+ # Create a BatchJob.
+ add_op = {
+ :operator => 'ADD',
+ :operand => {}
+ }
+
+ response = batch_job_srv.mutate([add_op])
+ batch_job = response[:value].first
+
+ # Get the upload URL from the new job.
+ upload_url = batch_job[:upload_url][:url]
+ puts "Created BatchJob with ID %d, status '%s', and upload URL %s." %
+ [batch_job[:id], batch_job[:status], upload_url]
+
+ # Create a temporary ID generator that will produce a sequence of descending
+ # negative numbers.
+ temp_id_generator = TempIdGenerator.new()
+
+ # Create an array of hashed operations generated from the batch_job_utils.
+ operations = []
+
+ # Create an operation to create a new budget.
+ budget_operation = build_budget_operation(temp_id_generator)
+ operations << budget_operation
+
+ # Create operations to create new campaigns.
+ campaign_operations = build_campaign_operations(
+ temp_id_generator, budget_operation)
+ operations += campaign_operations
+
+ # Create operations to create new negative keyword criteria for each
+ # campaign.
+ operations += build_campaign_criterion_operations(campaign_operations)
+
+ # Create operations to create new ad groups.
+ ad_group_operations = build_ad_group_operations(
+ temp_id_generator, campaign_operations)
+ operations += ad_group_operations
+
+ # Create operations to create new ad group criteria (keywords).
+ operations += build_ad_group_criterion_operations(ad_group_operations)
+
+ # Create operations to create new ad group ads (text ads).
+ operations += build_ad_group_ad_operations(ad_group_operations)
+
+ # Use the batch_job_utils to upload all operations.
+ batch_job_utils.upload_operations(operations, upload_url)
+ puts "Uploaded %d operations for batch job with ID %d." %
+ [operations.size, batch_job[:id]]
+
+ # Poll for completion of the batch job using an exponential back off.
+ poll_attempts = 0
+ is_pending = true
+ selector = {
+ :fields => ['Id', 'Status', 'DownloadUrl', 'ProcessingErrors',
+ 'ProgressStats'],
+ :predicates => [{
+ :field => 'Id',
+ :operator => 'IN',
+ :values => [batch_job[:id]]
+ }]
+ }
+
+ begin
+ sleep_seconds = 30 * (2 ** poll_attempts)
+ puts "Sleeping for %d seconds" % sleep_seconds
+ sleep(sleep_seconds)
+
+ batch_job = batch_job_srv.get(selector)[:entries].first
+
+ puts "Batch job ID %d has status '%s'." %
+ [batch_job[:id], batch_job[:status]]
+
+ poll_attempts += 1
+ is_pending = PENDING_STATUSES.include?(batch_job[:status])
+ end while is_pending and poll_attempts < MAX_POLL_ATTEMPTS
+
+ if is_pending
+ raise StandardError,
+ "Job is still in pending state after polling %d times." %
+ MAX_POLL_ATTEMPTS
+ end
+
+ unless batch_job[:processing_errors].nil?
+ batch_job[:processing_errors].each_with_index do |processing_error, i|
+ puts ("Processing error [%d]: errorType=%s, trigger=%s, errorString=%s" +
+ "fieldPath=%s, reason=%s") % [i, processing_error[:api_error_type],
+ processing_error[:trigger], processing_error[:error_string],
+ processing_error[:field_path], processing_error[:reason]]
+ end
+ end
+
+ unless batch_job[:download_url].nil? or batch_job[:download_url][:url].nil?
+ mutate_response = batch_job_utils.get_job_results(
+ batch_job[:download_url][:url])
+ puts "Downloaded results from '%s':" % batch_job[:download_url][:url]
+ mutate_response.each do |mutate_result|
+ outcome = "FAILURE"
+ outcome = "SUCCESS" if mutate_result[:error_list].nil?
+ puts " Operation [%d] - %s" % [mutate_result[:index], outcome]
+ end
+ end
+end
+
+# Custom class to generate temporary negative IDs for created entities to
+# reference each other.
+class TempIdGenerator
+ def initialize()
+ @counter = -1
+ end
+
+ def next()
+ ret = @counter
+ @counter -= 1
+ return ret
+ end
+end
+
+def get_time_microseconds()
+ return (Time.now.to_f * 1000000).to_i
+end
+
+def build_budget_operation(temp_id_generator)
+ budget = {
+ :budget_id => temp_id_generator.next,
+ :name => "Interplanetary Cruise %d" % get_time_microseconds(),
+ :amount => {
+ :micro_amount => 50000000
+ },
+ :delivery_method => 'STANDARD'
+ }
+ budget_operation = {
+ # The xsi_type of the operation can usually be guessed by the API because
+ # a given service only handles one type of operation. However, batch jobs
+ # process operations of different types, so the xsi_type must always be
+ # explicitly defined for these operations.
+ :xsi_type => 'BudgetOperation',
+ :operator => 'ADD',
+ :operand => budget
+ }
+ return budget_operation
+end
+
+def build_campaign_operations(temp_id_generator, budget_operation)
+ budget_id = budget_operation[:operand][:budget_id]
+
+ operations = []
+ NUMBER_OF_CAMPAIGNS_TO_ADD.times do
+ campaign = {
+ :name => "Batch Campaign %s" % get_time_microseconds(),
+ # Recommendation: Set the campaign to PAUSED when creating it to stop the
+ # ads from immediately serving. Set to ENABLED once you've added
+ # targeting and the ads are ready to serve.
+ :status => 'PAUSED',
+ :id => temp_id_generator.next,
+ :advertising_channel_type => 'SEARCH',
+ :budget => {
+ :budget_id => budget_id
+ },
+ :bidding_strategy_configuration => {
+ :bidding_strategy_type => 'MANUAL_CPC',
+ # You can optionally provide a bidding scheme in place of the type.
+ :bidding_scheme => {
+ :xsi_type => 'ManualCpcBiddingScheme'
+ }
+ }
+ }
+ operation = {
+ :xsi_type => 'CampaignOperation',
+ :operator => 'ADD',
+ :operand => campaign
+ }
+ operations << operation
+ end
+
+ return operations
+end
+
+def build_campaign_criterion_operations(campaign_operations)
+ operations = []
+ campaign_operations.each do |campaign_operation|
+ keyword = {
+ :xsi_type => 'Keyword',
+ :match_type => 'BROAD',
+ :text => 'venus'
+ }
+ negative_criterion = {
+ :xsi_type => 'NegativeCampaignCriterion',
+ :campaign_id => campaign_operation[:operand][:id],
+ :criterion => keyword
+ }
+ operation = {
+ :xsi_type => 'CampaignCriterionOperation',
+ :operator => 'ADD',
+ :operand => negative_criterion
+ }
+ operations << operation
+ end
+
+ return operations
+end
+
+def build_ad_group_operations(temp_id_generator, campaign_operations)
+ operations = []
+ campaign_operations.each do |campaign_operation|
+ NUMBER_OF_ADGROUPS_TO_ADD.times do
+ ad_group = {
+ :campaign_id => campaign_operation[:operand][:id],
+ :id => temp_id_generator.next,
+ :name => "Batch Ad Group %s" % get_time_microseconds(),
+ :bidding_strategy_configuration => {
+ :bids => [
+ {
+ :xsi_type => 'CpcBid',
+ :bid => {:micro_amount => 10000000}
+ }
+ ]
+ }
+ }
+ operation = {
+ :xsi_type => 'AdGroupOperation',
+ :operator => 'ADD',
+ :operand => ad_group
+ }
+ operations << operation
+ end
+ end
+
+ return operations
+end
+
+def build_ad_group_criterion_operations(ad_group_operations)
+ operations = []
+ ad_group_operations.each do |ad_group_operation|
+ NUMBER_OF_KEYWORDS_TO_ADD.times do |i|
+ text = "mars%d" % i
+
+ # Make 50% of keywords invalid to demonstrate error handling.
+ text = text + "!!!" if i % 2 == 0
+ keyword = {
+ :xsi_type => 'Keyword',
+ :text => text,
+ :match_type => 'BROAD'
+ }
+ biddable_criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :ad_group_id => ad_group_operation[:operand][:id],
+ :criterion => keyword
+ }
+ operation = {
+ :xsi_type => 'AdGroupCriterionOperation',
+ :operator => 'ADD',
+ :operand => biddable_criterion
+ }
+ operations << operation
+ end
+ end
+
+ return operations
+end
+
+def build_ad_group_ad_operations(ad_group_operations)
+ operations = []
+ ad_group_operations.each do |ad_group_operation|
+ text_ad = {
+ :xsi_type => 'ExpandedTextAd',
+ :headline_part1 => 'Luxury Cruise to Mars',
+ :headling_part2 => 'Visit the Red Planet in style.',
+ :description => 'Low-gravity fun for everyone!',
+ :final_urls => ['http://www.example.com/1']
+ }
+ ad_group_ad = {
+ :ad_group_id => ad_group_operation[:operand][:id],
+ :ad => text_ad
+ }
+ operation = {
+ :xsi_type => 'AdGroupAdOperation',
+ :operator => 'ADD',
+ :operand => ad_group_ad
+ }
+ operations << operation
+ end
+
+ return operations
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ NUMBER_OF_CAMPAIGNS_TO_ADD = 2
+ NUMBER_OF_ADGROUPS_TO_ADD = 2
+ NUMBER_OF_KEYWORDS_TO_ADD = 5
+ MAX_POLL_ATTEMPTS = 5
+ PENDING_STATUSES = ['ACTIVE', 'AWAITING_FILE', 'CANCELING']
+
+ begin
+ add_complete_campaigns_using_batch_job()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/add_draft.rb b/adwords_api/examples/v201809/campaign_management/add_draft.rb
new file mode 100755
index 000000000..596fcdd4c
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/add_draft.rb
@@ -0,0 +1,113 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 draft and access its associated
+# draft campaign.
+#
+# See the Campaign Drafts and Experiments guide for more information:
+# https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments
+
+require 'adwords_api'
+require 'date'
+
+def add_draft(base_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')
+
+ draft_srv = adwords.service(:DraftService, API_VERSION)
+
+ draft = {
+ :base_campaign_id => base_campaign_id,
+ :draft_name => 'Test Draft #%d' % (Time.new.to_f * 1000).to_i
+ }
+ draft_operation = {:operator => 'ADD', :operand => draft}
+
+ draft_result = draft_srv.mutate([draft_operation])
+
+ draft = draft_result[:value].first
+ draft_id = draft[:draft_id]
+ draft_campaign_id = draft[:draft_campaign_id]
+
+ puts "Draft with id %d and base campaign %d and draft campaign %d created" %
+ [draft_id, draft[:base_campaign_id], draft_campaign_id]
+
+ # Once the draft is created, you can modify the draft campaign as if it
+ # were a real campaign. For example, you may add criteria, adjust bids,
+ # or even include additional ads. Adding a criterion is shown here.
+ campaign_criterion_srv =
+ adwords.service(:CampaignCriterionService, API_VERSION)
+
+ criterion = {
+ :xsi_type => 'Language',
+ :id => 1003 # Spanish
+ }
+
+ criterion_operation = {
+ # Make sure to use the draft_campaign_id when modifying the virtual draft
+ # campaign.
+ :operator => 'ADD',
+ :operand => {
+ :campaign_id => draft_campaign_id,
+ :criterion => criterion
+ }
+ }
+
+ criterion_result = campaign_criterion_srv.mutate([criterion_operation])
+
+ criterion = criterion_result[:value].first
+
+ puts "Draft updated to include criteria in campaign %d" % draft_campaign_id
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ base_campaign_id = 'INSERT_BASE_CAMPAIGN_ID_HERE'.to_i
+
+ add_draft(base_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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/add_keywords_using_incremental_batch_job.rb b/adwords_api/examples/v201809/campaign_management/add_keywords_using_incremental_batch_job.rb
new file mode 100755
index 000000000..b7a737d9a
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/add_keywords_using_incremental_batch_job.rb
@@ -0,0 +1,210 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 perform multiple requests using the
+# BatchJobService using incremental uploads.
+
+require 'adwords_api'
+
+def add_keywords_using_incremental_batch_job(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')
+
+ batch_job_srv = adwords.service(:BatchJobService, API_VERSION)
+ batch_job_utils = adwords.batch_job_utils(API_VERSION)
+
+ # Create a BatchJob.
+ add_op = {
+ :operator => 'ADD',
+ :operand => {}
+ }
+
+ response = batch_job_srv.mutate([add_op])
+ batch_job = response[:value].first
+
+ # Get the upload URL from the new job.
+ upload_url = batch_job[:upload_url][:url]
+ puts "Created BatchJob with ID %d, status '%s', and upload URL %s." %
+ [batch_job[:id], batch_job[:status], upload_url]
+
+ # Upload #1
+ incremental_helper = batch_job_utils.start_incremental_upload(upload_url)
+ operations = create_keyword_operations(ad_group_id)
+ incremental_helper.upload(operations)
+
+ # Upload #2
+ operations = create_keyword_operations(ad_group_id)
+ incremental_helper.upload(operations)
+
+ # Upload #3
+ operations = create_keyword_operations(ad_group_id)
+ incremental_helper.upload(operations, true)
+
+ # Poll for completion of the batch job using an exponential back off.
+ poll_attempts = 0
+ is_pending = true
+ cancel_requested = false
+ selector = {
+ :fields =>
+ ['Id', 'Status', 'DownloadUrl', 'ProcessingErrors', 'ProgressStats'],
+ :predicates => [{
+ :field => 'Id',
+ :operator => 'IN',
+ :values => [batch_job[:id]]
+ }]
+ }
+
+ begin
+ sleep_seconds = 30 * (2 ** poll_attempts)
+ puts "Sleeping for %d seconds" % sleep_seconds
+ sleep(sleep_seconds)
+
+ batch_job = batch_job_srv.get(selector)[:entries].first
+
+ puts "Batch job ID %d has status '%s'." %
+ [batch_job[:id], batch_job[:status]]
+
+ poll_attempts += 1
+ is_pending = PENDING_STATUSES.include?(batch_job[:status])
+
+ if is_pending && !cancel_requested && poll_attempts == MAX_POLL_ATTEMPTS
+ batch_job[:status] = 'CANCELING'
+
+ set_op = {
+ :operator => 'SET',
+ :operand => batch_job
+ }
+
+ # Only request cancellation once per job.
+ cancel_requested = true
+
+ begin
+ batch_job = batch_job_srv.mutate([set_op])[:value].first
+ puts "Requested cancellation of batch job with ID %d" % batch_job[:id]
+ rescue AdwordsApi::Errors::ApiException => e
+ if !e.message.nil? && e.message.include?('INVALID_STATE_CHANGE')
+ puts ("Attempt to cancel batch job with ID %d was rejected " +
+ "because the job already completed or was canceled.") %
+ batch_job[:id]
+ next
+ end
+ raise e
+ end
+ end
+ end while is_pending and poll_attempts < MAX_POLL_ATTEMPTS
+
+ if is_pending
+ raise StandardError,
+ "Job is still in pending state after polling %d times." %
+ MAX_POLL_ATTEMPTS
+ end
+
+ if batch_job[:status] == 'CANCELED'
+ puts "Job was canceled before completion."
+ return
+ end
+
+ unless batch_job[:processing_errors].nil?
+ batch_job[:processing_errors].each_with_index do |processing_error, i|
+ puts ("Processing error [%d]: errorType=%s, trigger=%s, errorString=%s" +
+ "fieldPath=%s, reason=%s") % [i, processing_error[:api_error_type],
+ processing_error[:trigger], processing_error[:error_string],
+ processing_error[:field_path], processing_error[:reason]]
+ end
+ end
+
+ unless batch_job[:download_url].nil? or batch_job[:download_url][:url].nil?
+ mutate_response = batch_job_utils.get_job_results(
+ batch_job[:download_url][:url])
+ puts "Downloaded results from '%s':" % batch_job[:download_url][:url]
+ mutate_response.each do |mutate_result|
+ outcome = "FAILURE"
+ outcome = "SUCCESS" if mutate_result[:error_list].nil?
+ puts " Operation [%d] - %s" % [mutate_result[:index], outcome]
+ end
+ end
+end
+
+def create_keyword_operations(ad_group_id)
+ operations = []
+ KEYWORD_COUNT.times do |i|
+ text = "keyword %d" % i
+
+ # Make 10% of keywords invalid to demonstrate error handling.
+ text = text + "!!!" if i % 10 == 0
+ keyword = {
+ :xsi_type => 'Keyword',
+ :text => text,
+ :match_type => 'BROAD'
+ }
+ biddable_criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :ad_group_id => ad_group_id,
+ :criterion => keyword
+ }
+ operation = {
+ :xsi_type => 'AdGroupCriterionOperation',
+ :operator => 'ADD',
+ :operand => biddable_criterion
+ }
+ operations << operation
+ end
+
+ return operations
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ KEYWORD_COUNT = 100
+ MAX_POLL_ATTEMPTS = 5
+ PENDING_STATUSES = ['ACTIVE', 'AWAITING_FILE', 'CANCELING']
+
+ begin
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+
+ add_keywords_using_incremental_batch_job(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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/add_trial.rb b/adwords_api/examples/v201809/campaign_management/add_trial.rb
new file mode 100755
index 000000000..1c62e11e4
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/add_trial.rb
@@ -0,0 +1,142 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 trial and wait for it to complete.
+#
+# See the Campaign Drafts and Experiments guide for more information:
+# https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments
+
+require 'adwords_api'
+require 'date'
+
+def add_trial(draft_id, base_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')
+
+ trial_srv = adwords.service(:TrialService, API_VERSION)
+ trial_async_error_srv = adwords.service(:TrialAsyncErrorService, API_VERSION)
+
+ trial = {
+ :draft_id => draft_id,
+ :base_campaign_id => base_campaign_id,
+ :name => 'Test Trial #%d' % (Time.new.to_f * 1000).to_i,
+ :traffic_split_percent => 50,
+ :traffic_split_type => 'RANDOM_QUERY'
+ }
+ trial_operation = {:operator => 'ADD', :operand => trial}
+
+ trial_result = trial_srv.mutate([trial_operation])
+
+ trial_id = trial_result[:value].first[:id]
+
+ # Since creating a trial is asynchronous, we have to poll it to wait for
+ # it to finish.
+ selector = {
+ :fields => ['Id', 'Status', 'BaseCampaignId', 'TrialCampaignId'],
+ :predicates => [
+ :field => 'Id', :operator => 'IN', :values => [trial_id]
+ ]
+ }
+
+ poll_attempts = 0
+ is_pending = true
+ trial = nil
+ begin
+ sleep_seconds = 30 * (2 ** poll_attempts)
+ puts "Sleeping for %d seconds" % sleep_seconds
+ sleep(sleep_seconds)
+
+ trial = trial_srv.get(selector)[:entries].first
+
+ puts "Trial ID %d has status '%s'" % [trial[:id], trial[:status]]
+
+ poll_attempts += 1
+ is_pending = (trial[:status] == 'CREATING')
+ end while is_pending and poll_attempts < MAX_POLL_ATTEMPTS
+
+ if trial[:status] == 'ACTIVE'
+ # The trial creation was successful.
+ puts "Trial created with id %d and trial campaign id %d" %
+ [trial[:id], trial[:trial_campaign_id]]
+ elsif trial[:status] == 'CREATION_FAILED'
+ # The trial creation failed, and errors can be fetched from the
+ # TrialAsyncErrorService.
+ selector = {
+ :fields => ['TrialId', 'AsyncError'],
+ :predicates => [
+ {:field => 'TrialId', :operator => 'IN', :values => [trial[:id]]}
+ ]
+ }
+
+ errors = trial_async_error_srv.get(selector)[:entries]
+
+ if errors.nil?
+ puts "Could not retrieve errors for trial %d" % trial[:id]
+ else
+ puts "Could not create trial due to the following errors:"
+ errors.each_with_index do |error, i|
+ puts "Error #%d: %s" % [i, error[:async_error]]
+ end
+ end
+ else
+ # Most likely, the trial is still being created. You can continue polling,
+ # but we have limited the number of attempts in the example.
+ puts ("Timed out waiting to create trial from draft %d with base " +
+ "campaign %d") % [draft_id, base_campaign_id]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ MAX_POLL_ATTEMPTS = 6
+
+ begin
+ draft_id = 'INSERT_DRAFT_ID_HERE'.to_i
+ base_campaign_id = 'INSERT_BASE_CAMPAIGN_ID_HERE'.to_i
+
+ add_trial(draft_id, base_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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/get_all_disapproved_ads.rb b/adwords_api/examples/v201809/campaign_management/get_all_disapproved_ads.rb
new file mode 100755
index 000000000..17b3f8552
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/get_all_disapproved_ads.rb
@@ -0,0 +1,127 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 ads in this ad group.
+ selector = {
+ :fields => ['Id', 'PolicySummary'],
+ :ordering => [{:field => 'Id', :sort_order => 'ASCENDING'}],
+ :predicates => [
+ {:field => 'AdGroupId', :operator => 'IN', :values => [ad_group_id]},
+ {
+ :field => 'CombinedApprovalStatus',
+ :operator => 'IN',
+ :values => ['DISAPPROVED']
+ }
+ ],
+ :paging => {
+ :start_index => 0,
+ :number_results => PAGE_SIZE
+ }
+ }
+
+ # Set the initial values.
+ offset, page = 0, {}
+ disapproved_ads_count = 0
+
+ # Look through all ads to find ones that are disapproved.
+ begin
+ page = ad_group_ad_srv.get(selector)
+ if page[:entries]
+ page[:entries].each do |ad_group_ad|
+ policy_summary = ad_group_ad[:policy_summary]
+ disapproved_ads_count += 1
+ puts ("Ad with ID %d and type '%s' was disapproved with the " +
+ "following policy topic entries:") % [ad_group_ad[:ad][:id],
+ ad_group_ad[:ad][:ad_type]]
+ policy_summary[:policy_topic_entries].each do |policy_topic_entry|
+ puts " topic id: %s, topic name: '%s', Help Center URL: '%s'" % [
+ policy_topic_entry[:policy_topic_id],
+ policy_topic_entry[:policy_topic_name],
+ policy_topic_entry[:policy_topic_help_center_url]
+ ]
+ unless policy_topic_entry[:policy_topic_evidences].nil?
+ policy_topic_entry[:policy_topic_evidences].each do |evidence|
+ puts " evidence type: '%s'" %
+ evidence[:policy_topic_evidence_type]
+ unless evidence[:evidence_text_list].nil?
+ evidence[:evidence_text_list].each_with_index do |text, i|
+ puts " evidence text[%d]: '%s'" % [i, text]
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ offset += PAGE_SIZE
+ selector[:paging][:start_index] = offset
+ end while page[:total_num_entries] > offset
+
+ puts "%d disapproved ads were found." % disapproved_ads_count
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ PAGE_SIZE = 100
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/get_all_disapproved_ads_with_awql.rb b/adwords_api/examples/v201809/campaign_management/get_all_disapproved_ads_with_awql.rb
new file mode 100755
index 000000000..c772a5e44
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/get_all_disapproved_ads_with_awql.rb
@@ -0,0 +1,119 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 ads in this ad group.
+ query_builder = adwords.service_query_builder do |b|
+ b.select('Id', 'PolicySummary')
+ b.where('AdGroupId').equal_to(ad_group_id)
+ b.where('CombinedApprovalStatus').equal_to('DISAPPROVED')
+ b.order_by_asc('Id')
+ b.limit(0, PAGE_SIZE)
+ end
+ query = query_builder.build
+
+ # Set the initial values.
+ disapproved_ads_count = 0
+
+ # Look through all ads to find ones that are disapproved.
+ loop do
+ page_query = query.to_s
+ page = ad_group_ad_srv.query(page_query)
+ if page[:entries]
+ page[:entries].each do |ad_group_ad|
+ policy_summary = ad_group_ad[:policy_summary]
+ disapproved_ads_count += 1
+ puts ("Ad with ID %d and type '%s' was disapproved with the " +
+ "following policy topic entries:") % [ad_group_ad[:ad][:id],
+ ad_group_ad[:ad][:ad_type]]
+ policy_summary[:policy_topic_entries].each do |policy_topic_entry|
+ puts " topic id: %s, topic name: '%s', Help Center URL: '%s'" % [
+ policy_topic_entry[:policy_topic_id],
+ policy_topic_entry[:policy_topic_name],
+ policy_topic_entry[:policy_topic_help_center_url]
+ ]
+ unless policy_topic_entry[:policy_topic_evidences].nil?
+ policy_topic_entry[:policy_topic_evidences].each do |evidence|
+ puts " evidence type: '%s'" %
+ evidence[:policy_topic_evidence_type]
+ unless evidence[:evidence_text_list].nil?
+ evidence[:evidence_text_list].each_with_index do |text, i|
+ puts " evidence text[%d]: '%s'" % [i, text]
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ break unless query.has_next(page)
+ query.next_page
+ end
+
+ puts "%d disapproved ads were found." % disapproved_ads_count
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ PAGE_SIZE = 100
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/get_campaigns_by_label.rb b/adwords_api/examples/v201809/campaign_management/get_campaigns_by_label.rb
new file mode 100755
index 000000000..9f521f554
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/get_campaigns_by_label.rb
@@ -0,0 +1,108 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 campaigns with a specific label. To add a label
+# to campaigns, run add_campaign_labels.rb.
+
+require 'adwords_api'
+
+def get_campaigns_by_label(label_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)
+
+ # Get all the ad groups for this campaign.
+ selector = {
+ :fields => ['Id', 'Name', 'Labels'],
+ :ordering => [{:field => 'Name', :sort_order => 'ASCENDING'}],
+ :predicates => [
+ {
+ :field => 'Labels',
+ # Labels filtering is performed by ID. You can use CONTAINS_ANY to
+ # select campaigns with any of the label IDs, CONTAINS_ALL to select
+ # campaigns with all of the label IDs, or CONTAINS_NONE to select
+ # campaigns with none of the label IDs.
+ :operator => 'CONTAINS_ANY',
+ :values => [label_id]
+ }
+ ],
+ :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|
+ label_string = campaign[:labels].map do |label|
+ '%d/"%s"' % [label[:id], label[:name]]
+ end.join(', ')
+ puts 'Campaign found with name "%s" and ID %d and labels: %s.' %
+ [campaign[:name], campaign[:id], label_string]
+ end
+ # Increment values to request the next page.
+ offset += PAGE_SIZE
+ selector[:paging][:start_index] = offset
+ end
+ end while page[:total_num_entries] > offset
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 500
+
+ begin
+ # Label ID to get campaigns for.
+ label_id = 'INSERT_LABEL_ID_HERE'.to_i
+ get_campaigns_by_label(label_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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/graduate_trial.rb b/adwords_api/examples/v201809/campaign_management/graduate_trial.rb
new file mode 100755
index 000000000..4c1d224f0
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/graduate_trial.rb
@@ -0,0 +1,106 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 graduate a trial.
+#
+# See the Campaign Drafts and Experiments guide for more information:
+# https://developers.google.com/adwords/api/docs/guides/campaign-drafts-experiments
+
+require 'adwords_api'
+require 'date'
+
+def graduate_trial(trial_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')
+
+ trial_srv = adwords.service(:TrialService, API_VERSION)
+ budget_srv = adwords.service(:BudgetService, API_VERSION)
+
+ # To graduate a trial, you must specify a different budget from the base
+ # campaign. The base campaign (in order to have had a trial based on it)
+ # must have a non-shared budget, so it cannot be shared with the new
+ # independent campaign created by graduation.
+ budget = {
+ :name => 'Budget #%d' % (Time.new.to_f * 1000).to_i,
+ :amount => {:micro_amount => 50000000},
+ :delivery_method => 'STANDARD'
+ }
+ budget_operation = {:operator => 'ADD', :operand => budget}
+
+ # Add budget.
+ return_budget = budget_srv.mutate([budget_operation])
+ budget_id = return_budget[:value].first[:budget_id]
+
+ trial = {
+ :id => trial_id,
+ :budget_id => budget_id,
+ :status => 'GRADUATED'
+ }
+
+ trial_operation = {:operator => 'SET', :operand => trial}
+
+ # Update the trial.
+ return_trial = trial_srv.mutate([trial_operation])
+ trial = return_trial[:value].first
+
+ # Graduation is a synchronous operation, so the campaign is already ready.
+ # If you promote instead, make sure to see the polling scheme demonstrated
+ # in add_trial.rb to wait for the asynchronous operation to finish.
+ puts ("Trial ID %d graduated. Campaign %d was given a new budget ID %d and" +
+ "is no longer dependent on this trial.") %
+ [trial[:id], trial[:trial_campaign_id], budget_id]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ trial_id = 'INSERT_TRIAL_ID_HERE'.to_i
+
+ graduate_trial(trial_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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/set_ad_parameters.rb b/adwords_api/examples/v201809/campaign_management/set_ad_parameters.rb
new file mode 100755
index 000000000..7faf957f2
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/set_ad_parameters.rb
@@ -0,0 +1,118 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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!',
+ :final_urls => ['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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/set_criterion_bid_modifier.rb b/adwords_api/examples/v201809/campaign_management/set_criterion_bid_modifier.rb
new file mode 100755
index 000000000..614ee072a
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/set_criterion_bid_modifier.rb
@@ -0,0 +1,104 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+# To get campaigns, run get_campaigns.rb.
+
+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 = :v201809
+
+ begin
+ # ID of a campaign to use mobile bid modifier for.
+ 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 " +
+ 'https://github.com/googleads/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/v201809/campaign_management/validate_text_ad.rb b/adwords_api/examples/v201809/campaign_management/validate_text_ad.rb
new file mode 100755
index 000000000..2f9655db9
--- /dev/null
+++ b/adwords_api/examples/v201809/campaign_management/validate_text_ad.rb
@@ -0,0 +1,109 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 => 'ExpandedTextAd',
+ :headline_part1 => 'Luxury Cruise to Mars',
+ :headline_part2 => 'Visit the Red Planet in style.',
+ :description => 'Low-gravity fun for everyone!',
+ :final_urls => ['http://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_part1] = '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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/error_handling/handle_partial_failures.rb b/adwords_api/examples/v201809/error_handling/handle_partial_failures.rb
new file mode 100755
index 000000000..041044ce1
--- /dev/null
+++ b/adwords_api/examples/v201809/error_handling/handle_partial_failures.rb
@@ -0,0 +1,145 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+require 'adwords_api'
+
+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 ad group criteria.
+ response = ad_group_criterion_srv.mutate(operations)
+
+ # Display results.
+ 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 %d, criterion id %d, and " +
+ " keyword '%s' was added.") % [
+ ad_group_criterion[:ad_group_id],
+ ad_group_criterion[:criterion][:id],
+ ad_group_criterion[:criterion][:text]
+ ]
+ 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|
+ field_path_elements = error[:field_path_elements]
+ first_field_path_element = nil
+ unless field_path_elements.nil? || field_path_elements.length <= 0
+ first_field_path_element = field_path_elements.first
+ end
+ if !first_field_path_element.nil? &&
+ 'operations' == first_field_path_element[:field] &&
+ first_field_path_element[:index] != nil
+ operation_index = first_field_path_element[:index]
+ ad_group_criterion = operations[operation_index][:operand]
+ puts ("Ad group criterion with ad group id %d and keyword '%s' " +
+ "triggered an error for the following reason: %s") % [
+ ad_group_criterion[:ad_group_id],
+ ad_group_criterion[:criterion][:text],
+ error[:error_string]
+ ]
+ else
+ puts "A failure has occurred for the following reason: '%s'" %
+ error[:error_string]
+ end
+ end
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/extensions/add_google_my_business_location_extensions.rb b/adwords_api/examples/v201809/extensions/add_google_my_business_location_extensions.rb
new file mode 100755
index 000000000..90f03bf34
--- /dev/null
+++ b/adwords_api/examples/v201809/extensions/add_google_my_business_location_extensions.rb
@@ -0,0 +1,193 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 feed that syncs feed items from a Google My Business (GMB)
+# account and associates the feed with a customer.
+
+require 'adwords_api'
+require 'date'
+
+def add_gmb_location_extensions(gmb_email_address, gmb_access_token,
+ business_account_identifier)
+ # 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)
+ customer_feed_srv = adwords.service(:CustomerFeedService, API_VERSION)
+
+ if gmb_access_token.nil?
+ gmb_access_token = adwords.get_auth_handler.get_token(
+ adwords.credential_handler.credentials)[:access_token]
+ end
+
+ # Create a feed that will sync to the Google My Business account specified
+ # by gmb_email_address. Do not add FeedAttributes to this object, as AdWords
+ # will add them automatically because this will be a system generated feed.
+ gmb_feed = {
+ :name => "GMB feed #%d" % (Time.new.to_f * 1000).to_i,
+ :system_feed_generation_data => {
+ :xsi_type => 'PlacesLocationFeedData',
+ :o_auth_info => {
+ :http_method => 'GET',
+ :http_request_url => 'https://www.googleapis.com/auth/adwords',
+ :http_authorization_header => "Bearer %s" % gmb_access_token
+ },
+ :email_address => gmb_email_address
+ },
+ # Since this feed's feed items will be managed by AdWords, you must set
+ # its origin to ADWORDS.
+ :origin => 'ADWORDS'
+ }
+
+ # Optional: specify labels to filter Google My Business listings. If
+ # specified, only listings that have any of the labels set are synchronized
+ # into FeedItems.
+ gmb_feed[:system_feed_generation_data][:label_filters] =
+ ['Stores in New York City']
+
+ # Only include the business_account_identifier if it's specified.
+ # A nil value will cause an invalid request.
+ unless business_account_identifier.nil?
+ gmb_feed[:system_feed_generation_data][:business_account_identifier] =
+ business_account_identifier
+ end
+
+ gmb_operation = {
+ :operator => 'ADD',
+ :operand => gmb_feed
+ }
+
+ result = feed_srv.mutate([gmb_operation])
+ added_feed = result[:value].first
+ puts "Added GMB feed with ID %d" % added_feed[:id]
+
+ # Add a CustomerFeed that associates the feed with this customer for the
+ # LOCATION placeholder type.
+ customer_feed = {
+ :feed_id => added_feed[:id],
+ :placeholder_types => [PLACEHOLDER_TYPE_LOCATION],
+ :matching_function => {
+ :operator => 'IDENTITY',
+ :lhs_operand => {
+ :xsi_type => 'ConstantOperand',
+ :type => 'BOOLEAN',
+ :boolean_value => true
+ }
+ }
+ }
+
+ customer_feed_operation = {
+ :xsi_type => 'CustomerFeedOperation',
+ :operator => 'ADD',
+ :operand => customer_feed
+ }
+
+ added_customer_feed = nil
+ number_of_attempts = 0
+ while i < MAX_CUSTOMER_FEED_ADD_ATTEMPTS && !added_customer_feed
+ number_of_attempts += 1
+ begin
+ result = customer_feed_srv.mutate([customer_feed_operation])
+ added_customer_feed = result[:value].first
+ puts "Attempt #%d to add the CustomerFeed was successful" %
+ number_of_attempts
+ rescue
+ sleep_seconds = 5 * (2 ** number_of_attempts)
+ puts ("Attempt #%d to add the CustomerFeed was not succeessful. " +
+ "Waiting %d seconds before trying again.") %
+ [number_of_attempts, sleep_seconds]
+ sleep(sleep_seconds)
+ end
+ end
+
+ unless added_customer_feed
+ raise StandardError, ("Could not create the CustomerFeed after %d " +
+ "attempts. Please retry the CustomerFeed ADD operation later.") %
+ MAX_CUSTOMER_FEED_ADD_ATTEMPTS
+ end
+
+ puts "Added CustomerFeed for feed ID %d and placeholder type %d" %
+ [added_customer_feed[:id], added_customer_feed[:placeholder_types].first]
+
+ # OPTIONAL: Create a CampaignFeed to specify which FeedItems to use at the
+ # Campaign level. This will be similar to the CampaignFeed in the
+ # add_site_links example, except you can filter based on the business name
+ # and category of each FeedItem by using a FeedAttributeOperand in your
+ # matching function.
+
+ # OPTIONAL: Create an AdGroupFeed for even more fine grained control over
+ # which feed items are used at the AdGroup level.
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PLACEHOLDER_TYPE_LOCATION = 7
+ MAX_CUSTOMER_FEED_ADD_ATTEMPTS = 10
+
+ begin
+ # The email address of either an owner or a manager of the GMB account.
+ gmb_email_address = 'INSERT_GMB_EMAIL_ADDRESS_HERE'
+
+ # If the gmbEmailAddress above is the same as you used to generate your
+ # AdWords API refresh token, leave the value below as nil.
+ # Otherwise, to obtain an access token for your GMB account, generate a
+ # refresh token as you did for AdWords, but make sure you are logged in as
+ # the same user as gmb_email_address above when you follow the link, then
+ # capture the generated access token
+ gmb_access_token = nil
+
+ # If the gmb_email_address above is for a GMB manager instead of
+ # the GMB account owner, then set business_account_identifier to the
+ # +Page ID of a location for which the manager has access. See the
+ # location extensions guide at
+ # https://developers.google.com/adwords/api/docs/guides/feed-services-locations
+ # for details.
+ business_account_identifier = nil
+
+ add_gmb_location_extensions(gmb_email_address, gmb_access_token,
+ business_account_identifier)
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/extensions/add_prices.rb b/adwords_api/examples/v201809/extensions/add_prices.rb
new file mode 100755
index 000000000..0fb0972fa
--- /dev/null
+++ b/adwords_api/examples/v201809/extensions/add_prices.rb
@@ -0,0 +1,170 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 price extension and associates it with an account.
+# Campaign targeting is also set using the specified campaign ID. To get
+# campaigns, run basic_operations/get_campaigns.rb.
+
+require 'adwords_api'
+
+def add_prices(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')
+
+ customer_extension_setting_srv =
+ adwords.service(:CustomerExtensionSettingService, API_VERSION)
+
+ price_feed_item = {
+ :xsi_type => 'PriceFeedItem',
+ :price_extension_type => 'SERVICES',
+ # Price qualifier is optional.
+ :price_qualifier => 'FROM',
+ :tracking_url_template => 'http://tracker.example.com/?u={lpurl}',
+ :language => 'en',
+ :campaign_targeting => {
+ :targeting_campaign_id => campaign_id
+ },
+ :scheduling => {
+ :feed_item_schedules => [
+ {
+ :day_of_week => 'SUNDAY',
+ :start_hour => 10,
+ :start_minute => 'ZERO',
+ :end_hour => 18,
+ :end_minute => 'ZERO'
+ },
+ {
+ :day_of_week => 'SATURDAY',
+ :start_hour => 10,
+ :start_minute => 'ZERO',
+ :end_hour => 22,
+ :end_minute => 'ZERO'
+ }
+ ]
+ },
+ # To create a price extension, at least three table rows are needed.
+ :table_rows => [
+ create_price_table_row(
+ 'Scrubs',
+ 'Body Scrub, Salt Scrub',
+ 'http://www.example.com/scrubs',
+ 'http://m.example.com/scrubs',
+ 60000000,
+ 'USD',
+ 'PER_HOUR'
+ ),
+ create_price_table_row(
+ 'Hair Cuts',
+ 'Once a month',
+ 'http://www.example.com/haircuts',
+ 'http://m.example.com/haircuts',
+ 75000000,
+ 'USD',
+ 'PER_MONTH'
+ ),
+ create_price_table_row(
+ 'Skin Care Package',
+ 'Four times a month',
+ 'http://www.example.com/skincarepackage',
+ nil,
+ 250000000,
+ 'USD',
+ 'PER_MONTH'
+ )
+ ]
+ }
+
+ customer_extension_setting = {
+ :extension_type => 'PRICE',
+ :extension_setting => {
+ :extensions => [price_feed_item]
+ }
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => customer_extension_setting
+ }
+
+ result = customer_extension_setting_srv.mutate([operation])
+
+ new_extension_setting = result[:value].first
+ puts "Extension setting with type '%s' was added to your account.\n" %
+ new_extension_setting[:extension_type]
+end
+
+def create_price_table_row(header, description, final_url, final_mobile_url,
+ price_in_micros, currency_code, price_unit)
+ ret_val = {
+ :header => header,
+ :description => description,
+ :final_urls => {
+ :urls => [final_url]
+ },
+ :price => {
+ :money => {
+ :micro_amount => price_in_micros
+ },
+ :currency_code => currency_code
+ },
+ :price_unit => price_unit
+ }
+
+ # Optional: Set the mobile final URLs.
+ unless final_mobile_url.nil? or final_mobile_url.empty?
+ ret_val[:final_mobile_urls] = {:urls => [final_mobile_url]}
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Campaign ID to add site link to.
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
+ add_prices(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 " +
+ 'https://github.com/googleads/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/v201809/extensions/add_site_links.rb b/adwords_api/examples/v201809/extensions/add_site_links.rb
new file mode 100755
index 000000000..7b49a9ac0
--- /dev/null
+++ b/adwords_api/examples/v201809/extensions/add_site_links.rb
@@ -0,0 +1,199 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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.
+
+require 'adwords_api'
+require 'date'
+
+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')
+
+ customer_srv = adwords.service(:CustomerService, API_VERSION)
+
+ # Find the matching customer and its time zone. The get_customers method will
+ # return a single customer corresponding to the configured client_customer_id.
+ customer = customer_srv.get_customers().first
+ customer_time_zone = customer[:date_time_zone]
+ puts 'Found customer ID %d with time zone "%s"' %
+ [customer[:customer_id], customer_time_zone]
+
+ if customer_time_zone.nil?
+ raise StandardError, 'Customer not found for customer ID: ' + customer_id
+ end
+
+ campaign_extension_setting_srv =
+ adwords.service(:CampaignExtensionSettingService, API_VERSION)
+
+ sitelink_1 = {
+ :xsi_type => "SitelinkFeedItem",
+ :sitelink_text => "Store Hours",
+ :sitelink_final_urls => {
+ :urls => ["http://www.example.com/storehours"]
+ }
+ }
+
+ sitelink_2 = {
+ :xsi_type => "SitelinkFeedItem",
+ :sitelink_text => "Thanksgiving Specials",
+ :sitelink_final_urls => {
+ :urls => ["http://www.example.com/thanksgiving"]
+ },
+ :start_time => DateTime.new(Date.today.year, 11, 20, 0, 0, 0).
+ strftime("%Y%m%d %H%M%S ") + customer_time_zone,
+ :end_time => DateTime.new(Date.today.year, 11, 27, 23, 59, 59).
+ strftime("%Y%m%d %H%M%S ") + customer_time_zone,
+ # Target this sitelink for United States only. See
+ # https://developers.google.com/adwords/api/docs/appendix/geotargeting
+ # for valid geolocation codes.
+ :geo_targeting => {
+ :id => 2840
+ },
+ # Restrict targeting only to people physically within the United States.
+ # Otherwise, this could also show to people interested in the United States
+ # but not physically located there.
+ :geo_targeting_restriction => {
+ :geo_restriction => 'LOCATION_OF_PRESENCE'
+ }
+ }
+
+ sitelink_3 = {
+ :xsi_type => "SitelinkFeedItem",
+ :sitelink_text => "Wifi available",
+ :sitelink_final_urls => {
+ :urls => ["http://www.example.com/mobile/wifi"]
+ },
+ :device_preference => {:device_preference => 30001},
+ # Target this sitelink only when the ad is triggered by the keyword
+ # "free wifi".
+ :keyword_targeting => {
+ :text => "free wifi",
+ :match_type => 'BROAD'
+ }
+ }
+
+ sitelink_4 = {
+ :xsi_type => "SitelinkFeedItem",
+ :sitelink_text => "Happy hours",
+ :sitelink_final_urls => {
+ :urls => ["http://www.example.com/happyhours"]
+ },
+ :scheduling => {
+ :feed_item_schedules => [
+ {
+ :day_of_week => 'MONDAY',
+ :start_hour => 18,
+ :start_minute => 'ZERO',
+ :end_hour => 21,
+ :end_minute => 'ZERO'
+ },
+ {
+ :day_of_week => 'TUESDAY',
+ :start_hour => 18,
+ :start_minute => 'ZERO',
+ :end_hour => 21,
+ :end_minute => 'ZERO'
+ },
+ {
+ :day_of_week => 'WEDNESDAY',
+ :start_hour => 18,
+ :start_minute => 'ZERO',
+ :end_hour => 21,
+ :end_minute => 'ZERO'
+ },
+ {
+ :day_of_week => 'THURSDAY',
+ :start_hour => 18,
+ :start_minute => 'ZERO',
+ :end_hour => 21,
+ :end_minute => 'ZERO'
+ },
+ {
+ :day_of_week => 'FRIDAY',
+ :start_hour => 18,
+ :start_minute => 'ZERO',
+ :end_hour => 21,
+ :end_minute => 'ZERO'
+ }
+ ]
+ }
+ }
+
+ campaign_extension_setting = {
+ :campaign_id => campaign_id,
+ :extension_type => 'SITELINK',
+ :extension_setting => {
+ :extensions => [sitelink_1, sitelink_2, sitelink_3, sitelink_4]
+ }
+ }
+
+ operation = {
+ :operand => campaign_extension_setting,
+ :operator => 'ADD'
+ }
+
+ response = campaign_extension_setting_srv.mutate([operation])
+ if response and response[:value]
+ new_extension_setting = response[:value].first
+ puts "Extension setting with type = %s was added to campaign ID %d" % [
+ new_extension_setting[:extension_type],
+ new_extension_setting[:campaign_id]
+ ]
+ elsif
+ puts "No extension settings were created."
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Campaign ID to add site link to.
+ 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 " +
+ 'https://github.com/googleads/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/v201809/extensions/add_site_links_using_feeds.rb b/adwords_api/examples/v201809/extensions/add_site_links_using_feeds.rb
new file mode 100755
index 000000000..7212bb814
--- /dev/null
+++ b/adwords_api/examples/v201809/extensions/add_site_links_using_feeds.rb
@@ -0,0 +1,326 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+require 'adwords_api'
+
+def add_site_links(campaign_id, 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')
+
+ feed_srv = adwords.service(:FeedService, API_VERSION)
+ feed_item_srv = adwords.service(:FeedItemService, API_VERSION)
+ feed_item_target_srv = adwords.service(:FeedItemTargetService, 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_LIST', :name => 'Final URLs'},
+ {:type => 'STRING', :name => 'Line 2 Description'},
+ {:type => 'STRING', :name => 'Line 3 Description'}
+ ]
+ }
+
+ response = feed_srv.mutate([
+ {:operator => 'ADD', :operand => site_links_feed}
+ ])
+ unless response.nil? || response[:value].nil?
+ feed = response[:value].first
+ # Attribute of type STRING.
+ link_text_feed_attribute_id = feed[:attributes][0][:id]
+ # Attribute of type URL_LIST.
+ final_url_feed_attribute_id = feed[:attributes][1][:id]
+ # Attribute of type STRING.
+ line_2_feed_attribute_id = feed[:attributes][2][:id]
+ # Attribute of type STRING.
+ line_3_feed_attribute_id = feed[:attributes][3][:id]
+ puts "Feed with name '%s' and ID %d was added with" %
+ [feed[:name], feed[:id]]
+ puts ("\tText attribute ID %d and Final URLs attribute ID %d " +
+ "and Line 2 attribute ID %d and Line 3 attribute ID %d.") % [
+ link_text_feed_attribute_id,
+ final_url_feed_attribute_id,
+ line_2_feed_attribute_id,
+ line_3_feed_attribute_id
+ ]
+
+ sitelinks_data[:feed_id] = feed[:id]
+ sitelinks_data[:link_text_feed_id] = link_text_feed_attribute_id
+ sitelinks_data[:final_url_feed_id] = final_url_feed_attribute_id
+ sitelinks_data[:line_2_feed_id] = line_2_feed_attribute_id
+ sitelinks_data[:line_3_feed_id] = line_3_feed_attribute_id
+ else
+ raise new StandardError, 'No feeds were added.'
+ end
+
+ # Create site links feed items.
+ items_data = [
+ {
+ :text => 'Home',
+ :final_urls => ['http://www.example.com'],
+ :line_2 => 'Home line 2',
+ :line_3 => 'Home line 3'
+ },
+ {
+ :text => 'Stores',
+ :final_urls => ['http://www.example.com/stores'],
+ :line_2 => 'Stores line 2',
+ :line_3 => 'Stores line 3'
+ },
+ {
+ :text => 'On Sale',
+ :final_urls => ['http://www.example.com/sale'],
+ :line_2 => 'On Sale line 2',
+ :line_3 => 'On Sale line 3'
+ },
+ {
+ :text => 'Support',
+ :final_urls => ['http://www.example.com/support'],
+ :line_2 => 'Support line 2',
+ :line_3 => 'Support line 3'
+ },
+ {
+ :text => 'Products',
+ :final_urls => ['http://www.example.com/products'],
+ :line_2 => 'Products line 2',
+ :line_3 => 'Products line 3'
+ },
+ {
+ :text => 'About Us',
+ :final_urls => ['http://www.example.com/about'],
+ :line_2 => 'About line 2',
+ :line_3 => 'About line 3'
+ }
+ ]
+
+ 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[:final_url_feed_id],
+ :string_values => item[:final_urls]
+ },
+ {
+ :feed_attribute_id => sitelinks_data[:line_2_feed_id],
+ :string_value => item[:line_2]
+ },
+ {
+ :feed_attribute_id => sitelinks_data[:line_3_feed_id],
+ :string_value => item[:line_3]
+ }
+ ]
+ }
+ end
+ # The "About us" site link is using geographical targeting to use
+ # LOCATION_OF_PRESENCE.
+ feed_items.last[:geo_targeting_restriction] = {
+ :geo_restriction => 'LOCATION_OF_PRESENCE'
+ }
+
+ feed_items_operations = feed_items.map do |item|
+ {:operator => 'ADD', :operand => item}
+ end
+
+ response = feed_item_srv.mutate(feed_items_operations)
+ unless response.nil? || response[:value].nil?
+ 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
+
+ # Target the "About Us" sitelink to geographically target California.
+ # See https://developers.google.com/adwords/api/docs/appendix/geotargeting
+ # for location criteria for supported locations.
+ criterion_target = {
+ :xsi_type => 'FeedItemCriterionTarget',
+ :feed_id => feed_items[5][:feed_id],
+ :feed_item_id => sitelinks_data[:feed_item_ids][5],
+ :criterion => {
+ :xsi_type => 'Location',
+ :id => 21137 # California
+ }
+ }
+
+ retval = feed_item_target_srv.mutate([{
+ :operator => 'ADD',
+ :operand => criterion_target
+ }])
+ new_location_target = retval[:value].first
+ puts ('Feed item target for feed ID %d and feed item ID %d was created to' +
+ 'restrict serving to location ID %d.') % [new_location_target[:feed_id],
+ new_location_target[:feed_item_id], new_location_target[:criterion][:id]]
+
+ # 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[:final_url_feed_id],
+ :field_id => PLACEHOLDER_FIELD_SITELINK_FINAL_URLS
+ },
+ {
+ :feed_attribute_id => sitelinks_data[:line_2_feed_id],
+ :field_id => PLACEHOLDER_FIELD_SITELINK_LINE_2_TEXT
+ },
+ {
+ :feed_attribute_id => sitelinks_data[:line_3_feed_id],
+ :field_id => PLACEHOLDER_FIELD_SITELINK_LINE_3_TEXT
+ }
+ ]
+ }
+
+ response = feed_mapping_srv.mutate([
+ {:operator => 'ADD', :operand => feed_mapping}
+ ])
+ unless response.nil? || response[:value].nil?
+ 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
+
+ # Construct a matching function that associates the sitelink feeditems to the
+ # campaign, and set the device preference to Mobile. See the matching function
+ # guide at:
+ # https://developers.google.com/adwords/api/docs/guides/feed-matching-functions
+ # for more details.
+ matching_function_string =
+ "AND(IN(FEED_ITEM_ID, {%s}), EQUALS(CONTEXT.DEVICE, 'Mobile'))" %
+ sitelinks_data[:feed_item_ids].join(',')
+
+ # Create site links campaign feed.
+ campaign_feed = {
+ :feed_id => sitelinks_data[:feed_id],
+ :campaign_id => campaign_id,
+ :matching_function => {:function_string => matching_function_string},
+ # 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}
+ ])
+ unless response.nil? || response[:value].nil?
+ 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
+
+ # Optional: Restrict the first feed item to only serve with ads for the
+ # specified ad group ID.
+ if !ad_group_id.nil? && ad_group_id != 0
+ feed_item_target = {
+ :xsi_type => 'FeedItemAdGroupTarget',
+ :feed_id => sitelinks_data[:feed_id],
+ :feed_item_id => sitelinks_data[:feed_item_ids].first,
+ :ad_group_id => ad_group_id
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => feed_item_target
+ }
+
+ response = feed_item_target_srv.mutate([operation])
+ unless response.nil? || response[:value].nil?
+ feed_item_target = response[:value].first
+ puts ('Feed item target for feed ID %d and feed item ID %d' +
+ ' was created to restrict serving to ad group ID %d') %
+ [feed_item_target[:feed_id], feed_item_target[:feed_item_id],
+ feed_item_target[:ad_group_id]]
+ end
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ # 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_FINAL_URLS = 5
+ PLACEHOLDER_FIELD_SITELINK_LINE_2_TEXT = 3
+ PLACEHOLDER_FIELD_SITELINK_LINE_3_TEXT = 4
+
+ begin
+ # Campaign ID to add site link to.
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
+ # Optional: Ad group to restrict targeting to.
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+ add_site_links(campaign_id, 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 " +
+ 'https://github.com/googleads/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/v201809/migration/migrate_to_extension_settings.rb b/adwords_api/examples/v201809/migration/migrate_to_extension_settings.rb
new file mode 100755
index 000000000..1e88ac7c3
--- /dev/null
+++ b/adwords_api/examples/v201809/migration/migrate_to_extension_settings.rb
@@ -0,0 +1,387 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 your feed based sitelinks at campaign level to use
+# extension settings. To learn more about extensionsettings, see
+# https://developers.google.com/adwords/api/docs/guides/extension-settings.
+# To learn more about migrating Feed based extensions to extension settings,
+# see
+# https://developers.google.com/adwords/api/docs/guides/migrate-to-extension-settings.
+#
+# This code example doesn't migrate scheduling or feeditem-level campaign,
+# ad group, keyword, or geo targeting settings.
+
+require 'adwords_api'
+require 'set'
+
+def migrate_to_extension_settings()
+ # 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 all of the feeds for the current user.
+ feeds = get_feeds(adwords)
+
+ feeds.each do |feed|
+ # Retrieve all the sitelinks from the current feed.
+ feed_items = get_site_links_from_feed(adwords, feed)
+
+ # Get all the instances where a sitelink from this feed has been added
+ # to a campaign.
+ campaign_feeds = get_campaign_feeds(adwords, feed, PLACEHOLDER_SITELINKS)
+
+ all_feed_items_to_delete = campaign_feeds.map do |campaign_feed|
+ # Retrieve the sitelinks that have been associated with this campaign.
+ feed_item_ids = get_feed_item_ids_for_campaign(campaign_feed)
+
+ if feed_item_ids.empty?
+ puts(("Migration skipped for campaign feed with campaign ID %d " +
+ "and feed ID %d because no mapped feed item IDs were found in " +
+ "the campaign feed's matching function.") %
+ [campaign_feed[:campaign_id], campaign_feed[:feed_id]])
+ next
+ end
+
+ platform_restrictions = get_platform_restrictions(campaign_feed)
+
+ # Delete the campaign feed that associates the sitelinks from the
+ # feed to the campaign.
+ delete_campaign_feed(adwords, campaign_feed)
+
+ # Create extension settings instead of sitelinks.
+ create_extension_setting(adwords, feed_items, campaign_feed,
+ feed_item_ids, platform_restrictions)
+
+ # Mark the sitelinks from the feed for deletion.
+ feed_item_ids
+ end.flatten.to_set.reject {|id| id.nil?}
+
+ # Delete all the sitelinks from the feed.
+ delete_old_feed_items(adwords, all_feed_items_to_delete, feed)
+ end
+end
+
+def get_site_links_from_feed(adwords, feed)
+ # Retrieve the feed's attribute mapping.
+ feed_mappings = get_feed_mapping(adwords, feed, PLACEHOLDER_SITELINKS)
+
+ feed_items = {}
+
+ get_feed_items(adwords, feed).each do |feed_item|
+ site_link_from_feed = {}
+
+ feed_item[:attribute_values].each do |attribute_value|
+ # Skip this attribute if it hasn't been mapped to a field.
+ next unless feed_mappings.has_key?(
+ attribute_value[:feed_attribute_id])
+
+ feed_mappings[attribute_value[:feed_attribute_id]].each do |field_id|
+ case field_id
+ when PLACEHOLDER_FIELD_SITELINK_LINK_TEXT
+ site_link_from_feed[:text] = attribute_value[:string_value]
+ when PLACEHOLDER_FIELD_SITELINK_URL
+ site_link_from_feed[:url] = attribute_value[:string_value]
+ when PLACEHOLDER_FIELD_FINAL_URLS
+ site_link_from_feed[:final_urls] = attribute_value[:string_values]
+ when PLACEHOLDER_FIELD_FINAL_MOBILE_URLS
+ site_link_from_feed[:final_mobile_urls] =
+ attribute_value[:string_values]
+ when PLACEHOLDER_FIELD_TRACKING_URL_TEMPLATE
+ site_link_from_feed[:tracking_url_template] =
+ attribute_value[:string_value]
+ when PLACEHOLDER_FIELD_LINE_2_TEXT
+ site_link_from_feed[:line2] = attribute_value[:string_value]
+ when PLACEHOLDER_FIELD_LINE_3_TEXT
+ site_link_from_feed[:line3] = attribute_value[:string_value]
+ end
+ end
+ end
+
+ feed_items[feed_item[:feed_item_id]] = site_link_from_feed
+ end
+ return feed_items
+end
+
+def get_feed_mapping(adwords, feed, placeholder_type)
+ feed_mapping_srv = adwords.service(:FeedMappingService, API_VERSION)
+ query = ("SELECT FeedMappingId, AttributeFieldMappings " +
+ "WHERE FeedId = %d AND PlaceholderType = %d AND Status = 'ENABLED'") %
+ [feed[:id], placeholder_type]
+
+ attribute_mappings = {}
+ offset = 0
+
+ begin
+ page_query = (query + " LIMIT %d, %d") % [offset, PAGE_SIZE]
+ page = feed_mapping_srv.query(page_query)
+
+ unless page[:entries].nil?
+ # Normally, a feed attribute is mapped only to one field. However, you
+ # may map it to more than one field if needed.
+ page[:entries].each do |feed_mapping|
+ feed_mapping[:attribute_field_mappings].each do |attribute_mapping|
+ # Since attribute_mappings can have multiple values for each key,
+ # we set up an array to store the values.
+ if attribute_mappings.has_key?(attribute_mapping[:feed_attribute_id])
+ attribute_mappings[attribute_mapping[:feed_attribute_id]] <<
+ attribute_mapping[:field_id]
+ else
+ attribute_mappings[attribute_mapping[:feed_attribute_id]] =
+ [attribute_mapping[:field_id]]
+ end
+ end
+ end
+ end
+ offset += PAGE_SIZE
+ end while page[:total_num_entries] > offset
+
+ return attribute_mappings
+end
+
+def get_feeds(adwords)
+ feed_srv = adwords.service(:FeedService, API_VERSION)
+ query = "SELECT Id, Name, Attributes " +
+ "WHERE Origin = 'USER' AND FeedStatus = 'ENABLED'"
+
+ feeds = []
+ offset = 0
+
+ begin
+ page_query = (query + " LIMIT %d, %d") % [offset, PAGE_SIZE]
+ page = feed_srv.query(page_query)
+
+ unless page[:entries].nil?
+ feeds += page[:entries]
+ end
+ offset += PAGE_SIZE
+ end while page[:total_num_entries] > offset
+
+ return feeds
+end
+
+def get_feed_items(adwords, feed)
+ feed_item_srv = adwords.service(:FeedItemService, API_VERSION)
+ query = ("SELECT FeedItemId, AttributeValues " +
+ "WHERE Status = 'ENABLED' AND FeedId = %d") % feed[:id]
+
+ feed_items = []
+ offset = 0
+
+ begin
+ page_query = (query + " LIMIT %d, %d") % [offset, PAGE_SIZE]
+ page = feed_item_srv.query(page_query)
+
+ unless page[:entries].nil?
+ feed_items += page[:entries]
+ end
+ offset += PAGE_SIZE
+ end while page[:total_num_entries] > offset
+
+ return feed_items
+end
+
+def get_platform_restrictions(campaign_feed)
+ platform_restrictions = nil
+
+ if campaign_feed[:matching_function][:operator] == 'AND'
+ campaign_feed[:matching_function][:lhs_operand].each do |argument|
+ # Check if matchingFunction is EQUALS(CONTEXT.DEVICE, 'Mobile')
+ if argument[:value][:operator] == 'EQUALS'
+ request_context_operand = argument[:value][:lhs_operand].first()
+ if request_context_operand &&
+ request_context_operand == 'DEVICE_PLATFORM'
+ platform_restrictions =
+ argument[:value][:rhs_operand].first().upcase()
+ break
+ end
+ end
+ end
+ end
+ return platform_restrictions
+end
+
+def delete_old_feed_items(adwords, feed_item_ids, feed)
+ return if feed_item_ids.empty?
+
+ feed_item_srv = adwords.service(:FeedItemService, API_VERSION)
+
+ operations = feed_item_ids.map do |feed_item_id|
+ {
+ :operator => 'REMOVE',
+ :operand => {
+ :feed_id => feed[:id],
+ :feed_item_id => feed_item_id
+ }
+ }
+ end
+
+ feed_item_srv.mutate(operations)
+end
+
+def create_extension_setting(
+ adwords, feed_items, campaign_feed, feed_item_ids, platform_restrictions)
+ campaign_extension_setting_srv = adwords.service(
+ :CampaignExtensionSettingService, API_VERSION)
+
+ extension_feed_items = feed_item_ids.map do |feed_item_id|
+ site_link_from_feed = feed_items[:feed_item_id]
+ site_link_feed_item = {
+ :sitelink_text => site_link_from_feed[:text],
+ :sitelink_line2 => site_link_from_feed[:line2],
+ :sitelink_line3 => site_link_from_feed[:line3]
+ }
+ if !site_link_from_feed.final_urls.nil? &&
+ site_link_from_feed[:final_urls].length > 0
+ site_link_feed_item[:sitelink_final_urls] = {
+ :urls => site_link_from_feed[:final_urls]
+ }
+ unless site_link_from_feed[:final_mobile_urls].nil?
+ site_link_feed_item[:sitelink_final_mobile_urls] = {
+ :urls => site_link_from_feed[:final_mobile_urls]
+ }
+ end
+ site_link_feed_item[:sitelink_tracking_url_template] =
+ site_link_from_feed[:tracking_url_template]
+ else
+ site_link_feed_item[:sitelink_url] = site_link_from_feed[:url]
+ end
+
+ site_link_feed_item
+ end
+
+ extension_setting = {
+ :extensions => extension_feed_items
+ }
+
+ unless platform_restrictions.nil?
+ extension_setting[:platform_restrictions] = platform_restrictions
+ end
+
+ campaign_extension_setting = {
+ :campaign_id => campaign_feed[:campaign_id],
+ :extension_type => 'SITELINK',
+ :extension_setting => extension_setting
+ }
+
+ operation = {
+ :operand => campaign_extension_setting,
+ :operator => 'ADD'
+ }
+
+ campaign_extension_setting_srv.mutate([operation])
+end
+
+def delete_campaign_feed(adwords, campaign_feed)
+ campaign_feed_srv = adwords.service(:CampaignFeedService, API_VERSION)
+
+ operation = {
+ :operand => campaign_feed,
+ :operator => 'REMOVE'
+ }
+
+ campaign_feed_srv.mutate([operation])
+end
+
+def get_feed_item_ids_for_campaign(campaign_feed)
+ feed_item_ids = Set.new
+ if !campaign_feed[:matching_function][:lhs_operand].empty? &&
+ campaign_feed[:matching_function][:lhs_operand].first[:xsi_type] ==
+ 'RequestContextOperand'
+ request_context_operand =
+ campaign_feed[:matching_function][:lhs_operand].first
+ if request_context_operand[:context_type] == 'FEED_ITEM_ID' &&
+ campaign_feed[:matching_function][:operator] == 'IN'
+ campaign_feed[:matching_function][:rhs_operand].each do |argument|
+ if argument[:xsi_type] == 'ConstantOperand'
+ feed_item_ids.add(argument[:long_value])
+ end
+ end
+ end
+ end
+ return feed_item_ids
+end
+
+def get_campaign_feeds(adwords, feed, placeholder_type)
+ campaign_feed_srv = adwords.service(:CampaignFeedService, API_VERSION)
+ query = ("SELECT CampaignId, MatchingFunction, PlaceholderTypes " +
+ "WHERE Status = 'ENABLED' AND FeedId = %d " +
+ "AND PlaceholderTypes CONTAINS_ANY [%d]") % [feed[:id], placeholder_type]
+
+ campaign_feeds = []
+ offset = 0
+
+ begin
+ page_query = (query + " LIMIT %d, %d") % [offset, PAGE_SIZE]
+ page = campaign_feed_srv.query(page_query)
+
+ unless page[:entries].nil?
+ campaign_feeds += page[:entries]
+ end
+ offset += PAGE_SIZE
+ end while page[:total_num_entries] > offset
+
+ return campaign_feeds
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 500
+
+ # See the Placeholder reference page for a liste of all placeholder types
+ # and fields.
+ # https://developers.google.com/adwords/api/docs/appendix/placeholders
+ PLACEHOLDER_SITELINKS = 1
+ PLACEHOLDER_FIELD_SITELINK_LINK_TEXT = 1
+ PLACEHOLDER_FIELD_SITELINK_URL = 2
+ PLACEHOLDER_FIELD_LINE_2_TEXT = 3
+ PLACEHOLDER_FIELD_LINE_3_TEXT = 4
+ PLACEHOLDER_FIELD_FINAL_URLS = 5
+ PLACEHOLDER_FIELD_FINAL_MOBILE_URLS = 6
+ PLACEHOLDER_FIELD_TRACKING_URL_TEMPLATE = 7
+
+ begin
+ migrate_to_extension_settings()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/misc/get_all_image_assets.rb b/adwords_api/examples/v201809/misc/get_all_image_assets.rb
new file mode 100644
index 000000000..0473e9c58
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/get_all_image_assets.rb
@@ -0,0 +1,108 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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 gets all image assets. To upload an image asset,
+# run upload_image_asset.rb.
+
+require 'adwords_api'
+
+def get_all_image_assets()
+ # 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')
+
+ asset_srv = adwords.service(:AssetService, API_VERSION)
+
+ # Create the selector and filter for image assets only.
+ selector = {
+ :fields => ['AssetName', 'AssetStatus', 'ImageFileSize', 'ImageWidth',
+ 'ImageHeight', 'ImageFullSizeUrl'],
+ :predicates => [
+ {:field => 'AssetSubtype', :operator => 'IN', :values => ['IMAGE']}
+ ],
+ :paging => {
+ :start_index => 0,
+ :number_results => PAGE_SIZE
+ }
+ }
+
+ # Set initial values.
+ offset, page = 0, {}
+
+ begin
+ # Get the image assets.
+ page = asset_srv.get(selector)
+
+ # Display the results
+ if page[:entries]
+ page[:entries].each_with_index do |entry, i|
+ full_dimensions = entry[:full_size_info]
+ puts ('%s) Image asset with id = "%s", name = "%s" ' +
+ 'and status = "%s" was found.') %
+ [i+1, entry[:asset_id], entry[:asset_name], entry[:asset_status]]
+ puts ' Size is %sx%s and asset URL is %s.' %
+ [full_dimensions[:image_width],
+ full_dimensions[:image_height],
+ full_dimensions[:image_url]]
+ 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 = :v201809
+ PAGE_SIZE = 500
+
+ begin
+ get_all_image_assets()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/misc/get_all_images_and_videos.rb b/adwords_api/examples/v201809/misc/get_all_images_and_videos.rb
new file mode 100755
index 000000000..d4bad4bd2
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/get_all_images_and_videos.rb
@@ -0,0 +1,104 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/misc/setup_oauth2.rb b/adwords_api/examples/v201809/misc/setup_oauth2.rb
new file mode 100755
index 000000000..646721788
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/setup_oauth2.rb
@@ -0,0 +1,84 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 authentication credentials.
+
+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 = :v201809
+
+ 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/v201809/misc/upload_image.rb b/adwords_api/examples/v201809/misc/upload_image.rb
new file mode 100755
index 000000000..c3f130d6b
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/upload_image.rb
@@ -0,0 +1,93 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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)
+
+ # This utility method retrieves the contents of a URL using all of the config
+ # options provided to the Api object.
+ image_url = 'https://goo.gl/3b9Wfh'
+ image_data = AdsCommon::Http.get(image_url, adwords.config)
+ base64_image_data = Base64.encode64(image_data)
+
+ # Create image.
+ 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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/misc/upload_image_asset.rb b/adwords_api/examples/v201809/misc/upload_image_asset.rb
new file mode 100644
index 000000000..0e024034e
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/upload_image_asset.rb
@@ -0,0 +1,100 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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 uploads an image asset. To get images,
+# run get_all_image_assets.rb.
+
+require 'adwords_api'
+
+def upload_image_asset()
+ # 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')
+
+ asset_srv = adwords.service(:AssetService, API_VERSION)
+
+ # The image needs to be in a BASE64 encoded form
+ image_url = 'https://goo.gl/3b9Wfh'
+ image_data = AdsCommon::Http.get(image_url, adwords.config)
+ image_data_base64 = Base64.encode64(image_data)
+
+ # Create the image asset.
+ image_asset = {
+ :xsi_type => 'ImageAsset',
+ # Optional: Provide a unique friendly name to identify your asset. If you
+ # specify the assetName field, then both the asset name and the image being
+ # uploaded should be unique, and should not match another ACTIVE asset in
+ # this customer account.
+ # :asset_name => 'Jupiter Trip %s' % (Time.new.to_f * 1000).to_i,
+ :image_data => image_data_base64
+ }
+
+ # Create the operation.
+ asset_operation = {:operator => 'ADD', :operand => image_asset}
+
+ begin
+ # Make the mutate request.
+ response = asset_srv.mutate([asset_operation])
+
+ # Display the results
+ if response and response[:value]
+ uploaded_asset = response[:value].first
+ puts 'Image asset with id = "%s" and name = "%s" was created.' %
+ [uploaded_asset[:asset_id], uploaded_asset[:asset_name]]
+ else
+ puts 'No image asset was created.'
+ end
+ rescue Exception => e
+ puts 'Failed to create image asset.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ upload_image_asset()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/misc/upload_media_bundle.rb b/adwords_api/examples/v201809/misc/upload_media_bundle.rb
new file mode 100755
index 000000000..438ee5048
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/upload_media_bundle.rb
@@ -0,0 +1,90 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 HTML5 zip file.
+
+require 'adwords_api'
+require 'base64'
+
+def upload_media_bundle()
+ # 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 HTML5 media.
+ html5_url = 'https://goo.gl/9Y7qI2'
+ # This utility method retrieves the contents of a URL using all of the config
+ # options provided to the Api object.
+ html5_data = AdsCommon::Http.get(html5_url, adwords.config)
+ base64_html5_data = Base64.encode64(html5_data)
+ media_bundle = {
+ :xsi_type => 'MediaBundle',
+ :data => base64_html5_data,
+ :type => 'MEDIA_BUNDLE'
+ }
+
+ # Upload HTML5 zip.
+ response = media_srv.upload([media_bundle])
+ if response and !response.empty?
+ ret_html5 = response.first
+ full_dimensions = ret_html5[:dimensions]['FULL']
+ puts ("HTML5 media with ID %d, dimensions %dx%d and MIME type '%s' " +
+ "uploaded successfully.") % [ret_html5[:media_id],
+ full_dimensions[:height], full_dimensions[:width],
+ ret_html5[:mime_type]]
+ else
+ puts 'No HTML5 zip was uploaded.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ upload_media_bundle()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/misc/use_oauth2_jwt.rb b/adwords_api/examples/v201809/misc/use_oauth2_jwt.rb
new file mode 100755
index 000000000..c697bcdbd
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/use_oauth2_jwt.rb
@@ -0,0 +1,93 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 authentication method with
+# Service Account (JWT). For this example to work, your Service Account must be
+# a G Suite account.
+#
+# See https://developers.google.com/adwords/api/docs/guides/service-accounts
+# for more information.
+
+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 = :v201809
+
+ 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/v201809/misc/use_runtime_config.rb b/adwords_api/examples/v201809/misc/use_runtime_config.rb
new file mode 100755
index 000000000..bfb7a6fe9
--- /dev/null
+++ b/adwords_api/examples/v201809/misc/use_runtime_config.rb
@@ -0,0 +1,92 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 make AdWords queries without using the
+# adwords_api.yml file.
+
+require 'adwords_api'
+require 'date'
+
+def use_runtime_config(client_id, client_secret, refresh_token,
+ developer_token, client_customer_id, user_agent)
+ # AdwordsApi::Api will read a config file from ENV['HOME']/adwords_api.yml
+ # when called without parameters.
+ adwords = AdwordsApi::Api.new({
+ :authentication => {
+ :method => 'OAuth2',
+ :oauth2_client_id => client_id,
+ :oauth2_client_secret => client_secret,
+ :developer_token => developer_token,
+ :client_customer_id => client_customer_id,
+ :user_agent => user_agent,
+ :oauth2_token => {
+ :refresh_token => refresh_token
+ }
+ },
+ :service => {
+ :environment => 'PRODUCTION'
+ }
+ })
+
+ # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
+ # the hash above or provide your own logger:
+ # adwords.logger = Logger.new('adwords_xml.log')
+
+ customer_srv = adwords.service(:CustomerService, API_VERSION)
+ customer = customer_srv.get()
+ puts "You are logged in as customer: %d" % customer[:id]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ client_id = 'INSERT_CLIENT_ID_HERE'
+ client_secret = 'INSERT_CLIENT_SECRET_HERE'
+ refresh_token = 'INSERT_REFRESH_TOKEN_HERE'
+ developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'
+ client_customer_id = 'INSERT_CLIENT_CUSTOMER_ID_HERE'
+ user_agent = 'INSERT_USER_AGENT_HERE'
+
+ use_runtime_config(client_id, client_secret, refresh_token,
+ developer_token, client_customer_id, user_agent)
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/optimization/estimate_keyword_traffic.rb b/adwords_api/examples/v201809/optimization/estimate_keyword_traffic.rb
new file mode 100755
index 000000000..e203a10af
--- /dev/null
+++ b/adwords_api/examples/v201809/optimization/estimate_keyword_traffic.rb
@@ -0,0 +1,191 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 a selector.
+ selector = {
+ :campaign_estimate_requests => [campaign_request],
+ # Optional: Request a list of campaign level estimates segmented by
+ # platform.
+ :platform_estimate_requested => true
+ }
+
+ # Execute the request.
+ response = traffic_estimator_srv.get(selector)
+
+ # Display traffic estimates.
+ if response and response[:campaign_estimates] and
+ response[:campaign_estimates].size > 0
+ campaign_estimate = response[:campaign_estimates].first
+
+ unless campaign_estimate[:platform_estimates].nil?
+ # Display the campaign level estimates segmented by platform.
+ campaign_estimate[:platform_estimates].each do |platform_estimate|
+ platform_message = ('Results for the platform with ID %d and name ' +
+ '"%s":') % [platform_estimate[:platform][:id],
+ platform_estimate[:platform][:platform_name]]
+ display_mean_estimates(
+ platform_message,
+ platform_estimate[:min_estimate],
+ platform_estimate[:max_estimate]
+ )
+ end
+ end
+
+ # Display the keyword estimates.
+ keyword_estimates =
+ campaign_estimate[:ad_group_estimates].first[:keyword_estimates]
+ keyword_estimates.each_with_index do |keyword_estimate, index|
+ next if keyword_requests[index][:is_negative]
+ keyword = keyword_requests[index][:keyword]
+
+ keyword_message = ('Results for the keyword with text "%s" and match ' +
+ 'type "%s":') % [keyword[:text], keyword[:match_type]]
+ display_mean_estimates(
+ keyword_message,
+ keyword_estimate[:min],
+ keyword_estimate[:max]
+ )
+ end
+ else
+ puts 'No traffic estimates were returned.'
+ end
+end
+
+def display_mean_estimates(message, min_estimate, max_estimate)
+ mean_average_cpc = nil
+ unless min_estimate[:average_cpc].nil? || max_estimate[:average_cpc].nil?
+ mean_average_cpc = calculate_mean(
+ min_estimate[:average_cpc][:micro_amount],
+ max_estimate[:average_cpc][:micro_amount]
+ )
+ end
+ mean_average_position = calculate_mean(
+ min_estimate[:average_position],
+ max_estimate[:average_position]
+ )
+ mean_clicks = calculate_mean(
+ min_estimate[:clicks_per_day],
+ max_estimate[:clicks_per_day]
+ )
+ mean_total_cost = nil
+ unless min_estimate[:total_cost].nil? || max_estimate[:total_cost].nil?
+ mean_total_cost = calculate_mean(
+ min_estimate[:total_cost][:micro_amount],
+ max_estimate[:total_cost][:micro_amount]
+ )
+ end
+
+ puts message
+ puts "\tEstimated average CPC: %s" % format_mean(mean_average_cpc)
+ puts "\tEstimated ad position: %s" % format_mean(mean_average_position)
+ puts "\tEstimated daily clicks: %s" % format_mean(mean_clicks)
+ puts "\tEstimated daily cost: %s" % format_mean(mean_total_cost)
+end
+
+def format_mean(mean)
+ return "nil" if mean.nil?
+ return "%.2f" % (mean / 1000000)
+end
+
+def calculate_mean(min_money, max_money)
+ return nil if min_money.nil? || max_money.nil?
+ return (min_money.to_f + max_money.to_f) / 2.0
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/optimization/get_campaign_criterion_bid_modifier_simulations.rb b/adwords_api/examples/v201809/optimization/get_campaign_criterion_bid_modifier_simulations.rb
new file mode 100755
index 000000000..1c4ecb751
--- /dev/null
+++ b/adwords_api/examples/v201809/optimization/get_campaign_criterion_bid_modifier_simulations.rb
@@ -0,0 +1,137 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 available campaign criterion bid modifier landscapes
+# for a given campaign.
+# To get campaigns, run basic_operations/get_campaigns.rb.
+
+require 'adwords_api'
+
+def get_campaign_criterion_bid_modifier_simulations(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')
+
+ data_srv = adwords.service(:DataService, API_VERSION)
+
+ selector = {
+ :fields => [
+ 'CampaignId',
+ 'CriterionId',
+ 'StartDate',
+ 'EndDate',
+ 'BidModifier',
+ 'LocalClicks',
+ 'LocalCost',
+ 'LocalImpressions',
+ 'TotalLocalImpressions',
+ 'TotalLocalClicks',
+ 'TotalLocalCost',
+ 'RequiredBudget'
+ ],
+ :predicates => [
+ {:field => 'CampaignId', :operator => 'IN', :values => [campaign_id]}
+ ],
+ :paging => {
+ :start_index => 0,
+ :number_results => PAGE_SIZE
+ }
+ }
+
+ landscape_points_in_previous_page = 0
+ start_index = 0
+ begin
+ # Offset the start index by the number of landscape points in the last
+ # retrieved page, NOT the number of entries (bid landscapes) in the page.
+ start_index += landscape_points_in_previous_page
+ selector[:paging][:start_index] = start_index
+
+ # Reset the count of landscape points in preparation for processing the
+ # next page.
+ landscape_points_in_previous_page = 0
+
+ # Request the next page of bid landscapes.
+ page = data_srv.get_campaign_criterion_bid_landscape(selector)
+
+ if page[:entries]
+ page[:entries].each do |bid_modifier_landscape|
+ puts ("Found campaign-level criterion bid modifier landscapes for " +
+ "criterion with id '%d', start date '%s', end date '%s', and " +
+ "landscape points:") % [
+ bid_modifier_landscape[:criterion_id],
+ bid_modifier_landscape[:start_date],
+ bid_modifier_landscape[:end_date]
+ ]
+ bid_modifier_landscape[:landscape_points].each do |landscape_point|
+ landscape_points_in_previous_page += 1
+ puts (" bid modifier: %f => clicks: %d, cost: %d, impressions: %d" +
+ " total clicks: %d, total cost: %d, total impressions: %d" +
+ " and required budget: %f") % [
+ landscape_point[:bid_modifier],
+ landscape_point[:clicks],
+ landscape_point[:cost][:micro_amount],
+ landscape_point[:impressions],
+ landscape_point[:total_local_clicks],
+ landscape_point[:total_local_cost][:micro_amount],
+ landscape_point[:total_local_impressions],
+ landscape_point[:required_budget][:micro_amount]
+ ]
+ end
+ puts
+ end
+ end
+ end while landscape_points_in_previous_page >= PAGE_SIZE
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 100
+
+ begin
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
+
+ get_campaign_criterion_bid_modifier_simulations(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 " +
+ 'https://github.com/googleads/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/v201809/optimization/get_keyword_bid_simulations.rb b/adwords_api/examples/v201809/optimization/get_keyword_bid_simulations.rb
new file mode 100755
index 000000000..0c8c156f7
--- /dev/null
+++ b/adwords_api/examples/v201809/optimization/get_keyword_bid_simulations.rb
@@ -0,0 +1,106 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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.
+ query_builder = adwords.service_query_builder do |b|
+ b.select(%w[
+ AdGroupId CriterionId StartDate EndDate Bid BiddableConversions
+ BiddableConversionsValue LocalClicks LocalCost LocalImpressions
+ ])
+ b.where('AdGroupId').equal_to(ad_group_id)
+ b.where('CriterionId').equal_to(keyword_id)
+ b.limit(0, PAGE_SIZE)
+ end
+ query = query_builder.build
+
+ loop do
+ # Request the next page of bid landscapes.
+ page = data_srv.query_criterion_bid_landscape(query.to_s)
+
+ 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|
+ landscape_points_in_previous_page += 1
+ puts ("\t%d => clicks: %d, cost: %d, impressions: %d, biddable " +
+ "conversions: %.2f, biddable conversions value: %.2f") %
+ [point[:bid][:micro_amount], point[:clicks],
+ point[:cost][:micro_amount], point[:impressions],
+ point[:biddable_conversions], point[:biddable_conversions_value]]
+ end
+ end
+ end
+ break unless query.has_next_landscape_page(page)
+ query.next_page()
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 100
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/optimization/get_keyword_ideas.rb b/adwords_api/examples/v201809/optimization/get_keyword_ideas.rb
new file mode 100755
index 000000000..9e3b74ba6
--- /dev/null
+++ b/adwords_api/examples/v201809/optimization/get_keyword_ideas.rb
@@ -0,0 +1,162 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+require 'adwords_api'
+
+def get_keyword_ideas(keyword_text, 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')
+
+ targeting_idea_srv = adwords.service(:TargetingIdeaService, API_VERSION)
+
+ # Construct selector object.
+ selector = {
+ :idea_type => 'KEYWORD',
+ :request_type => 'IDEAS'
+ }
+ selector[:requested_attribute_types] = [
+ 'KEYWORD_TEXT',
+ 'SEARCH_VOLUME',
+ 'AVERAGE_CPC',
+ 'COMPETITION',
+ 'CATEGORY_PRODUCTS_AND_SERVICES',
+ ]
+
+ selector[:paging] = {
+ :start_index => 0,
+ :number_results => PAGE_SIZE
+ }
+
+ search_parameters = []
+ 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]
+ }
+
+ search_parameters << {
+ # 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}]
+ }
+
+ search_parameters << {
+ # Network search parameter (optional).
+ :xsi_type => 'NetworkSearchParameter',
+ :network_setting => {
+ :target_google_search => true,
+ :target_search_network => false,
+ :target_content_network => false,
+ :target_partner_search_network => false
+ }
+ }
+
+ unless ad_group_id.nil?
+ search_parameters << {
+ :xsi_type => 'SeedAdGroupIdSearchParameter',
+ :ad_group_id => ad_group_id
+ }
+ end
+
+ selector[:search_parameters] = search_parameters
+
+ # Define initial values.
+ offset = 0
+ results = []
+
+ begin
+ # Perform request. If this loop executes too many times in quick suggestion,
+ # you may get a RateExceededError. See here for more info on handling these:
+ # https://developers.google.com/adwords/api/docs/guides/rate-limits
+ 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]
+ average_cpc = data['AVERAGE_CPC'][:value]
+ competition = data['COMPETITION'][:value]
+ products_and_services = data['CATEGORY_PRODUCTS_AND_SERVICES'][:value]
+ average_monthly_searches = data['SEARCH_VOLUME'][:value]
+ puts ("Keyword with text '%s', average monthly search volume %d, " +
+ "average CPC %d, and competition %.2f was found with categories: %s") %
+ [
+ keyword,
+ average_monthly_searches,
+ average_cpc[:micro_amount],
+ competition,
+ products_and_services
+ ]
+ end
+ puts "Total keywords related to '%s': %d." % [keyword_text, results.length]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+ PAGE_SIZE = 100
+
+ begin
+ keyword_text = 'INSERT_KEYWORD_TEXT_HERE'
+ # Optional:
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'
+
+ ad_group_id = nil if ad_group_id == 'INSERT_AD_GROUP_ID_HERE'
+ get_keyword_ideas(keyword_text, 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/add_audience.rb b/adwords_api/examples/v201809/remarketing/add_audience.rb
new file mode 100755
index 000000000..8408555f2
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/add_audience.rb
@@ -0,0 +1,120 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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',
+ :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.
+ conversion_trackers = {}
+ if user_list and user_list[:conversion_types]
+ conversion_ids = user_list[:conversion_types][:id]
+ selector = {
+ :fields => ['Id', 'GoogleGlobalSiteTag', 'GoogleEventSnippet'],
+ :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]
+ conv_tracker_response[:entries].each do |conversion_tracker|
+ conversion_trackers[conversion_tracker[:id]] = conversion_tracker
+ end
+ end
+ end
+ puts "User list with name '%s' and ID %d was added." %
+ [user_list[:name], user_list[:id]]
+ # Display the list of associated conversion code snippets.
+ user_list_conversion_type = user_list[:conversion_types]
+ conversion_tracker =
+ conversion_trackers[user_list_conversion_type[:id].to_i]
+ puts "Google global site tag:\n%s\n" %
+ conversion_tracker[:google_global_site_tag]
+ puts "Google event snippet:\n%s\n" %
+ conversion_tracker[:google_event_snippet]
+ else
+ puts 'No user lists were added.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/add_conversion_trackers.rb b/adwords_api/examples/v201809/remarketing/add_conversion_trackers.rb
new file mode 100755
index 000000000..e6999119e
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/add_conversion_trackers.rb
@@ -0,0 +1,135 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 and an
+# upload conversion tracker.
+
+require 'adwords_api'
+
+def add_conversion_trackers()
+ # 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 AdWords conversion tracker.
+ operation1 = {
+ :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',
+ # Optional fields:
+ :status => 'ENABLED',
+ :viewthrough_lookback_window => 15,
+ :default_revenue_value => 23.41,
+ :always_use_default_revenue_value => true
+ }
+ }
+
+ # Prepare for adding upload conversion tracker.
+ operation2 = {
+ :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 => 'UploadConversion',
+
+ # Set an appropriate category. This field is optional, and will be set to
+ # DEFAULT if not mentioned.
+ :category => 'LEAD',
+ :name => "Upload Conversion #%d" % (Time.new.to_f * 1000).to_i,
+ :viewthrough_lookback_window => 30,
+ :ctc_lookback_window => 90,
+
+ # Optional: Set the default currency code to use for conversions that do
+ # not specify a conversion currency. This must be an ISO 4217 3-character
+ # currency code such as "EUR" or "USD".
+ # If this field is not set on this UploadConversion, AdWords will use the
+ # account currency.
+ :default_revenue_currency_code => 'EUR',
+
+ # Optional: Set the default revenue value to use for conversions that do
+ # not specify a conversion value.
+ # Note: that this value should NOT be in micros.
+ :default_revenue_value => 2.50,
+
+ # Optional: To upload fractional conversion credits, mark the upload
+ # conversion as externally attributed. See
+ # https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions
+ # to learn more about importing externally attributed conversions.
+ #:is_externally_attributed => true
+ }
+ }
+
+ # Add conversion trackers.
+ response = conv_tracker_srv.mutate([operation1, operation2])
+ if response and response[:value]
+ response[:value].each do |tracker|
+ puts ("\nConversion tracker with ID %d, name '%s', status '%s' and " +
+ "category '%s' was added.") % [tracker[:id], tracker[:name],
+ tracker[:status], tracker[:category]]
+ if tracker[:xsi_type] == 'AdWordsConversionTracker'
+ puts "Google global site tag:\n%s\n" % tracker[:google_global_site_tag]
+ puts "Google event snippet:\n%s\n" % tracker[:google_event_snippet]
+ end
+ end
+ else
+ puts 'No conversion trackers were added.'
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ add_conversion_trackers()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/add_crm_based_user_list.rb b/adwords_api/examples/v201809/remarketing/add_crm_based_user_list.rb
new file mode 100755
index 000000000..64b12b72f
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/add_crm_based_user_list.rb
@@ -0,0 +1,138 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 user list (a.k.a. audience) and uploads members to
+# populate the list.
+#
+# Note: It may take several hours for the list to be populated with members.
+# Email addresses and other member information must be associated with a Google
+# account. For privacy purposes, the user list size will show as zero until the
+# list has at least 1000 members. After that, the size will be rounded to the
+# two most significant digits.
+
+require 'adwords_api'
+require 'digest'
+
+def add_crm_based_user_list()
+ # 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)
+
+ user_list = {
+ :xsi_type => 'CrmBasedUserList',
+ :name => 'Customer relationship management list #%d' % Time.new.usec,
+ :description => 'A list of customers that originated from email addresses',
+ # CRM-based user lists can use a membershipLifeSpan of 10000 to indicate
+ # unlimited; otherwise normal values apply.
+ :membership_life_span => 30,
+ :upload_key_type => 'CONTACT_INFO'
+ }
+
+ operation = {
+ :operand => user_list,
+ :operator => 'ADD'
+ }
+
+ result = user_list_srv.mutate([operation])
+ user_list_id = result[:value].first[:id]
+
+ emails = ['customer1@example.com', 'customer2@example.com',
+ ' Customer3@example.com ']
+
+ sha_digest = Digest::SHA256.new
+ members = emails.map do |email|
+ # Remove leading and trailing whitespace and convert all characters to
+ # lowercase before generating the hashed version.
+ {
+ :hashed_email => sha_digest.hexdigest(normalize_text(email))
+ }
+ end
+
+ first_name = 'John'
+ last_name = 'Doe'
+ country_code = 'US'
+ zip_code = '10001'
+
+ members << {
+ :address_info => {
+ # First and last name must be normalized and hashed.
+ :hashed_first_name => sha_digest.hexdigest(normalize_text(first_name)),
+ :hashed_last_name => sha_digest.hexdigest(normalize_text(last_name)),
+ # Country code and zip code are sent in plaintext.
+ :country_code => country_code,
+ :zip_code => zip_code
+ }
+ }
+
+ mutate_members_operation = {
+ :operand => {
+ :user_list_id => user_list_id,
+ :members_list => members
+ },
+ :operator => 'ADD'
+ }
+
+ mutate_members_result =
+ user_list_srv.mutate_members([mutate_members_operation])
+
+ mutate_members_result[:user_lists].each do |user_list|
+ puts "User list with name '%s' and ID '%d' was added." %
+ [user_list[:name], user_list[:id]]
+ end
+end
+
+def normalize_text(text)
+ text.strip.downcase
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ add_crm_based_user_list()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/add_rule_based_user_lists.rb b/adwords_api/examples/v201809/remarketing/add_rule_based_user_lists.rb
new file mode 100755
index 000000000..4741c7c42
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/add_rule_based_user_lists.rb
@@ -0,0 +1,208 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 two rule-based remarketing user lists: one with no site
+# visit data restrictions, and another that will only include users who visit
+# your site in the next six months.
+
+require 'adwords_api'
+
+def add_rule_based_user_lists()
+ # 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)
+
+ # First rule item group - users who visited the checkout page and had more
+ # than one item in their shopping cart.
+ cart_rule_item = {
+ :xsi_type => 'StringRuleItem',
+ :key => {
+ :name => 'ecomm_pagetype'
+ },
+ :op => 'EQUALS',
+ :value => 'checkout'
+ }
+
+ cart_size_rule_item = {
+ :xsi_type => 'NumberRuleItem',
+ :key => {
+ :name => 'cartsize'
+ },
+ :op => 'GREATER_THAN',
+ :value => 1.0
+ }
+
+ # Combine the two rule items into a RuleItemGroup so AdWords will AND
+ # their rules together.
+ checkout_multiple_item_group = {
+ :items => [cart_rule_item, cart_size_rule_item]
+ }
+
+ # Second rule item group - users who checked out after October 31st
+ # and before January 1st.
+ start_date_rule_item = {
+ :xsi_type => 'DateRuleItem',
+ :key => {
+ :name => 'checkoutdate'
+ },
+ :op => 'AFTER',
+ :value => '20141031'
+ }
+
+ end_date_rule_item = {
+ :xsi_type => 'DateRuleItem',
+ :key => {
+ :name => 'checkoutdate'
+ },
+ :op => 'BEFORE',
+ :value => '20150101'
+ }
+
+ # Combine the date rule items into a RuleItemGroup.
+ checked_out_nov_dec_item_group = {
+ :items => [start_date_rule_item, end_date_rule_item]
+ }
+
+ # Combine the rule item groups into a Rule so AdWords knows how to apply the
+ # rules.
+ rule = {
+ :groups => [checkout_multiple_item_group, checked_out_nov_dec_item_group],
+ # ExpressionRuleUserLists can use either CNF or DNF for matching. CNF means
+ # 'at least one item in each rule item group must match', and DNF means 'at
+ # least one entire rule item group must match'.
+ # DateSpecificRuleUserList only supports DNF. You can also omit the rule
+ # type altogether to default to DNF.
+ :rule_type => 'DNF'
+ }
+
+ # Third and fourth rule item groups.
+ # Visitors of a page who visited another page.
+ sites = ['example.com/example1', 'example.com/example2']
+
+ # Create two rules to show that a visitor browsed two sites.
+ user_visited_site_rules = sites.map do |site|
+ {
+ :groups => [
+ :items => [
+ {
+ :xsi_type => 'StringRuleItem',
+ :key => {:name => 'url__'},
+ :op => 'EQUALS',
+ :value => site
+ }
+ ]]}
+ end
+
+ # Create the user list with no restrictions on site visit date.
+ expression_user_list = {
+ :xsi_type => 'ExpressionRuleUserList',
+ :name => 'Users who checked out in November or December OR ' +
+ 'visited the checkout page with more than one item in their cart',
+ :description => 'Expression based user list',
+ :rule => rule,
+ # Optional: Set the prepopulationStatus to REQUESTED to include past users
+ # in the user list.
+ :prepopulation_status => 'REQUESTED'
+ }
+
+ # Create the user list restricted to users who visit your site within the
+ # specified timeframe.
+ date_user_list = {
+ :xsi_type => 'DateSpecificRuleUserList',
+ :name => 'Date rule user list created at ' + Time.now.to_s,
+ :description => 'Users who visited the site between 20141031 and ' +
+ '20150331 and checked out in November or December OR visited the ' +
+ 'checkout page with more than one item in their cart',
+ # We re-use the rule here. To avoid side effects, we need a deep copy.
+ :rule => Marshal.load(Marshal.dump(rule)),
+ # Set the start and end dates of the user list.
+ :start_date => '20141031',
+ :end_date => '20150331'
+ }
+
+ # Create the user list where "Visitors of a page who did visit another page".
+ # To create a user list where "Visitors of a page who did not visit another
+ # page", change the ruleOperator from AND to AND_NOT.
+ combined_rule_user_list = {
+ :xsi_type => 'CombinedRuleUserList',
+ :name =>
+ 'Combined rule user list "Visitors of a page who did visit another page"',
+ :description => 'Users who visited two sites.',
+ :left_operand => user_visited_site_rules[0],
+ :right_operand => user_visited_site_rules[1],
+ :rule_operator => 'AND'
+ }
+
+ # Create operations to add the user lists.
+ all_lists = [expression_user_list, date_user_list, combined_rule_user_list]
+ operations = all_lists.map do |user_list|
+ {
+ :operand => user_list,
+ :operator => 'ADD'
+ }
+ end
+
+ # Submit the operations.
+ response = user_list_srv.mutate(operations)
+
+ # Display the results.
+ response[:value].each do |user_list|
+ puts ("User list added with ID %d, name '%s', status '%s', " +
+ "list type '%s', accountUserListStatus '%s', description '%s'.") %
+ [user_list[:id], user_list[:name], user_list[:status],
+ user_list[:list_type], user_list[:account_user_list_status],
+ user_list[:description]]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ add_rule_based_user_lists()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/upload_conversion_adjustments.rb b/adwords_api/examples/v201809/remarketing/upload_conversion_adjustments.rb
new file mode 100644
index 000000000..176a131bb
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/upload_conversion_adjustments.rb
@@ -0,0 +1,103 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright 2018 Google LLC
+#
+# 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
+#
+# https://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 imports conversion adjustments for conversions that already
+# exist. To set up a conversion tracker, run the add_conversion_tracker.pl
+# example.
+
+require 'adwords_api'
+
+def upload_conversion_adjustments(conversion_name, gclid, adjustment_type,
+ conversion_time, adjustment_time, adjusted_value)
+ # 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')
+
+ adjustment_srv =
+ adwords.service(:OfflineConversionAdjustmentFeedService, API_VERSION)
+
+ # This example demonstrates adjusting one conversion, but you can add more
+ # than one operation to adjust more in a single mutate request.
+ operations = []
+
+ # Associate conversion adjustments with the existing named conversion tracker.
+ # The GCLID should have been uploaded before with a conversion.
+ feed = {
+ :xsi_type => 'GclidOfflineConversionAdjustmentFeed',
+ :conversion_name => conversion_name,
+ :google_click_id => gclid,
+ :conversion_time => conversion_time,
+ :adjustment_type => adjustment_type,
+ :adjustment_time => adjustment_time,
+ :adjusted_value => adjusted_value
+ }
+
+ operations << {
+ :operator => 'ADD',
+ :operand => feed
+ }
+
+ response = adjustment_srv.mutate(operations)
+ new_feed = response[:value].first
+
+ puts ('Uploaded offline conversion adjustment value of "%s" for Google ' +
+ 'Click ID "%s"') %
+ [new_feed[:conversion_name], new_feed[:google_click_id]]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ conversion_name = 'INSERT_CONVERSION_NAME_HERE'
+ gclid = 'INSERT_GCLID_HERE'
+ adjustment_type = 'INSERT_ADJUSTMENT_TYPE_HERE'
+ conversion_time = 'INSERT_CONVERSION_TIME_HERE'
+ adjustment_time = 'INSERT_ADJUSTMENT_TIME_HERE'
+ adjusted_value = 'INSERT_ADJUSTED_VALUE_HERE'.to_f
+
+ upload_conversion_adjustments(conversion_name, gclid, adjustment_type,
+ conversion_time, adjustment_time, adjusted_value)
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/upload_offline_call_conversions.rb b/adwords_api/examples/v201809/remarketing/upload_offline_call_conversions.rb
new file mode 100755
index 000000000..a827f81ca
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/upload_offline_call_conversions.rb
@@ -0,0 +1,111 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2016, 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 imports offline conversion values for calls related to ads
+# in your account.
+#
+# To set up a conversion tracker, run the add_conversion_trackers.rb example.
+
+require 'adwords_api'
+
+def upload_offline_call_conversions(caller_id, call_start_time, conversion_name,
+ conversion_time, conversion_value)
+ # 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')
+
+ occ_feed_srv =
+ adwords.service(:OfflineCallConversionFeedService, API_VERSION)
+
+ # Associate offline conversions with the existing named conversion tracker. If
+ # this tracker was newly created, it may be a few hours before it can accept
+ # conversions.
+ feed = {
+ :caller_id => caller_id,
+ :call_start_time => call_start_time,
+ :conversion_name => conversion_name,
+ :conversion_time => conversion_time,
+ :conversion_value => conversion_value
+ }
+
+ occ_operations = [{
+ :operator => 'ADD',
+ :operand => feed
+ }]
+
+ occ_response = occ_feed_srv.mutate(occ_operations)
+
+ if occ_response[:value]
+ occ_response[:value].each do |occ_feed|
+ puts 'Uploaded offline call conversion value "%s" for caller ID "%s"' %
+ [occ_feed[:conversion_name], occ_feed[:caller_id]]
+ end
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ caller_id = 'INSERT_CALLER_ID_HERE'
+ # For times, use the format yyyyMMdd HHmmss tz. For more details on
+ # formats, see:
+ # https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats
+ # For time zones, see:
+ # https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids
+ call_start_time = 'INSERT_CALL_START_TIME_HERE'
+ conversion_name = 'INSERT_CONVERSION_NAME_HERE'
+ conversion_time = 'INSERT_CONVERSION_TIME_HERE'
+ conversion_value = 'INSERT_CONVERSION_VALUE_HERE'
+
+ upload_offline_call_conversions(
+ caller_id,
+ call_start_time,
+ conversion_name,
+ conversion_time,
+ conversion_value
+ )
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/upload_offline_conversions.rb b/adwords_api/examples/v201809/remarketing/upload_offline_conversions.rb
new file mode 100755
index 000000000..1c447ab91
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/upload_offline_conversions.rb
@@ -0,0 +1,108 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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 imports offline conversion values for specific clicks to
+# your account. To get Google Click ID for a click, run
+# CLICK_PERFORMANCE_REPORT. To set up a conversion tracker, run the
+# add_conversion_trackers.rb example.
+
+require 'adwords_api'
+require 'date'
+
+def upload_offline_conversions(conversion_name, google_click_id,
+ conversion_time, conversion_value)
+ # 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')
+
+ conversion_feed_srv =
+ adwords.service(:OfflineConversionFeedService, API_VERSION)
+
+ # Associate offline conversions with the existing named conversion tracker. If
+ # this tracker was newly created, it may be a few hours before it can accept
+ # conversions.
+ feed = {
+ :conversion_name => conversion_name,
+ :google_click_id => google_click_id,
+ :conversion_time => conversion_time,
+ :conversion_value => conversion_value
+ }
+
+ # Optional: To upload fractional conversion credits, set the external
+ # attribution model and credit. To use this feature, your conversion tracker
+ # should be marked as externally attributed. See
+ # https://developers.google.com/adwords/api/docs/guides/conversion-tracking#importing_externally_attributed_conversions
+ # to learn more about importing externally attributed conversions.
+ #
+ # feed[:external_attribution_model] = "Linear"
+ # feed[:external_attribution_credit] = 0.3
+
+ return_feeds = conversion_feed_srv.mutate([
+ {:operator => 'ADD', :operand => feed}])
+ return_feeds[:value].each do |return_feed|
+ puts ("Uploaded offline conversion value %.2f for Google Click ID '%s', " +
+ 'to %s') % [return_feed[:conversion_value],
+ return_feed[:google_click_id],
+ return_feed[:conversion_name]]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # Name of the conversion tracker to upload to.
+ conversion_name = 'INSERT_CONVERSION_NAME_HERE'
+ # Google Click ID of the click for which offline conversions are uploaded.
+ google_click_id = 'INSERT_GOOGLE_CLICK_ID_HERE'
+ # Conversion time in 'yyyymmdd hhmmss' format.
+ conversion_time = Time.new.strftime("%Y%m%d %H%M%S")
+ # Conversion value to be uploaded.
+ conversion_value = 'INSERT_CONVERSION_VALUE_HERE'.to_f
+
+ upload_offline_conversions(conversion_name, google_click_id,
+ conversion_time, conversion_value)
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/remarketing/upload_offline_data.rb b/adwords_api/examples/v201809/remarketing/upload_offline_data.rb
new file mode 100755
index 000000000..772b724ff
--- /dev/null
+++ b/adwords_api/examples/v201809/remarketing/upload_offline_data.rb
@@ -0,0 +1,252 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2017, 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 shows how to upload offline data for store sales
+# transactions.
+
+require 'adwords_api'
+require 'digest'
+require 'date'
+
+def upload_offline_data(conversion_name, external_upload_id,
+ store_sales_upload_common_metadata_type, email_addresses,
+ advertiser_upload_time, bridge_map_version_id, partner_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')
+
+ unless email_addresses.size == 2
+ raise ArgumentError, ('%d email addresses specified. Please specify ' +
+ 'exactly 2 email addresses.') % email_addresses.size
+ end
+
+ # Set partial failure to true since this example demonstrates how to handle
+ # partial failure errors.
+ adwords.partial_failure = true
+ offline_data_upload_srv = adwords.service(
+ :OfflineDataUploadService, API_VERSION)
+
+ offline_data_list = []
+
+ # Create the first offline data for upload.
+ # This transaction occurred 7 days ago with amount of 200 USD.
+ transaction_time_1 = DateTime.parse((Date.today - 7).to_s)
+ transaction_amount_1 = 200_000_000
+ user_identifiers_1 = [
+ create_user_identifier('HASHED_EMAIL', email_addresses[0]),
+ create_user_identifier('STATE', 'New York')
+ ]
+
+ offline_data_list << create_offline_data(transaction_time_1,
+ transaction_amount_1, 'USD', conversion_name, user_identifiers_1)
+
+ # Create the second offline data for upload.
+ # This transaction occurred 14 days ago with amount of 450 EUR.
+ transaction_time_2 = DateTime.parse((Date.today - 14).to_s)
+ transaction_amount_2 = 450_000_000
+ user_identifiers_2 = [
+ create_user_identifier('HASHED_EMAIL', email_addresses[1]),
+ create_user_identifier('STATE', 'California')
+ ]
+
+ offline_data_list << create_offline_data(transaction_time_2,
+ transaction_amount_2, 'EUR', conversion_name, user_identifiers_2)
+
+ # Set the type and metadata of this upload.
+ upload_metadata = {
+ :xsi_type => store_sales_upload_common_metadata_type,
+ :loyalty_rate => 1.0,
+ :transaction_upload_rate => 1.0
+ }
+
+ upload_type = 'STORE_SALES_UPLOAD_FIRST_PARTY'
+ if store_sales_upload_common_metadata_type == METADATA_TYPE_3P
+ upload_type = 'STORE_SALES_UPLOAD_THIRD_PARTY'
+ upload_metadata[:advertiser_upload_time] = advertiser_upload_time
+ upload_metadata[:valid_transaction_rate] = 1.0
+ upload_metadata[:partner_match_rate] = 1.0
+ upload_metadata[:partner_upload_rate] = 1.0
+ upload_metadata[:bridge_map_version_id] = bridge_map_version_id
+ upload_metadata[:partner_id] = partner_id
+ end
+
+ # Create offline data upload object.
+ offline_data_upload = {
+ :external_upload_id => external_upload_id,
+ :offline_data_list => offline_data_list,
+ :upload_type => upload_type,
+ :upload_metadata => upload_metadata
+ }
+
+ # Create an offline data upload operation.
+ data_upload_operation = {
+ :operator => 'ADD',
+ :operand => offline_data_upload
+ }
+
+ # Upload offline data on the server and print some information.
+ operations = [data_upload_operation]
+ return_value = offline_data_upload_srv.mutate(operations)
+ offline_data_upload = return_value[:value].first
+ puts ('Uploaded offline data with external upload ID %d, and upload ' +
+ 'status %s') % [offline_data_upload[:external_upload_id],
+ offline_data_upload[:upload_status]]
+
+ # Print any partial data errors from the response.
+ unless return_value[:partial_failure_errors].nil?
+ return_value[:partial_failure_errors].each do |api_error|
+ # Get the index of the failed operation from the error's field path
+ # elements.
+ operation_index = get_field_path_element_index(api_error, 'operations')
+ unless operation_index.nil?
+ failed_offline_data_upload = operations[operation_index][:operand]
+ # Get the index of the entry in the offline data list from the error's
+ # field path elements.
+ offline_data_list_index = get_field_path_element_index(api_error,
+ 'offlineDataList')
+ puts ("Offline data list entry %d in operation %d with external " +
+ "upload ID %d and type '%s' has triggered failure for the " +
+ " following reason: '%s'") %
+ [offline_data_list_index, operation_index,
+ failed_offline_data_upload[:external_upload_id],
+ failed_offline_data_upload[:upload_type], api_error[:error_string]]
+ else
+ puts "A failure has occurred for the following reason: '%s'" %
+ apiError[:error_string]
+ end
+ end
+ end
+end
+
+def get_field_path_element_index(api_error, field)
+ field_path_elements = api_error[:field_path_elements]
+ return nil if field_path_elements.nil?
+ field_path_elements.each_with_index do |field_path_element, i|
+ if field == field_path_element[:field]
+ return field_path_element[:index]
+ end
+ end
+ return nil
+end
+
+def create_offline_data(transaction_time, transaction_micro_amount,
+ transaction_currency, conversion_name, user_identifiers)
+ store_sales_transaction = {
+ :xsi_type => 'StoreSalesTransaction',
+ # For times, use the format yyyyMMdd HHmmss [tz].
+ # For details, see
+ # https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats
+ :transaction_time => transaction_time.strftime('%Y%m%d %H%M%S'),
+ :conversion_name => conversion_name,
+ :user_identifiers => user_identifiers,
+ :transaction_amount => {
+ :money => {
+ :micro_amount => transaction_micro_amount
+ },
+ :currency_code => transaction_currency
+ }
+ }
+ return store_sales_transaction
+end
+
+def create_user_identifier(identifier_type, value)
+ # If the user identifier type is a hashed type, also call the hash function
+ # on the value.
+ if HASHED_IDENTIFIER_TYPES.include?(identifier_type)
+ value = hash_string(value)
+ end
+ user_identifier = {
+ :user_identifier_type => identifier_type,
+ :value => value
+ }
+ return user_identifier
+end
+
+def hash_string(text)
+ sha_digest = Digest::SHA256.new
+ sha_digest.hexdigest(normalize_text(text))
+end
+
+def normalize_text(text)
+ text.strip.downcase
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ HASHED_IDENTIFIER_TYPES = [
+ 'HASHED_EMAIL',
+ 'HASHED_FIRST_NAME',
+ 'HASHED_LAST_NAME',
+ 'HASHED_PHONE'
+ ]
+
+ # Store sales upload common metadata types
+ METADATA_TYPE_1P = 'FirstPartyUploadMetadata'
+ METADATA_TYPE_3P = 'ThirdPartyUploadMetadata'
+
+ begin
+ conversion_name = 'INSERT_CONVERSION_NAME_HERE'
+ external_upload_id = 'INSERT_EXTERNAL_UPLOAD_ID_HERE'.to_i
+ email_addresses = ['INSERT_EMAIL_ADDRESS_HERE', 'INSERT_EMAIL_ADDRESS_HERE']
+
+ # Set the below constant to METADATA_TYPE_3P if uploading third-party data.
+ store_sales_upload_common_metadata_type = METADATA_TYPE_1P
+
+ # The three constants below are needed when uploading third-party data. They
+ # are not used when uploading first-party data.
+ # Advertiser upload time to partner.
+ # For times, use the format yyyyMMdd HHmmss tz. For more details on formats,
+ # see:
+ # https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids
+ advertiser_upload_time = 'INSERT_ADVERTISER_UPLOAD_TIME_HERE'
+ bridge_map_version_id = 'INSERT_BRIDGE_MAP_VERSION_ID_HERE'
+ partner_id = 'INSERT_PARTNER_ID_HERE'.to_i
+
+ upload_offline_data(conversion_name, external_upload_id,
+ store_sales_upload_common_metadata_type, email_addresses,
+ advertiser_upload_time, bridge_map_version_id, partner_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 " +
+ 'https://github.com/googleads/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/v201809/reporting/download_criteria_report_with_awql.rb b/adwords_api/examples/v201809/reporting/download_criteria_report_with_awql.rb
new file mode 100755
index 000000000..2c03601da
--- /dev/null
+++ b/adwords_api/examples/v201809/reporting/download_criteria_report_with_awql.rb
@@ -0,0 +1,97 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+ 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')
+
+ # Define report definition. You can also pass your own XML text as a string.
+ report_query_builder = adwords.report_query_builder do |b|
+ b.select(*%w[CampaignId AdGroupId Id Criteria CriteriaType Impressions
+ Clicks Cost])
+ b.from('CRITERIA_PERFORMANCE_REPORT')
+ b.where('Status').in('ENABLED', 'PAUSED')
+ # You could use the during_date_range method to specify ranges such as
+ # 'LAST_7_DAYS', but you can't specify both.
+ b.during(start_date, end_date)
+ end
+ report_query = report_query_builder.build.to_s
+
+ # Optional: Set the configuration of the API instance to suppress header,
+ # column name, or summary rows in the report output. You can also configure
+ # this in your adwords_api.yml configuration file.
+ adwords.skip_report_header = false
+ adwords.skip_column_header = false
+ adwords.skip_report_summary = false
+ # Enable to allow rows with zero impressions to show.
+ adwords.include_zero_impressions = true
+
+ # 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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/reporting/download_criteria_report_with_selector.rb b/adwords_api/examples/v201809/reporting/download_criteria_report_with_selector.rb
new file mode 100755
index 000000000..d486cf61f
--- /dev/null
+++ b/adwords_api/examples/v201809/reporting/download_criteria_report_with_selector.rb
@@ -0,0 +1,92 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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_with_selector(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',
+ 'FinalUrls', 'Impressions', 'Clicks', 'Cost'],
+ # Predicates are optional.
+ :predicates => {
+ :field => 'Status',
+ :operator => 'IN',
+ :values => ['ENABLED', 'PAUSED']
+ }
+ },
+ :report_name => 'Last 7 days CRITERIA_PERFORMANCE_REPORT',
+ :report_type => 'CRITERIA_PERFORMANCE_REPORT',
+ :download_format => 'CSV',
+ :date_range_type => 'LAST_7_DAYS',
+ }
+
+ # Optional: Set the configuration of the API instance to suppress header,
+ # column name, or summary rows in the report output. You can also configure
+ # this in your adwords_api.yml configuration file.
+ adwords.skip_report_header = false
+ adwords.skip_column_header = false
+ adwords.skip_report_summary = false
+ # Enable to allow rows with zero impressions to show.
+ adwords.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 = :v201809
+
+ begin
+ # File name to write report to.
+ file_name = 'INSERT_OUTPUT_FILE_NAME_HERE'
+ download_criteria_report_with_selector(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 " +
+ 'https://github.com/googleads/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/v201809/reporting/get_report_fields.rb b/adwords_api/examples/v201809/reporting/get_report_fields.rb
new file mode 100755
index 000000000..e836707bb
--- /dev/null
+++ b/adwords_api/examples/v201809/reporting/get_report_fields.rb
@@ -0,0 +1,75 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/reporting/parallel_report_download.rb b/adwords_api/examples/v201809/reporting/parallel_report_download.rb
new file mode 100755
index 000000000..f3183f979
--- /dev/null
+++ b/adwords_api/examples/v201809/reporting/parallel_report_download.rb
@@ -0,0 +1,164 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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. This example
+# needs to be run against an AdWords manager account.
+
+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']}
+
+ graph = 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', 'AdGroupId', 'Impressions', 'Clicks', 'Cost'],
+ # Predicates are optional.
+ :predicates => {
+ :field => 'AdGroupStatus',
+ :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'
+ }
+
+ 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 = :v201809
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/reporting/stream_criteria_report_results.rb b/adwords_api/examples/v201809/reporting/stream_criteria_report_results.rb
new file mode 100755
index 000000000..d6d1205d7
--- /dev/null
+++ b/adwords_api/examples/v201809/reporting/stream_criteria_report_results.rb
@@ -0,0 +1,100 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2015, 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 streams the results of an Ad Hoc report to a file.
+
+require 'adwords_api'
+
+def stream_criteria_report_results()
+ # 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 query.
+ report_query_builder = adwords.report_query_builder do |b|
+ b.select('Id', 'AdNetworkType1', 'Impressions')
+ b.from('CRITERIA_PERFORMANCE_REPORT')
+ b.where('Status').in('ENABLED', 'PAUSED')
+ b.during_date_range('LAST_7_DAYS')
+ end
+ report_query = report_query_builder.build.to_s
+
+ # Optional: Set the configuration of the API instance to suppress header,
+ # column name, or summary rows in the report output. You can also configure
+ # this in your adwords_api.yml configuration file.
+ adwords.skip_report_header = true
+ adwords.skip_column_header = true
+ adwords.skip_report_summary = true
+ # Enable to allow rows with zero impressions to show.
+ adwords.include_zero_impressions = false
+
+ # Set the default value of the hash to 0 to allow easy totaling.
+ ad_network_map = Hash.new(0)
+
+ # We use get_stream_helper_with_awql.each_line here, which uses the
+ # ReportStream utility to handle breaking the streamed results into lines
+ # for easy processing. If you'd rather handle processing yourself, you can
+ # use download_report_as_stream_with_awql, which just passes data to the
+ # block as it's downloaded, without breaking it up into meaningful chunks.
+ report_utils.get_stream_helper_with_awql(
+ report_query, 'CSV').each_line do |line|
+ process_line(line, ad_network_map)
+ end
+
+ puts 'Total impressions by ad network type 1:'
+ ad_network_map.each do |ad_network_type, total_impressions|
+ puts ' %s: %s' % [ad_network_type, total_impressions]
+ end
+end
+
+def process_line(line, ad_network_map)
+ id, ad_network_type_1, impressions = line.split(',')
+ ad_network_map[ad_network_type_1] += impressions.to_i
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ # File name to write report to.
+ stream_criteria_report_results()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/shopping_campaigns/add_product_partition_tree.rb b/adwords_api/examples/v201809/shopping_campaigns/add_product_partition_tree.rb
new file mode 100755
index 000000000..5be021d09
--- /dev/null
+++ b/adwords_api/examples/v201809/shopping_campaigns/add_product_partition_tree.rb
@@ -0,0 +1,267 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 ProductPartition tree.
+
+require 'adwords_api'
+
+class ProductPartitionHelper
+ attr_reader :operations
+
+ def initialize(ad_group_id)
+ # The next temporary criterion ID to be used.
+ #
+ # When creating our tree we need to specify the parent-child relationships
+ # between nodes. However, until a criterion has been created on the server
+ # we do not have a criterionId with which to refer to it.
+ #
+ # Instead we can specify temporary IDs that are specific to a single mutate
+ # request. Once the criteria have been created they are assigned an ID as
+ # normal and the temporary ID will no longer refer to it.
+ #
+ # A valid temporary ID is any negative integer.
+ @next_id = -1
+
+ # The set of mutate operations needed to create the current tree.
+ @operations = []
+
+ # The ID of the AdGroup that we wish to attach the partition tree to.
+ @ad_group_id = ad_group_id
+ end
+
+ def create_subdivision(parent = nil, value = nil)
+ division = {
+ :xsi_type => 'ProductPartition',
+ :partition_type => 'SUBDIVISION',
+ :id => @next_id
+ }
+
+ @next_id -= 1
+
+ unless parent.nil? || value.nil?
+ division[:parent_criterion_id] = parent[:id]
+ division[:case_value] = value
+ end
+
+ ad_group_criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :ad_group_id => @ad_group_id,
+ :criterion => division
+ }
+
+ create_add_operation(ad_group_criterion)
+
+ return division
+ end
+
+ def create_unit(parent = nil, value = nil, bid_amount = nil)
+ unit = {
+ :xsi_type => 'ProductPartition',
+ :partition_type => 'UNIT'
+ }
+
+ unless parent.nil? || value.nil?
+ unit[:parent_criterion_id] = parent[:id]
+ unit[:case_value] = value
+ end
+
+ ad_group_criterion = {}
+ if bid_amount && bid_amount > 0
+ bidding_strategy_configuration = {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {
+ :xsi_type => 'Money',
+ :micro_amount => bid_amount
+ }
+ }]
+ }
+ ad_group_criterion[:xsi_type] = 'BiddableAdGroupCriterion'
+ ad_group_criterion[:bidding_strategy_configuration] =
+ bidding_strategy_configuration
+ else
+ ad_group_criterion[:xsi_type] = 'NegativeAdGroupCriterion'
+ end
+ ad_group_criterion[:ad_group_id] = @ad_group_id
+ ad_group_criterion[:criterion] = unit
+
+ create_add_operation(ad_group_criterion)
+
+ return unit
+ end
+
+ private
+
+ def create_add_operation(ad_group_criterion)
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_criterion
+ }
+
+ @operations << operation
+ end
+end
+
+def display_tree(node, children, level = 0)
+ value = ''
+ type = ''
+
+ if node[:case_value]
+ type = node[:case_value][:product_dimension_type]
+
+ value = case type
+ when 'ProductCanonicalCondition'
+ node[:case_value][:condition]
+ when 'ProductBiddingCategory'
+ "%s(%s)" % [node[:case_value][:type], node[:case_value][:value]]
+ else
+ node[:case_value][:value]
+ end
+ end
+
+ puts "%sid: %s, type: %s, value: %s" %
+ [' ' * level, node[:id], type, value]
+
+ children[node[:id]].each do |child_node|
+ display_tree(child_node, children, level + 1)
+ end
+end
+
+def add_product_partition_tree(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)
+
+ helper = ProductPartitionHelper.new(ad_group_id)
+
+ root = helper.create_subdivision()
+
+ new_product_canonical_condition = {
+ :xsi_type => 'ProductCanonicalCondition',
+ :condition => 'NEW'
+ }
+
+ used_product_canonical_condition = {
+ :xsi_type => 'ProductCanonicalCondition',
+ :condition => 'USED'
+ }
+
+ other_product_canonical_condition = {
+ :xsi_type => 'ProductCanonicalCondition'
+ }
+
+ helper.create_unit(root, new_product_canonical_condition, 200000)
+ helper.create_unit(root, used_product_canonical_condition, 100000)
+ other_condition =
+ helper.create_subdivision(root, other_product_canonical_condition)
+
+ cool_product_brand = {
+ :xsi_type => 'ProductBrand',
+ :value => 'CoolBrand'
+ }
+
+ cheap_product_brand = {
+ :xsi_type => 'ProductBrand',
+ :value => 'CheapBrand'
+ }
+
+ other_product_brand = {
+ :xsi_type => 'ProductBrand'
+ }
+
+ helper.create_unit(other_condition, cool_product_brand, 900000)
+ helper.create_unit(other_condition, cheap_product_brand, 10000)
+ other_brand = helper.create_subdivision(other_condition, other_product_brand)
+
+ # The value for the bidding category is a fixed ID for the 'Luggage & Bags'
+ # category. You can retrieve IDs for categories from the ConstantDataService.
+ # See the get_product_taxonomy example for more details.
+ luggage_category = {
+ :xsi_type => 'ProductBiddingCategory',
+ :type => 'BIDDING_CATEGORY_L1',
+ :value => '-5914235892932915235'
+ }
+
+ generic_category = {
+ :xsi_type => 'ProductBiddingCategory',
+ :type => 'BIDDING_CATEGORY_L1'
+ }
+
+ helper.create_unit(other_brand, luggage_category, 750000)
+ helper.create_unit(other_brand, generic_category, 110000)
+
+ # Make the mutate request.
+ result = ad_group_criterion_srv.mutate(helper.operations)
+
+ children = {}
+ root_node = nil
+ # For each criterion, make an array containing each of its children.
+ # We always create the parent before the child, so we can rely on that here.
+ result[:value].each do |criterion|
+ children[criterion[:criterion][:id]] = []
+
+ if criterion[:criterion][:parent_criterion_id]
+ children[criterion[:criterion][:parent_criterion_id]] <<
+ criterion[:criterion]
+ else
+ root_node = criterion[:criterion]
+ end
+ end
+
+ display_tree(root_node, children)
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ ad_group_id = 'INSERT_AD_GROUP_ID_HERE'.to_i
+
+ add_product_partition_tree(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 " +
+ 'https://github.com/googleads/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/v201809/shopping_campaigns/add_product_scope.rb b/adwords_api/examples/v201809/shopping_campaigns/add_product_scope.rb
new file mode 100755
index 000000000..5da40dc7b
--- /dev/null
+++ b/adwords_api/examples/v201809/shopping_campaigns/add_product_scope.rb
@@ -0,0 +1,130 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 restricts the products that will be included in the campaign by
+# setting a ProductScope.
+
+require 'adwords_api'
+
+def add_product_scope(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)
+
+ product_scope = {
+ # This set of dimensions is for demonstration purposes only. It is
+ # extremely unlikely that you want to include so many dimensions in your
+ # product scope.
+ :xsi_type => 'ProductScope',
+ :dimensions => [
+ {
+ :xsi_type => 'ProductBrand',
+ :value => 'Nexus'
+ },
+ {
+ :xsi_type => 'ProductCanonicalCondition',
+ :condition => 'NEW'
+ },
+ {
+ :xsi_type => 'ProductCustomAttribute',
+ :type => 'CUSTOM_ATTRIBUTE_0',
+ :value => 'my attribute value'
+ },
+ {
+ :xsi_type => 'ProductOfferId',
+ :value => 'book1'
+ },
+ {
+ :xsi_type => 'ProductType',
+ :type => 'PRODUCT_TYPE_L1',
+ :value => 'Media'
+ },
+ {
+ :xsi_type => 'ProductType',
+ :type => 'PRODUCT_TYPE_L2',
+ :value => 'Books'
+ },
+ # The value for the bidding category is a fixed ID for the
+ # 'Luggage & Bags' category. You can retrieve IDs for categories from
+ # the ConstantDataService. See the 'get_product_category_taxonomy'
+ # example for more details.
+ {
+ :xsi_type => 'ProductBiddingCategory',
+ :type => 'BIDDING_CATEGORY_L1',
+ :value => '-5914235892932915235',
+ }
+ ]
+ }
+
+ campaign_criterion = {
+ :campaign_id => campaign_id,
+ :criterion => product_scope
+ }
+
+ campaign_criterion_operation = {
+ :operator => 'ADD',
+ :operand => campaign_criterion
+ }
+
+ # Make the mutate request.
+ result = campaign_criterion_srv.mutate([campaign_criterion_operation])
+
+ campaign_criterion = result[:value].first
+ puts "Created a ProductScope criterion with ID %d." %
+ [campaign_criterion[:criterion][:id]]
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'.to_i
+
+ add_product_scope(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 " +
+ 'https://github.com/googleads/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/v201809/shopping_campaigns/add_shopping_campaign.rb b/adwords_api/examples/v201809/shopping_campaigns/add_shopping_campaign.rb
new file mode 100755
index 000000000..20e0be68e
--- /dev/null
+++ b/adwords_api/examples/v201809/shopping_campaigns/add_shopping_campaign.rb
@@ -0,0 +1,174 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 Shopping campaign.
+
+require 'adwords_api'
+require 'date'
+
+def add_shopping_campaign(budget_id, merchant_id, create_default_partition)
+ # 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)
+ ad_group_srv = adwords.service(:AdGroupService, API_VERSION)
+ ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ # Create campaign.
+ campaign = {
+ :name => "Shopping campaign #%d" % (Time.new.to_f * 1000).to_i,
+ # The advertising_channel_type is what makes this a Shopping campaign.
+ :advertising_channel_type => 'SHOPPING',
+ # Recommendation: Set the campaign to PAUSED when creating it to stop the
+ # ads from immediately serving. Set to ENABLED once you've added
+ # targeting and the ads are ready to serve.
+ :status => 'PAUSED',
+ :budget => {:budget_id => budget_id},
+ :bidding_strategy_configuration => {
+ :bidding_strategy_type => 'MANUAL_CPC'
+ },
+ :settings => [
+ {
+ :xsi_type => 'ShoppingSetting',
+ :sales_country => 'US',
+ :campaign_priority => 0,
+ :merchant_id => merchant_id,
+ # Set to "true" to enable Local Inventory Ads in your campaign.
+ :enable_local => true
+ }
+ ]
+ }
+ campaign_operation = {:operator => 'ADD', :operand => campaign}
+
+ # Make the mutate request.
+ result = campaign_srv.mutate([campaign_operation])
+
+ # Print the result.
+ campaign = result[:value].first
+ puts "Campaign with name '%s' and ID %d was added." %
+ [campaign[:name], campaign[:id]]
+
+ # Create ad group.
+ ad_group = {
+ :campaign_id => campaign[:id],
+ :name => 'Ad Group #%d' % (Time.new.to_f * 1000).to_i
+ }
+ ad_group_operation = {:operator => 'ADD', :operand => ad_group}
+
+ # Make the mutate request.
+ result = ad_group_srv.mutate([ad_group_operation])
+
+ # Print the result.
+ ad_group = result[:value].first
+ puts "Ad group with name '%s' and ID %d was added." %
+ [ad_group[:name], ad_group[:id]]
+
+ # Create product ad.
+ ad_group_ad = {
+ :ad_group_id => ad_group[:id],
+ :ad => {:xsi_type => 'ProductAd'}
+ }
+ ad_group_operation = {:operator => 'ADD', :operand => ad_group_ad}
+
+ # Make the mutate request.
+ result = ad_group_ad_srv.mutate([ad_group_operation])
+
+ # Print the result.
+ ad_group_ad = result[:value].first
+ puts "Product ad with ID %d was added." % [ad_group_ad[:id]]
+
+ if create_default_partition
+ ad_group_criterion_srv =
+ adwords.service(:AdGroupCriterionService, API_VERSION)
+
+ product_partition = {
+ :partition_type => 'UNIT',
+ # Make sure that caseValue and parentCriterionId are nil. This
+ # makes this partition as generic as possible to use as a fallback
+ # when others don't match.
+ :case_value => nil,
+ :parent_criterion_id => nil
+ }
+
+ ad_group_criterion = {
+ :ad_group_id => ad_group[:id],
+ :criterion => product_partition,
+ :bidding_strategy_configuration => {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {:micro_amount => 500_000}
+ }]
+ }
+ }
+
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_criterion
+ }
+
+ result = ad_group_criterion_srv.mutate([operation])
+
+ ad_group_criterion = result[:value].first
+ puts "Ad group criterion with ID %d in ad group with ID %d was added." %
+ [ad_group_criterion[:criterion][:id], ad_group_criterion[:ad_group_id]]
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ budget_id = 'INSERT_BUDGET_ID_HERE'.to_i
+ merchant_id = 'INSERT_MERCHANT_ID_HERE'.to_i
+
+ # If set to true, a default partition will be created. If running the
+ # add_product_partition_tree.rb example right after this example, make
+ # sure this stays set to false.
+ create_default_partition = false
+
+ add_shopping_campaign(budget_id, merchant_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 " +
+ 'https://github.com/googleads/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/v201809/shopping_campaigns/add_shopping_campaign_for_showcase_ads.rb b/adwords_api/examples/v201809/shopping_campaigns/add_shopping_campaign_for_showcase_ads.rb
new file mode 100755
index 000000000..bc43f4713
--- /dev/null
+++ b/adwords_api/examples/v201809/shopping_campaigns/add_shopping_campaign_for_showcase_ads.rb
@@ -0,0 +1,316 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2017, 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 Shopping campaign for Showcase ads.
+
+require 'adwords_api'
+require 'date'
+require 'base64'
+
+def add_shopping_campaign_for_showcase_ads(budget_id, merchant_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 = create_campaign(adwords, budget_id, merchant_id)
+ puts "Campaign with name '%s' and ID %d was added." %
+ [campaign[:name], campaign[:id]]
+
+ ad_group = create_ad_group(adwords, campaign)
+ puts "Ad group with name '%s' and ID %d was added." %
+ [ad_group[:name], ad_group[:id]]
+
+ ad_group_ad = create_showcase_ad(adwords, ad_group)
+ puts "Showcase ad with ID %d was added." % ad_group_ad[:ad][:id]
+
+ ad_group_criterion = create_product_partitions(adwords, ad_group[:id])
+ puts "Product partition tree with %d nodes was added." %
+ ad_group_criterion.length
+end
+
+def create_campaign(adwords, budget_id, merchant_id)
+ campaign_srv = adwords.service(:CampaignService, API_VERSION)
+
+ campaign = {
+ :name => 'Shopping campaign #%d' % (Time.new.to_f * 1000).to_i,
+ # The advertising_channel_type is what makes this a Shopping campaign.
+ :advertising_channel_type => 'SHOPPING',
+ # Recommendation: Set the campaign to PAUSED when creating it to stop the
+ # ads from immediately serving. Set to ENABLED once you've added
+ # targeting and the ads are ready to serve.
+ :status => 'PAUSED',
+ :budget => {:budget_id => budget_id},
+ :bidding_strategy_configuration => {
+ :bidding_strategy_type => 'MANUAL_CPC'
+ },
+ :settings => [
+ {
+ :xsi_type => 'ShoppingSetting',
+ :sales_country => 'US',
+ :campaign_priority => 0,
+ :merchant_id => merchant_id,
+ # Set to "true" to enable Local Inventory Ads in your campaign.
+ :enable_local => true
+ }
+ ]
+ }
+ campaign_operation = {:operator => 'ADD', :operand => campaign}
+
+ # Make the mutate request.
+ result = campaign_srv.mutate([campaign_operation])
+ campaign = result[:value].first
+ return campaign
+end
+
+def create_ad_group(adwords, campaign)
+ ad_group_srv = adwords.service(:AdGroupService, API_VERSION)
+
+ ad_group = {
+ :campaign_id => campaign[:id],
+ :name => 'Ad Group #%d' % (Time.new.to_f * 1000).to_i,
+ # Required: Set the ad group type to SHOPPING_SHOWCASE_ADS.
+ :ad_group_type => 'SHOPPING_SHOWCASE_ADS',
+ # Required: Set the ad group's bidding strategy configuration.
+ # Note: Showcase ads require that the campaign has a ManualCpc
+ # BiddingStrategyConfiguration.
+ :bidding_strategy_configuration => {
+ :bids => [
+ :xsi_type => 'CpcBid',
+ :bid => {:micro_amount => 1000000}
+ ]
+ }
+ }
+
+ ad_group_operation = {:operator => 'ADD', :operand => ad_group}
+
+ # Make the mutate request.
+ result = ad_group_srv.mutate([ad_group_operation])
+ ad_group = result[:value].first
+ return ad_group
+end
+
+def create_showcase_ad(adwords, ad_group)
+ ad_group_ad_srv = adwords.service(:AdGroupAdService, API_VERSION)
+
+ ad_group_ad = {
+ :ad_group_id => ad_group[:id],
+ :ad => {
+ :xsi_type => 'ShowcaseAd',
+ :name => 'Showcase ad #%d' % (Time.new.to_f * 1000).to_i,
+ :final_urls => ['http://example.com/showcase'],
+ :display_url => 'example.com',
+ # Required: Set the ad's expanded image.
+ :expanded_image => {
+ :media_id => upload_image(adwords, 'https://goo.gl/IfVlpF')
+ },
+ # Optional: Set the collapsed image.
+ :collapsed_image => {
+ :media_id => upload_image(adwords, 'https://goo.gl/NqTxAE')
+ }
+ }
+ }
+
+ ad_group_operation = {:operator => 'ADD', :operand => ad_group_ad}
+
+ # Make the mutate request.
+ result = ad_group_ad_srv.mutate([ad_group_operation])
+ ad_group_ad = result[:value].first
+ return ad_group_ad
+end
+
+def upload_image(adwords, image_url)
+ media_srv = adwords.service(:MediaService, API_VERSION)
+
+ raw_image_data = AdsCommon::Http.get(image_url, adwords.config)
+ image = {
+ :xsi_type => 'Image',
+ :data => Base64.encode64(raw_image_data),
+ :type => 'IMAGE'
+ }
+
+ # Upload the image.
+ response = media_srv.upload([image])
+ image = response.first
+ return image[:media_id]
+end
+
+def create_product_partitions(adwords, ad_group_id)
+ ad_group_criterion_srv = adwords.service(:AdGroupCriterionService,
+ API_VERSION)
+
+ helper = ProductPartitionHelper.new(ad_group_id)
+
+ root = helper.create_subdivision()
+
+ new_product_canonical_condition = {
+ :xsi_type => 'ProductCanonicalCondition',
+ :condition => 'NEW'
+ }
+
+ used_product_canonical_condition = {
+ :xsi_type => 'ProductCanonicalCondition',
+ :condition => 'USED'
+ }
+
+ other_product_canonical_condition = {
+ :xsi_type => 'ProductCanonicalCondition'
+ }
+
+ helper.create_unit(root, new_product_canonical_condition)
+ helper.create_unit(root, used_product_canonical_condition)
+ helper.create_unit(root, other_product_canonical_condition)
+
+ result = ad_group_criterion_srv.mutate(helper.operations)
+ ad_group_criterion = result[:value]
+ return ad_group_criterion
+end
+
+class ProductPartitionHelper
+ attr_reader :operations
+
+ def initialize(ad_group_id)
+ # The next temporary criterion ID to be used.
+ #
+ # When creating our tree we need to specify the parent-child relationships
+ # between nodes. However, until a criterion has been created on the server
+ # we do not have a criterionId with which to refer to it.
+ #
+ # Instead we can specify temporary IDs that are specific to a single mutate
+ # request. Once the criteria have been created they are assigned an ID as
+ # normal and the temporary ID will no longer refer to it.
+ #
+ # A valid temporary ID is any negative integer.
+ @next_id = -1
+
+ # The set of mutate operations needed to create the current tree.
+ @operations = []
+
+ # The ID of the AdGroup that we wish to attach the partition tree to.
+ @ad_group_id = ad_group_id
+ end
+
+ def create_subdivision(parent = nil, value = nil)
+ division = {
+ :xsi_type => 'ProductPartition',
+ :partition_type => 'SUBDIVISION',
+ :id => @next_id
+ }
+
+ @next_id -= 1
+
+ unless parent.nil? || value.nil?
+ division[:parent_criterion_id] = parent[:id]
+ division[:case_value] = value
+ end
+
+ ad_group_criterion = {
+ :xsi_type => 'BiddableAdGroupCriterion',
+ :ad_group_id => @ad_group_id,
+ :criterion => division
+ }
+
+ create_add_operation(ad_group_criterion)
+
+ return division
+ end
+
+ def create_unit(parent = nil, value = nil, bid_amount = nil)
+ unit = {
+ :xsi_type => 'ProductPartition',
+ :partition_type => 'UNIT'
+ }
+
+ unless parent.nil? || value.nil?
+ unit[:parent_criterion_id] = parent[:id]
+ unit[:case_value] = value
+ end
+
+ ad_group_criterion = {}
+ if bid_amount && bid_amount > 0
+ bidding_strategy_configuration = {
+ :bids => [{
+ :xsi_type => 'CpcBid',
+ :bid => {
+ :xsi_type => 'Money',
+ :micro_amount => bid_amount
+ }
+ }]
+ }
+ ad_group_criterion[:xsi_type] = 'BiddableAdGroupCriterion'
+ ad_group_criterion[:bidding_strategy_configuration] =
+ bidding_strategy_configuration
+ else
+ ad_group_criterion[:xsi_type] = 'NegativeAdGroupCriterion'
+ end
+ ad_group_criterion[:ad_group_id] = @ad_group_id
+ ad_group_criterion[:criterion] = unit
+
+ create_add_operation(ad_group_criterion)
+
+ return unit
+ end
+
+ private
+
+ def create_add_operation(ad_group_criterion)
+ operation = {
+ :operator => 'ADD',
+ :operand => ad_group_criterion
+ }
+
+ @operations << operation
+ end
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ budget_id = 'INSERT_BUDGET_ID_HERE'.to_i
+ merchant_id = 'INSERT_MERCHANT_ID_HERE'.to_i
+
+ add_shopping_campaign_for_showcase_ads(budget_id, merchant_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 " +
+ 'https://github.com/googleads/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/v201809/shopping_campaigns/get_product_category_taxonomy.rb b/adwords_api/examples/v201809/shopping_campaigns/get_product_category_taxonomy.rb
new file mode 100755
index 000000000..a4c0546b9
--- /dev/null
+++ b/adwords_api/examples/v201809/shopping_campaigns/get_product_category_taxonomy.rb
@@ -0,0 +1,115 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2014, 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 fetches the set of valid ProductBiddingCategories.
+
+require 'adwords_api'
+
+def display_categories(categories, prefix='')
+ categories.each do |category|
+ puts "%s%s [%s]" % [prefix, category[:name], category[:id]]
+ if category[:children]
+ display_categories(category[:children],
+ "%s%s > " % [prefix, category[:name]])
+ end
+ end
+end
+
+def get_product_category_taxonomy()
+ # 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)
+
+ selector = {
+ :predicates => [
+ {:field => 'Country', :operator => 'IN', :values => ['US']}
+ ]
+ }
+
+ result = constant_data_srv.get_product_bidding_category_data(selector)
+
+ bidding_categories = {}
+ root_categories = []
+
+ result.each do |product_bidding_category|
+ id = product_bidding_category[:dimension_value][:value]
+ parent_id = nil
+ name = product_bidding_category[:display_value].values.first()
+
+ if product_bidding_category[:parent_dimension_value]
+ parent_id = product_bidding_category[:parent_dimension_value][:value]
+ end
+
+ bidding_categories[id] ||= {}
+
+ category = bidding_categories[id]
+
+ if parent_id
+ bidding_categories[parent_id] ||= {}
+
+ parent = bidding_categories[parent_id]
+
+ parent[:children] ||= []
+ parent[:children] << category
+ else
+ root_categories << category
+ end
+
+ category[:id] = id
+ category[:name] = name
+ end
+
+ display_categories(root_categories)
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ get_product_category_taxonomy()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/targeting/add_campaign_targeting_criteria.rb b/adwords_api/examples/v201809/targeting/add_campaign_targeting_criteria.rb
new file mode 100755
index 000000000..0ddf96df5
--- /dev/null
+++ b/adwords_api/examples/v201809/targeting/add_campaign_targeting_criteria.rb
@@ -0,0 +1,146 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+require 'adwords_api'
+
+def add_campaign_targeting_criteria(campaign_id, location_feed_id = nil)
+ # 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
+ ]
+
+ # Distance targeting. Area of 10 miles around targets above.
+ unless location_feed_id.nil?
+ campaign_criteria << {
+ :xsi_type => 'LocationGroups',
+ :feed_id => location_feed_id,
+ :matching_function => {
+ :operator => 'IDENTITY',
+ :lhs_operand => [{
+ :xsi_type => 'LocationExtensionOperand',
+ :radius => {
+ :xsi_type => 'ConstantOperand',
+ :type => 'DOUBLE',
+ :unit => 'MILES',
+ :double_value => 10
+ }
+ }]
+ }
+ }
+ end
+
+ # 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 = :v201809
+
+ begin
+ campaign_id = 'INSERT_CAMPAIGN_ID_HERE'
+ # Replace the value below with the ID a feed that has been configured for
+ # location targeting, meaning it has an ENABLED FeedMapping with
+ # criterionType of 77. Feeds linked to a GMB account automatically
+ # have this FeedMapping.
+ # If you don't have such a feed, set this value to nil or delete
+ # the variable.
+ location_feed_id = 'INSERT_LOCATION_FEED_ID_HERE'
+ add_campaign_targeting_criteria(campaign_id, location_feed_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 " +
+ 'https://github.com/googleads/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/v201809/targeting/add_customer_negative_criteria.rb b/adwords_api/examples/v201809/targeting/add_customer_negative_criteria.rb
new file mode 100755
index 000000000..7c2e381dc
--- /dev/null
+++ b/adwords_api/examples/v201809/targeting/add_customer_negative_criteria.rb
@@ -0,0 +1,105 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# Copyright:: Copyright 2017, 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 negative criteria to a customer. These
+# criteria will be applied to all campaigns for the customer.
+
+require 'adwords_api'
+
+def add_customer_negative_criteria()
+ # 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')
+
+ customer_negative_criterion_srv = adwords.service(
+ :CustomerNegativeCriterionService, API_VERSION)
+
+ criteria = []
+
+ # Exclude tragedy & conflict content.
+ criteria << {
+ :xsi_type => 'ContentLabel',
+ :content_label_type => 'TRAGEDY'
+ }
+
+ # Exclude a specific placement.
+ criteria << {
+ :xsi_type => 'Placement',
+ :url => 'http://www.example.com'
+ }
+
+ # Additional criteria types are available for this service. See the types
+ # listed under Criterion here:
+ # https://developers.google.com/adwords/api/docs/reference/latest/CustomerNegativeCriterionService.Criterion
+
+ # Create operations to add each of the criteria above.
+ operations = criteria.map do |criterion|
+ {
+ :operator => 'ADD',
+ :operand => {
+ :criterion => criterion
+ }
+ }
+ end
+
+ # Send the request to add the criteria.
+ result = customer_negative_criterion_srv.mutate(operations)
+
+ # Display the results.
+ result[:value].each do |negative_criterion|
+ puts ("Customer negative criterion with criterion ID %d and type '%s' " +
+ "was added.") % [negative_criterion[:criterion][:id],
+ negative_criterion[:criterion][:criterion_type]]
+ end
+
+end
+
+if __FILE__ == $0
+ API_VERSION = :v201809
+
+ begin
+ add_customer_negative_criteria()
+
+ # 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 " +
+ 'https://github.com/googleads/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/v201809/targeting/add_demographic_targeting_criteria.rb b/adwords_api/examples/v201809/targeting/add_demographic_targeting_criteria.rb
new file mode 100755
index 000000000..0be9820ba
--- /dev/null
+++ b/adwords_api/examples/v201809/targeting/add_demographic_targeting_criteria.rb
@@ -0,0 +1,112 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/targeting/get_campaign_targeting_criteria.rb b/adwords_api/examples/v201809/targeting/get_campaign_targeting_criteria.rb
new file mode 100755
index 000000000..53802fa32
--- /dev/null
+++ b/adwords_api/examples/v201809/targeting/get_campaign_targeting_criteria.rb
@@ -0,0 +1,106 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+ 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 " +
+ 'https://github.com/googleads/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/v201809/targeting/get_targetable_languages_and_carriers.rb b/adwords_api/examples/v201809/targeting/get_targetable_languages_and_carriers.rb
new file mode 100755
index 000000000..31e8dd731
--- /dev/null
+++ b/adwords_api/examples/v201809/targeting/get_targetable_languages_and_carriers.rb
@@ -0,0 +1,89 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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/v201809/targeting/lookup_location.rb b/adwords_api/examples/v201809/targeting/lookup_location.rb
new file mode 100755
index 000000000..7934b2106
--- /dev/null
+++ b/adwords_api/examples/v201809/targeting/lookup_location.rb
@@ -0,0 +1,108 @@
+#!/usr/bin/env ruby
+# Encoding: utf-8
+#
+# 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.
+
+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 = :v201809
+
+ 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 " +
+ 'https://github.com/googleads/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 80f5db6c7..dc5120727 100644
--- a/adwords_api/lib/adwords_api/api_config.rb
+++ b/adwords_api/lib/adwords_api/api_config.rb
@@ -33,8 +33,8 @@ class << ApiConfig
end
# Set defaults
- DEFAULT_VERSION = :v201806
- LATEST_VERSION = :v201806
+ DEFAULT_VERSION = :v201809
+ LATEST_VERSION = :v201809
# Set other constants
API_NAME = 'AdwordsApi'
@@ -149,6 +149,62 @@ class << ApiConfig
:TrafficEstimatorService,
:TrialAsyncErrorService,
:TrialService
+ ],
+ :v201809 => [
+ :AccountLabelService,
+ :AdCustomizerFeedService,
+ :AdGroupAdService,
+ :AdGroupBidModifierService,
+ :AdGroupCriterionService,
+ :AdGroupExtensionSettingService,
+ :AdGroupFeedService,
+ :AdGroupService,
+ :AdParamService,
+ :AdService,
+ :AdwordsUserListService,
+ :AssetService,
+ :BatchJobService,
+ :BiddingStrategyService,
+ :BudgetOrderService,
+ :BudgetService,
+ :CampaignBidModifierService,
+ :CampaignCriterionService,
+ :CampaignExtensionSettingService,
+ :CampaignFeedService,
+ :CampaignGroupService,
+ :CampaignGroupPerformanceTargetService,
+ :CampaignService,
+ :CampaignSharedSetService,
+ :ConstantDataService,
+ :ConversionTrackerService,
+ :CustomAffinityService,
+ :CustomerExtensionSettingService,
+ :CustomerFeedService,
+ :CustomerNegativeCriterionService,
+ :CustomerService,
+ :CustomerSyncService,
+ :DataService,
+ :DraftAsyncErrorService,
+ :DraftService,
+ :FeedItemService,
+ :FeedItemTargetService,
+ :FeedMappingService,
+ :FeedService,
+ :LabelService,
+ :LocationCriterionService,
+ :ManagedCustomerService,
+ :MediaService,
+ :OfflineCallConversionFeedService,
+ :OfflineConversionAdjustmentFeedService,
+ :OfflineConversionFeedService,
+ :OfflineDataUploadService,
+ :ReportDefinitionService,
+ :SharedCriterionService,
+ :SharedSetService,
+ :TargetingIdeaService,
+ :TrafficEstimatorService,
+ :TrialAsyncErrorService,
+ :TrialService
]
}
@@ -157,7 +213,8 @@ class << ApiConfig
:oauth_scope => 'https://www.googleapis.com/auth/adwords',
:header_ns => 'https://adwords.google.com/api/adwords/cm/',
:v201802 => 'https://adwords.google.com/api/adwords/',
- :v201806 => 'https://adwords.google.com/api/adwords/'
+ :v201806 => 'https://adwords.google.com/api/adwords/',
+ :v201809 => 'https://adwords.google.com/api/adwords/'
}
# Configure the subdirectories for each version / service pair.
@@ -268,7 +325,62 @@ class << ApiConfig
[:v201806, :TargetingIdeaService] => 'o/',
[:v201806, :TrafficEstimatorService] => 'o/',
[:v201806, :TrialAsyncErrorService] => 'cm/',
- [:v201806, :TrialService] => 'cm/'
+ [:v201806, :TrialService] => 'cm/',
+ # v201809
+ [:v201809, :AccountLabelService] => 'mcm/',
+ [:v201809, :AdCustomizerFeedService] => 'cm/',
+ [:v201809, :AdGroupAdService] => 'cm/',
+ [:v201809, :AdGroupBidModifierService] => 'cm/',
+ [:v201809, :AdGroupCriterionService] => 'cm/',
+ [:v201809, :AdGroupExtensionSettingService] => 'cm/',
+ [:v201809, :AdGroupFeedService] => 'cm/',
+ [:v201809, :AdGroupService] => 'cm/',
+ [:v201809, :AdParamService] => 'cm/',
+ [:v201809, :AdService] => 'cm/',
+ [:v201809, :AdwordsUserListService] => 'rm/',
+ [:v201809, :AssetService] => 'cm/',
+ [:v201809, :BatchJobService] => 'cm/',
+ [:v201809, :BiddingStrategyService] => 'cm/',
+ [:v201809, :BudgetOrderService] => 'billing/',
+ [:v201809, :BudgetService] => 'cm/',
+ [:v201809, :CampaignBidModifierService] => 'cm/',
+ [:v201809, :CampaignCriterionService] => 'cm/',
+ [:v201809, :CampaignExtensionSettingService] => 'cm/',
+ [:v201809, :CampaignFeedService] => 'cm/',
+ [:v201809, :CampaignGroupService] => 'cm/',
+ [:v201809, :CampaignGroupPerformanceTargetService] => 'cm/',
+ [:v201809, :CampaignService] => 'cm/',
+ [:v201809, :CampaignSharedSetService] => 'cm/',
+ [:v201809, :ConstantDataService] => 'cm/',
+ [:v201809, :ConversionTrackerService] => 'cm/',
+ [:v201809, :CustomAffinityService] => 'rm/',
+ [:v201809, :CustomerExtensionSettingService] => 'cm/',
+ [:v201809, :CustomerFeedService] => 'cm/',
+ [:v201809, :CustomerNegativeCriterionService] => 'cm/',
+ [:v201809, :CustomerService] => 'mcm/',
+ [:v201809, :CustomerSyncService] => 'ch/',
+ [:v201809, :DraftAsyncErrorService] => 'cm/',
+ [:v201809, :DataService] => 'cm/',
+ [:v201809, :DraftService] => 'cm/',
+ [:v201809, :FeedItemService] => 'cm/',
+ [:v201809, :FeedItemTargetService] => 'cm/',
+ [:v201809, :FeedMappingService] => 'cm/',
+ [:v201809, :FeedService] => 'cm/',
+ [:v201809, :LabelService] => 'cm/',
+ [:v201809, :LocationCriterionService] => 'cm/',
+ [:v201809, :ManagedCustomerService] => 'mcm/',
+ [:v201809, :MediaService] => 'cm/',
+ [:v201809, :OfflineCallConversionFeedService] => 'cm/',
+ [:v201809, :OfflineConversionAdjustmentFeedService] => 'cm/',
+ [:v201809, :OfflineConversionFeedService] => 'cm/',
+ [:v201809, :OfflineDataUploadService] => 'rm/',
+ [:v201809, :ReportDefinitionService] => 'cm/',
+ [:v201809, :SharedCriterionService] => 'cm/',
+ [:v201809, :SharedSetService] => 'cm/',
+ [:v201809, :TargetingIdeaService] => 'o/',
+ [:v201809, :TrafficEstimatorService] => 'o/',
+ [:v201809, :TrialAsyncErrorService] => 'cm/',
+ [:v201809, :TrialService] => 'cm/'
}
public
diff --git a/adwords_api/lib/adwords_api/v201809/account_label_service.rb b/adwords_api/lib/adwords_api/v201809/account_label_service.rb
new file mode 100644
index 000000000..781ce93b9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/account_label_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:43.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/account_label_service_registry'
+
+module AdwordsApi; module V201809; module AccountLabelService
+ class AccountLabelService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/mcm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AccountLabelServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AccountLabelService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/account_label_service_registry.rb b/adwords_api/lib/adwords_api/v201809/account_label_service_registry.rb
new file mode 100644
index 000000000..0537e727f
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/account_label_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:43.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module AccountLabelService
+ class AccountLabelServiceRegistry
+ ACCOUNTLABELSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AccountLabelPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AccountLabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AccountLabelReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ ACCOUNTLABELSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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=>[{:name=>:reason, :type=>"CollectionSizeError.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}, :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}], :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"Date", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"Date", :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :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}, :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}, :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :"CollectionSizeError.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}, :"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}, :"RegionCodeError.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}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AccountLabelPage=>{:fields=>[{:name=>:labels, :type=>"AccountLabel", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AccountLabelReturnValue=>{:fields=>[{:name=>:labels, :type=>"AccountLabel", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AccountLabel=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :LabelServiceError=>{:fields=>[{:name=>:reason, :type=>"LabelServiceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AccountLabelOperation=>{:fields=>[{:name=>:operand, :type=>"AccountLabel", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"LabelServiceError.Reason"=>{:fields=>[]}}
+ ACCOUNTLABELSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ def self.get_method_signature(method_name)
+ return ACCOUNTLABELSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return ACCOUNTLABELSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return ACCOUNTLABELSERVICE_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, AccountLabelServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_customizer_feed_service.rb b/adwords_api/lib/adwords_api/v201809/ad_customizer_feed_service.rb
new file mode 100644
index 000000000..d6a2c4676
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_customizer_feed_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:43.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_customizer_feed_service_registry'
+
+module AdwordsApi; module V201809; module AdCustomizerFeedService
+ class AdCustomizerFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdCustomizerFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdCustomizerFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_customizer_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_customizer_feed_service_registry.rb
new file mode 100644
index 000000000..2df4fea50
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_customizer_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:43.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module AdCustomizerFeedService
+ class AdCustomizerFeedServiceRegistry
+ ADCUSTOMIZERFEEDSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdCustomizerFeedPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdCustomizerFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdCustomizerFeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ ADCUSTOMIZERFEEDSERVICE_TYPES = {:AdCustomizerFeed=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_status, :type=>"Feed.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_attributes, :type=>"AdCustomizerFeedAttribute", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AdCustomizerFeedAttribute=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"AdCustomizerFeedAttribute.Type", :min_occurs=>0, :max_occurs=>1}]}, :AdCustomizerFeedError=>{:fields=>[{:name=>:reason, :type=>"AdCustomizerFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdCustomizerFeedOperation=>{:fields=>[{:name=>:operand, :type=>"AdCustomizerFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdCustomizerFeedPage=>{:fields=>[{:name=>:entries, :type=>"AdCustomizerFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdCustomizerFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"AdCustomizerFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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}]}, :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"}, :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"}, :FeedError=>{:fields=>[{:name=>:reason, :type=>"FeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AdCustomizerFeedAttribute.Type"=>{:fields=>[]}, :"AdCustomizerFeedError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Feed.Status"=>{:fields=>[]}, :"FeedError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ ADCUSTOMIZERFEEDSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return ADCUSTOMIZERFEEDSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return ADCUSTOMIZERFEEDSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return ADCUSTOMIZERFEEDSERVICE_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, AdCustomizerFeedServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_ad_service.rb b/adwords_api/lib/adwords_api/v201809/ad_group_ad_service.rb
new file mode 100644
index 000000000..da89b7b98
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_ad_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:44.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_group_ad_service_registry'
+
+module AdwordsApi; module V201809; module AdGroupAdService
+ class AdGroupAdService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_label(*args, &block)
+ return execute_action('mutate_label', args, &block)
+ end
+
+ def mutate_label_to_xml(*args)
+ return get_soap_xml('mutate_label', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdGroupAdServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdGroupAdService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_ad_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_group_ad_service_registry.rb
new file mode 100644
index 000000000..c7cd4d4f0
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_ad_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:44.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :mutate_label=>{:input=>[{:name=>:operations, :type=>"AdGroupAdLabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_label_response", :fields=>[{:name=>:rval, :type=>"AdGroupAdLabelReturnValue", :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=>:final_urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:final_mobile_urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:final_app_urls, :type=>"AppUrl", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_data, :type=>"UrlData", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:automated, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Ad.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:system_managed_entity_source, :type=>"SystemManagedEntitySource", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_type, :original_name=>"Ad.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdCustomizerError=>{:fields=>[{:name=>:reason, :type=>"AdCustomizerError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:function_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>:status, :type=>"AdGroupAd.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary, :type=>"AdGroupAdPolicySummary", :min_occurs=>0, :max_occurs=>1}, {:name=>:labels, :type=>"Label", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_strength_info, :type=>"AdStrengthInfo", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAdCountLimitExceeded=>{:fields=>[], :base=>"EntityCountLimitExceeded"}, :AdGroupAdError=>{:fields=>[{:name=>:reason, :type=>"AdGroupAdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupAdLabel=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAdLabelOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupAdLabel", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupAdLabelReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupAdLabel", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :AdGroupAdOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ignorable_policy_topic_ids, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupAdPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupAdPolicySummary=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :AdSharingError=>{:fields=>[{:name=>:reason, :type=>"AdSharingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:shared_ad_error, :type=>"ApiError", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdStrengthInfo=>{:fields=>[{:name=>:ad_strength, :type=>"AdStrength", :min_occurs=>0, :max_occurs=>1}, {:name=>:action_items, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :AppUrl=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_type, :type=>"AppUrl.OsType", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :Asset=>{:fields=>[{:name=>:asset_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_subtype, :type=>"Asset.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_status, :type=>"AssetStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_type, :original_name=>"Asset.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AssetError=>{:fields=>[{:name=>:reason, :type=>"AssetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AssetLink=>{:fields=>[{:name=>:asset, :type=>"Asset", :min_occurs=>0, :max_occurs=>1}, {:name=>:pinned_field, :type=>"ServedAssetFieldType", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_policy_summary_info, :type=>"AssetPolicySummaryInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_performance_label, :type=>"AssetPerformanceLabel", :min_occurs=>0, :max_occurs=>1}]}, :AssetLinkError=>{:fields=>[{:name=>:reason, :type=>"AssetLinkError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AssetPolicySummaryInfo=>{:fields=>[], :base=>"PolicySummaryInfo"}, :LabelAttribute=>{:fields=>[{:name=>:label_attribute_type, :original_name=>"LabelAttribute.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"}, :CallOnlyAd=>{:fields=>[{:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name, :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}, {:name=>:call_tracked, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:disable_call_conversion, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_type_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number_verification_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :TextLabel=>{:fields=>[], :base=>"Label"}, :DisplayAttribute=>{:fields=>[{:name=>:background_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"LabelAttribute"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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"}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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=>:deprecated_ad_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}]}, :DisplayCallToAction=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:text_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DynamicSettings=>{:fields=>[{:name=>:landscape_logo_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_prefix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promo_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :ExpandedDynamicSearchAd=>{:fields=>[{:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ExpandedTextAd=>{:fields=>[{:name=>:headline_part1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline_part2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline_part3, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:path1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:path2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :FeedAttributeReferenceError=>{:fields=>[{:name=>:reason, :type=>"FeedAttributeReferenceError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_attribute_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionParsingError=>{:fields=>[{:name=>:reason, :type=>"FunctionParsingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GmailAd=>{:fields=>[{:name=>:teaser, :type=>"GmailTeaser", :min_occurs=>0, :max_occurs=>1}, {:name=>:header_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image_headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image_display_call_to_action, :type=>"DisplayCallToAction", :min_occurs=>0, :max_occurs=>1}, {:name=>:product_images, :type=>"ProductImage", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:product_video_list, :type=>"Video", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Ad"}, :GmailTeaser=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:logo_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :ImageAsset=>{:fields=>[{:name=>:image_data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_mime_type, :type=>"MediaMimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:full_size_info, :type=>"ImageDimensionInfo", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :ImageDimensionInfo=>{:fields=>[{:name=>:image_height, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :Label=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Label.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute, :type=>"LabelAttribute", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_type, :original_name=>"Label.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :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.LegacyMimeType", :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}]}, :MediaBundle=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_bundle_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:entry_point, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :MediaBundleAsset=>{:fields=>[{:name=>:media_bundle_data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :MediaBundleError=>{:fields=>[{:name=>:reason, :type=>"MediaBundleError.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}]}, :MultiAssetResponsiveDisplayAd=>{:fields=>[{:name=>:marketing_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:square_marketing_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:logo_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:landscape_logo_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:headlines, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:long_headline, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>1}, {:name=>:descriptions, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:you_tube_videos, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:main_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:accent_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:allow_flexible_color, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_to_action_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dynamic_settings_price_prefix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dynamic_settings_promo_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:format_setting, :type=>"DisplayAdFormatSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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"}, :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}]}, :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"}, :PolicyFindingError=>{:fields=>[{:name=>:reason, :type=>"PolicyFindingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary, :type=>"PolicySummary", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PolicySummary=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :PolicySummaryInfo=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary_info_type, :original_name=>"PolicySummaryInfo.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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=>[], :base=>"Ad"}, :ProductImage=>{:fields=>[{:name=>:product_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_call_to_action, :type=>"DisplayCallToAction", :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :ResponsiveDisplayAd=>{:fields=>[{:name=>:marketing_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:logo_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:square_marketing_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:short_headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:long_headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:main_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:accent_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:allow_flexible_color, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_to_action_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dynamic_display_ad_settings, :type=>"DynamicSettings", :min_occurs=>0, :max_occurs=>1}, {:name=>:format_setting, :type=>"DisplayAdFormatSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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"}, :ShowcaseAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:collapsed_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:expanded_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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"}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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=>:ad_as_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {: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}, {:name=>:origin_ad_id, :type=>"long", :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"}, :TextAsset=>{:fields=>[{:name=>:asset_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :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"}, :UniversalAppAd=>{:fields=>[{:name=>:headlines, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:descriptions, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mandatory_ad_text, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>1}, {:name=>:images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:videos, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:html5_media_bundles, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Ad"}, :GoalOptimizedShoppingAd=>{:fields=>[], :base=>"Ad"}, :UrlData=>{:fields=>[{:name=>:url_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlList=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ResponsiveSearchAd=>{:fields=>[{:name=>:headlines, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:descriptions, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:path1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:path2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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"}, :YouTubeVideoAsset=>{:fields=>[{:name=>:you_tube_video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :"Ad.Type"=>{:fields=>[]}, :"AdCustomizerError.Reason"=>{:fields=>[]}, :"AdError.Reason"=>{:fields=>[]}, :"AdGroupAd.Status"=>{:fields=>[]}, :"DeprecatedAd.Type"=>{:fields=>[]}, :"AdGroupAdError.Reason"=>{:fields=>[]}, :"AdSharingError.Reason"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AppUrl.OsType"=>{:fields=>[]}, :"AssetError.Reason"=>{:fields=>[]}, :"AssetLinkError.Reason"=>{:fields=>[]}, :AssetPerformanceLabel=>{:fields=>[]}, :AssetStatus=>{:fields=>[]}, :"Asset.Type"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DisplayAdFormatSetting=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedAttributeReferenceError.Reason"=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"FunctionParsingError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"Label.Status"=>{:fields=>[]}, :"Media.MediaType"=>{:fields=>[]}, :"Media.LegacyMimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :"MediaBundleError.Reason"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :MediaMimeType=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :PolicyApprovalStatus=>{:fields=>[]}, :"PolicyFindingError.Reason"=>{:fields=>[]}, :PolicySummaryDenormalizedStatus=>{:fields=>[]}, :PolicySummaryReviewState=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :AdStrength=>{: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=>[]}, :"RichMediaAd.AdAttribute"=>{:fields=>[]}, :"RichMediaAd.RichMediaAdType"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :ServedAssetFieldType=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :SystemManagedEntitySource=>{:fields=>[]}, :"TemplateElementField.Type"=>{:fields=>[]}, :"ThirdPartyRedirectAd.ExpandingDirection"=>{:fields=>[]}, :"UrlError.Reason"=>{: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/v201809/ad_group_bid_modifier_service.rb b/adwords_api/lib/adwords_api/v201809/ad_group_bid_modifier_service.rb
new file mode 100644
index 000000000..c4ebccdd3
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_bid_modifier_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:47.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_group_bid_modifier_service_registry'
+
+module AdwordsApi; module V201809; module AdGroupBidModifierService
+ class AdGroupBidModifierService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdGroupBidModifierServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdGroupBidModifierService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_bid_modifier_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_group_bid_modifier_service_registry.rb
new file mode 100644
index 000000000..e9b3990e2
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_bid_modifier_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:47.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"AdGroupBidModifierPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ ADGROUPBIDMODIFIERSERVICE_TYPES = {: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=>:base_ad_group_id, :type=>"long", :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"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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}]}, :PreferredContent=>{:fields=>[], :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"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=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/ad_group_criterion_service.rb b/adwords_api/lib/adwords_api/v201809/ad_group_criterion_service.rb
new file mode 100644
index 000000000..deb689f44
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_criterion_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:48.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_group_criterion_service_registry'
+
+module AdwordsApi; module V201809; module AdGroupCriterionService
+ class AdGroupCriterionService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_label(*args, &block)
+ return execute_action('mutate_label', args, &block)
+ end
+
+ def mutate_label_to_xml(*args)
+ return get_soap_xml('mutate_label', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdGroupCriterionServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdGroupCriterionService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_group_criterion_service_registry.rb
new file mode 100644
index 000000000..3551cecb4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_criterion_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:48.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :mutate_label=>{:input=>[{:name=>:operations, :type=>"AdGroupCriterionLabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_label_response", :fields=>[{:name=>:rval, :type=>"AdGroupCriterionLabelReturnValue", :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 = {: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=>:labels, :type=>"Label", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {: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"}, :AdGroupCriterionLabel=>{: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=>:label_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupCriterionLabelOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupCriterionLabel", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupCriterionLabelReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupCriterionLabel", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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"}, :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"}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :AppPaymentModel=>{:fields=>[{:name=>:app_payment_model_type, :type=>"AppPaymentModel.AppPaymentModelType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :AppUrl=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_type, :type=>"AppUrl.OsType", :min_occurs=>0, :max_occurs=>1}]}, :AppUrlList=>{:fields=>[{:name=>:app_urls, :type=>"AppUrl", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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}]}, :LabelAttribute=>{:fields=>[{:name=>:label_attribute_type, :original_name=>"LabelAttribute.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"}, :Bid=>{:fields=>[{:name=>:amount, :type=>"Money", :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=>: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=>:first_position_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_info, :type=>"QualityInfo", :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}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_app_urls, :type=>"AppUrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterion"}, :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}, {:name=>:target_roas_override, :type=>"double", :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}, :TextLabel=>{:fields=>[], :base=>"Label"}, :DisplayAttribute=>{:fields=>[{:name=>:background_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"LabelAttribute"}, :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"}, :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}, {:name=>:bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>: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"}, :CriterionCustomAffinity=>{:fields=>[{:name=>:custom_affinity_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionCustomIntent=>{:fields=>[{:name=>:custom_intent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :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"}, :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"}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :IncomeRange=>{:fields=>[{:name=>:income_range_type, :type=>"IncomeRange.IncomeRangeType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :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"}, :Label=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Label.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute, :type=>"LabelAttribute", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_type, :original_name=>"Label.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[{:name=>:viewable_cpm_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionValueBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionsBiddingScheme=>{: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"}, :MultiplierError=>{:fields=>[{:name=>:reason, :type=>"MultiplierError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :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"}, :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}, :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_constrained, :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"}, :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"}, :Parent=>{:fields=>[{:name=>:parent_type, :type=>"Parent.ParentType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Placement=>{:fields=>[{:name=>:url, :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}]}, :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}]}, :ProductAdwordsGrouping=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductAdwordsLabels=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductBiddingCategory=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductBrand=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductCanonicalCondition=>{:fields=>[{:name=>:condition, :type=>"ProductCanonicalCondition.Condition", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductChannel=>{:fields=>[{:name=>:channel, :type=>"ShoppingProductChannel", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductChannelExclusivity=>{:fields=>[{:name=>:channel_exclusivity, :type=>"ShoppingProductChannelExclusivity", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductLegacyCondition=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductCustomAttribute=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductDimension=>{:fields=>[{:name=>:product_dimension_type, :original_name=>"ProductDimension.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ProductOfferId=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductPartition=>{:fields=>[{:name=>:partition_type, :type=>"ProductPartitionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:case_value, :type=>"ProductDimension", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :ProductType=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductTypeFull=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :QualityInfo=>{:fields=>[{: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"}, :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=>: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"}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}]}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_floor, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetOutrankShareBiddingScheme=>{:fields=>[{:name=>:target_outrank_share, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:competitor_domain, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :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"}, :TargetRoasBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_floor, :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"}, :UnknownProductDimension=>{:fields=>[], :base=>"ProductDimension"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlList=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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}, {:name=>:operator, :type=>"WebpageConditionOperator", :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"}, :YouTubeChannel=>{:fields=>[{:name=>:channel_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:channel_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :YouTubeVideo=>{:fields=>[{:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :"AdGroupCriterionError.Reason"=>{:fields=>[]}, :"AdGroupCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :"AppPaymentModel.AppPaymentModelType"=>{:fields=>[]}, :"AppUrl.OsType"=>{:fields=>[]}, :ApprovalStatus=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{: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=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"Gender.GenderType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"IncomeRange.IncomeRangeType"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :"Label.Status"=>{:fields=>[]}, :"MultiplierError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Parent.ParentType"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"ProductCanonicalCondition.Condition"=>{:fields=>[]}, :ProductDimensionType=>{:fields=>[]}, :ProductPartitionType=>{: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=>[]}, :ShoppingProductChannel=>{:fields=>[]}, :ShoppingProductChannelExclusivity=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :SystemServingStatus=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :UserStatus=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}, :WebpageConditionOperator=>{: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/v201809/ad_group_extension_setting_service.rb b/adwords_api/lib/adwords_api/v201809/ad_group_extension_setting_service.rb
new file mode 100644
index 000000000..17747a1f4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_extension_setting_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:50.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_group_extension_setting_service_registry'
+
+module AdwordsApi; module V201809; module AdGroupExtensionSettingService
+ class AdGroupExtensionSettingService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdGroupExtensionSettingServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdGroupExtensionSettingService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_extension_setting_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_group_extension_setting_service_registry.rb
new file mode 100644
index 000000000..42956dec9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_extension_setting_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:50.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module AdGroupExtensionSettingService
+ class AdGroupExtensionSettingServiceRegistry
+ ADGROUPEXTENSIONSETTINGSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdGroupExtensionSettingPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdGroupExtensionSettingOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdGroupExtensionSettingReturnValue", :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=>"AdGroupExtensionSettingPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ ADGROUPEXTENSIONSETTINGSERVICE_TYPES = {:AdGroupExtensionSetting=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:extension_type, :type=>"Feed.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:extension_setting, :type=>"ExtensionSetting", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupExtensionSettingOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupExtensionSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupExtensionSettingPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupExtensionSetting", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupExtensionSettingReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupExtensionSetting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :AppFeedItem=>{:fields=>[{:name=>:app_store, :type=>"AppFeedItem.AppStore", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_link_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :CallConversionType=>{:fields=>[{:name=>:conversion_type_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :CallFeedItem=>{:fields=>[{:name=>:call_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_conversion_type, :type=>"CallConversionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:disable_call_conversion_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :CalloutFeedItem=>{:fields=>[{:name=>:callout_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :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"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :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"}, :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"}, :ExtensionFeedItem=>{: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=>:feed_type, :type=>"Feed.Type", :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=>:device_preference, :type=>"FeedItemDevicePreference", :min_occurs=>0, :max_occurs=>1}, {:name=>:scheduling, :type=>"FeedItemScheduling", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_targeting, :type=>"FeedItemCampaignTargeting", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_targeting, :type=>"FeedItemAdGroupTargeting", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_targeting, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_targeting, :type=>"Location", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_targeting_restriction, :type=>"FeedItemGeoRestriction", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summaries, :type=>"FeedItemPolicySummary", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:extension_feed_item_type, :original_name=>"ExtensionFeedItem.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ExtensionSetting=>{:fields=>[{:name=>:extensions, :type=>"ExtensionFeedItem", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:platform_restrictions, :type=>"ExtensionSetting.Platform", :min_occurs=>0, :max_occurs=>1}]}, :ExtensionSettingError=>{:fields=>[{:name=>:reason, :type=>"ExtensionSettingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemAdGroupTargeting=>{:fields=>[{:name=>:targeting_ad_group_id, :original_name=>"TargetingAdGroupId", :type=>"long", :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}, {:name=>:error_information, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemCampaignTargeting=>{:fields=>[{:name=>:targeting_campaign_id, :original_name=>"TargetingCampaignId", :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemDevicePreference=>{:fields=>[{:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemGeoRestriction=>{:fields=>[{:name=>:geo_restriction, :type=>"GeoRestriction", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemPolicySummary=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_status, :type=>"FeedItemValidationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_errors, :type=>"FeedItemAttributeError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:quality_approval_status, :type=>"FeedItemQualityApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_disapproval_reasons, :type=>"FeedItemQualityDisapprovalReasons", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"PolicySummaryInfo"}, :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}]}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :MessageFeedItem=>{:fields=>[{:name=>:message_business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_extension_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :MoneyWithCurrency=>{:fields=>[{:name=>:money, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :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"}, :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"}, :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}]}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :PolicySummaryInfo=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary_info_type, :original_name=>"PolicySummaryInfo.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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}]}, :PriceFeedItem=>{:fields=>[{:name=>:price_extension_type, :type=>"PriceExtensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_qualifier, :type=>"PriceExtensionPriceQualifier", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:table_rows, :type=>"PriceTableRow", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ExtensionFeedItem"}, :PriceTableRow=>{:fields=>[{:name=>:header, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:price, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_unit, :type=>"PriceExtensionPriceUnit", :min_occurs=>0, :max_occurs=>1}]}, :PromotionFeedItem=>{:fields=>[{:name=>:promotion_target, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:discount_modifier, :type=>"PromotionExtensionDiscountModifier", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_off, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:money_amount_off, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:orders_over_amount, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_start, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_end, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:occasion, :type=>"PromotionExtensionOccasion", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:language, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :ReviewFeedItem=>{:fields=>[{:name=>:review_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_source_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_text_exactly_quoted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :SitelinkFeedItem=>{:fields=>[{:name=>:sitelink_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_line2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_line3, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StructuredSnippetFeedItem=>{:fields=>[{:name=>:header, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ExtensionFeedItem"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlList=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :"AppFeedItem.AppStore"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ExtensionSetting.Platform"=>{:fields=>[]}, :"ExtensionSettingError.Reason"=>{:fields=>[]}, :"FeedItem.Status"=>{:fields=>[]}, :FeedItemQualityApprovalStatus=>{:fields=>[]}, :FeedItemQualityDisapprovalReasons=>{:fields=>[]}, :FeedItemValidationStatus=>{:fields=>[]}, :"Feed.Type"=>{:fields=>[]}, :GeoRestriction=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :PolicyApprovalStatus=>{:fields=>[]}, :PolicySummaryDenormalizedStatus=>{:fields=>[]}, :PolicySummaryReviewState=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :PriceExtensionPriceQualifier=>{:fields=>[]}, :PriceExtensionPriceUnit=>{:fields=>[]}, :PriceExtensionType=>{:fields=>[]}, :PromotionExtensionDiscountModifier=>{:fields=>[]}, :PromotionExtensionOccasion=>{: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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}}
+ ADGROUPEXTENSIONSETTINGSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return ADGROUPEXTENSIONSETTINGSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return ADGROUPEXTENSIONSETTINGSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return ADGROUPEXTENSIONSETTINGSERVICE_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, AdGroupExtensionSettingServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_feed_service.rb b/adwords_api/lib/adwords_api/v201809/ad_group_feed_service.rb
new file mode 100644
index 000000000..224e7d50f
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_feed_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:52.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_group_feed_service_registry'
+
+module AdwordsApi; module V201809; module AdGroupFeedService
+ class AdGroupFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdGroupFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdGroupFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_group_feed_service_registry.rb
new file mode 100644
index 000000000..d11c323c9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:52.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"AdGroupFeedPage", :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}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_ad_group_id, :type=>"long", :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}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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=>:unit, :type=>"ConstantOperand.Unit", :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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}, {:name=>:function_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :FunctionParsingError=>{:fields=>[{:name=>:reason, :type=>"FunctionParsingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text_index, :type=>"int", :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}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"ConstantOperand.ConstantType"=>{:fields=>[]}, :"ConstantOperand.Unit"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Function.Operator"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"FunctionParsingError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestContextOperand.ContextType"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{: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/v201809/ad_group_service.rb b/adwords_api/lib/adwords_api/v201809/ad_group_service.rb
new file mode 100644
index 000000000..118188e97
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:53.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_group_service_registry'
+
+module AdwordsApi; module V201809; module AdGroupService
+ class AdGroupService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_label(*args, &block)
+ return execute_action('mutate_label', args, &block)
+ end
+
+ def mutate_label_to_xml(*args)
+ return get_soap_xml('mutate_label', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdGroupServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdGroupService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_group_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_group_service_registry.rb
new file mode 100644
index 000000000..27f9e1e4c
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_group_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:53.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :mutate_label=>{:input=>[{:name=>:operations, :type=>"AdGroupLabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_label_response", :fields=>[{:name=>:rval, :type=>"AdGroupLabelReturnValue", :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 = {: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=>:labels, :type=>"Label", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_type, :type=>"AdGroupType", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_ad_rotation_mode, :type=>"AdGroupAdRotationMode", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAdRotationMode=>{:fields=>[{:name=>:ad_rotation_mode, :type=>"AdRotationMode", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupLabel=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupLabelOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupLabel", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupLabelReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupLabel", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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"}, :AdGroupServiceError=>{:fields=>[{:name=>:reason, :type=>"AdGroupServiceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :LabelAttribute=>{:fields=>[{:name=>:label_attribute_type, :original_name=>"LabelAttribute.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"}, :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}, {:name=>:target_roas_override, :type=>"double", :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}, :TextLabel=>{:fields=>[], :base=>"Label"}, :DisplayAttribute=>{:fields=>[{:name=>:background_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"LabelAttribute"}, :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}, :CpaBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>: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"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :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"}, :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"}, :ExplorerAutoOptimizerSetting=>{:fields=>[{:name=>:opt_in, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :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"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Label=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Label.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute, :type=>"LabelAttribute", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_type, :original_name=>"Label.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[{:name=>:viewable_cpm_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionValueBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionsBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :MultiplierError=>{:fields=>[{:name=>:reason, :type=>"MultiplierError.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"}, :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"}, :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}, :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_constrained, :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"}, :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}]}, :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"}, :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"}, :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"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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"}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}]}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_floor, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetOutrankShareBiddingScheme=>{:fields=>[{:name=>:target_outrank_share, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:competitor_domain, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :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"}, :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}]}, :TargetRoasBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_floor, :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"}, :TargetingSetting=>{:fields=>[{:name=>:details, :type=>"TargetingSettingDetail", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Setting"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AdGroupServiceError.Reason"=>{:fields=>[]}, :"AdGroup.Status"=>{:fields=>[]}, :AdGroupType=>{:fields=>[]}, :AdRotationMode=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :CriterionTypeGroup=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"Label.Status"=>{:fields=>[]}, :"MultiplierError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"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=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.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/v201809/ad_param_service.rb b/adwords_api/lib/adwords_api/v201809/ad_param_service.rb
new file mode 100644
index 000000000..d907838eb
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_param_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:55.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_param_service_registry'
+
+module AdwordsApi; module V201809; module AdParamService
+ class AdParamService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdParamServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdParamService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_param_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_param_service_registry.rb
new file mode 100644
index 000000000..2d94719dd
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_param_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:55.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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=>{: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}]}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"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=>[]}, :"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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{: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/v201809/ad_service.rb b/adwords_api/lib/adwords_api/v201809/ad_service.rb
new file mode 100644
index 000000000..48e244274
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:55.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/ad_service_registry'
+
+module AdwordsApi; module V201809; module AdService
+ class AdService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/ad_service_registry.rb b/adwords_api/lib/adwords_api/v201809/ad_service_registry.rb
new file mode 100644
index 000000000..b186c06b4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/ad_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:55.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module AdService
+ class AdServiceRegistry
+ ADSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ ADSERVICE_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=>:final_urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:final_mobile_urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:final_app_urls, :type=>"AppUrl", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_data, :type=>"UrlData", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:automated, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Ad.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:system_managed_entity_source, :type=>"SystemManagedEntitySource", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_type, :original_name=>"Ad.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdCampaignAdSubProductType=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :AdCampaignAdSubProductTypeError=>{:fields=>[{:name=>:reason, :type=>"AdCampaignAdSubProductTypeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdCampaignAdSubProductTypeOperation=>{:fields=>[{:name=>:operand, :type=>"AdCampaignAdSubProductType", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdCampaignAdSubProductTypeReturnValue=>{:fields=>[{:name=>:value, :type=>"AdCampaignAdSubProductType", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :AdCustomizerError=>{:fields=>[{:name=>:reason, :type=>"AdCustomizerError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:function_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand_value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdOperation=>{:fields=>[{:name=>:operand, :type=>"Ad", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ignorable_policy_topic_ids, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdPage=>{:fields=>[{:name=>:entries, :type=>"Ad", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdReturnValue=>{:fields=>[{:name=>:value, :type=>"Ad", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :AdSharingError=>{:fields=>[{:name=>:reason, :type=>"AdSharingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:shared_ad_error, :type=>"ApiError", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :AppUrl=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:os_type, :type=>"AppUrl.OsType", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :Asset=>{:fields=>[{:name=>:asset_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_subtype, :type=>"Asset.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_status, :type=>"AssetStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_type, :original_name=>"Asset.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AssetError=>{:fields=>[{:name=>:reason, :type=>"AssetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AssetLink=>{:fields=>[{:name=>:asset, :type=>"Asset", :min_occurs=>0, :max_occurs=>1}, {:name=>:pinned_field, :type=>"ServedAssetFieldType", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_policy_summary_info, :type=>"AssetPolicySummaryInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_performance_label, :type=>"AssetPerformanceLabel", :min_occurs=>0, :max_occurs=>1}]}, :AssetLinkError=>{:fields=>[{:name=>:reason, :type=>"AssetLinkError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AssetPolicySummaryInfo=>{:fields=>[], :base=>"PolicySummaryInfo"}, :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"}, :CallOnlyAd=>{:fields=>[{:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name, :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}, {:name=>:call_tracked, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:disable_call_conversion, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_type_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number_verification_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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"}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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=>:deprecated_ad_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}]}, :DisplayCallToAction=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:text_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DynamicSettings=>{:fields=>[{:name=>:landscape_logo_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_prefix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promo_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :ExpandedDynamicSearchAd=>{:fields=>[{:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ExpandedTextAd=>{:fields=>[{:name=>:headline_part1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline_part2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline_part3, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:path1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:path2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :FeedAttributeReferenceError=>{:fields=>[{:name=>:reason, :type=>"FeedAttributeReferenceError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_attribute_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :ForwardCompatibilityError=>{:fields=>[{:name=>:reason, :type=>"ForwardCompatibilityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionParsingError=>{:fields=>[{:name=>:reason, :type=>"FunctionParsingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GmailAd=>{:fields=>[{:name=>:teaser, :type=>"GmailTeaser", :min_occurs=>0, :max_occurs=>1}, {:name=>:header_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image_headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:marketing_image_display_call_to_action, :type=>"DisplayCallToAction", :min_occurs=>0, :max_occurs=>1}, {:name=>:product_images, :type=>"ProductImage", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:product_video_list, :type=>"Video", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Ad"}, :GmailTeaser=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:logo_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :ImageAsset=>{:fields=>[{:name=>:image_data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_mime_type, :type=>"MediaMimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:full_size_info, :type=>"ImageDimensionInfo", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :ImageDimensionInfo=>{:fields=>[{:name=>:image_height, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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}, :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.LegacyMimeType", :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}]}, :MediaBundle=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_bundle_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:entry_point, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :MediaBundleAsset=>{:fields=>[{:name=>:media_bundle_data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :MediaBundleError=>{:fields=>[{:name=>:reason, :type=>"MediaBundleError.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}]}, :MultiAssetResponsiveDisplayAd=>{:fields=>[{:name=>:marketing_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:square_marketing_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:logo_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:landscape_logo_images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:headlines, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:long_headline, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>1}, {:name=>:descriptions, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:you_tube_videos, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:main_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:accent_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:allow_flexible_color, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_to_action_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dynamic_settings_price_prefix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dynamic_settings_promo_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:format_setting, :type=>"DisplayAdFormatSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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"}, :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}]}, :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"}, :PolicyFindingError=>{:fields=>[{:name=>:reason, :type=>"PolicyFindingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary, :type=>"PolicySummary", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PolicySummary=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :PolicySummaryInfo=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary_info_type, :original_name=>"PolicySummaryInfo.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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=>[], :base=>"Ad"}, :ProductImage=>{:fields=>[{:name=>:product_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_call_to_action, :type=>"DisplayCallToAction", :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :ResponsiveDisplayAd=>{:fields=>[{:name=>:marketing_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:logo_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:square_marketing_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:short_headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:long_headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:main_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:accent_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:allow_flexible_color, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_to_action_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dynamic_display_ad_settings, :type=>"DynamicSettings", :min_occurs=>0, :max_occurs=>1}, {:name=>:format_setting, :type=>"DisplayAdFormatSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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"}, :ShowcaseAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:collapsed_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {:name=>:expanded_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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"}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>:ad_as_image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}, {: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}, {:name=>:origin_ad_id, :type=>"long", :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"}, :TextAsset=>{:fields=>[{:name=>:asset_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :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"}, :UniversalAppAd=>{:fields=>[{:name=>:headlines, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:descriptions, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mandatory_ad_text, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>1}, {:name=>:images, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:videos, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:html5_media_bundles, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Ad"}, :UrlData=>{:fields=>[{:name=>:url_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlList=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ResponsiveSearchAd=>{:fields=>[{:name=>:headlines, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:descriptions, :type=>"AssetLink", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:path1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:path2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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"}, :YouTubeVideoAsset=>{:fields=>[{:name=>:you_tube_video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :"Ad.Type"=>{:fields=>[]}, :"AdCampaignAdSubProductTypeError.Reason"=>{:fields=>[]}, :"AdCustomizerError.Reason"=>{:fields=>[]}, :"AdError.Reason"=>{:fields=>[]}, :"DeprecatedAd.Type"=>{:fields=>[]}, :"AdSharingError.Reason"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AppUrl.OsType"=>{:fields=>[]}, :"AssetError.Reason"=>{:fields=>[]}, :"AssetLinkError.Reason"=>{:fields=>[]}, :AssetPerformanceLabel=>{:fields=>[]}, :AssetStatus=>{:fields=>[]}, :"Asset.Type"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DisplayAdFormatSetting=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedAttributeReferenceError.Reason"=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"FunctionParsingError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"Media.MediaType"=>{:fields=>[]}, :"Media.LegacyMimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :"MediaBundleError.Reason"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :MediaMimeType=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :PolicyApprovalStatus=>{:fields=>[]}, :"PolicyFindingError.Reason"=>{:fields=>[]}, :PolicySummaryDenormalizedStatus=>{:fields=>[]}, :PolicySummaryReviewState=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{: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=>[]}, :"RichMediaAd.AdAttribute"=>{:fields=>[]}, :"RichMediaAd.RichMediaAdType"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :ServedAssetFieldType=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :SystemManagedEntitySource=>{:fields=>[]}, :"TemplateElementField.Type"=>{:fields=>[]}, :"ThirdPartyRedirectAd.ExpandingDirection"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :VideoType=>{:fields=>[]}}
+ ADSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return ADSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return ADSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return ADSERVICE_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, AdServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/adwords_user_list_service.rb b/adwords_api/lib/adwords_api/v201809/adwords_user_list_service.rb
new file mode 100644
index 000000000..55727fef3
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/adwords_user_list_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:57.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/adwords_user_list_service_registry'
+
+module AdwordsApi; module V201809; module AdwordsUserListService
+ class AdwordsUserListService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/rm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_members(*args, &block)
+ return execute_action('mutate_members', args, &block)
+ end
+
+ def mutate_members_to_xml(*args)
+ return get_soap_xml('mutate_members', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AdwordsUserListServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AdwordsUserListService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/adwords_user_list_service_registry.rb b/adwords_api/lib/adwords_api/v201809/adwords_user_list_service_registry.rb
new file mode 100644
index 000000000..f54c356e3
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/adwords_user_list_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:57.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :mutate_members=>{:input=>[{:name=>:operations, :type=>"MutateMembersOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_members_response", :fields=>[{:name=>:rval, :type=>"MutateMembersReturnValue", :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=>"UserListPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ ADWORDSUSERLISTSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.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}, :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :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}, :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}, :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", :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :"CollectionSizeError.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}, :"QueryError.Reason"=>{: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}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AddressInfo=>{:fields=>[{:name=>:hashed_first_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:hashed_last_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:zip_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CombinedRuleUserList=>{:fields=>[{:name=>:left_operand, :type=>"Rule", :min_occurs=>0, :max_occurs=>1}, {:name=>:right_operand, :type=>"Rule", :min_occurs=>0, :max_occurs=>1}, {:name=>:rule_operator, :type=>"CombinedRuleUserList.RuleOperator", :min_occurs=>0, :max_occurs=>1}], :base=>"RuleBasedUserList"}, :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}]}, :CrmBasedUserList=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:upload_key_type, :type=>"CustomerMatchUploadKeyType", :min_occurs=>0, :max_occurs=>1}, {:name=>:data_source_type, :type=>"CrmDataSourceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:data_upload_result, :type=>"DataUploadResult", :min_occurs=>0, :max_occurs=>1}], :base=>"UserList"}, :DataUploadResult=>{:fields=>[{:name=>:upload_status, :type=>"UserListUploadStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:remove_all_status, :type=>"UserListUploadStatus", :min_occurs=>0, :max_occurs=>1}]}, :DateKey=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DateRuleItem=>{:fields=>[{:name=>:key, :type=>"DateKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:op, :type=>"DateRuleItem.DateOperator", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:relative_value, :type=>"RelativeDate", :min_occurs=>0, :max_occurs=>1}]}, :DateSpecificRuleUserList=>{:fields=>[{:name=>:rule, :type=>"Rule", :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}], :base=>"RuleBasedUserList"}, :ExpressionRuleUserList=>{:fields=>[{:name=>:rule, :type=>"Rule", :min_occurs=>0, :max_occurs=>1}], :base=>"RuleBasedUserList"}, :LogicalUserList=>{:fields=>[{:name=>:rules, :type=>"UserListLogicalRule", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"UserList"}, :LogicalUserListOperand=>{:fields=>[], :choices=>[{:name=>:user_list, :original_name=>"UserList", :type=>"UserList", :min_occurs=>1, :max_occurs=>1}]}, :Member=>{:fields=>[{:name=>:hashed_email, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:mobile_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:hashed_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:address_info, :type=>"AddressInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MutateMembersError=>{:fields=>[{:name=>:reason, :type=>"MutateMembersError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MutateMembersOperand=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:remove_all, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:members_list, :type=>"Member", :min_occurs=>0, :max_occurs=>:unbounded}]}, :MutateMembersOperation=>{:fields=>[{:name=>:operand, :type=>"MutateMembersOperand", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :MutateMembersReturnValue=>{:fields=>[{:name=>:user_lists, :type=>"UserList", :min_occurs=>0, :max_occurs=>:unbounded}]}, :NumberKey=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :NumberRuleItem=>{:fields=>[{:name=>:key, :type=>"NumberKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:op, :type=>"NumberRuleItem.NumberOperator", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :RelativeDate=>{:fields=>[{:name=>:offset_in_days, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :BasicUserList=>{:fields=>[{:name=>:conversion_types, :type=>"UserListConversionType", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"UserList"}, :Rule=>{:fields=>[{:name=>:groups, :type=>"RuleItemGroup", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:rule_type, :type=>"UserListRuleTypeEnums.Enum", :min_occurs=>0, :max_occurs=>1}]}, :RuleBasedUserList=>{:fields=>[{:name=>:prepopulation_status, :type=>"RuleBasedUserList.PrepopulationStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"UserList"}, :RuleItem=>{:fields=>[], :choices=>[{:name=>:date_rule_item, :original_name=>"DateRuleItem", :type=>"DateRuleItem", :min_occurs=>1, :max_occurs=>1}, {:name=>:number_rule_item, :original_name=>"NumberRuleItem", :type=>"NumberRuleItem", :min_occurs=>1, :max_occurs=>1}, {:name=>:string_rule_item, :original_name=>"StringRuleItem", :type=>"StringRuleItem", :min_occurs=>1, :max_occurs=>1}]}, :RuleItemGroup=>{:fields=>[{:name=>:items, :type=>"RuleItem", :min_occurs=>0, :max_occurs=>:unbounded}]}, :SimilarUserList=>{:fields=>[{:name=>:seed_user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:seed_user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:seed_user_list_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:seed_user_list_status, :type=>"UserListMembershipStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:seed_list_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"UserList"}, :StringKey=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :StringRuleItem=>{:fields=>[{:name=>:key, :type=>"StringKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:op, :type=>"StringRuleItem.StringOperator", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :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=>:size_for_search, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:size_range_for_search, :type=>"SizeRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:list_type, :type=>"UserListType", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_eligible_for_display, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:closing_reason, :type=>"UserListClosingReason", :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=>[]}, :"CombinedRuleUserList.RuleOperator"=>{:fields=>[]}, :"UserListConversionType.Category"=>{:fields=>[]}, :CrmDataSourceType=>{:fields=>[]}, :CustomerMatchUploadKeyType=>{:fields=>[]}, :"DateRuleItem.DateOperator"=>{:fields=>[]}, :"MutateMembersError.Reason"=>{:fields=>[]}, :"NumberRuleItem.NumberOperator"=>{:fields=>[]}, :"RuleBasedUserList.PrepopulationStatus"=>{:fields=>[]}, :SizeRange=>{:fields=>[]}, :"StringRuleItem.StringOperator"=>{:fields=>[]}, :UserListClosingReason=>{:fields=>[]}, :"UserListError.Reason"=>{:fields=>[]}, :"UserListLogicalRule.Operator"=>{:fields=>[]}, :UserListMembershipStatus=>{:fields=>[]}, :"UserListRuleTypeEnums.Enum"=>{:fields=>[]}, :UserListType=>{:fields=>[]}, :UserListUploadStatus=>{:fields=>[]}}
+ ADWORDSUSERLISTSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/asset_service.rb b/adwords_api/lib/adwords_api/v201809/asset_service.rb
new file mode 100644
index 000000000..760070221
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/asset_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:58.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/asset_service_registry'
+
+module AdwordsApi; module V201809; module AssetService
+ class AssetService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return AssetServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::AssetService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/asset_service_registry.rb b/adwords_api/lib/adwords_api/v201809/asset_service_registry.rb
new file mode 100644
index 000000000..26bff5c03
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/asset_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:58.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module AssetService
+ class AssetServiceRegistry
+ ASSETSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AssetPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AssetOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AssetReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ ASSETSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :Asset=>{:fields=>[{:name=>:asset_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_subtype, :type=>"Asset.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_status, :type=>"AssetStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_type, :original_name=>"Asset.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AssetError=>{:fields=>[{:name=>:reason, :type=>"AssetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AssetOperation=>{:fields=>[{:name=>:operand, :type=>"Asset", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AssetPage=>{:fields=>[{:name=>:entries, :type=>"Asset", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AssetReturnValue=>{:fields=>[{:name=>:value, :type=>"Asset", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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"}, :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"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ImageAsset=>{:fields=>[{:name=>:image_data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_mime_type, :type=>"MediaMimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:full_size_info, :type=>"ImageDimensionInfo", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :ImageDimensionInfo=>{:fields=>[{:name=>:image_height, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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}, :MediaBundleAsset=>{:fields=>[{:name=>:media_bundle_data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :MediaUploadError=>{:fields=>[{:name=>:reason, :type=>"MediaUploadError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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}]}, :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"}, :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}]}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :YouTubeAdVideoRegistrationError=>{:fields=>[{:name=>:reason, :type=>"YouTubeAdVideoRegistrationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :YouTubeVideoAsset=>{:fields=>[{:name=>:you_tube_video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Asset"}, :"AssetError.Reason"=>{:fields=>[]}, :AssetStatus=>{:fields=>[]}, :"Asset.Type"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :MediaMimeType=>{:fields=>[]}, :"MediaUploadError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"YouTubeAdVideoRegistrationError.Reason"=>{:fields=>[]}}
+ ASSETSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return ASSETSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return ASSETSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return ASSETSERVICE_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, AssetServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/batch_job_service.rb b/adwords_api/lib/adwords_api/v201809/batch_job_service.rb
new file mode 100644
index 000000000..ca19cac8c
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/batch_job_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:59.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/batch_job_service_registry'
+
+module AdwordsApi; module V201809; module BatchJobService
+ class BatchJobService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return BatchJobServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::BatchJobService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/batch_job_service_registry.rb b/adwords_api/lib/adwords_api/v201809/batch_job_service_registry.rb
new file mode 100644
index 000000000..e8becda4b
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/batch_job_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:46:59.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module BatchJobService
+ class BatchJobServiceRegistry
+ BATCHJOBSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"BatchJobPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"BatchJobOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"BatchJobReturnValue", :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=>"BatchJobPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ BATCHJOBSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :BatchJob=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"BatchJobStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:progress_stats, :type=>"ProgressStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:upload_url, :type=>"TemporaryUrl", :min_occurs=>0, :max_occurs=>1}, {:name=>:download_url, :type=>"TemporaryUrl", :min_occurs=>0, :max_occurs=>1}, {:name=>:processing_errors, :type=>"BatchJobProcessingError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:disk_usage_quota_balance, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :BatchJobError=>{:fields=>[{:name=>:reason, :type=>"BatchJobError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BatchJobOperation=>{:fields=>[{:name=>:operand, :type=>"BatchJob", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :BatchJobPage=>{:fields=>[{:name=>:entries, :type=>"BatchJob", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :BatchJobProcessingError=>{:fields=>[{:name=>:reason, :type=>"BatchJobProcessingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :BatchJobReturnValue=>{:fields=>[{:name=>:value, :type=>"BatchJob", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :ProgressStats=>{:fields=>[{:name=>:num_operations_executed, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_operations_succeeded, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:estimated_percent_executed, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_results_written, :type=>"long", :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TemporaryUrl=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:expiration, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BatchJobError.Reason"=>{:fields=>[]}, :"BatchJobProcessingError.Reason"=>{:fields=>[]}, :BatchJobStatus=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ BATCHJOBSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return BATCHJOBSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return BATCHJOBSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return BATCHJOBSERVICE_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, BatchJobServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/bidding_strategy_service.rb b/adwords_api/lib/adwords_api/v201809/bidding_strategy_service.rb
new file mode 100644
index 000000000..f48509867
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/bidding_strategy_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:00.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/bidding_strategy_service_registry'
+
+module AdwordsApi; module V201809; module BiddingStrategyService
+ class BiddingStrategyService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return BiddingStrategyServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::BiddingStrategyService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/bidding_strategy_service_registry.rb b/adwords_api/lib/adwords_api/v201809/bidding_strategy_service_registry.rb
new file mode 100644
index 000000000..8e67c0c67
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/bidding_strategy_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:00.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"BiddingStrategyPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ BIDDINGSTRATEGYSERVICE_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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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}, :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}]}, :BiddingStrategyError=>{:fields=>[{:name=>:reason, :type=>"BiddingStrategyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :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}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[{:name=>:viewable_cpm_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionValueBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionsBiddingScheme=>{: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"}, :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"}, :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}, :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_constrained, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_floor, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetOutrankShareBiddingScheme=>{:fields=>[{:name=>:target_outrank_share, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:competitor_domain, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :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"}, :TargetRoasBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_floor, :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"}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"SharedBiddingStrategy.BiddingStrategyStatus"=>{:fields=>[]}, :"BiddingStrategyError.Reason"=>{:fields=>[]}, :BiddingStrategyType=>{: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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{: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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/budget_order_service.rb b/adwords_api/lib/adwords_api/v201809/budget_order_service.rb
new file mode 100644
index 000000000..87c180dc9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/budget_order_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:01.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/budget_order_service_registry'
+
+module AdwordsApi; module V201809; module BudgetOrderService
+ class BudgetOrderService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/billing/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def get_billing_accounts(*args, &block)
+ return execute_action('get_billing_accounts', args, &block)
+ end
+
+ def get_billing_accounts_to_xml(*args)
+ return get_soap_xml('get_billing_accounts', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return BudgetOrderServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::BudgetOrderService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/budget_order_service_registry.rb b/adwords_api/lib/adwords_api/v201809/budget_order_service_registry.rb
new file mode 100644
index 000000000..1c54bff2c
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/budget_order_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:01.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :"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}, :"StatsQueryError.Reason"=>{:fields=>[], :ns=>0}, :"StringFormatError.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}]}, :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=>:total_adjustments, :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}]}, :BudgetOrderError=>{:fields=>[{:name=>:reason, :type=>"BudgetOrderError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :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}]}, :BudgetOrderReturnValue=>{:fields=>[{:name=>:value, :type=>"BudgetOrder", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :CustomerOrderLineError=>{:fields=>[{:name=>:reason, :type=>"CustomerOrderLineError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"BudgetOrderError.Reason"=>{:fields=>[]}, :"BudgetOrderRequest.Status"=>{:fields=>[]}, :"CustomerOrderLineError.Reason"=>{:fields=>[]}}
+ BUDGETORDERSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/budget_service.rb b/adwords_api/lib/adwords_api/v201809/budget_service.rb
new file mode 100644
index 000000000..d1ba91b97
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/budget_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:02.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/budget_service_registry'
+
+module AdwordsApi; module V201809; module BudgetService
+ class BudgetService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return BudgetServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::BudgetService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/budget_service_registry.rb b/adwords_api/lib/adwords_api/v201809/budget_service_registry.rb
new file mode 100644
index 000000000..fc1ede432
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/budget_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:02.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"BudgetPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ BUDGETSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :Budget=>{:fields=>[{:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :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"}, :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"}, :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}]}, :DateRangeError=>{:fields=>[{:name=>:reason, :type=>"DateRangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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"}, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"Budget.BudgetDeliveryMethod"=>{:fields=>[]}, :"Budget.BudgetStatus"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DateRangeError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/campaign_bid_modifier_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_bid_modifier_service.rb
new file mode 100644
index 000000000..0b4746eab
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_bid_modifier_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:03.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_bid_modifier_service_registry'
+
+module AdwordsApi; module V201809; module CampaignBidModifierService
+ class CampaignBidModifierService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignBidModifierServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignBidModifierService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_bid_modifier_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_bid_modifier_service_registry.rb
new file mode 100644
index 000000000..725e18ecd
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_bid_modifier_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:03.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CampaignBidModifierService
+ class CampaignBidModifierServiceRegistry
+ CAMPAIGNBIDMODIFIERSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignBidModifierPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignBidModifierOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignBidModifierReturnValue", :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=>"CampaignBidModifierPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CAMPAIGNBIDMODIFIERSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :CampaignBidModifier=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertising_channel_type, :type=>"AdvertisingChannelType", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :CampaignBidModifierError=>{:fields=>[{:name=>:reason, :type=>"CampaignBidModifierError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignBidModifierOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignBidModifier", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignBidModifierPage=>{:fields=>[{:name=>:entries, :type=>"CampaignBidModifier", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignBidModifierReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignBidModifier", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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}]}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityAccessDenied=>{:fields=>[{:name=>:reason, :type=>"EntityAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :InteractionType=>{:fields=>[], :base=>"Criterion"}, :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"}, :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}]}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdvertisingChannelType=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"CampaignBidModifierError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ CAMPAIGNBIDMODIFIERSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CAMPAIGNBIDMODIFIERSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CAMPAIGNBIDMODIFIERSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CAMPAIGNBIDMODIFIERSERVICE_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, CampaignBidModifierServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_criterion_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_criterion_service.rb
new file mode 100644
index 000000000..0a7c0fd35
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_criterion_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:04.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_criterion_service_registry'
+
+module AdwordsApi; module V201809; module CampaignCriterionService
+ class CampaignCriterionService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignCriterionServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignCriterionService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_criterion_service_registry.rb
new file mode 100644
index 000000000..019ed2755
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_criterion_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:04.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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=>:campaign_criterion_status, :type=>"CampaignCriterion.CampaignCriterionStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_campaign_id, :type=>"long", :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"}, :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"}, :ConstantOperand=>{:fields=>[{:name=>:type, :type=>"ConstantOperand.ConstantType", :min_occurs=>0, :max_occurs=>1}, {:name=>:unit, :type=>"ConstantOperand.Unit", :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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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}, {:name=>:function_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.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}]}, :GeoTargetOperand=>{:fields=>[{:name=>:locations, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"FunctionArgumentOperand"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IncomeOperand=>{:fields=>[{:name=>:tier, :type=>"IncomeTier", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :IncomeRange=>{:fields=>[{:name=>:income_range_type, :type=>"IncomeRange.IncomeRangeType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IpBlock=>{:fields=>[{:name=>:ip_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :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"}, :LocationExtensionOperand=>{:fields=>[{:name=>:radius, :type=>"ConstantOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:location_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :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"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FunctionArgumentOperand=>{:fields=>[{:name=>:function_argument_operand_type, :original_name=>"FunctionArgumentOperand.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :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"}, :Parent=>{:fields=>[{:name=>:parent_type, :type=>"Parent.ParentType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :PlacesOfInterestOperand=>{:fields=>[{:name=>:category, :type=>"PlacesOfInterestOperand.Category", :min_occurs=>0, :max_occurs=>1}], :base=>"FunctionArgumentOperand"}, :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}]}, :ProductAdwordsGrouping=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductAdwordsLabels=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductBiddingCategory=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductBrand=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductCanonicalCondition=>{:fields=>[{:name=>:condition, :type=>"ProductCanonicalCondition.Condition", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductChannel=>{:fields=>[{:name=>:channel, :type=>"ShoppingProductChannel", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductChannelExclusivity=>{:fields=>[{:name=>:channel_exclusivity, :type=>"ShoppingProductChannelExclusivity", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductLegacyCondition=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductCustomAttribute=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductDimension=>{:fields=>[{:name=>:product_dimension_type, :original_name=>"ProductDimension.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ProductOfferId=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductScope=>{:fields=>[{:name=>:dimensions, :type=>"ProductDimension", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :ProductType=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductTypeFull=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :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"}, :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"}, :LocationGroups=>{:fields=>[{:name=>:feed_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:matching_function, :type=>"Function", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}]}, :UnknownProductDimension=>{:fields=>[], :base=>"ProductDimension"}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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}, {:name=>:operator, :type=>"WebpageConditionOperator", :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"}, :YouTubeChannel=>{:fields=>[{:name=>:channel_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:channel_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :YouTubeVideo=>{:fields=>[{:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"CampaignCriterion.CampaignCriterionStatus"=>{:fields=>[]}, :"CampaignCriterionError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConstantOperand.ConstantType"=>{:fields=>[]}, :"ConstantOperand.Unit"=>{:fields=>[]}, :ContentLabelType=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Function.Operator"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"Gender.GenderType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"IncomeRange.IncomeRangeType"=>{:fields=>[]}, :IncomeTier=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"MobileDevice.DeviceType"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperatingSystemVersion.OperatorType"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{:fields=>[]}, :"Parent.ParentType"=>{:fields=>[]}, :"PlacesOfInterestOperand.Category"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"ProductCanonicalCondition.Condition"=>{:fields=>[]}, :ProductDimensionType=>{:fields=>[]}, :"Proximity.DistanceUnits"=>{:fields=>[]}, :"QueryError.Reason"=>{: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=>[]}, :ShoppingProductChannel=>{:fields=>[]}, :ShoppingProductChannelExclusivity=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :WebpageConditionOperand=>{:fields=>[]}, :WebpageConditionOperator=>{: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/v201809/campaign_extension_setting_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_extension_setting_service.rb
new file mode 100644
index 000000000..909c0bd98
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_extension_setting_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:05.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_extension_setting_service_registry'
+
+module AdwordsApi; module V201809; module CampaignExtensionSettingService
+ class CampaignExtensionSettingService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignExtensionSettingServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignExtensionSettingService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_extension_setting_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_extension_setting_service_registry.rb
new file mode 100644
index 000000000..03ad27db4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_extension_setting_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:05.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CampaignExtensionSettingService
+ class CampaignExtensionSettingServiceRegistry
+ CAMPAIGNEXTENSIONSETTINGSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignExtensionSettingPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignExtensionSettingOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignExtensionSettingReturnValue", :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=>"CampaignExtensionSettingPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CAMPAIGNEXTENSIONSETTINGSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :AppFeedItem=>{:fields=>[{:name=>:app_store, :type=>"AppFeedItem.AppStore", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_link_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :CallConversionType=>{:fields=>[{:name=>:conversion_type_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :CallFeedItem=>{:fields=>[{:name=>:call_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_conversion_type, :type=>"CallConversionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:disable_call_conversion_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :CalloutFeedItem=>{:fields=>[{:name=>:callout_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :CampaignExtensionSetting=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:extension_type, :type=>"Feed.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:extension_setting, :type=>"ExtensionSetting", :min_occurs=>0, :max_occurs=>1}]}, :CampaignExtensionSettingOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignExtensionSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignExtensionSettingPage=>{:fields=>[{:name=>:entries, :type=>"CampaignExtensionSetting", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignExtensionSettingReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignExtensionSetting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :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"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :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"}, :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"}, :ExtensionFeedItem=>{: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=>:feed_type, :type=>"Feed.Type", :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=>:device_preference, :type=>"FeedItemDevicePreference", :min_occurs=>0, :max_occurs=>1}, {:name=>:scheduling, :type=>"FeedItemScheduling", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_targeting, :type=>"FeedItemCampaignTargeting", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_targeting, :type=>"FeedItemAdGroupTargeting", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_targeting, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_targeting, :type=>"Location", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_targeting_restriction, :type=>"FeedItemGeoRestriction", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summaries, :type=>"FeedItemPolicySummary", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:extension_feed_item_type, :original_name=>"ExtensionFeedItem.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ExtensionSetting=>{:fields=>[{:name=>:extensions, :type=>"ExtensionFeedItem", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:platform_restrictions, :type=>"ExtensionSetting.Platform", :min_occurs=>0, :max_occurs=>1}]}, :ExtensionSettingError=>{:fields=>[{:name=>:reason, :type=>"ExtensionSettingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemAdGroupTargeting=>{:fields=>[{:name=>:targeting_ad_group_id, :original_name=>"TargetingAdGroupId", :type=>"long", :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}, {:name=>:error_information, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemCampaignTargeting=>{:fields=>[{:name=>:targeting_campaign_id, :original_name=>"TargetingCampaignId", :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemDevicePreference=>{:fields=>[{:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemGeoRestriction=>{:fields=>[{:name=>:geo_restriction, :type=>"GeoRestriction", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemPolicySummary=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_status, :type=>"FeedItemValidationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_errors, :type=>"FeedItemAttributeError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:quality_approval_status, :type=>"FeedItemQualityApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_disapproval_reasons, :type=>"FeedItemQualityDisapprovalReasons", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"PolicySummaryInfo"}, :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}]}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :MessageFeedItem=>{:fields=>[{:name=>:message_business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_extension_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :MoneyWithCurrency=>{:fields=>[{:name=>:money, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :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"}, :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"}, :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}]}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :PolicySummaryInfo=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary_info_type, :original_name=>"PolicySummaryInfo.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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}]}, :PriceFeedItem=>{:fields=>[{:name=>:price_extension_type, :type=>"PriceExtensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_qualifier, :type=>"PriceExtensionPriceQualifier", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:table_rows, :type=>"PriceTableRow", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ExtensionFeedItem"}, :PriceTableRow=>{:fields=>[{:name=>:header, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:price, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_unit, :type=>"PriceExtensionPriceUnit", :min_occurs=>0, :max_occurs=>1}]}, :PromotionFeedItem=>{:fields=>[{:name=>:promotion_target, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:discount_modifier, :type=>"PromotionExtensionDiscountModifier", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_off, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:money_amount_off, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:orders_over_amount, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_start, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_end, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:occasion, :type=>"PromotionExtensionOccasion", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:language, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :ReviewFeedItem=>{:fields=>[{:name=>:review_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_source_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_text_exactly_quoted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :SitelinkFeedItem=>{:fields=>[{:name=>:sitelink_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_line2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_line3, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StructuredSnippetFeedItem=>{:fields=>[{:name=>:header, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ExtensionFeedItem"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlList=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :"AppFeedItem.AppStore"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ExtensionSetting.Platform"=>{:fields=>[]}, :"ExtensionSettingError.Reason"=>{:fields=>[]}, :"FeedItem.Status"=>{:fields=>[]}, :FeedItemQualityApprovalStatus=>{:fields=>[]}, :FeedItemQualityDisapprovalReasons=>{:fields=>[]}, :FeedItemValidationStatus=>{:fields=>[]}, :"Feed.Type"=>{:fields=>[]}, :GeoRestriction=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :PolicyApprovalStatus=>{:fields=>[]}, :PolicySummaryDenormalizedStatus=>{:fields=>[]}, :PolicySummaryReviewState=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :PriceExtensionPriceQualifier=>{:fields=>[]}, :PriceExtensionPriceUnit=>{:fields=>[]}, :PriceExtensionType=>{:fields=>[]}, :PromotionExtensionDiscountModifier=>{:fields=>[]}, :PromotionExtensionOccasion=>{: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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}}
+ CAMPAIGNEXTENSIONSETTINGSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CAMPAIGNEXTENSIONSETTINGSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CAMPAIGNEXTENSIONSETTINGSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CAMPAIGNEXTENSIONSETTINGSERVICE_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, CampaignExtensionSettingServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_feed_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_feed_service.rb
new file mode 100644
index 000000000..88246b57e
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_feed_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:07.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_feed_service_registry'
+
+module AdwordsApi; module V201809; module CampaignFeedService
+ class CampaignFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_feed_service_registry.rb
new file mode 100644
index 000000000..821ac8fe9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:07.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"CampaignFeedPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CAMPAIGNFEEDSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, {:name=>:base_campaign_id, :type=>"long", :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}, {:name=>:partial_failure_errors, :type=>"ApiError", :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=>:unit, :type=>"ConstantOperand.Unit", :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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}, {:name=>:function_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :FunctionParsingError=>{:fields=>[{:name=>:reason, :type=>"FunctionParsingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text_index, :type=>"int", :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}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>[]}, :"ConstantOperand.Unit"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Function.Operator"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"FunctionParsingError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestContextOperand.ContextType"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{: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/v201809/campaign_group_performance_target_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_group_performance_target_service.rb
new file mode 100644
index 000000000..e26eab313
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_group_performance_target_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:09.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_group_performance_target_service_registry'
+
+module AdwordsApi; module V201809; module CampaignGroupPerformanceTargetService
+ class CampaignGroupPerformanceTargetService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignGroupPerformanceTargetServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignGroupPerformanceTargetService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_group_performance_target_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_group_performance_target_service_registry.rb
new file mode 100644
index 000000000..532f394ba
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_group_performance_target_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:09.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CampaignGroupPerformanceTargetService
+ class CampaignGroupPerformanceTargetServiceRegistry
+ CAMPAIGNGROUPPERFORMANCETARGETSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignGroupPerformanceTargetPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignGroupPerformanceTargetOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignGroupPerformanceTargetReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ CAMPAIGNGROUPPERFORMANCETARGETSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :CampaignGroupPerformanceTarget=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:performance_target, :type=>"PerformanceTarget", :min_occurs=>0, :max_occurs=>1}]}, :CampaignGroupPerformanceTargetError=>{:fields=>[{:name=>:reason, :type=>"CampaignGroupPerformanceTargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignGroupPerformanceTargetOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignGroupPerformanceTarget", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignGroupPerformanceTargetPage=>{:fields=>[{:name=>:entries, :type=>"CampaignGroupPerformanceTarget", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignGroupPerformanceTargetReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignGroupPerformanceTarget", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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}]}, :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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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"}, :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"}, :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}]}, :PerformanceTarget=>{:fields=>[{:name=>:volume_goal_type, :type=>"VolumeGoalType", :min_occurs=>0, :max_occurs=>1}, {:name=>:volume_target_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:efficiency_target_type, :type=>"EfficiencyTargetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:efficiency_target_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:spend_target_type, :type=>"SpendTargetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:forecast_status, :type=>"PerformanceTargetStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:has_promoted_suggestions, :type=>"boolean", :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}]}, :PerformanceTargetError=>{:fields=>[{:name=>:reason, :type=>"PerformanceTargetError.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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"CampaignGroupPerformanceTargetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :EfficiencyTargetType=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PerformanceTargetError.Reason"=>{:fields=>[]}, :PerformanceTargetStatus=>{: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=>[]}, :SpendTargetType=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :VolumeGoalType=>{:fields=>[]}}
+ CAMPAIGNGROUPPERFORMANCETARGETSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CAMPAIGNGROUPPERFORMANCETARGETSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CAMPAIGNGROUPPERFORMANCETARGETSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CAMPAIGNGROUPPERFORMANCETARGETSERVICE_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, CampaignGroupPerformanceTargetServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_group_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_group_service.rb
new file mode 100644
index 000000000..d554bd7b4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_group_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:08.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_group_service_registry'
+
+module AdwordsApi; module V201809; module CampaignGroupService
+ class CampaignGroupService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignGroupServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignGroupService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_group_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_group_service_registry.rb
new file mode 100644
index 000000000..424ff7742
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_group_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:08.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CampaignGroupService
+ class CampaignGroupServiceRegistry
+ CAMPAIGNGROUPSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CampaignGroupPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CampaignGroupOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CampaignGroupReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ CAMPAIGNGROUPSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :CampaignGroup=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CampaignGroupStatus", :min_occurs=>0, :max_occurs=>1}]}, :CampaignGroupError=>{:fields=>[{:name=>:reason, :type=>"CampaignGroupError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignGroupOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignGroup", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignGroupPage=>{:fields=>[{:name=>:entries, :type=>"CampaignGroup", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CampaignGroupReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignGroup", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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}]}, :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"}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"CampaignGroupError.Reason"=>{:fields=>[]}, :CampaignGroupStatus=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ CAMPAIGNGROUPSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CAMPAIGNGROUPSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CAMPAIGNGROUPSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CAMPAIGNGROUPSERVICE_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, CampaignGroupServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_service.rb
new file mode 100644
index 000000000..e675cf2b0
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:10.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_service_registry'
+
+module AdwordsApi; module V201809; module CampaignService
+ class CampaignService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_label(*args, &block)
+ return execute_action('mutate_label', args, &block)
+ end
+
+ def mutate_label_to_xml(*args)
+ return get_soap_xml('mutate_label', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_service_registry.rb
new file mode 100644
index 000000000..c12b6d542
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:10.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :mutate_label=>{:input=>[{:name=>:operations, :type=>"CampaignLabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_label_response", :fields=>[{:name=>:rval, :type=>"CampaignLabelReturnValue", :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"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :LabelAttribute=>{:fields=>[{:name=>:label_attribute_type, :original_name=>"LabelAttribute.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"}, :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}, {:name=>:target_roas_override, :type=>"double", :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=>: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"}, :Campaign=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_group_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=>: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=>:advertising_channel_type, :type=>"AdvertisingChannelType", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertising_channel_sub_type, :type=>"AdvertisingChannelSubType", :min_occurs=>0, :max_occurs=>1}, {:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}, {:name=>:labels, :type=>"Label", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:bidding_strategy_configuration, :type=>"BiddingStrategyConfiguration", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_trial_type, :type=>"CampaignTrialType", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:forward_compatibility_map, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:vanity_pharma, :type=>"VanityPharma", :min_occurs=>0, :max_occurs=>1}, {:name=>:universal_app_campaign_info, :type=>"UniversalAppCampaignInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:selective_optimization, :type=>"SelectiveOptimization", :min_occurs=>0, :max_occurs=>1}]}, :CampaignError=>{:fields=>[{:name=>:reason, :type=>"CampaignError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignLabel=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :CampaignLabelOperation=>{:fields=>[{:name=>:operand, :type=>"CampaignLabel", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CampaignLabelReturnValue=>{:fields=>[{:name=>:value, :type=>"CampaignLabel", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :TextLabel=>{:fields=>[], :base=>"Label"}, :DisplayAttribute=>{:fields=>[{:name=>:background_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"LabelAttribute"}, :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"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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}, :ConversionOptimizerEligibility=>{:fields=>[{:name=>:eligible, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:rejection_reasons, :type=>"ConversionOptimizerEligibility.RejectionReason", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :CpaBid=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"Bids"}, :CpcBid=>{:fields=>[{:name=>: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"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :DateRangeError=>{:fields=>[{:name=>:reason, :type=>"DateRangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :DynamicSearchAdsSetting=>{:fields=>[{:name=>:domain_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:use_supplied_urls_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_feed, :type=>"PageFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :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}]}, :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"}, :Label=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Label.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute, :type=>"LabelAttribute", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_type, :original_name=>"Label.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ListError=>{:fields=>[{:name=>:reason, :type=>"ListError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ListOperations=>{:fields=>[{:name=>:clear, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:operators, :type=>"ListOperations.ListOperator", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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"}, :ManualCpcBiddingScheme=>{:fields=>[{:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :ManualCpmBiddingScheme=>{:fields=>[{:name=>:viewable_cpm_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionValueBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :MaximizeConversionsBiddingScheme=>{:fields=>[], :base=>"BiddingScheme"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :UniversalAppCampaignSetting=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_vendor, :type=>"MobileApplicationVendor", :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}, {:name=>:description3, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description4, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:youtube_video_media_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:image_media_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:universal_app_bidding_strategy_goal_type, :type=>"UniversalAppBiddingStrategyGoalType", :min_occurs=>0, :max_occurs=>1}, {:name=>:youtube_video_media_ids_ops, :type=>"ListOperations", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_media_ids_ops, :type=>"ListOperations", :min_occurs=>0, :max_occurs=>1}, {:name=>:ads_policy_decisions, :type=>"UniversalAppCampaignAdsPolicyDecisions", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Setting"}, :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"}, :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"}, :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}, :PageFeed=>{:fields=>[{:name=>:feed_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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_constrained, :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"}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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"}, :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :SelectiveOptimization=>{:fields=>[{:name=>:conversion_type_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:conversion_type_ids_ops, :type=>"ListOperations", :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}]}, :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"}, :ShoppingSetting=>{:fields=>[{:name=>:merchant_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:sales_country, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_priority, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:enable_local, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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"}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}]}, :TargetCpaBiddingScheme=>{:fields=>[{:name=>:target_cpa, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_floor, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"BiddingScheme"}, :TargetOutrankShareBiddingScheme=>{:fields=>[{:name=>:target_outrank_share, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:competitor_domain, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc_bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_changes_for_raises_only, :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"}, :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}]}, :TargetRoasBiddingScheme=>{:fields=>[{:name=>:target_roas, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_ceiling, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_floor, :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"}, :TargetingSetting=>{:fields=>[{:name=>:details, :type=>"TargetingSettingDetail", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Setting"}, :TrackingSetting=>{:fields=>[{:name=>:tracking_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Setting"}, :UniversalAppCampaignAdsPolicyDecisions=>{:fields=>[{:name=>:universal_app_campaign_asset, :type=>"UniversalAppCampaignAsset", :min_occurs=>0, :max_occurs=>1}, {:name=>:asset_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :UniversalAppCampaignInfo=>{:fields=>[{:name=>:bidding_strategy_goal_type, :type=>"UniversalAppBiddingStrategyGoalType", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_vendor, :type=>"MobileApplicationVendor", :min_occurs=>0, :max_occurs=>1}]}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VanityPharma=>{:fields=>[{:name=>:vanity_pharma_display_url_mode, :type=>"VanityPharmaDisplayUrlMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:vanity_pharma_text, :type=>"VanityPharmaText", :min_occurs=>0, :max_occurs=>1}]}, :AdServingOptimizationStatus=>{:fields=>[]}, :AdvertisingChannelSubType=>{:fields=>[]}, :AdvertisingChannelType=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :BiddingStrategySource=>{:fields=>[]}, :BiddingStrategyType=>{:fields=>[]}, :"Budget.BudgetDeliveryMethod"=>{:fields=>[]}, :"Budget.BudgetStatus"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"CampaignError.Reason"=>{:fields=>[]}, :CampaignStatus=>{:fields=>[]}, :CampaignTrialType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConversionOptimizerEligibility.RejectionReason"=>{:fields=>[]}, :CriterionTypeGroup=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DateRangeError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ForwardCompatibilityError.Reason"=>{:fields=>[]}, :"GeoTargetTypeSetting.NegativeGeoTargetType"=>{:fields=>[]}, :"GeoTargetTypeSetting.PositiveGeoTargetType"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"Label.Status"=>{:fields=>[]}, :Level=>{:fields=>[]}, :"ListError.Reason"=>{:fields=>[]}, :"ListOperations.ListOperator"=>{:fields=>[]}, :MobileApplicationVendor=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PageOnePromotedBiddingScheme.StrategyGoal"=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{: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=>[]}, :ServingStatus=>{:fields=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StatsQueryError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :TimeUnit=>{:fields=>[]}, :UniversalAppBiddingStrategyGoalType=>{:fields=>[]}, :UniversalAppCampaignAsset=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :VanityPharmaDisplayUrlMode=>{:fields=>[]}, :VanityPharmaText=>{: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/v201809/campaign_shared_set_service.rb b/adwords_api/lib/adwords_api/v201809/campaign_shared_set_service.rb
new file mode 100644
index 000000000..3f269f15b
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_shared_set_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:12.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/campaign_shared_set_service_registry'
+
+module AdwordsApi; module V201809; module CampaignSharedSetService
+ class CampaignSharedSetService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CampaignSharedSetServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CampaignSharedSetService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/campaign_shared_set_service_registry.rb b/adwords_api/lib/adwords_api/v201809/campaign_shared_set_service_registry.rb
new file mode 100644
index 000000000..b46429f19
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/campaign_shared_set_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:12.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"CampaignSharedSetPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CAMPAIGNSHAREDSETSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{: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=>[]}, :SharedSetType=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{: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
+
+ # 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, CampaignSharedSetServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/constant_data_service.rb b/adwords_api/lib/adwords_api/v201809/constant_data_service.rb
new file mode 100644
index 000000000..9e38ec6b5
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/constant_data_service.rb
@@ -0,0 +1,110 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:13.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/constant_data_service_registry'
+
+module AdwordsApi; module V201809; module ConstantDataService
+ class ConstantDataService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get_age_range_criterion(*args, &block)
+ return execute_action('get_age_range_criterion', args, &block)
+ end
+
+ def get_age_range_criterion_to_xml(*args)
+ return get_soap_xml('get_age_range_criterion', args)
+ end
+
+ def get_carrier_criterion(*args, &block)
+ return execute_action('get_carrier_criterion', args, &block)
+ end
+
+ def get_carrier_criterion_to_xml(*args)
+ return get_soap_xml('get_carrier_criterion', args)
+ end
+
+ def get_gender_criterion(*args, &block)
+ return execute_action('get_gender_criterion', args, &block)
+ end
+
+ def get_gender_criterion_to_xml(*args)
+ return get_soap_xml('get_gender_criterion', args)
+ end
+
+ def get_language_criterion(*args, &block)
+ return execute_action('get_language_criterion', args, &block)
+ end
+
+ def get_language_criterion_to_xml(*args)
+ return get_soap_xml('get_language_criterion', args)
+ end
+
+ def get_mobile_app_category_criterion(*args, &block)
+ return execute_action('get_mobile_app_category_criterion', args, &block)
+ end
+
+ def get_mobile_app_category_criterion_to_xml(*args)
+ return get_soap_xml('get_mobile_app_category_criterion', args)
+ end
+
+ def get_mobile_device_criterion(*args, &block)
+ return execute_action('get_mobile_device_criterion', args, &block)
+ end
+
+ def get_mobile_device_criterion_to_xml(*args)
+ return get_soap_xml('get_mobile_device_criterion', args)
+ end
+
+ def get_operating_system_version_criterion(*args, &block)
+ return execute_action('get_operating_system_version_criterion', args, &block)
+ end
+
+ def get_operating_system_version_criterion_to_xml(*args)
+ return get_soap_xml('get_operating_system_version_criterion', args)
+ end
+
+ def get_product_bidding_category_data(*args, &block)
+ return execute_action('get_product_bidding_category_data', args, &block)
+ end
+
+ def get_product_bidding_category_data_to_xml(*args)
+ return get_soap_xml('get_product_bidding_category_data', args)
+ end
+
+ def get_user_interest_criterion(*args, &block)
+ return execute_action('get_user_interest_criterion', args, &block)
+ end
+
+ def get_user_interest_criterion_to_xml(*args)
+ return get_soap_xml('get_user_interest_criterion', args)
+ end
+
+ def get_vertical_criterion(*args, &block)
+ return execute_action('get_vertical_criterion', args, &block)
+ end
+
+ def get_vertical_criterion_to_xml(*args)
+ return get_soap_xml('get_vertical_criterion', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return ConstantDataServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::ConstantDataService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/constant_data_service_registry.rb b/adwords_api/lib/adwords_api/v201809/constant_data_service_registry.rb
new file mode 100644
index 000000000..e7f7d35df
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/constant_data_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:13.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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_app_category_criterion=>{:input=>[], :output=>{:name=>"get_mobile_app_category_criterion_response", :fields=>[{:name=>:rval, :type=>"MobileAppCategory", :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_product_bidding_category_data=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_product_bidding_category_data_response", :fields=>[{:name=>:rval, :type=>"ProductBiddingCategoryData", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_user_interest_criterion=>{:input=>[{:name=>:user_interest_taxonomy_type, :type=>"ConstantDataService.UserInterestTaxonomyType", :min_occurs=>0, :max_occurs=>1}], :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"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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"}, :ConstantData=>{:fields=>[{:name=>:constant_data_type, :original_name=>"ConstantData.Type", :type=>"string", :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}]}, :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}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :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"}, :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}]}, :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}]}, :ProductAdwordsGrouping=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductAdwordsLabels=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductBiddingCategory=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductBiddingCategoryData=>{:fields=>[{:name=>:dimension_value, :type=>"ProductBiddingCategory", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_dimension_value, :type=>"ProductBiddingCategory", :min_occurs=>0, :max_occurs=>1}, {:name=>:country, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"ShoppingBiddingDimensionStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_value, :type=>"String_StringMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ConstantData"}, :ProductBrand=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductCanonicalCondition=>{:fields=>[{:name=>:condition, :type=>"ProductCanonicalCondition.Condition", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductChannel=>{:fields=>[{:name=>:channel, :type=>"ShoppingProductChannel", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductChannelExclusivity=>{:fields=>[{:name=>:channel_exclusivity, :type=>"ShoppingProductChannelExclusivity", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductLegacyCondition=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductCustomAttribute=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductDimension=>{:fields=>[{:name=>:product_dimension_type, :original_name=>"ProductDimension.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ProductOfferId=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductType=>{:fields=>[{:name=>:type, :type=>"ProductDimensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :ProductTypeFull=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ProductDimension"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}]}, :UnknownProductDimension=>{:fields=>[], :base=>"ProductDimension"}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :"AdxError.Reason"=>{:fields=>[]}, :"AgeRange.AgeRangeType"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"ConstantDataService.UserInterestTaxonomyType"=>{: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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperatingSystemVersion.OperatorType"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"ProductCanonicalCondition.Condition"=>{:fields=>[]}, :ProductDimensionType=>{: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=>[]}, :ShoppingBiddingDimensionStatus=>{:fields=>[]}, :ShoppingProductChannel=>{:fields=>[]}, :ShoppingProductChannelExclusivity=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{: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/v201809/conversion_tracker_service.rb b/adwords_api/lib/adwords_api/v201809/conversion_tracker_service.rb
new file mode 100644
index 000000000..d96ac5dff
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/conversion_tracker_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:15.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/conversion_tracker_service_registry'
+
+module AdwordsApi; module V201809; module ConversionTrackerService
+ class ConversionTrackerService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return ConversionTrackerServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::ConversionTrackerService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/conversion_tracker_service_registry.rb b/adwords_api/lib/adwords_api/v201809/conversion_tracker_service_registry.rb
new file mode 100644
index 000000000..8c11ae9ff
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/conversion_tracker_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:15.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"ConversionTrackerPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CONVERSIONTRACKERSERVICE_TYPES = {:AdCallMetricsConversion=>{:fields=>[{:name=>:phone_call_duration, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :AdWordsConversionTracker=>{:fields=>[{:name=>:tracking_code_type, :type=>"AdWordsConversionTracker.TrackingCodeType", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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=>:snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_conversion_type, :type=>"AppConversion.AppConversionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_postback_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :AppPostbackUrlError=>{:fields=>[{:name=>:reason, :type=>"AppPostbackUrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :ConversionTrackerPage=>{:fields=>[{:name=>:entries, :type=>"ConversionTracker", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :ConversionTracker=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:original_conversion_type_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=>:google_event_snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:google_global_site_tag, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:data_driven_model_status, :type=>"DataDrivenModelStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_type_owner_customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:viewthrough_lookback_window, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctc_lookback_window, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:counting_type, :type=>"ConversionDeduplicationMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:default_revenue_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:default_revenue_currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:always_use_default_revenue_value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:exclude_from_bidding, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribution_model_type, :type=>"AttributionModelType", :min_occurs=>0, :max_occurs=>1}, {:name=>:most_recent_conversion_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:last_received_request_time, :type=>"string", :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"}, :ConversionTrackingError=>{:fields=>[{:name=>:reason, :type=>"ConversionTrackingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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}]}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UploadCallConversion=>{:fields=>[], :base=>"ConversionTracker"}, :UploadConversion=>{:fields=>[{:name=>:is_externally_attributed, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :WebsiteCallMetricsConversion=>{:fields=>[{:name=>:phone_call_duration, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ConversionTracker"}, :"AdWordsConversionTracker.TrackingCodeType"=>{:fields=>[]}, :"AppConversion.AppConversionType"=>{:fields=>[]}, :"AppConversion.AppPlatform"=>{:fields=>[]}, :"AppPostbackUrlError.Reason"=>{:fields=>[]}, :AttributionModelType=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :ConversionDeduplicationMode=>{:fields=>[]}, :"ConversionTracker.Category"=>{:fields=>[]}, :"ConversionTracker.Status"=>{:fields=>[]}, :"ConversionTrackingError.Reason"=>{:fields=>[]}, :DataDrivenModelStatus=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/custom_affinity_service.rb b/adwords_api/lib/adwords_api/v201809/custom_affinity_service.rb
new file mode 100644
index 000000000..546bf65fa
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/custom_affinity_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:16.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/custom_affinity_service_registry'
+
+module AdwordsApi; module V201809; module CustomAffinityService
+ class CustomAffinityService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/rm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_token(*args, &block)
+ return execute_action('mutate_token', args, &block)
+ end
+
+ def mutate_token_to_xml(*args)
+ return get_soap_xml('mutate_token', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CustomAffinityServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CustomAffinityService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/custom_affinity_service_registry.rb b/adwords_api/lib/adwords_api/v201809/custom_affinity_service_registry.rb
new file mode 100644
index 000000000..36810cea4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/custom_affinity_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:16.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CustomAffinityService
+ class CustomAffinityServiceRegistry
+ CUSTOMAFFINITYSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CustomAffinityPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CustomAffinityOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CustomAffinityReturnValue", :min_occurs=>0, :max_occurs=>1}]}}, :mutate_token=>{:input=>[{:name=>:operations, :type=>"CustomAffinityTokenOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_token_response", :fields=>[{:name=>:rval, :type=>"CustomAffinityTokenReturnValue", :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=>"CustomAffinityPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CUSTOMAFFINITYSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.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}, :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :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}, :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", :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}, :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=>: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}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.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}, :"QueryError.Reason"=>{: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}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CustomAffinity=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"CustomAffinityStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"CustomAffinityType", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:tokens, :type=>"CustomAffinityToken", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CustomAffinityError=>{:fields=>[{:name=>:reason, :type=>"CustomAffinityError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CustomAffinityOperation=>{:fields=>[{:name=>:operand, :type=>"CustomAffinity", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CustomAffinityPage=>{:fields=>[{:name=>:entries, :type=>"CustomAffinity", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :CustomAffinityReturnValue=>{:fields=>[{:name=>:entries, :type=>"CustomAffinity", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CustomAffinityToken=>{:fields=>[{:name=>:custom_affinity_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:custom_affinity_token_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:token_type, :type=>"CustomAffinityToken.TokenType", :min_occurs=>0, :max_occurs=>1}, {:name=>:parameter, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CustomAffinityTokenOperation=>{:fields=>[{:name=>:operand, :type=>"CustomAffinityToken", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CustomAffinityTokenReturnValue=>{:fields=>[{:name=>:entries, :type=>"CustomAffinityToken", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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}]}, :"CriterionError.Reason"=>{:fields=>[]}, :"CustomAffinityError.Reason"=>{:fields=>[]}, :CustomAffinityStatus=>{:fields=>[]}, :"CustomAffinityToken.TokenType"=>{:fields=>[]}, :CustomAffinityType=>{:fields=>[]}}
+ CUSTOMAFFINITYSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ def self.get_method_signature(method_name)
+ return CUSTOMAFFINITYSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CUSTOMAFFINITYSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CUSTOMAFFINITYSERVICE_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, CustomAffinityServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_extension_setting_service.rb b/adwords_api/lib/adwords_api/v201809/customer_extension_setting_service.rb
new file mode 100644
index 000000000..b068bcdc5
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_extension_setting_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:17.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/customer_extension_setting_service_registry'
+
+module AdwordsApi; module V201809; module CustomerExtensionSettingService
+ class CustomerExtensionSettingService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CustomerExtensionSettingServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CustomerExtensionSettingService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_extension_setting_service_registry.rb b/adwords_api/lib/adwords_api/v201809/customer_extension_setting_service_registry.rb
new file mode 100644
index 000000000..731398ef9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_extension_setting_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:17.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CustomerExtensionSettingService
+ class CustomerExtensionSettingServiceRegistry
+ CUSTOMEREXTENSIONSETTINGSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CustomerExtensionSettingPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CustomerExtensionSettingOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CustomerExtensionSettingReturnValue", :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=>"CustomerExtensionSettingPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CUSTOMEREXTENSIONSETTINGSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :AppFeedItem=>{:fields=>[{:name=>:app_store, :type=>"AppFeedItem.AppStore", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_link_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:app_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :CallConversionType=>{:fields=>[{:name=>:conversion_type_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :CallFeedItem=>{:fields=>[{:name=>:call_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_conversion_type, :type=>"CallConversionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:disable_call_conversion_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :CalloutFeedItem=>{:fields=>[{:name=>:callout_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :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"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomerExtensionSetting=>{:fields=>[{:name=>:extension_type, :type=>"Feed.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:extension_setting, :type=>"ExtensionSetting", :min_occurs=>0, :max_occurs=>1}]}, :CustomerExtensionSettingOperation=>{:fields=>[{:name=>:operand, :type=>"CustomerExtensionSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CustomerExtensionSettingPage=>{:fields=>[{:name=>:entries, :type=>"CustomerExtensionSetting", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CustomerExtensionSettingReturnValue=>{:fields=>[{:name=>:value, :type=>"CustomerExtensionSetting", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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}]}, :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"}, :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"}, :ExtensionFeedItem=>{: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=>:feed_type, :type=>"Feed.Type", :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=>:device_preference, :type=>"FeedItemDevicePreference", :min_occurs=>0, :max_occurs=>1}, {:name=>:scheduling, :type=>"FeedItemScheduling", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_targeting, :type=>"FeedItemCampaignTargeting", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_targeting, :type=>"FeedItemAdGroupTargeting", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_targeting, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_targeting, :type=>"Location", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_targeting_restriction, :type=>"FeedItemGeoRestriction", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summaries, :type=>"FeedItemPolicySummary", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:extension_feed_item_type, :original_name=>"ExtensionFeedItem.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ExtensionSetting=>{:fields=>[{:name=>:extensions, :type=>"ExtensionFeedItem", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:platform_restrictions, :type=>"ExtensionSetting.Platform", :min_occurs=>0, :max_occurs=>1}]}, :ExtensionSettingError=>{:fields=>[{:name=>:reason, :type=>"ExtensionSettingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemAdGroupTargeting=>{:fields=>[{:name=>:targeting_ad_group_id, :original_name=>"TargetingAdGroupId", :type=>"long", :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}, {:name=>:error_information, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemCampaignTargeting=>{:fields=>[{:name=>:targeting_campaign_id, :original_name=>"TargetingCampaignId", :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemDevicePreference=>{:fields=>[{:name=>:device_preference, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemGeoRestriction=>{:fields=>[{:name=>:geo_restriction, :type=>"GeoRestriction", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemPolicySummary=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_status, :type=>"FeedItemValidationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_errors, :type=>"FeedItemAttributeError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:quality_approval_status, :type=>"FeedItemQualityApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_disapproval_reasons, :type=>"FeedItemQualityDisapprovalReasons", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"PolicySummaryInfo"}, :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}]}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :MessageFeedItem=>{:fields=>[{:name=>:message_business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_extension_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:message_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :MoneyWithCurrency=>{:fields=>[{:name=>:money, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :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"}, :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"}, :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}]}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :PolicySummaryInfo=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary_info_type, :original_name=>"PolicySummaryInfo.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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}]}, :PriceFeedItem=>{:fields=>[{:name=>:price_extension_type, :type=>"PriceExtensionType", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_qualifier, :type=>"PriceExtensionPriceQualifier", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:language, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:table_rows, :type=>"PriceTableRow", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ExtensionFeedItem"}, :PriceTableRow=>{:fields=>[{:name=>:header, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:price, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:price_unit, :type=>"PriceExtensionPriceUnit", :min_occurs=>0, :max_occurs=>1}]}, :PromotionFeedItem=>{:fields=>[{:name=>:promotion_target, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:discount_modifier, :type=>"PromotionExtensionDiscountModifier", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_off, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:money_amount_off, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:orders_over_amount, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_start, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_end, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:occasion, :type=>"PromotionExtensionOccasion", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:promotion_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}, {:name=>:language, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :ReviewFeedItem=>{:fields=>[{:name=>:review_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_source_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:review_text_exactly_quoted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :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"}, :SitelinkFeedItem=>{:fields=>[{:name=>:sitelink_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_line2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_line3, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_mobile_urls, :type=>"UrlList", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sitelink_url_custom_parameters, :type=>"CustomParameters", :min_occurs=>0, :max_occurs=>1}], :base=>"ExtensionFeedItem"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StructuredSnippetFeedItem=>{:fields=>[{:name=>:header, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ExtensionFeedItem"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlList=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :"AppFeedItem.AppStore"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"ExtensionSetting.Platform"=>{:fields=>[]}, :"ExtensionSettingError.Reason"=>{:fields=>[]}, :"FeedItem.Status"=>{:fields=>[]}, :FeedItemQualityApprovalStatus=>{:fields=>[]}, :FeedItemQualityDisapprovalReasons=>{:fields=>[]}, :FeedItemValidationStatus=>{:fields=>[]}, :"Feed.Type"=>{:fields=>[]}, :GeoRestriction=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :PolicyApprovalStatus=>{:fields=>[]}, :PolicySummaryDenormalizedStatus=>{:fields=>[]}, :PolicySummaryReviewState=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :PriceExtensionPriceQualifier=>{:fields=>[]}, :PriceExtensionPriceUnit=>{:fields=>[]}, :PriceExtensionType=>{:fields=>[]}, :PromotionExtensionDiscountModifier=>{:fields=>[]}, :PromotionExtensionOccasion=>{: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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}}
+ CUSTOMEREXTENSIONSETTINGSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CUSTOMEREXTENSIONSETTINGSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CUSTOMEREXTENSIONSETTINGSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CUSTOMEREXTENSIONSETTINGSERVICE_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, CustomerExtensionSettingServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_feed_service.rb b/adwords_api/lib/adwords_api/v201809/customer_feed_service.rb
new file mode 100644
index 000000000..8e67b3a8c
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_feed_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:19.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/customer_feed_service_registry'
+
+module AdwordsApi; module V201809; module CustomerFeedService
+ class CustomerFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CustomerFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CustomerFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/customer_feed_service_registry.rb
new file mode 100644
index 000000000..6d4bb574f
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:19.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CustomerFeedService
+ class CustomerFeedServiceRegistry
+ CUSTOMERFEEDSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CustomerFeedPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CustomerFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CustomerFeedReturnValue", :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=>"CustomerFeedPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CUSTOMERFEEDSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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=>:unit, :type=>"ConstantOperand.Unit", :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"}, :CustomerFeed=>{:fields=>[{:name=>:feed_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=>"CustomerFeed.Status", :min_occurs=>0, :max_occurs=>1}]}, :CustomerFeedError=>{:fields=>[{:name=>:reason, :type=>"CustomerFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CustomerFeedOperation=>{:fields=>[{:name=>:operand, :type=>"CustomerFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CustomerFeedPage=>{:fields=>[{:name=>:entries, :type=>"CustomerFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :CustomerFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"CustomerFeed", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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}, {:name=>:function_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :FunctionParsingError=>{:fields=>[{:name=>:reason, :type=>"FunctionParsingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:offending_text_index, :type=>"int", :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}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"ConstantOperand.ConstantType"=>{:fields=>[]}, :"ConstantOperand.Unit"=>{:fields=>[]}, :"CustomerFeed.Status"=>{:fields=>[]}, :"CustomerFeedError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"Function.Operator"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"FunctionParsingError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestContextOperand.ContextType"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ CUSTOMERFEEDSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CUSTOMERFEEDSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CUSTOMERFEEDSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CUSTOMERFEEDSERVICE_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, CustomerFeedServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_negative_criterion_service.rb b/adwords_api/lib/adwords_api/v201809/customer_negative_criterion_service.rb
new file mode 100644
index 000000000..adb5ac9d5
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_negative_criterion_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:20.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/customer_negative_criterion_service_registry'
+
+module AdwordsApi; module V201809; module CustomerNegativeCriterionService
+ class CustomerNegativeCriterionService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CustomerNegativeCriterionServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CustomerNegativeCriterionService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_negative_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201809/customer_negative_criterion_service_registry.rb
new file mode 100644
index 000000000..d547e425e
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_negative_criterion_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:20.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CustomerNegativeCriterionService
+ class CustomerNegativeCriterionServiceRegistry
+ CUSTOMERNEGATIVECRITERIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"CustomerNegativeCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"CustomerNegativeCriterionOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"CustomerNegativeCriterionReturnValue", :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=>"CustomerNegativeCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ CUSTOMERNEGATIVECRITERIONSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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"}, :CustomerNegativeCriterion=>{:fields=>[{:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}]}, :CustomerNegativeCriterionError=>{:fields=>[{:name=>:reason, :type=>"CustomerNegativeCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CustomerNegativeCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"CustomerNegativeCriterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :CustomerNegativeCriterionPage=>{:fields=>[{:name=>:entries, :type=>"CustomerNegativeCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :CustomerNegativeCriterionReturnValue=>{:fields=>[{:name=>:value, :type=>"CustomerNegativeCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :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"}, :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}]}, :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}]}, :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}]}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :YouTubeChannel=>{:fields=>[{:name=>:channel_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:channel_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :YouTubeVideo=>{:fields=>[{:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :ContentLabelType=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"CustomerNegativeCriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ CUSTOMERNEGATIVECRITERIONSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return CUSTOMERNEGATIVECRITERIONSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return CUSTOMERNEGATIVECRITERIONSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return CUSTOMERNEGATIVECRITERIONSERVICE_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, CustomerNegativeCriterionServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_service.rb b/adwords_api/lib/adwords_api/v201809/customer_service.rb
new file mode 100644
index 000000000..e0461eb99
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_service.rb
@@ -0,0 +1,62 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:21.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/customer_service_registry'
+
+module AdwordsApi; module V201809; module CustomerService
+ class CustomerService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/mcm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get_customers(*args, &block)
+ return execute_action('get_customers', args, &block)
+ end
+
+ def get_customers_to_xml(*args)
+ return get_soap_xml('get_customers', args)
+ end
+
+ def get_service_links(*args, &block)
+ return execute_action('get_service_links', args, &block)
+ end
+
+ def get_service_links_to_xml(*args)
+ return get_soap_xml('get_service_links', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_service_links(*args, &block)
+ return execute_action('mutate_service_links', args, &block)
+ end
+
+ def mutate_service_links_to_xml(*args)
+ return get_soap_xml('mutate_service_links', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CustomerServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CustomerService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_service_registry.rb b/adwords_api/lib/adwords_api/v201809/customer_service_registry.rb
new file mode 100644
index 000000000..eb070b1bb
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:21.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module CustomerService
+ class CustomerServiceRegistry
+ CUSTOMERSERVICE_METHODS = {:get_customers=>{:input=>[], :output=>{:name=>"get_customers_response", :fields=>[{:name=>:rval, :type=>"Customer", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :get_service_links=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_service_links_response", :fields=>[{:name=>:rval, :type=>"ServiceLink", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :mutate=>{:input=>[{:name=>:customer, :type=>"Customer", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"Customer", :min_occurs=>0, :max_occurs=>1}]}}, :mutate_service_links=>{:input=>[{:name=>:operations, :type=>"ServiceLinkOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_service_links_response", :fields=>[{:name=>:rval, :type=>"ServiceLink", :min_occurs=>0, :max_occurs=>:unbounded}]}}}
+ CUSTOMERSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :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}, :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}, :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}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.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}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.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}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :SortOrder=>{:fields=>[], :ns=>0}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"UrlError.Reason"=>{:fields=>[], :ns=>0}, :ConversionTrackingSettings=>{:fields=>[{:name=>:effective_conversion_tracking_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:uses_cross_account_conversion_tracking, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}, {:name=>:auto_tagging_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:tracking_url_template, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:final_url_suffix, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:parallel_tracking_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_tracking_settings, :type=>"ConversionTrackingSettings", :min_occurs=>0, :max_occurs=>1}, {:name=>:remarketing_settings, :type=>"RemarketingSettings", :min_occurs=>0, :max_occurs=>1}]}, :CustomerError=>{:fields=>[{:name=>:reason, :type=>"CustomerError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RemarketingSettings=>{:fields=>[{:name=>:snippet, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:google_global_site_tag, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ServiceLink=>{:fields=>[{:name=>:service_type, :type=>"ServiceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_link_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:link_status, :type=>"ServiceLink.LinkStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ServiceLinkOperation=>{:fields=>[{:name=>:operand, :type=>"ServiceLink", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :"CustomerError.Reason"=>{:fields=>[]}, :"ServiceLink.LinkStatus"=>{:fields=>[]}, :ServiceType=>{:fields=>[]}}
+ CUSTOMERSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/customer_sync_service.rb b/adwords_api/lib/adwords_api/v201809/customer_sync_service.rb
new file mode 100644
index 000000000..da833b0e9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_sync_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:22.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/customer_sync_service_registry'
+
+module AdwordsApi; module V201809; module CustomerSyncService
+ class CustomerSyncService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/ch/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return CustomerSyncServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::CustomerSyncService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/customer_sync_service_registry.rb b/adwords_api/lib/adwords_api/v201809/customer_sync_service_registry.rb
new file mode 100644
index 000000000..67d0c8fa1
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/customer_sync_service_registry.rb
@@ -0,0 +1,47 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:22.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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 = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :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}, :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.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}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringFormatError.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=>:removed_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_feeds, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:removed_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=>:removed_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=>:removed_campaign_criteria, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:changed_feeds, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:removed_feeds, :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}]}, :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"}, :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}]}, :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=>:removed_feed_items, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ChangeStatus=>{:fields=>[]}, :"CustomerSyncError.Reason"=>{:fields=>[]}}
+ CUSTOMERSYNCSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/data_service.rb b/adwords_api/lib/adwords_api/v201809/data_service.rb
new file mode 100644
index 000000000..c66b607bf
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/data_service.rb
@@ -0,0 +1,94 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:22.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/data_service_registry'
+
+module AdwordsApi; module V201809; module DataService
+ class DataService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get_ad_group_bid_landscape(*args, &block)
+ return execute_action('get_ad_group_bid_landscape', args, &block)
+ end
+
+ def get_ad_group_bid_landscape_to_xml(*args)
+ return get_soap_xml('get_ad_group_bid_landscape', args)
+ end
+
+ def get_campaign_criterion_bid_landscape(*args, &block)
+ return execute_action('get_campaign_criterion_bid_landscape', args, &block)
+ end
+
+ def get_campaign_criterion_bid_landscape_to_xml(*args)
+ return get_soap_xml('get_campaign_criterion_bid_landscape', args)
+ end
+
+ def get_criterion_bid_landscape(*args, &block)
+ return execute_action('get_criterion_bid_landscape', args, &block)
+ end
+
+ def get_criterion_bid_landscape_to_xml(*args)
+ return get_soap_xml('get_criterion_bid_landscape', args)
+ end
+
+ def get_domain_category(*args, &block)
+ return execute_action('get_domain_category', args, &block)
+ end
+
+ def get_domain_category_to_xml(*args)
+ return get_soap_xml('get_domain_category', args)
+ end
+
+ def query_ad_group_bid_landscape(*args, &block)
+ return execute_action('query_ad_group_bid_landscape', args, &block)
+ end
+
+ def query_ad_group_bid_landscape_to_xml(*args)
+ return get_soap_xml('query_ad_group_bid_landscape', args)
+ end
+
+ def query_campaign_criterion_bid_landscape(*args, &block)
+ return execute_action('query_campaign_criterion_bid_landscape', args, &block)
+ end
+
+ def query_campaign_criterion_bid_landscape_to_xml(*args)
+ return get_soap_xml('query_campaign_criterion_bid_landscape', args)
+ end
+
+ def query_criterion_bid_landscape(*args, &block)
+ return execute_action('query_criterion_bid_landscape', args, &block)
+ end
+
+ def query_criterion_bid_landscape_to_xml(*args)
+ return get_soap_xml('query_criterion_bid_landscape', args)
+ end
+
+ def query_domain_category(*args, &block)
+ return execute_action('query_domain_category', args, &block)
+ end
+
+ def query_domain_category_to_xml(*args)
+ return get_soap_xml('query_domain_category', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return DataServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::DataService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/data_service_registry.rb b/adwords_api/lib/adwords_api/v201809/data_service_registry.rb
new file mode 100644
index 000000000..244d6895b
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/data_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:22.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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_campaign_criterion_bid_landscape=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_campaign_criterion_bid_landscape_response", :fields=>[{:name=>:rval, :type=>"CriterionBidLandscapePage", :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}]}}, :get_domain_category=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_domain_category_response", :fields=>[{:name=>:rval, :type=>"DomainCategoryPage", :min_occurs=>0, :max_occurs=>1}]}}, :query_ad_group_bid_landscape=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_ad_group_bid_landscape_response", :fields=>[{:name=>:rval, :type=>"AdGroupBidLandscapePage", :min_occurs=>0, :max_occurs=>1}]}}, :query_campaign_criterion_bid_landscape=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_campaign_criterion_bid_landscape_response", :fields=>[{:name=>:rval, :type=>"CriterionBidLandscapePage", :min_occurs=>0, :max_occurs=>1}]}}, :query_criterion_bid_landscape=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_criterion_bid_landscape_response", :fields=>[{:name=>:rval, :type=>"CriterionBidLandscapePage", :min_occurs=>0, :max_occurs=>1}]}}, :query_domain_category=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_domain_category_response", :fields=>[{:name=>:rval, :type=>"DomainCategoryPage", :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"}, :AdGroupBidLandscapePage=>{:fields=>[{:name=>:entries, :type=>"AdGroupBidLandscape", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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"}, :"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=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:promoted_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:required_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:biddable_conversions, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:biddable_conversions_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_modifier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_local_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_local_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_local_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_local_promoted_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :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}, :CriterionBidLandscape=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape"}, :CriterionBidLandscapePage=>{:fields=>[{:name=>:entries, :type=>"CriterionBidLandscape", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :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}]}, :DimensionProperties=>{:fields=>[{:name=>:level_of_detail, :type=>"LevelOfDetail", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :base=>"DataEntry"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DomainCategory=>{:fields=>[{:name=>:category, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:domain_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:iso_language, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:recommended_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:has_child, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:category_rank, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"DimensionProperties"}, :DomainCategoryPage=>{:fields=>[{:name=>:entries, :type=>"DomainCategory", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :LevelOfDetail=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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}]}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DataEntry=>{:fields=>[{:name=>:data_entry_type, :original_name=>"DataEntry.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :DataError=>{:fields=>[{:name=>:reason, :type=>"DataError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AdGroupBidLandscape.Type"=>{:fields=>[]}, :"AdxError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/draft_async_error_service.rb b/adwords_api/lib/adwords_api/v201809/draft_async_error_service.rb
new file mode 100644
index 000000000..f825da174
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/draft_async_error_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:24.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/draft_async_error_service_registry'
+
+module AdwordsApi; module V201809; module DraftAsyncErrorService
+ class DraftAsyncErrorService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return DraftAsyncErrorServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::DraftAsyncErrorService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/draft_async_error_service_registry.rb b/adwords_api/lib/adwords_api/v201809/draft_async_error_service_registry.rb
new file mode 100644
index 000000000..7c81277ab
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/draft_async_error_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:24.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module DraftAsyncErrorService
+ class DraftAsyncErrorServiceRegistry
+ DRAFTASYNCERRORSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"DraftAsyncErrorPage", :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=>"DraftAsyncErrorPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ DRAFTASYNCERRORSERVICE_TYPES = {:AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupAdError=>{:fields=>[{:name=>:reason, :type=>"AdGroupAdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"AdGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupFeedError=>{:fields=>[{:name=>:reason, :type=>"AdGroupFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupServiceError=>{:fields=>[{:name=>:reason, :type=>"AdGroupServiceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdSharingError=>{:fields=>[{:name=>:reason, :type=>"AdSharingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:shared_ad_error, :type=>"ApiError", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignBidModifierError=>{:fields=>[{:name=>:reason, :type=>"CampaignBidModifierError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignCriterionError=>{:fields=>[{:name=>:reason, :type=>"CampaignCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignError=>{:fields=>[{:name=>:reason, :type=>"CampaignError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignFeedError=>{:fields=>[{:name=>:reason, :type=>"CampaignFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignPreferenceError=>{:fields=>[{:name=>:reason, :type=>"CampaignPreferenceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignSharedSetError=>{:fields=>[{:name=>:reason, :type=>"CampaignSharedSetError.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"}, :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}]}, :DateRangeError=>{:fields=>[{:name=>:reason, :type=>"DateRangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DraftAsyncError=>{:fields=>[{:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:async_error, :type=>"ApiError", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :DraftAsyncErrorPage=>{:fields=>[{:name=>:entries, :type=>"DraftAsyncError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :DraftError=>{:fields=>[{:name=>:reason, :type=>"DraftError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FeedError=>{:fields=>[{:name=>:reason, :type=>"FeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :MultiplierError=>{:fields=>[{:name=>:reason, :type=>"MultiplierError.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"}, :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}]}, :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}]}, :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"}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoError=>{:fields=>[{:name=>:reason, :type=>"VideoError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AdError.Reason"=>{:fields=>[]}, :"AdGroupAdError.Reason"=>{:fields=>[]}, :"AdGroupCriterionError.Reason"=>{:fields=>[]}, :"AdGroupFeedError.Reason"=>{:fields=>[]}, :"AdGroupServiceError.Reason"=>{:fields=>[]}, :"AdSharingError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"CampaignBidModifierError.Reason"=>{:fields=>[]}, :"CampaignCriterionError.Reason"=>{:fields=>[]}, :"CampaignError.Reason"=>{:fields=>[]}, :"CampaignFeedError.Reason"=>{:fields=>[]}, :"CampaignPreferenceError.Reason"=>{:fields=>[]}, :"CampaignSharedSetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DateRangeError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"DraftError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedError.Reason"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :"MultiplierError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"OperatorError.Reason"=>{: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=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"VideoError.Reason"=>{:fields=>[]}}
+ DRAFTASYNCERRORSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return DRAFTASYNCERRORSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return DRAFTASYNCERRORSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return DRAFTASYNCERRORSERVICE_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, DraftAsyncErrorServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/draft_service.rb b/adwords_api/lib/adwords_api/v201809/draft_service.rb
new file mode 100644
index 000000000..e53cd5247
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/draft_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:25.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/draft_service_registry'
+
+module AdwordsApi; module V201809; module DraftService
+ class DraftService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return DraftServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::DraftService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/draft_service_registry.rb b/adwords_api/lib/adwords_api/v201809/draft_service_registry.rb
new file mode 100644
index 000000000..a6788767f
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/draft_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:25.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module DraftService
+ class DraftServiceRegistry
+ DRAFTSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"DraftPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"DraftOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"DraftReturnValue", :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=>"DraftPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ DRAFTSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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"}, :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"}, :Draft=>{:fields=>[{:name=>:draft_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_status, :type=>"DraftStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:has_running_trial, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :DraftError=>{:fields=>[{:name=>:reason, :type=>"DraftError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DraftOperation=>{:fields=>[{:name=>:operand, :type=>"Draft", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :DraftPage=>{:fields=>[{:name=>:entries, :type=>"Draft", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NullStatsPage"}, :DraftReturnValue=>{:fields=>[{:name=>:value, :type=>"Draft", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :DraftStatus=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"DraftError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ DRAFTSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return DRAFTSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return DRAFTSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return DRAFTSERVICE_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, DraftServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/feed_item_service.rb b/adwords_api/lib/adwords_api/v201809/feed_item_service.rb
new file mode 100644
index 000000000..397184975
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_item_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:26.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/feed_item_service_registry'
+
+module AdwordsApi; module V201809; module FeedItemService
+ class FeedItemService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return FeedItemServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::FeedItemService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/feed_item_service_registry.rb b/adwords_api/lib/adwords_api/v201809/feed_item_service_registry.rb
new file mode 100644
index 000000000..a55db1a1f
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_item_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:26.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"FeedItemPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ FEEDITEMSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :CertificateDomainMismatchConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateDomainMismatchInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :CertificateMissingConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :CertificateMissingInCountryConstraint=>{:fields=>[], :base=>"CountryConstraint"}, :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"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CountryConstraint=>{:fields=>[{:name=>:constrained_countries, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_targeted_countries, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"PolicyTopicConstraint"}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CustomParameter=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_remove, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :CustomParameters=>{:fields=>[{:name=>:parameters, :type=>"CustomParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:do_replace, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :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"}, :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"}, :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=>:policy_summaries, :type=>"FeedItemPolicySummary", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:geo_targeting_restriction, :type=>"FeedItemGeoRestriction", :min_occurs=>0, :max_occurs=>1}, {:name=>:url_custom_parameters, :type=>"CustomParameters", :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}, {:name=>:error_information, :type=>"string", :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}, {:name=>:integer_values, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:double_values, :type=>"double", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:boolean_values, :type=>"boolean", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:string_values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:money_with_currency_value, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}]}, :FeedItemError=>{:fields=>[{:name=>:reason, :type=>"FeedItemError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemGeoRestriction=>{:fields=>[{:name=>:geo_restriction, :type=>"GeoRestriction", :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"}, :FeedItemPolicySummary=>{:fields=>[{:name=>:feed_mapping_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_status, :type=>"FeedItemValidationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:validation_errors, :type=>"FeedItemAttributeError", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:quality_approval_status, :type=>"FeedItemQualityApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_disapproval_reasons, :type=>"FeedItemQualityDisapprovalReasons", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"PolicySummaryInfo"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :MoneyWithCurrency=>{:fields=>[{:name=>:money, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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"}, :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"}, :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}]}, :PolicySummaryInfo=>{:fields=>[{:name=>:policy_topic_entries, :type=>"PolicyTopicEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:review_state, :type=>"PolicySummaryReviewState", :min_occurs=>0, :max_occurs=>1}, {:name=>:denormalized_status, :type=>"PolicySummaryDenormalizedStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_approval_status, :type=>"PolicyApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_summary_info_type, :original_name=>"PolicySummaryInfo.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicConstraint=>{:fields=>[{:name=>:constraint_type, :type=>"PolicyTopicConstraint.PolicyTopicConstraintType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_constraint_type, :original_name=>"PolicyTopicConstraint.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :PolicyTopicEntry=>{:fields=>[{:name=>:policy_topic_entry_type, :type=>"PolicyTopicEntryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_evidences, :type=>"PolicyTopicEvidence", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_constraints, :type=>"PolicyTopicConstraint", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:policy_topic_help_center_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :PolicyTopicEvidence=>{:fields=>[{:name=>:policy_topic_evidence_type, :type=>"PolicyTopicEvidenceType", :min_occurs=>0, :max_occurs=>1}, {:name=>:evidence_text_list, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:policy_topic_evidence_destination_mismatch_url_types, :type=>"PolicyTopicEvidenceDestinationMismatchUrlType", :min_occurs=>0, :max_occurs=>:unbounded}]}, :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"}, :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"}, :ResellerConstraint=>{:fields=>[], :base=>"PolicyTopicConstraint"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedItem.Status"=>{:fields=>[]}, :"FeedItemError.Reason"=>{:fields=>[]}, :FeedItemQualityApprovalStatus=>{:fields=>[]}, :FeedItemQualityDisapprovalReasons=>{:fields=>[]}, :FeedItemValidationStatus=>{:fields=>[]}, :GeoRestriction=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :PolicyApprovalStatus=>{:fields=>[]}, :PolicySummaryDenormalizedStatus=>{:fields=>[]}, :PolicySummaryReviewState=>{:fields=>[]}, :"PolicyTopicConstraint.PolicyTopicConstraintType"=>{:fields=>[]}, :PolicyTopicEntryType=>{:fields=>[]}, :PolicyTopicEvidenceDestinationMismatchUrlType=>{:fields=>[]}, :PolicyTopicEvidenceType=>{: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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.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/v201809/feed_item_target_service.rb b/adwords_api/lib/adwords_api/v201809/feed_item_target_service.rb
new file mode 100644
index 000000000..fa8fce3f8
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_item_target_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:27.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/feed_item_target_service_registry'
+
+module AdwordsApi; module V201809; module FeedItemTargetService
+ class FeedItemTargetService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return FeedItemTargetServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::FeedItemTargetService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/feed_item_target_service_registry.rb b/adwords_api/lib/adwords_api/v201809/feed_item_target_service_registry.rb
new file mode 100644
index 000000000..cf1a30e15
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_item_target_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:27.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module FeedItemTargetService
+ class FeedItemTargetServiceRegistry
+ FEEDITEMTARGETSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"FeedItemTargetPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"FeedItemTargetOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"FeedItemTargetReturnValue", :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=>"FeedItemTargetPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ FEEDITEMTARGETSERVICE_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"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemAdGroupTarget=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"FeedItemTarget"}, :FeedItemCampaignTarget=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"FeedItemTarget"}, :FeedItemCriterionTarget=>{:fields=>[{:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_negative, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"FeedItemTarget"}, :FeedItemTarget=>{: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=>:target_type, :type=>"FeedItemTargetType", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"FeedItemTargetStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:feed_item_target_type, :original_name=>"FeedItemTarget.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :FeedItemTargetError=>{:fields=>[{:name=>:reason, :type=>"FeedItemTargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FeedItemTargetOperation=>{:fields=>[{:name=>:operand, :type=>"FeedItemTarget", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :FeedItemTargetPage=>{:fields=>[{:name=>:entries, :type=>"FeedItemTarget", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :FeedItemTargetReturnValue=>{:fields=>[{:name=>:value, :type=>"FeedItemTarget", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :NegativeFeedItemCriterionTarget=>{:fields=>[], :base=>"FeedItemCriterionTarget"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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}]}, :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}]}, :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}]}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedItemTargetError.Reason"=>{:fields=>[]}, :FeedItemTargetStatus=>{:fields=>[]}, :FeedItemTargetType=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :LocationTargetingStatus=>{:fields=>[]}, :MinuteOfHour=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}}
+ FEEDITEMTARGETSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return FEEDITEMTARGETSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return FEEDITEMTARGETSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return FEEDITEMTARGETSERVICE_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, FeedItemTargetServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/feed_mapping_service.rb b/adwords_api/lib/adwords_api/v201809/feed_mapping_service.rb
new file mode 100644
index 000000000..be0a792a8
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_mapping_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:28.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/feed_mapping_service_registry'
+
+module AdwordsApi; module V201809; module FeedMappingService
+ class FeedMappingService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return FeedMappingServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::FeedMappingService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/feed_mapping_service_registry.rb b/adwords_api/lib/adwords_api/v201809/feed_mapping_service_registry.rb
new file mode 100644
index 000000000..16b555d1d
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_mapping_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:28.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"FeedMappingPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ FEEDMAPPINGSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :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"}, :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"}, :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}, {:name=>:criterion_type, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"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=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/feed_service.rb b/adwords_api/lib/adwords_api/v201809/feed_service.rb
new file mode 100644
index 000000000..b76f69c70
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:29.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/feed_service_registry'
+
+module AdwordsApi; module V201809; module FeedService
+ class FeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return FeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::FeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/feed_service_registry.rb
new file mode 100644
index 000000000..6da5d162a
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:29.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"FeedPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ FEEDSERVICE_TYPES = {:AffiliateLocationFeedData=>{:fields=>[{:name=>:chains, :type=>"Chain", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:relationship_type, :type=>"RelationshipType", :min_occurs=>0, :max_occurs=>1}], :base=>"SystemFeedGenerationData"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :PlacesLocationFeedData=>{:fields=>[{:name=>:o_auth_info, :type=>"OAuthInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:email_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_account_identifier, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:business_name_filter, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:category_filters, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:label_filters, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SystemFeedGenerationData"}, :Chain=>{:fields=>[{:name=>:chain_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :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"}, :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}, {:name=>:system_feed_generation_data, :type=>"SystemFeedGenerationData", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :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}]}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SystemFeedGenerationData=>{:fields=>[{:name=>:system_feed_generation_data_type, :original_name=>"SystemFeedGenerationData.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :"QueryError.Reason"=>{:fields=>[]}, :"QuotaCheckError.Reason"=>{:fields=>[]}, :"RangeError.Reason"=>{:fields=>[]}, :"RateExceededError.Reason"=>{:fields=>[]}, :"ReadOnlyError.Reason"=>{:fields=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :RelationshipType=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{: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/v201809/label_service.rb b/adwords_api/lib/adwords_api/v201809/label_service.rb
new file mode 100644
index 000000000..6a8bf4526
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/label_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:30.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/label_service_registry'
+
+module AdwordsApi; module V201809; module LabelService
+ class LabelService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return LabelServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::LabelService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/label_service_registry.rb b/adwords_api/lib/adwords_api/v201809/label_service_registry.rb
new file mode 100644
index 000000000..0033d8819
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/label_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:30.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module LabelService
+ class LabelServiceRegistry
+ LABELSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"LabelPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"LabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"LabelReturnValue", :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=>"LabelPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ LABELSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :LabelAttribute=>{:fields=>[{:name=>:label_attribute_type, :original_name=>"LabelAttribute.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"}, :TextLabel=>{:fields=>[], :base=>"Label"}, :DisplayAttribute=>{:fields=>[{:name=>:background_color, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"LabelAttribute"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :Label=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"Label.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:attribute, :type=>"LabelAttribute", :min_occurs=>0, :max_occurs=>1}, {:name=>:label_type, :original_name=>"Label.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :LabelError=>{:fields=>[{:name=>:reason, :type=>"LabelError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :LabelOperation=>{:fields=>[{:name=>:operand, :type=>"Label", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :LabelPage=>{:fields=>[{:name=>:entries, :type=>"Label", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :LabelReturnValue=>{:fields=>[{:name=>:value, :type=>"Label", :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}, :NewEntityCreationError=>{:fields=>[{:name=>:reason, :type=>"NewEntityCreationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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}]}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.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=>[]}, :"Label.Status"=>{:fields=>[]}, :"LabelError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{: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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ LABELSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return LABELSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return LABELSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return LABELSERVICE_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, LabelServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/location_criterion_service.rb b/adwords_api/lib/adwords_api/v201809/location_criterion_service.rb
new file mode 100644
index 000000000..c0838ca8f
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/location_criterion_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:31.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/location_criterion_service_registry'
+
+module AdwordsApi; module V201809; module LocationCriterionService
+ class LocationCriterionService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return LocationCriterionServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::LocationCriterionService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/location_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201809/location_criterion_service_registry.rb
new file mode 100644
index 000000000..aed425970
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/location_criterion_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:31.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :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}]}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :"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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{: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/v201809/managed_customer_service.rb b/adwords_api/lib/adwords_api/v201809/managed_customer_service.rb
new file mode 100644
index 000000000..42cb817e8
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/managed_customer_service.rb
@@ -0,0 +1,78 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:31.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/managed_customer_service_registry'
+
+module AdwordsApi; module V201809; module ManagedCustomerService
+ class ManagedCustomerService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/mcm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def get_pending_invitations(*args, &block)
+ return execute_action('get_pending_invitations', args, &block)
+ end
+
+ def get_pending_invitations_to_xml(*args)
+ return get_soap_xml('get_pending_invitations', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def mutate_label(*args, &block)
+ return execute_action('mutate_label', args, &block)
+ end
+
+ def mutate_label_to_xml(*args)
+ return get_soap_xml('mutate_label', args)
+ end
+
+ def mutate_link(*args, &block)
+ return execute_action('mutate_link', args, &block)
+ end
+
+ def mutate_link_to_xml(*args)
+ return get_soap_xml('mutate_link', args)
+ end
+
+ def mutate_manager(*args, &block)
+ return execute_action('mutate_manager', args, &block)
+ end
+
+ def mutate_manager_to_xml(*args)
+ return get_soap_xml('mutate_manager', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return ManagedCustomerServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::ManagedCustomerService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/managed_customer_service_registry.rb b/adwords_api/lib/adwords_api/v201809/managed_customer_service_registry.rb
new file mode 100644
index 000000000..995a13b36
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/managed_customer_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:31.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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_label=>{:input=>[{:name=>:operations, :type=>"ManagedCustomerLabelOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_label_response", :fields=>[{:name=>:rval, :type=>"ManagedCustomerLabelReturnValue", :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 = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :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}, :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.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}, :"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}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AccountLabel=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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}, {:name=>:is_hidden, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :LinkOperation=>{:fields=>[{:name=>:operand, :type=>"ManagedCustomerLink", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :ManagedCustomer=>{:fields=>[{:name=>: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}, {:name=>:account_labels, :type=>"AccountLabel", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:exclude_hidden_accounts, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :ManagedCustomerLabel=>{:fields=>[{:name=>:label_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :ManagedCustomerLabelOperation=>{:fields=>[{:name=>:operand, :type=>"ManagedCustomerLabel", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :ManagedCustomerLabelReturnValue=>{:fields=>[{:name=>:value, :type=>"ManagedCustomerLabel", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ManagedCustomerOperation=>{:fields=>[{:name=>:operand, :type=>"ManagedCustomer", :min_occurs=>0, :max_occurs=>1}, {:name=>:invitee_email, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:invitee_role, :type=>"AccessRole", :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}]}, :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"}, :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}]}, :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}]}, :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}]}, :AccessRole=>{:fields=>[]}, :LinkStatus=>{:fields=>[]}, :"ManagedCustomerServiceError.Reason"=>{:fields=>[]}}
+ MANAGEDCUSTOMERSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/media_service.rb b/adwords_api/lib/adwords_api/v201809/media_service.rb
new file mode 100644
index 000000000..5a2800ff1
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/media_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:33.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/media_service_registry'
+
+module AdwordsApi; module V201809; module MediaService
+ class MediaService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ def upload(*args, &block)
+ return execute_action('upload', args, &block)
+ end
+
+ def upload_to_xml(*args)
+ return get_soap_xml('upload', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return MediaServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::MediaService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/media_service_registry.rb b/adwords_api/lib/adwords_api/v201809/media_service_registry.rb
new file mode 100644
index 000000000..7fb4bfd85
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/media_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:33.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_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 = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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"}, :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}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :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.LegacyMimeType", :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}]}, :MediaBundle=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_bundle_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:entry_point, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :MediaBundleError=>{:fields=>[{:name=>:reason, :type=>"MediaBundleError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MediaError=>{:fields=>[{:name=>:reason, :type=>"MediaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MediaPage=>{:fields=>[{:name=>:entries, :type=>"Media", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :"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.LegacyMimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :"MediaBundleError.Reason"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"OperatorError.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=>[]}, :"StringFormatError.Reason"=>{: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/v201809/offline_call_conversion_feed_service.rb b/adwords_api/lib/adwords_api/v201809/offline_call_conversion_feed_service.rb
new file mode 100644
index 000000000..0001b92b8
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_call_conversion_feed_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:34.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/offline_call_conversion_feed_service_registry'
+
+module AdwordsApi; module V201809; module OfflineCallConversionFeedService
+ class OfflineCallConversionFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return OfflineCallConversionFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::OfflineCallConversionFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_call_conversion_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/offline_call_conversion_feed_service_registry.rb
new file mode 100644
index 000000000..1450f2558
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_call_conversion_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:34.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module OfflineCallConversionFeedService
+ class OfflineCallConversionFeedServiceRegistry
+ OFFLINECALLCONVERSIONFEEDSERVICE_METHODS = {:mutate=>{:input=>[{:name=>:operations, :type=>"OfflineCallConversionFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"OfflineCallConversionFeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ OFFLINECALLCONVERSIONFEEDSERVICE_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"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OfflineCallConversionError=>{:fields=>[{:name=>:reason, :type=>"OfflineCallConversionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OfflineCallConversionFeed=>{:fields=>[{:name=>:caller_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_start_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :OfflineCallConversionFeedOperation=>{:fields=>[{:name=>:operand, :type=>"OfflineCallConversionFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :OfflineConversionError=>{:fields=>[{:name=>:reason, :type=>"OfflineConversionError.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"}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.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"}, :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"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :OfflineCallConversionFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"OfflineCallConversionFeed", :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}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OfflineCallConversionError.Reason"=>{:fields=>[]}, :"OfflineConversionError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{: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=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ OFFLINECALLCONVERSIONFEEDSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return OFFLINECALLCONVERSIONFEEDSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return OFFLINECALLCONVERSIONFEEDSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return OFFLINECALLCONVERSIONFEEDSERVICE_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, OfflineCallConversionFeedServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_conversion_adjustment_feed_service.rb b/adwords_api/lib/adwords_api/v201809/offline_conversion_adjustment_feed_service.rb
new file mode 100644
index 000000000..097d35477
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_conversion_adjustment_feed_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:34.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/offline_conversion_adjustment_feed_service_registry'
+
+module AdwordsApi; module V201809; module OfflineConversionAdjustmentFeedService
+ class OfflineConversionAdjustmentFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return OfflineConversionAdjustmentFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::OfflineConversionAdjustmentFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_conversion_adjustment_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/offline_conversion_adjustment_feed_service_registry.rb
new file mode 100644
index 000000000..d1fbcb854
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_conversion_adjustment_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:34.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module OfflineConversionAdjustmentFeedService
+ class OfflineConversionAdjustmentFeedServiceRegistry
+ OFFLINECONVERSIONADJUSTMENTFEEDSERVICE_METHODS = {:mutate=>{:input=>[{:name=>:operations, :type=>"OfflineConversionAdjustmentFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"OfflineConversionAdjustmentFeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ OFFLINECONVERSIONADJUSTMENTFEEDSERVICE_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"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :GclidOfflineConversionAdjustmentFeed=>{:fields=>[{:name=>:google_click_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"OfflineConversionAdjustmentFeed"}, :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"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OfflineConversionAdjustmentError=>{:fields=>[{:name=>:reason, :type=>"OfflineConversionAdjustmentError.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"}, :OrderIdOfflineConversionAdjustmentFeed=>{:fields=>[{:name=>:order_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"OfflineConversionAdjustmentFeed"}, :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"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :OfflineConversionAdjustmentFeed=>{:fields=>[{:name=>:conversion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:adjustment_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:adjustment_type, :type=>"OfflineConversionAdjustmentType", :min_occurs=>0, :max_occurs=>1}, {:name=>:adjusted_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:adjusted_value_currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_conversion_adjustment_feed_type, :original_name=>"OfflineConversionAdjustmentFeed.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :OfflineConversionAdjustmentFeedOperation=>{:fields=>[{:name=>:operand, :type=>"OfflineConversionAdjustmentFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :OfflineConversionAdjustmentFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"OfflineConversionAdjustmentFeed", :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}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OfflineConversionAdjustmentError.Reason"=>{:fields=>[]}, :OfflineConversionAdjustmentType=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{: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=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ OFFLINECONVERSIONADJUSTMENTFEEDSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return OFFLINECONVERSIONADJUSTMENTFEEDSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return OFFLINECONVERSIONADJUSTMENTFEEDSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return OFFLINECONVERSIONADJUSTMENTFEEDSERVICE_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, OfflineConversionAdjustmentFeedServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_conversion_feed_service.rb b/adwords_api/lib/adwords_api/v201809/offline_conversion_feed_service.rb
new file mode 100644
index 000000000..4ca58d4a3
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_conversion_feed_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:35.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/offline_conversion_feed_service_registry'
+
+module AdwordsApi; module V201809; module OfflineConversionFeedService
+ class OfflineConversionFeedService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return OfflineConversionFeedServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::OfflineConversionFeedService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_conversion_feed_service_registry.rb b/adwords_api/lib/adwords_api/v201809/offline_conversion_feed_service_registry.rb
new file mode 100644
index 000000000..448b2d3fd
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_conversion_feed_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:35.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module OfflineConversionFeedService
+ class OfflineConversionFeedServiceRegistry
+ OFFLINECONVERSIONFEEDSERVICE_METHODS = {:mutate=>{:input=>[{:name=>:operations, :type=>"OfflineConversionFeedOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"OfflineConversionFeedReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ OFFLINECONVERSIONFEEDSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OfflineConversionError=>{:fields=>[{:name=>:reason, :type=>"OfflineConversionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OfflineConversionFeed=>{:fields=>[{:name=>:google_click_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_attribution_credit, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_attribution_model, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :OfflineConversionFeedOperation=>{:fields=>[{:name=>:operand, :type=>"OfflineConversionFeed", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :OfflineConversionFeedReturnValue=>{:fields=>[{:name=>:value, :type=>"OfflineConversionFeed", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :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"}, :PagingError=>{:fields=>[{:name=>:reason, :type=>"PagingError.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"}, :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"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CollectionSizeError.Reason"=>{:fields=>[]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OfflineConversionError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{:fields=>[]}, :"PagingError.Reason"=>{: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=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}}
+ OFFLINECONVERSIONFEEDSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return OFFLINECONVERSIONFEEDSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return OFFLINECONVERSIONFEEDSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return OFFLINECONVERSIONFEEDSERVICE_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, OfflineConversionFeedServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_data_upload_service.rb b/adwords_api/lib/adwords_api/v201809/offline_data_upload_service.rb
new file mode 100644
index 000000000..e7a2857ad
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_data_upload_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:35.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/offline_data_upload_service_registry'
+
+module AdwordsApi; module V201809; module OfflineDataUploadService
+ class OfflineDataUploadService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/rm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return OfflineDataUploadServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::OfflineDataUploadService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/offline_data_upload_service_registry.rb b/adwords_api/lib/adwords_api/v201809/offline_data_upload_service_registry.rb
new file mode 100644
index 000000000..34e163bf6
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/offline_data_upload_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:35.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module OfflineDataUploadService
+ class OfflineDataUploadServiceRegistry
+ OFFLINEDATAUPLOADSERVICE_METHODS = {:get=>{:input=>[{:name=>:service_selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"OfflineDataUploadPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"OfflineDataUploadOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"OfflineDataUploadReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
+ OFFLINEDATAUPLOADSERVICE_TYPES = {:AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :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}, :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :"AdError.Reason"=>{:fields=>[], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.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}, :"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}, :"RegionCodeError.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}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FirstPartyUploadMetadata=>{:fields=>[], :base=>"StoreSalesUploadCommonMetadata"}, :MoneyWithCurrency=>{:fields=>[{:name=>:money, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :OfflineData=>{:fields=>[], :choices=>[{:name=>:store_sales_transaction, :original_name=>"StoreSalesTransaction", :type=>"StoreSalesTransaction", :min_occurs=>1, :max_occurs=>1}]}, :OfflineDataUpload=>{:fields=>[{:name=>:external_upload_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:upload_type, :type=>"OfflineDataUploadType", :min_occurs=>0, :max_occurs=>1}, {:name=>:upload_status, :type=>"OfflineDataUploadStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:upload_metadata, :type=>"UploadMetadata", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_data_list, :type=>"OfflineData", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:failure_reason, :type=>"OfflineDataUploadFailureReason", :min_occurs=>0, :max_occurs=>1}]}, :OfflineDataUploadError=>{:fields=>[{:name=>:reason, :type=>"OfflineDataUploadError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OfflineDataUploadOperation=>{:fields=>[{:name=>:operand, :type=>"OfflineDataUpload", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :OfflineDataUploadPage=>{:fields=>[{:name=>:entries, :type=>"OfflineDataUpload", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :OfflineDataUploadReturnValue=>{:fields=>[{:name=>:value, :type=>"OfflineDataUpload", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :StoreSalesTransaction=>{:fields=>[{:name=>:user_identifiers, :type=>"UserIdentifier", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:transaction_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:transaction_amount, :type=>"MoneyWithCurrency", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :StoreSalesUploadCommonMetadata=>{:fields=>[{:name=>:loyalty_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:transaction_upload_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:store_sales_upload_common_metadata_type, :original_name=>"StoreSalesUploadCommonMetadata.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ThirdPartyUploadMetadata=>{:fields=>[{:name=>:advertiser_upload_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:valid_transaction_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:partner_match_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:partner_upload_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:bridge_map_version_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:partner_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"StoreSalesUploadCommonMetadata"}, :UploadMetadata=>{:fields=>[], :choices=>[{:name=>:store_sales_upload_common_metadata, :original_name=>"StoreSalesUploadCommonMetadata", :type=>"StoreSalesUploadCommonMetadata", :min_occurs=>1, :max_occurs=>1}]}, :UserIdentifier=>{:fields=>[{:name=>:user_identifier_type, :type=>"OfflineDataUploadUserIdentifierType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"OfflineDataUploadError.Reason"=>{:fields=>[]}, :OfflineDataUploadFailureReason=>{:fields=>[]}, :OfflineDataUploadStatus=>{:fields=>[]}, :OfflineDataUploadType=>{:fields=>[]}, :OfflineDataUploadUserIdentifierType=>{:fields=>[]}}
+ OFFLINEDATAUPLOADSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ def self.get_method_signature(method_name)
+ return OFFLINEDATAUPLOADSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return OFFLINEDATAUPLOADSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return OFFLINEDATAUPLOADSERVICE_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, OfflineDataUploadServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/report_definition_service.rb b/adwords_api/lib/adwords_api/v201809/report_definition_service.rb
new file mode 100644
index 000000000..56816e698
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/report_definition_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:36.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/report_definition_service_registry'
+
+module AdwordsApi; module V201809; module ReportDefinitionService
+ class ReportDefinitionService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get_report_fields(*args, &block)
+ return execute_action('get_report_fields', args, &block)
+ end
+
+ def get_report_fields_to_xml(*args)
+ return get_soap_xml('get_report_fields', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return ReportDefinitionServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::ReportDefinitionService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/report_definition_service_registry.rb b/adwords_api/lib/adwords_api/v201809/report_definition_service_registry.rb
new file mode 100644
index 000000000..a5e09b822
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/report_definition_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:36.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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 = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :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}]}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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=>:field_behavior, :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=>:is_zero_row_compatible, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:enum_value_pairs, :type=>"EnumValuePair", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:exclusive_fields, :type=>"string", :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.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=>[]}, :"OperationAccessDenied.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=>[]}, :"StringFormatError.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/v201809/shared_criterion_service.rb b/adwords_api/lib/adwords_api/v201809/shared_criterion_service.rb
new file mode 100644
index 000000000..7ded2b5b4
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/shared_criterion_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:37.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/shared_criterion_service_registry'
+
+module AdwordsApi; module V201809; module SharedCriterionService
+ class SharedCriterionService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return SharedCriterionServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::SharedCriterionService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/shared_criterion_service_registry.rb b/adwords_api/lib/adwords_api/v201809/shared_criterion_service_registry.rb
new file mode 100644
index 000000000..d78a731fe
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/shared_criterion_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:37.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"SharedCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ SHAREDCRITERIONSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}]}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :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"}, :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}]}, :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}]}, :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}]}, :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"}, :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"}, :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}]}, :SharedCriterionError=>{:fields=>[{:name=>:reason, :type=>"SharedCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}, {:name=>:partial_failure_errors, :type=>"ApiError", :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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"}, :YouTubeChannel=>{:fields=>[{:name=>:channel_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:channel_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :YouTubeVideo=>{:fields=>[{:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.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=>[]}, :"SharedCriterionError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{: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
+
+ # 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, SharedCriterionServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/shared_set_service.rb b/adwords_api/lib/adwords_api/v201809/shared_set_service.rb
new file mode 100644
index 000000000..7ad7b21aa
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/shared_set_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:38.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/shared_set_service_registry'
+
+module AdwordsApi; module V201809; module SharedSetService
+ class SharedSetService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return SharedSetServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::SharedSetService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/shared_set_service_registry.rb b/adwords_api/lib/adwords_api/v201809/shared_set_service_registry.rb
new file mode 100644
index 000000000..04032bbb8
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/shared_set_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:38.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}, :query=>{:input=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"query_response", :fields=>[{:name=>:rval, :type=>"SharedSetPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ SHAREDSETSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :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}]}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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"}, :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"}, :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}, {:name=>:partial_failure_errors, :type=>"ApiError", :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.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=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"OperatorError.Reason"=>{: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=>[]}, :"SharedSet.Status"=>{:fields=>[]}, :"SharedSetError.Reason"=>{:fields=>[]}, :SharedSetType=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{: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
+
+ # 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, SharedSetServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/targeting_idea_service.rb b/adwords_api/lib/adwords_api/v201809/targeting_idea_service.rb
new file mode 100644
index 000000000..d426d9d41
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/targeting_idea_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:39.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/targeting_idea_service_registry'
+
+module AdwordsApi; module V201809; module TargetingIdeaService
+ class TargetingIdeaService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/o/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return TargetingIdeaServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::TargetingIdeaService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/targeting_idea_service_registry.rb b/adwords_api/lib/adwords_api/v201809/targeting_idea_service_registry.rb
new file mode 100644
index 000000000..c38262e5b
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/targeting_idea_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:39.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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}]}}}
+ TARGETINGIDEASERVICE_TYPES = {: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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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}, :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=>[{:name=>:reason, :type=>"CollectionSizeError.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}, :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}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :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}, :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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}, :"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}, :"BudgetError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.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}, :"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}, :"StatsQueryError.Reason"=>{:fields=>[], :ns=>0}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"CriterionUserList.MembershipStatus"=>{:fields=>[], :ns=>0}, :Attribute=>{:fields=>[{:name=>:attribute_type, :original_name=>"Attribute.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :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"}, :DoubleAttribute=>{:fields=>[{:name=>:value, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :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"}, :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"}, :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"}, :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}]}, :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=>[]}, :IdeaType=>{:fields=>[]}, :RequestType=>{:fields=>[]}, :"TargetingIdeaError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}}
+ TARGETINGIDEASERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/traffic_estimator_service.rb b/adwords_api/lib/adwords_api/v201809/traffic_estimator_service.rb
new file mode 100644
index 000000000..e792f39ba
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/traffic_estimator_service.rb
@@ -0,0 +1,38 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:40.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/traffic_estimator_service_registry'
+
+module AdwordsApi; module V201809; module TrafficEstimatorService
+ class TrafficEstimatorService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/o/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return TrafficEstimatorServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::TrafficEstimatorService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/traffic_estimator_service_registry.rb b/adwords_api/lib/adwords_api/v201809/traffic_estimator_service_registry.rb
new file mode 100644
index 000000000..3899f658d
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/traffic_estimator_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:40.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; 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=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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=>[{:name=>:reason, :type=>"CollectionSizeError.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}, :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}, :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}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :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}, :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}, :Platform=>{:fields=>[{:name=>:platform_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :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=>: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}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.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}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_parent_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}, {:name=>:user_list_eligible_for_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_eligible_for_display, :type=>"boolean", :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}, :"AdxError.Reason"=>{:fields=>[], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.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}, :"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}, :"StringFormatError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"CriterionUserList.MembershipStatus"=>{: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}, {:name=>:platform_estimates, :type=>"PlatformCampaignEstimate", :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"}, :PlatformCampaignEstimate=>{:fields=>[{:name=>:platform, :type=>"Platform", :min_occurs=>0, :max_occurs=>1}, {:name=>:min_estimate, :type=>"StatsEstimate", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_estimate, :type=>"StatsEstimate", :min_occurs=>0, :max_occurs=>1}]}, :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=>:click_through_rate, :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=>: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}, {:name=>:platform_estimate_requested, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}}
+ TRAFFICESTIMATORSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201809"]
+
+ 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/v201809/trial_async_error_service.rb b/adwords_api/lib/adwords_api/v201809/trial_async_error_service.rb
new file mode 100644
index 000000000..d79cbe4a9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/trial_async_error_service.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:40.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/trial_async_error_service_registry'
+
+module AdwordsApi; module V201809; module TrialAsyncErrorService
+ class TrialAsyncErrorService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return TrialAsyncErrorServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::TrialAsyncErrorService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/trial_async_error_service_registry.rb b/adwords_api/lib/adwords_api/v201809/trial_async_error_service_registry.rb
new file mode 100644
index 000000000..bda426655
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/trial_async_error_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:40.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module TrialAsyncErrorService
+ class TrialAsyncErrorServiceRegistry
+ TRIALASYNCERRORSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"TrialAsyncErrorPage", :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=>"TrialAsyncErrorPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ TRIALASYNCERRORSERVICE_TYPES = {:AdError=>{:fields=>[{:name=>:reason, :type=>"AdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupAdError=>{:fields=>[{:name=>:reason, :type=>"AdGroupAdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"AdGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupFeedError=>{:fields=>[{:name=>:reason, :type=>"AdGroupFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdGroupServiceError=>{:fields=>[{:name=>:reason, :type=>"AdGroupServiceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdSharingError=>{:fields=>[{:name=>:reason, :type=>"AdSharingError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:shared_ad_error, :type=>"ApiError", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignBidModifierError=>{:fields=>[{:name=>:reason, :type=>"CampaignBidModifierError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignCriterionError=>{:fields=>[{:name=>:reason, :type=>"CampaignCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignError=>{:fields=>[{:name=>:reason, :type=>"CampaignError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignFeedError=>{:fields=>[{:name=>:reason, :type=>"CampaignFeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignPreferenceError=>{:fields=>[{:name=>:reason, :type=>"CampaignPreferenceError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignSharedSetError=>{:fields=>[{:name=>:reason, :type=>"CampaignSharedSetError.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"}, :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}]}, :DateRangeError=>{:fields=>[{:name=>:reason, :type=>"DateRangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FeedError=>{:fields=>[{:name=>:reason, :type=>"FeedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :FunctionError=>{:fields=>[{:name=>:reason, :type=>"FunctionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :MultiplierError=>{:fields=>[{:name=>:reason, :type=>"MultiplierError.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"}, :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}]}, :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}]}, :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"}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TrialAsyncError=>{:fields=>[{:name=>:trial_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:async_error, :type=>"ApiError", :min_occurs=>0, :max_occurs=>1}, {:name=>:trial_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:trial_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :TrialAsyncErrorPage=>{:fields=>[{:name=>:entries, :type=>"TrialAsyncError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :UrlError=>{:fields=>[{:name=>:reason, :type=>"UrlError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoError=>{:fields=>[{:name=>:reason, :type=>"VideoError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :"AdError.Reason"=>{:fields=>[]}, :"AdGroupAdError.Reason"=>{:fields=>[]}, :"AdGroupCriterionError.Reason"=>{:fields=>[]}, :"AdGroupFeedError.Reason"=>{:fields=>[]}, :"AdGroupServiceError.Reason"=>{:fields=>[]}, :"AdSharingError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"CampaignBidModifierError.Reason"=>{:fields=>[]}, :"CampaignCriterionError.Reason"=>{:fields=>[]}, :"CampaignError.Reason"=>{:fields=>[]}, :"CampaignFeedError.Reason"=>{:fields=>[]}, :"CampaignPreferenceError.Reason"=>{:fields=>[]}, :"CampaignSharedSetError.Reason"=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"CriterionError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DateRangeError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityAccessDenied.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"FeedError.Reason"=>{:fields=>[]}, :"FunctionError.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"ImageError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"MediaError.Reason"=>{:fields=>[]}, :"MultiplierError.Reason"=>{:fields=>[]}, :"NewEntityCreationError.Reason"=>{:fields=>[]}, :"NotEmptyError.Reason"=>{:fields=>[]}, :"NullError.Reason"=>{:fields=>[]}, :"OperationAccessDenied.Reason"=>{:fields=>[]}, :"OperatorError.Reason"=>{: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=>[]}, :"SettingError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"VideoError.Reason"=>{:fields=>[]}}
+ TRIALASYNCERRORSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return TRIALASYNCERRORSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return TRIALASYNCERRORSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return TRIALASYNCERRORSERVICE_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, TrialAsyncErrorServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/trial_service.rb b/adwords_api/lib/adwords_api/v201809/trial_service.rb
new file mode 100644
index 000000000..ff05c8131
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/trial_service.rb
@@ -0,0 +1,54 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:42.
+
+require 'ads_common/savon_service'
+require 'adwords_api/v201809/trial_service_registry'
+
+module AdwordsApi; module V201809; module TrialService
+ class TrialService < AdsCommon::SavonService
+ def initialize(config, endpoint)
+ namespace = 'https://adwords.google.com/api/adwords/cm/v201809'
+ super(config, endpoint, namespace, :v201809)
+ end
+
+ def get(*args, &block)
+ return execute_action('get', args, &block)
+ end
+
+ def get_to_xml(*args)
+ return get_soap_xml('get', args)
+ end
+
+ def mutate(*args, &block)
+ return execute_action('mutate', args, &block)
+ end
+
+ def mutate_to_xml(*args)
+ return get_soap_xml('mutate', args)
+ end
+
+ def query(*args, &block)
+ return execute_action('query', args, &block)
+ end
+
+ def query_to_xml(*args)
+ return get_soap_xml('query', args)
+ end
+
+ private
+
+ def get_service_registry()
+ return TrialServiceRegistry
+ end
+
+ def get_module()
+ return AdwordsApi::V201809::TrialService
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/v201809/trial_service_registry.rb b/adwords_api/lib/adwords_api/v201809/trial_service_registry.rb
new file mode 100644
index 000000000..f1f7f55a9
--- /dev/null
+++ b/adwords_api/lib/adwords_api/v201809/trial_service_registry.rb
@@ -0,0 +1,46 @@
+# Encoding: utf-8
+#
+# This is auto-generated code, changes will be overwritten.
+#
+# Copyright:: Copyright 2018, Google Inc. All Rights Reserved.
+# License:: Licensed under the Apache License, Version 2.0.
+#
+# Code generated by AdsCommon library 1.0.1 on 2018-09-20 09:47:42.
+
+require 'adwords_api/errors'
+
+module AdwordsApi; module V201809; module TrialService
+ class TrialServiceRegistry
+ TRIALSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"Selector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"TrialPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"TrialOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"TrialReturnValue", :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=>"TrialPage", :min_occurs=>0, :max_occurs=>1}]}}}
+ TRIALSERVICE_TYPES = {:ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:field_path_elements, :type=>"FieldPathElement", :min_occurs=>0, :max_occurs=>:unbounded}, {: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"}, :BiddingErrors=>{:fields=>[{:name=>:reason, :type=>"BiddingErrors.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"}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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}]}, :DateRangeError=>{:fields=>[{:name=>:reason, :type=>"DateRangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :FieldPathElement=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:index, :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"}, :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"}, :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}]}, :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"}, :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=>: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}]}, :StringFormatError=>{:fields=>[{:name=>:reason, :type=>"StringFormatError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Trial=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:draft_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :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=>:traffic_split_percent, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:traffic_split_type, :type=>"CampaignTrialTrafficSplitType", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"TrialStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:trial_campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :TrialError=>{:fields=>[{:name=>:reason, :type=>"TrialError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TrialOperation=>{:fields=>[{:name=>:operand, :type=>"Trial", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :TrialPage=>{:fields=>[{:name=>:entries, :type=>"Trial", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :TrialReturnValue=>{:fields=>[{:name=>:value, :type=>"Trial", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"CampaignError.Reason"=>{:fields=>[]}, :CampaignTrialTrafficSplitType=>{:fields=>[]}, :"ClientTermsError.Reason"=>{:fields=>[]}, :"DatabaseError.Reason"=>{:fields=>[]}, :"DateError.Reason"=>{:fields=>[]}, :"DateRangeError.Reason"=>{:fields=>[]}, :"DistinctError.Reason"=>{:fields=>[]}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[]}, :"EntityNotFound.Reason"=>{:fields=>[]}, :"IdError.Reason"=>{:fields=>[]}, :"InternalApiError.Reason"=>{:fields=>[]}, :"NotEmptyError.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=>[]}, :"RejectedError.Reason"=>{:fields=>[]}, :"RequestError.Reason"=>{:fields=>[]}, :"RequiredError.Reason"=>{:fields=>[]}, :"SelectorError.Reason"=>{:fields=>[]}, :"SizeLimitError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"StringFormatError.Reason"=>{:fields=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"TrialError.Reason"=>{:fields=>[]}, :TrialStatus=>{:fields=>[]}}
+ TRIALSERVICE_NAMESPACES = []
+
+ def self.get_method_signature(method_name)
+ return TRIALSERVICE_METHODS[method_name.to_sym]
+ end
+
+ def self.get_type_signature(type_name)
+ return TRIALSERVICE_TYPES[type_name.to_sym]
+ end
+
+ def self.get_namespace(index)
+ return TRIALSERVICE_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, TrialServiceRegistry)
+ end
+ end
+end; end; end
diff --git a/adwords_api/lib/adwords_api/version.rb b/adwords_api/lib/adwords_api/version.rb
index b8afdd332..7e2f6405c 100644
--- a/adwords_api/lib/adwords_api/version.rb
+++ b/adwords_api/lib/adwords_api/version.rb
@@ -19,6 +19,6 @@
module AdwordsApi
module ApiConfig
- CLIENT_LIB_VERSION = '1.3.0'
+ CLIENT_LIB_VERSION = '1.3.1'
end
end
diff --git a/adwords_api/test/adwords_api/test_adwords_api.rb b/adwords_api/test/adwords_api/test_adwords_api.rb
index 643a189d5..a074cb864 100755
--- a/adwords_api/test/adwords_api/test_adwords_api.rb
+++ b/adwords_api/test/adwords_api/test_adwords_api.rb
@@ -34,7 +34,7 @@ def warn(message)
class TestAdwordsApi < Test::Unit::TestCase
- API_VERSION = :v201806
+ API_VERSION = :v201809
def setup()
@logger = LoggerStub.new
diff --git a/adwords_api/test/adwords_api/test_api_config.rb b/adwords_api/test/adwords_api/test_api_config.rb
index 08b32d3dd..f856435c6 100755
--- a/adwords_api/test/adwords_api/test_api_config.rb
+++ b/adwords_api/test/adwords_api/test_api_config.rb
@@ -30,27 +30,27 @@ def setup()
# Tests correct require path.
def test_do_require()
- name1 = @config.do_require(:v201806, :CampaignService)
- assert_equal('adwords_api/v201806/campaign_service', name1)
+ name1 = @config.do_require(:v201809, :CampaignService)
+ assert_equal('adwords_api/v201809/campaign_service', name1)
end
# Tests correct module name.
def test_module_name()
- name1 = @config.module_name(:v201806, :CampaignService)
- assert_equal('AdwordsApi::V201806::CampaignService', name1)
+ name1 = @config.module_name(:v201809, :CampaignService)
+ assert_equal('AdwordsApi::V201809::CampaignService', name1)
end
# Tests correct interface name.
def test_interface_name()
- name1 = @config.interface_name(:v201806, :CampaignService)
- assert_equal('AdwordsApi::V201806::CampaignService::CampaignService', name1)
+ name1 = @config.interface_name(:v201809, :CampaignService)
+ assert_equal('AdwordsApi::V201809::CampaignService::CampaignService', name1)
end
# Tests AdHoc report URL generator (prod).
def test_adhoc_report_download_url_prod()
- url = AdwordsApi::ApiConfig.adhoc_report_download_url(:v201806)
+ url = AdwordsApi::ApiConfig.adhoc_report_download_url(:v201809)
expected_url =
- 'https://adwords.google.com/api/adwords/reportdownload/v201806'
+ 'https://adwords.google.com/api/adwords/reportdownload/v201809'
assert_equal(expected_url, url)
end
end
diff --git a/adwords_api/test/adwords_api/test_batch_job_utils.rb b/adwords_api/test/adwords_api/test_batch_job_utils.rb
index 5107fffa4..6ca9994cd 100755
--- a/adwords_api/test/adwords_api/test_batch_job_utils.rb
+++ b/adwords_api/test/adwords_api/test_batch_job_utils.rb
@@ -50,12 +50,12 @@ class ResponseStub
attr_reader :body
end
-VALID_SERVICE_XML = 'batch job service test (AwApi-Ruby/0.17.0, Common-Ruby/0.11.1, GoogleAdsSavon/1.0.0, ruby/2.2.1, HTTPI/2.4.1, net_http)developer_token012-345-6789SET0PAUSED'
+VALID_SERVICE_XML = 'batch job service test (AwApi-Ruby/0.17.0, Common-Ruby/0.11.1, GoogleAdsSavon/1.0.0, ruby/2.2.1, HTTPI/2.4.1, net_http)developer_token012-345-6789SET0PAUSED'
EXPECTED_OPERATION = "\n SET\n \n 0\n PAUSED\n \n"
class TestBatchJobUtils < Test::Unit::TestCase
- API_VERSION = :v201806
+ API_VERSION = :v201809
# Initialize tests.
def setup()
diff --git a/adwords_api/test/adwords_api/test_choices.rb b/adwords_api/test/adwords_api/test_choices.rb
index fd6e502c3..73b85ed29 100755
--- a/adwords_api/test/adwords_api/test_choices.rb
+++ b/adwords_api/test/adwords_api/test_choices.rb
@@ -21,12 +21,12 @@
require 'test/unit'
require 'ads_common/parameters_validator'
-require 'adwords_api/v201806/adwords_user_list_service_registry'
+require 'adwords_api/v201809/adwords_user_list_service_registry'
class TestChoices < Test::Unit::TestCase
def setup()
- registry_module = AdwordsApi::V201806::AdwordsUserListService
+ registry_module = AdwordsApi::V201809::AdwordsUserListService
registry = registry_module::AdwordsUserListServiceRegistry
@validator = AdsCommon::ParametersValidator.new(registry)
end
diff --git a/adwords_api/test/adwords_api/test_report_stream.rb b/adwords_api/test/adwords_api/test_report_stream.rb
index 682da1126..a3540664b 100755
--- a/adwords_api/test/adwords_api/test_report_stream.rb
+++ b/adwords_api/test/adwords_api/test_report_stream.rb
@@ -36,7 +36,7 @@ def download_report_as_stream(report_definition, cid = nil, &block)
end
class TestReportStream < Test::Unit::TestCase
- API_VERSION = :v201806
+ API_VERSION = :v201809
# Initialize tests.
def setup()
diff --git a/adwords_api/test/adwords_api/test_report_utils.rb b/adwords_api/test/adwords_api/test_report_utils.rb
index 06f62f80c..a721388f6 100755
--- a/adwords_api/test/adwords_api/test_report_utils.rb
+++ b/adwords_api/test/adwords_api/test_report_utils.rb
@@ -75,7 +75,7 @@ def initialize(code, body)
class TestReportUtils < Test::Unit::TestCase
- API_VERSION = :v201806
+ API_VERSION = :v201809
# Initialize tests.
def setup()
diff --git a/adwords_api/test/templates/v201809/basic_operations_get_campaigns.def b/adwords_api/test/templates/v201809/basic_operations_get_campaigns.def
new file mode 100644
index 000000000..eeee51ad1
--- /dev/null
+++ b/adwords_api/test/templates/v201809/basic_operations_get_campaigns.def
@@ -0,0 +1,116 @@
+def setup_mocks()
+ $api_config = {
+ :service => {:environment => 'PRODUCTION'},
+ :authentication => {
+ :method => 'OAuth2',
+ :oauth2_client_id => 'client_id123',
+ :oauth2_client_secret => 'client_secret123',
+ :developer_token => 'dev_token123',
+ :client_customer_id => '123-456-7890',
+ :user_agent => 'ruby-tests',
+ :oauth2_token => {
+ :refresh_token => 'refresh_token123'
+ }
+ }
+ }
+
+ stub_request(:post, "https://accounts.google.com/o/oauth2/auth").
+ with(:body => {"client_id"=>"client_id123", "client_secret"=>"client_secret123", "refresh_token"=>"refresh_token123", "grant_type"=>"refresh_token"}).
+ to_return(:status => 200, :body => '{"access_token":"access_token123","token_type":"Bearer","expires_in":"3600"}\n', :headers => {})
+
+ stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201809/CampaignService").
+ with(
+ :body =>
+ # autogenerated code
+ {"env:Envelope"=>
+ {"env:Header"=>
+ {"wsdl:RequestHeader"=>
+ {"userAgent"=>/ruby-tests.*AwApi\-Ruby.*Common\-Ruby/,
+ "developerToken"=>"dev_token123",
+ "clientCustomerId"=>"123-456-7890",
+ "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201809"}},
+ "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/v201809"}},
+ "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/v201809",
+ "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/v201809/basic_operations_update_keyword.def b/adwords_api/test/templates/v201809/basic_operations_update_keyword.def
new file mode 100644
index 000000000..9a3856d4a
--- /dev/null
+++ b/adwords_api/test/templates/v201809/basic_operations_update_keyword.def
@@ -0,0 +1,125 @@
+def setup_mocks()
+ $api_config = {
+ :service => {:environment => 'PRODUCTION'},
+ :authentication => {
+ :method => 'OAuth2',
+ :oauth2_client_id => 'client_id123',
+ :oauth2_client_secret => 'client_secret123',
+ :developer_token => 'dev_token123',
+ :client_customer_id => '123-456-7890',
+ :user_agent => 'ruby-tests',
+ :oauth2_token => {
+ :refresh_token => 'refresh_token123'
+ }
+ }
+ }
+
+ stub_request(:post, "https://accounts.google.com/o/oauth2/auth").
+ with(:body => {"client_id"=>"client_id123", "client_secret"=>"client_secret123", "refresh_token"=>"refresh_token123", "grant_type"=>"refresh_token"}).
+ to_return(:status => 200, :body => '{"access_token":"access_token123","token_type":"Bearer","expires_in":"3600"}\n', :headers => {})
+
+ stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201809/AdGroupCriterionService").
+ with(
+ :body =>
+ # autogenerated code
+ {"env:Envelope"=>
+ {"env:Header"=>
+ {"wsdl:RequestHeader"=>
+ {"userAgent"=>/ruby-tests.*AwApi\-Ruby.*Common\-Ruby/,
+ "developerToken"=>"dev_token123",
+ "clientCustomerId"=>"123-456-7890",
+ "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201809"}},
+ "env:Body"=>
+ {"mutate"=>
+ {"operations"=>
+ {"operator"=>"SET",
+ "operand"=>
+ {"adGroupId"=>"0",
+ "criterion"=>{"id"=>"0"},
+ "biddingStrategyConfiguration"=>
+ {"bids"=>
+ {"bid"=>{"microAmount"=>"1000000"}, "xsi:type"=>"CpcBid"}},
+ "xsi:type"=>"BiddableAdGroupCriterion"}},
+ "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201809"}},
+ "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/v201809",
+ "xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}},
+ # end of auto-generated code.
+ :headers => {
+ 'SOAPAction' => '"mutate"',
+ 'Content-Type' => 'text/xml;charset=UTF-8'
+ }
+ ).
+ to_return(
+ :status => 200,
+ :body => '
+
+
+ 0004c
+ AdGroupCriterionService
+ mutate
+ 1
+ 102
+
+
+
+
+
+ AdGroupCriterionReturnValue
+
+ 1234
+
+ 5678
+ KEYWORD
+ Keyword
+ test text
+ BROAD
+
+ BiddableAdGroupCriterion
+ PAUSED
+ ELIGIBLE
+ PENDING_REVIEW
+
+ MANUAL_CPC
+ CAMPAIGN
+
+ ManualCpcBiddingScheme
+ false
+
+
+ CpcBid
+
+ Money
+ 1000000
+
+ CRITERION
+
+
+ CpmBid
+
+ Money
+ 10000
+
+ ADGROUP
+
+
+
+ http://example.com/mars
+
+
+
+
+
+ ',
+ :headers => {'content-type' => 'text/xml;'}
+ )
+end
+
+def run_asserts()
+ assert_equal(1, $latest_result[:value].size)
+ ad_group_criterion = $latest_result[:value].first
+ assert_equal(1234, ad_group_criterion[:ad_group_id])
+ assert_equal(5678, ad_group_criterion[:criterion][:id])
+ assert_equal("test text", ad_group_criterion[:criterion][:text])
+end
diff --git a/adwords_api/test/templates/v201809/misc_use_oauth2_jwt.def b/adwords_api/test/templates/v201809/misc_use_oauth2_jwt.def
new file mode 100644
index 000000000..f08af7e29
--- /dev/null
+++ b/adwords_api/test/templates/v201809/misc_use_oauth2_jwt.def
@@ -0,0 +1,130 @@
+def setup_mocks()
+ file_name = 'privatekey.json'
+ file_contents = '{"private_key":"-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC57qKyQpgXHHgH\ny8SjFKQzn8v7+ZUmsD/EoQB4WMe63bul2MEIuv6ASAVZk02vbWNx9CmcAATo7R9d\nIs8U9ZRaQ6HSG+WXVw/UKAJ2kTlEjOdnXvER0cDbGAZLlMew2pGhas9U/EGPDZ5z\n2iTtbRpwSzNHSR7jIpxdfrVj5yEcIHW4mOfTeprmpcQwYT5VsacvYYnW2Eseh/AF\nHU5gbvj+nXbYJrs3VXBTOjy/D4H1KXnb//EIEJqZtUTDu4xpF05F8jUvwoRvROrN\nktrzbjE+Mb8YNTwMBHOLFrVb6LmGPWbYrfs9ZZ59cdqbqhKS+iCaAlyk1Oi2Oand\nX3D0I/tHAgMBAAECggEAM2+SzqGhlXMouW9jfIHvUuC3+4L2AffsDCdGDATza/x/\nNsgZzqJ8WVyTLk6TxR4LzrBu+lr/ALjoXkmM5A1z9uySzZ8uConpNRXEaKyQHSil\ns3EOW5GdOn8Q7sO/4mr0sqTrqmUGdd6coQwN/yiZkcsb6nKN+uPOQgcVgwejnzXa\n0q0At2JFR3zxWz+JyGRvpR+SejHzugJD4EXEgQpXvzzt7Yw/pUWY5uM1Mor1jOCQ\nxLAi5uI3BIe0yqTnFAQgQhz5+jtDmzwm0kl2N0ADprTWm4tmrBfE6d035Aqdctcp\nWUFrHiLeF8drqBm+d8qBsdqkM8ytCbJcBK6p68vOUQKBgQDh4KLKt+dIIH3GwUe/\nXq+evlZarEL8Pou7tZI4BqCk98glOESAPPYbajSRaS4AJAVJ347nOqwWZE+SnQDG\n8T2igDUWGmFPwX62Q9/W0YRc4hsOAcylFV+vEB8XgtddesbhCQPkwHJ4wWJRFmFy\n2rPp1tuXwzCG4y19WTascYMzRQKBgQDSukh4tuJb7WhIGWCI0mB/MvQzvp0hv0hm\nF1JQHpLe8pNGsFEy2f3CIzlnlw7GeM2xHLUo/l/F/5bCWzui+Tsud0wof7AG+okJ\nGQtCtA3+LHfgf3aJlajZIRqqn4Gt3XqWL03ZYchcHd1G77PJ3Hb+FBy289+BgUWI\nypwQo973GwKBgQCeVAmIM1RpGG1RjlWubL6JdT2unSTvDyB/WQy/PNYKDK08ea56\nfUC9grqKWsGl05npaE0RA+1wXKvyRx8uVBcx+tA7SA6CC024kOcr+vze5pa0QMqj\nxNGnMpO4tTwlCFSzlNAn3kXfIx65XAi+q1KFTNfsDyPKyR8vyAMs6PxgSQKBgH35\nEp3nZoZh9Dc1xHnGmh0wTsAoMTMdcKBnTLPMsyxIgzZ87O2jV4mZGRYOPaz0RrKc\nYMgy2Po6gtuJQqt4pqJuer6zJn3lg8pGiG7FyJ+r4bX5PNme+CNlINXjKNjRUBk8\nCiPryqUWzVM8tJP2EcRuLYRJYdG/f9v4kzd3XzEFAoGBAIoxsaECx6U7yyswlBtR\nrPMlVbJTN7EEHDEYfaF009jOeu97lk2dhuNSb7ZK1suqGQcZznaDjUJER1PSOjft\ns8piH4THI9MhTLNSZS8q0HcB2lbbANV+GpqT5nt/5Sl0qi4KcXBRE0PkqsYMAKTt\nBjiDgUEVFb0ma/qpcbsRfQPM\n-----END PRIVATE KEY-----\n","client_email":"client email"}'
+ key_secret = 'not-secret'
+
+ $api_config = {
+ :authentication => {
+ :method => 'OAUTH2_SERVICE_ACCOUNT',
+ :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'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>/Faraday/}).
+ with(:body => /assertion=eyJhbGciOiJSUzI1NiJ9/).
+ 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/v201809/CampaignService").
+ with(
+ :body =>
+ # autogenerated code
+ {"env:Envelope"=>
+ {"env:Header"=>
+ {"wsdl:RequestHeader"=>
+ {"userAgent"=>/ruby-tests.*AwApi\-Ruby.*Common\-Ruby/,
+ "developerToken"=>"dev_token123",
+ "clientCustomerId"=>"123-456-7890",
+ "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201809"}},
+ "env:Body"=>
+ {"get"=>
+ {"serviceSelector"=>
+ {"fields"=>["Id", "Name", "Status"],
+ "ordering"=>{"field"=>"Name", "sortOrder"=>"ASCENDING"}},
+ "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201809"}},
+ "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/v201809",
+ "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
diff --git a/adwords_api/test/templates/v201809/reporting_download_criteria_report_with_awql.def b/adwords_api/test/templates/v201809/reporting_download_criteria_report_with_awql.def
new file mode 100644
index 000000000..951d5e907
--- /dev/null
+++ b/adwords_api/test/templates/v201809/reporting_download_criteria_report_with_awql.def
@@ -0,0 +1,56 @@
+def setup_mocks()
+ require 'tempfile'
+
+ $tempfile = Tempfile.new('report_test');
+
+ $args = [$tempfile.path, 'CSV']
+
+ $api_config = {
+ :service => {:environment => 'PRODUCTION'},
+ :authentication => {
+ :method => 'OAuth2',
+ :oauth2_client_id => 'client_id123',
+ :oauth2_client_secret => 'client_secret123',
+ :developer_token => 'dev_token123',
+ :client_customer_id => '123-456-7890',
+ :user_agent => 'ruby-tests',
+ :oauth2_token => {
+ :refresh_token => 'refresh_token123'
+ }
+ }
+ }
+
+ stub_request(:post,
+ "https://adwords.google.com/api/adwords/reportdownload/v201809").
+ with(
+ body: {
+ "__fmt"=>"CSV",
+ "__rdquery"=>/SELECT CampaignId/
+ },
+ headers: {
+ 'Accept'=>'*/*',
+ 'Authorization'=>'Bearer ',
+ 'Clientcustomerid'=>'123-456-7890',
+ 'Content-Type'=>'application/x-www-form-urlencoded',
+ 'Developertoken'=>'dev_token123',
+ 'Includezeroimpressions'=>'true',
+ 'Skipcolumnheader'=>'false',
+ 'Skipreportheader'=>'false',
+ 'Skipreportsummary'=>'false',
+ 'User-Agent'=>/ruby-tests.*AwApi\-Ruby.*Common\-Ruby/
+ }).
+ to_return(status: 200, body: "test body", headers: {})
+
+end
+
+def run_asserts()
+ assert_equal('test body', $latest_result.body)
+ $tempfile.seek(0)
+ assert_equal('test body', $tempfile.read)
+ clean_up()
+end
+
+def clean_up()
+ $tempfile.close
+ $tempfile = nil
+end