google-adwords-api 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +7 -0
- data/README +4 -4
- data/examples/v201109_1/account_management/create_account.rb +80 -0
- data/examples/v201109_1/account_management/get_account_alerts.rb +111 -0
- data/examples/v201109_1/account_management/get_account_changes.rb +137 -0
- data/examples/v201109_1/account_management/get_account_hierarchy.rb +93 -0
- data/examples/v201109_1/account_management/get_client_customer_id.rb +85 -0
- data/examples/v201109_1/account_management/get_client_unit_usage.rb +87 -0
- data/examples/v201109_1/basic_operations/add_ad_groups.rb +111 -0
- data/examples/v201109_1/basic_operations/add_campaigns.rb +140 -0
- data/examples/v201109_1/basic_operations/add_keywords.rb +108 -0
- data/examples/v201109_1/basic_operations/add_text_ads.rb +105 -0
- data/examples/v201109_1/basic_operations/delete_ad.rb +85 -0
- data/examples/v201109_1/basic_operations/delete_ad_group.rb +102 -0
- data/examples/v201109_1/basic_operations/delete_campaign.rb +103 -0
- data/examples/v201109_1/basic_operations/delete_keyword.rb +90 -0
- data/examples/v201109_1/basic_operations/get_ad_groups.rb +98 -0
- data/examples/v201109_1/basic_operations/get_campaigns.rb +93 -0
- data/examples/v201109_1/basic_operations/get_keywords.rb +104 -0
- data/examples/v201109_1/basic_operations/get_text_ads.rb +106 -0
- data/examples/v201109_1/basic_operations/pause_ad.rb +84 -0
- data/examples/v201109_1/basic_operations/update_ad_group.rb +81 -0
- data/examples/v201109_1/basic_operations/update_campaign.rb +84 -0
- data/examples/v201109_1/basic_operations/update_keyword.rb +99 -0
- data/examples/v201109_1/campaign_management/add_experiment.rb +158 -0
- data/examples/v201109_1/campaign_management/add_keywords_in_bulk.rb +150 -0
- data/examples/v201109_1/campaign_management/add_location_extension.rb +117 -0
- data/examples/v201109_1/campaign_management/add_location_extension_override.rb +83 -0
- data/examples/v201109_1/campaign_management/get_all_disapproved_ads.rb +93 -0
- data/examples/v201109_1/campaign_management/promote_experiment.rb +77 -0
- data/examples/v201109_1/campaign_management/set_ad_parameters.rb +114 -0
- data/examples/v201109_1/campaign_management/validate_text_ad.rb +106 -0
- data/examples/v201109_1/error_handling/handle_captcha_challenge.rb +93 -0
- data/examples/v201109_1/error_handling/handle_partial_failures.rb +126 -0
- data/examples/v201109_1/error_handling/handle_policy_violation_error.rb +137 -0
- data/examples/v201109_1/error_handling/handle_two_factor_authorization_error.rb +87 -0
- data/examples/v201109_1/misc/get_all_images_and_videos.rb +101 -0
- data/examples/v201109_1/misc/upload_image.rb +90 -0
- data/examples/v201109_1/misc/use_oauth.rb +97 -0
- data/examples/v201109_1/optimization/estimate_keyword_traffic.rb +129 -0
- data/examples/v201109_1/optimization/get_keyword_bid_simulations.rb +92 -0
- data/examples/v201109_1/optimization/get_keyword_ideas.rb +113 -0
- data/examples/v201109_1/optimization/get_placement_ideas.rb +106 -0
- data/examples/v201109_1/remarketing/add_audience.rb +115 -0
- data/examples/v201109_1/remarketing/add_conversion_tracker.rb +97 -0
- data/examples/v201109_1/reporting/download_criteria_report.rb +79 -0
- data/examples/v201109_1/reporting/get_campaign_stats.rb +105 -0
- data/examples/v201109_1/reporting/get_defined_reports.rb +75 -0
- data/examples/{v201109/reporting/download_defined_report.rb → v201109_1/reporting/get_report_fields.rb} +15 -11
- data/examples/v201109_1/reporting/parallel_report_download.rb +159 -0
- data/examples/v201109_1/targeting/add_campaign_targeting_criteria.rb +118 -0
- data/examples/v201109_1/targeting/get_campaign_targeting_criteria.rb +102 -0
- data/examples/v201109_1/targeting/get_targetable_languages_and_carriers.rb +86 -0
- data/examples/v201109_1/targeting/lookup_location.rb +103 -0
- data/lib/adwords_api.rb +15 -88
- data/lib/adwords_api/api_config.rb +75 -33
- data/lib/adwords_api/client_login_header_handler.rb +17 -26
- data/lib/adwords_api/credential_handler.rb +29 -65
- data/lib/adwords_api/report_header_handler.rb +65 -0
- data/lib/adwords_api/report_utils.rb +12 -36
- data/lib/adwords_api/v201109/ad_extension_override_service.rb +3 -3
- data/lib/adwords_api/v201109/ad_extension_override_service_registry.rb +2 -2
- data/lib/adwords_api/v201109/ad_group_ad_service.rb +3 -3
- data/lib/adwords_api/v201109/ad_group_ad_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/ad_group_criterion_service.rb +3 -3
- data/lib/adwords_api/v201109/ad_group_criterion_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/ad_group_service.rb +3 -3
- data/lib/adwords_api/v201109/ad_group_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/ad_param_service.rb +3 -3
- data/lib/adwords_api/v201109/ad_param_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/alert_service.rb +3 -3
- data/lib/adwords_api/v201109/alert_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/budget_order_service.rb +42 -0
- data/lib/adwords_api/v201109/budget_order_service_registry.rb +46 -0
- data/lib/adwords_api/v201109/bulk_mutate_job_service.rb +3 -3
- data/lib/adwords_api/v201109/bulk_mutate_job_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/campaign_ad_extension_service.rb +3 -3
- data/lib/adwords_api/v201109/campaign_ad_extension_service_registry.rb +2 -2
- data/lib/adwords_api/v201109/campaign_criterion_service.rb +3 -3
- data/lib/adwords_api/v201109/campaign_criterion_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/campaign_service.rb +3 -3
- data/lib/adwords_api/v201109/campaign_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/campaign_target_service.rb +3 -3
- data/lib/adwords_api/v201109/campaign_target_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/constant_data_service.rb +3 -3
- data/lib/adwords_api/v201109/constant_data_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/conversion_tracker_service.rb +3 -3
- data/lib/adwords_api/v201109/conversion_tracker_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/create_account_service.rb +3 -3
- data/lib/adwords_api/v201109/create_account_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/customer_sync_service.rb +3 -3
- data/lib/adwords_api/v201109/customer_sync_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/data_service.rb +3 -3
- data/lib/adwords_api/v201109/data_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/experiment_service.rb +3 -3
- data/lib/adwords_api/v201109/experiment_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/geo_location_service.rb +3 -3
- data/lib/adwords_api/v201109/geo_location_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/info_service.rb +3 -3
- data/lib/adwords_api/v201109/info_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/location_criterion_service.rb +3 -3
- data/lib/adwords_api/v201109/location_criterion_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/media_service.rb +3 -3
- data/lib/adwords_api/v201109/media_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/mutate_job_service.rb +3 -3
- data/lib/adwords_api/v201109/mutate_job_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/report_definition_service.rb +3 -12
- data/lib/adwords_api/v201109/report_definition_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/serviced_account_service.rb +3 -3
- data/lib/adwords_api/v201109/serviced_account_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/targeting_idea_service.rb +3 -3
- data/lib/adwords_api/v201109/targeting_idea_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/traffic_estimator_service.rb +3 -3
- data/lib/adwords_api/v201109/traffic_estimator_service_registry.rb +1 -1
- data/lib/adwords_api/v201109/user_list_service.rb +3 -3
- data/lib/adwords_api/v201109/user_list_service_registry.rb +1 -1
- data/lib/adwords_api/v201109_1/ad_extension_override_service.rb +38 -0
- data/lib/adwords_api/v201109_1/ad_extension_override_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/ad_group_ad_service.rb +38 -0
- data/lib/adwords_api/v201109_1/ad_group_ad_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/ad_group_criterion_service.rb +38 -0
- data/lib/adwords_api/v201109_1/ad_group_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/ad_group_service.rb +38 -0
- data/lib/adwords_api/v201109_1/ad_group_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/ad_param_service.rb +38 -0
- data/lib/adwords_api/v201109_1/ad_param_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/alert_service.rb +34 -0
- data/lib/adwords_api/v201109_1/alert_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/budget_order_service.rb +42 -0
- data/lib/adwords_api/v201109_1/budget_order_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/bulk_mutate_job_service.rb +38 -0
- data/lib/adwords_api/v201109_1/bulk_mutate_job_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/campaign_ad_extension_service.rb +38 -0
- data/lib/adwords_api/v201109_1/campaign_ad_extension_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/campaign_criterion_service.rb +38 -0
- data/lib/adwords_api/v201109_1/campaign_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/campaign_service.rb +38 -0
- data/lib/adwords_api/v201109_1/campaign_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/campaign_target_service.rb +38 -0
- data/lib/adwords_api/v201109_1/campaign_target_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/constant_data_service.rb +38 -0
- data/lib/adwords_api/v201109_1/constant_data_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/conversion_tracker_service.rb +38 -0
- data/lib/adwords_api/v201109_1/conversion_tracker_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/create_account_service.rb +34 -0
- data/lib/adwords_api/v201109_1/create_account_service_registry.rb +47 -0
- data/lib/adwords_api/v201109_1/customer_sync_service.rb +34 -0
- data/lib/adwords_api/v201109_1/customer_sync_service_registry.rb +47 -0
- data/lib/adwords_api/v201109_1/data_service.rb +38 -0
- data/lib/adwords_api/v201109_1/data_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/experiment_service.rb +38 -0
- data/lib/adwords_api/v201109_1/experiment_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/geo_location_service.rb +34 -0
- data/lib/adwords_api/v201109_1/geo_location_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/info_service.rb +34 -0
- data/lib/adwords_api/v201109_1/info_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/location_criterion_service.rb +34 -0
- data/lib/adwords_api/v201109_1/location_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/media_service.rb +38 -0
- data/lib/adwords_api/v201109_1/media_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/mutate_job_service.rb +42 -0
- data/lib/adwords_api/v201109_1/mutate_job_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/report_definition_service.rb +38 -0
- data/lib/adwords_api/v201109_1/report_definition_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/serviced_account_service.rb +34 -0
- data/lib/adwords_api/v201109_1/serviced_account_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/targeting_idea_service.rb +38 -0
- data/lib/adwords_api/v201109_1/targeting_idea_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/traffic_estimator_service.rb +34 -0
- data/lib/adwords_api/v201109_1/traffic_estimator_service_registry.rb +46 -0
- data/lib/adwords_api/v201109_1/user_list_service.rb +38 -0
- data/lib/adwords_api/v201109_1/user_list_service_registry.rb +46 -0
- data/lib/adwords_api/version.rb +1 -1
- data/test/adwords_api/test_api_config.rb +24 -8
- data/test/adwords_api/test_credential_handler.rb +32 -52
- data/test/coverage.rb +38 -0
- data/test/examples/v201109/test_reporting.rb +0 -12
- data/test/examples/v201109_1/test_account_management.rb +60 -0
- data/test/examples/v201109_1/test_basic_operations.rb +172 -0
- data/test/examples/v201109_1/test_campaign_management.rb +116 -0
- data/test/examples/v201109_1/test_error_handling.rb +63 -0
- data/{lib/adwords_api/v13_login_handler.rb → test/examples/v201109_1/test_misc.rb} +24 -10
- data/test/examples/v201109_1/test_optimization.rb +63 -0
- data/test/{suite_exampletests.rb → examples/v201109_1/test_remarketing.rb} +16 -8
- data/test/examples/v201109_1/test_reporting.rb +77 -0
- data/test/examples/v201109_1/test_targeting.rb +60 -0
- data/test/examples/v201109_1/utils.rb +239 -0
- data/test/suite_exampletests_v201109.rb +37 -0
- data/test/suite_exampletests_v201109_1.rb +37 -0
- data/test/suite_unittests.rb +7 -5
- metadata +136 -11
- data/lib/adwords_api/extensions.rb +0 -269
@@ -5,16 +5,16 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-08 19:55:52.
|
9
9
|
|
10
10
|
require 'ads_common/savon_service'
|
11
11
|
require 'adwords_api/v201109/traffic_estimator_service_registry'
|
12
12
|
|
13
13
|
module AdwordsApi; module V201109; module TrafficEstimatorService
|
14
14
|
class TrafficEstimatorService < AdsCommon::SavonService
|
15
|
-
def initialize(
|
15
|
+
def initialize(config, endpoint)
|
16
16
|
namespace = 'https://adwords.google.com/api/adwords/o/v201109'
|
17
|
-
super(
|
17
|
+
super(config, endpoint, namespace, :v201109)
|
18
18
|
end
|
19
19
|
|
20
20
|
def get(*args, &block)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-08 19:55:52.
|
9
9
|
|
10
10
|
require 'adwords_api/errors'
|
11
11
|
|
@@ -5,16 +5,16 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-08 19:55:54.
|
9
9
|
|
10
10
|
require 'ads_common/savon_service'
|
11
11
|
require 'adwords_api/v201109/user_list_service_registry'
|
12
12
|
|
13
13
|
module AdwordsApi; module V201109; module UserListService
|
14
14
|
class UserListService < AdsCommon::SavonService
|
15
|
-
def initialize(
|
15
|
+
def initialize(config, endpoint)
|
16
16
|
namespace = 'https://adwords.google.com/api/adwords/cm/v201109'
|
17
|
-
super(
|
17
|
+
super(config, endpoint, namespace, :v201109)
|
18
18
|
end
|
19
19
|
|
20
20
|
def get(*args, &block)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-08 19:55:54.
|
9
9
|
|
10
10
|
require 'adwords_api/errors'
|
11
11
|
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:37.
|
9
|
+
|
10
|
+
require 'ads_common/savon_service'
|
11
|
+
require 'adwords_api/v201109_1/ad_extension_override_service_registry'
|
12
|
+
|
13
|
+
module AdwordsApi; module V201109_1; module AdExtensionOverrideService
|
14
|
+
class AdExtensionOverrideService < AdsCommon::SavonService
|
15
|
+
def initialize(config, endpoint)
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/cm/v201109_1'
|
17
|
+
super(config, endpoint, namespace, :v201109_1)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(*args, &block)
|
21
|
+
return execute_action('get', args, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mutate(*args, &block)
|
25
|
+
return execute_action('mutate', args, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def get_service_registry()
|
31
|
+
return AdExtensionOverrideServiceRegistry
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_module()
|
35
|
+
return AdwordsApi::V201109_1::AdExtensionOverrideService
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end; end; end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:37.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201109_1; module AdExtensionOverrideService
|
13
|
+
class AdExtensionOverrideServiceRegistry
|
14
|
+
ADEXTENSIONOVERRIDESERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"AdExtensionOverrideSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AdExtensionOverridePage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"AdExtensionOverrideOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"AdExtensionOverrideReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
|
15
|
+
ADEXTENSIONOVERRIDESERVICE_TYPES = {:AdExtensionOverrideStats=>{:fields=>[], :base=>"Stats"}, :Address=>{:fields=>[{:name=>:street_address, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:street_address2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:city_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:province_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:postal_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoPoint=>{:fields=>[{:name=>:latitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:longitude_in_micro_degrees, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :LocationOverrideInfo=>{:fields=>[{:name=>:radius, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:radius_units, :type=>"LocationOverrideInfo.RadiusUnits", :min_occurs=>0, :max_occurs=>1}]}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :MobileExtension=>{:fields=>[{:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_tracking_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_call_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OAuthInfo=>{:fields=>[{:name=>:http_method, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_request_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:http_authorization_header, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :OverrideInfo=>{:fields=>[]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Sitelink=>{:fields=>[{:name=>:display_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :SitelinksExtension=>{:fields=>[{:name=>:sitelinks, :type=>"Sitelink", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"AdExtension"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionOverrideSelector=>{:fields=>[{:name=>:campaign_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_extension_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:statuses, :type=>"AdExtensionOverride.Status", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :LocationExtension=>{:fields=>[{:name=>:address, :type=>"Address", :min_occurs=>0, :max_occurs=>1}, {:name=>:geo_point, :type=>"GeoPoint", :min_occurs=>0, :max_occurs=>1}, {:name=>:encoded_location, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}, {:name=>:company_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:source, :type=>"LocationExtension.Source", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:image_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}]}, :ProductConditionAndGroup=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ProductExtension=>{:fields=>[{:name=>:google_base_customer_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertiser_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:product_selection, :type=>"ProductConditionAndGroup", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"AdExtension"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :LocationSyncExtension=>{:fields=>[{:name=>:email, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:o_auth_info, :type=>"OAuthInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:icon_media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:should_sync_url, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdExtension"}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_click, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_click, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conv_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_click_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_missed_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_received_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_duration_secs, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_call_duration_secs, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_interactions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_cost_for_offline_interaction, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdExtension=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionOverride=>{:fields=>[{:name=>:ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_extension, :type=>"AdExtension", :min_occurs=>0, :max_occurs=>1}, {:name=>:override_info, :type=>"OverrideInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdExtensionOverride.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_status, :type=>"AdExtensionOverride.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"AdExtensionOverrideStats", :min_occurs=>0, :max_occurs=>1}]}, :AdExtensionOverrideOperation=>{:fields=>[{:name=>:operand, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdExtensionOverridePage=>{:fields=>[{:name=>:entries, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdExtensionOverrideReturnValue=>{:fields=>[{:name=>:value, :type=>"AdExtensionOverride", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_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, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdExtensionOverride.ApprovalStatus"=>{:fields=>[]}, :"AdExtensionOverride.Status"=>{:fields=>[]}, :"LocationExtension.Source"=>{:fields=>[]}, :"LocationOverrideInfo.RadiusUnits"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}}
|
16
|
+
ADEXTENSIONOVERRIDESERVICE_NAMESPACES = []
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return ADEXTENSIONOVERRIDESERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return ADEXTENSIONOVERRIDESERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return ADEXTENSIONOVERRIDESERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Base class for exceptions.
|
32
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
33
|
+
attr_reader :message # string
|
34
|
+
attr_reader :application_exception_type # string
|
35
|
+
end
|
36
|
+
|
37
|
+
# Exception class for holding a list of service errors.
|
38
|
+
class ApiException < ApplicationException
|
39
|
+
attr_reader :errors # ApiError
|
40
|
+
def initialize(exception_fault)
|
41
|
+
@array_fields ||= []
|
42
|
+
@array_fields << 'errors'
|
43
|
+
super(exception_fault)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end; end; end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:38.
|
9
|
+
|
10
|
+
require 'ads_common/savon_service'
|
11
|
+
require 'adwords_api/v201109_1/ad_group_ad_service_registry'
|
12
|
+
|
13
|
+
module AdwordsApi; module V201109_1; module AdGroupAdService
|
14
|
+
class AdGroupAdService < AdsCommon::SavonService
|
15
|
+
def initialize(config, endpoint)
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/cm/v201109_1'
|
17
|
+
super(config, endpoint, namespace, :v201109_1)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(*args, &block)
|
21
|
+
return execute_action('get', args, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mutate(*args, &block)
|
25
|
+
return execute_action('mutate', args, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def get_service_registry()
|
31
|
+
return AdGroupAdServiceRegistry
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_module()
|
35
|
+
return AdwordsApi::V201109_1::AdGroupAdService
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end; end; end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:38.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201109_1; module AdGroupAdService
|
13
|
+
class AdGroupAdServiceRegistry
|
14
|
+
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}]}}}
|
15
|
+
ADGROUPADSERVICE_TYPES = {:AdExtensionOverrideStats=>{:fields=>[], :base=>"Stats"}, :AdGroupAdCountLimitExceeded=>{:fields=>[], :base=>"EntityCountLimitExceeded"}, :AdStats=>{:fields=>[{:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Stats"}, :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"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DeprecatedAd=>{:fields=>[{:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"DeprecatedAd.Type", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :Dimensions=>{:fields=>[{:name=>:width, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:height, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :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}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Image=>{:fields=>[{:name=>:data, :type=>"base64Binary", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :Media_Size_DimensionsMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}]}, :Media_Size_StringMapEntry=>{:fields=>[{:name=>:key, :type=>"Media.Size", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MobileAd=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:markup_languages, :type=>"MarkupLanguageType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mobile_carriers, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:business_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:phone_number, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ProductAd=>{:fields=>[{:name=>:promotion_line, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :TempAdUnionId=>{:fields=>[], :base=>"AdUnionId"}, :TextAd=>{:fields=>[{:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :ThirdPartyRedirectAd=>{:fields=>[{:name=>:is_cookie_targeted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_user_interest_targeted, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_tagged, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_types, :type=>"VideoType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:expanding_directions, :type=>"ThirdPartyRedirectAd.ExpandingDirection", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"RichMediaAd"}, :Video=>{:fields=>[{:name=>:duration_millis, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:streaming_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:ready_to_play_on_the_web, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:industry_standard_commercial_identifier, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:advertising_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:you_tube_video_id_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Media"}, :AdGroupAdExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}]}, :AdUnionId=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_union_id_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :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=>:certified_vendor_format_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :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}]}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_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.MimeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:source_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:file_size, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:creation_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :MobileImageAd=>{:fields=>[{:name=>:markup_languages, :type=>"MarkupLanguageType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:mobile_carriers, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:image, :type=>"Image", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_click, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_click, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conv_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_click_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_missed_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_received_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_duration_secs, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_call_duration_secs, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_interactions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_cost_for_offline_interaction, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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}]}, :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"}, :TemplateElement=>{:fields=>[{:name=>:unique_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"TemplateElementField", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TemplateAd=>{:fields=>[{:name=>:template_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_union_id, :type=>"AdUnionId", :min_occurs=>0, :max_occurs=>1}, {:name=>:template_elements, :type=>"TemplateElement", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:dimensions, :type=>"Dimensions", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"Ad"}, :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=>:approval_status, :type=>"Ad.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:disapproval_reasons, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:trademark_disapproved, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAd=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad, :type=>"Ad", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"AdGroupAdExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"AdGroupAd.Status", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"AdStats", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupAdOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupAdPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupAdReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupAd", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_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, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"Ad.ApprovalStatus"=>{:fields=>[]}, :"AdGroupAd.Status"=>{:fields=>[]}, :"DeprecatedAd.Type"=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :MarkupLanguageType=>{:fields=>[]}, :"Media.MediaType"=>{:fields=>[]}, :"Media.MimeType"=>{:fields=>[]}, :"Media.Size"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :"TemplateElementField.Type"=>{:fields=>[]}, :"ThirdPartyRedirectAd.ExpandingDirection"=>{:fields=>[]}, :VideoType=>{:fields=>[]}}
|
16
|
+
ADGROUPADSERVICE_NAMESPACES = []
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return ADGROUPADSERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return ADGROUPADSERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return ADGROUPADSERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Base class for exceptions.
|
32
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
33
|
+
attr_reader :message # string
|
34
|
+
attr_reader :application_exception_type # string
|
35
|
+
end
|
36
|
+
|
37
|
+
# Exception class for holding a list of service errors.
|
38
|
+
class ApiException < ApplicationException
|
39
|
+
attr_reader :errors # ApiError
|
40
|
+
def initialize(exception_fault)
|
41
|
+
@array_fields ||= []
|
42
|
+
@array_fields << 'errors'
|
43
|
+
super(exception_fault)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end; end; end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:40.
|
9
|
+
|
10
|
+
require 'ads_common/savon_service'
|
11
|
+
require 'adwords_api/v201109_1/ad_group_criterion_service_registry'
|
12
|
+
|
13
|
+
module AdwordsApi; module V201109_1; module AdGroupCriterionService
|
14
|
+
class AdGroupCriterionService < AdsCommon::SavonService
|
15
|
+
def initialize(config, endpoint)
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/cm/v201109_1'
|
17
|
+
super(config, endpoint, namespace, :v201109_1)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(*args, &block)
|
21
|
+
return execute_action('get', args, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mutate(*args, &block)
|
25
|
+
return execute_action('mutate', args, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def get_service_registry()
|
31
|
+
return AdGroupCriterionServiceRegistry
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_module()
|
35
|
+
return AdwordsApi::V201109_1::AdGroupCriterionService
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end; end; end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:40.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201109_1; module AdGroupCriterionService
|
13
|
+
class AdGroupCriterionServiceRegistry
|
14
|
+
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}]}}}
|
15
|
+
ADGROUPCRITERIONSERVICE_TYPES = {:AdGroupCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"AdGroupCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded"}, :ConversionOptimizerAdGroupCriterionBids=>{:fields=>[], :base=>"AdGroupCriterionBids"}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :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}], :base=>"ApiError"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue"}, :NegativeAdGroupCriterion=>{:fields=>[], :base=>"AdGroupCriterion"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PercentCPAAdGroupCriterionBids=>{:fields=>[{:name=>:percent_cpa, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionBids"}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :QualityInfo=>{:fields=>[{:name=>:is_keyword_ad_relevance_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_landing_page_quality_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_landing_page_latency_acceptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_score, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :Vertical=>{:fields=>[{:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion"}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}]}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :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}]}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_click, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_click, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conv_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_click_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_missed_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_received_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_duration_secs, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_call_duration_secs, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_interactions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_cost_for_offline_interaction, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Bid=>{:fields=>[{:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :BidMultiplier=>{:fields=>[{:name=>:multiplier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplied_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOptimizerAdGroupCriterionBids=>{:fields=>[{:name=>:proxy_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionBids"}, :ManualCPCAdGroupCriterionExperimentBidMultiplier=>{:fields=>[{:name=>:max_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplier_source, :type=>"MultiplierSource", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionExperimentBidMultiplier"}, :ManualCPMAdGroupCriterionBids=>{:fields=>[{:name=>:max_cpm, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionBids"}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion"}, :AdGroupCriterionExperimentBidMultiplier=>{:fields=>[{:name=>:ad_group_criterion_experiment_bid_multiplier_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BiddableAdGroupCriterionExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_bid_multiplier, :type=>"AdGroupCriterionExperimentBidMultiplier", :min_occurs=>0, :max_occurs=>1}]}, :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, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ManualCPCAdGroupCriterionBids=>{:fields=>[{:name=>:max_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_source, :type=>"BidSource", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterionBids"}, :AdGroupCriterionBids=>{:fields=>[{:name=>:ad_group_criterion_bids_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :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=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:bids, :type=>"AdGroupCriterionBids", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"BiddableAdGroupCriterionExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:first_page_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:top_of_page_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:quality_info, :type=>"QualityInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"Stats", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupCriterion"}, :AdGroupCriterion=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_use, :type=>"CriterionUse", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_criterion_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :AdGroupCriterionPage=>{:fields=>[{:name=>:entries, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupCriterionReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroupCriterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:partial_failure_errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :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, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdGroupCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[]}, :ApprovalStatus=>{:fields=>[]}, :BidSource=>{:fields=>[]}, :"Criterion.Type"=>{:fields=>[]}, :CriterionUse=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :KeywordMatchType=>{:fields=>[]}, :MultiplierSource=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}, :SystemServingStatus=>{:fields=>[]}, :"CriterionUserList.MembershipStatus"=>{:fields=>[]}, :UserStatus=>{:fields=>[]}}
|
16
|
+
ADGROUPCRITERIONSERVICE_NAMESPACES = []
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return ADGROUPCRITERIONSERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return ADGROUPCRITERIONSERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return ADGROUPCRITERIONSERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Base class for exceptions.
|
32
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
33
|
+
attr_reader :message # string
|
34
|
+
attr_reader :application_exception_type # string
|
35
|
+
end
|
36
|
+
|
37
|
+
# Exception class for holding a list of service errors.
|
38
|
+
class ApiException < ApplicationException
|
39
|
+
attr_reader :errors # ApiError
|
40
|
+
def initialize(exception_fault)
|
41
|
+
@array_fields ||= []
|
42
|
+
@array_fields << 'errors'
|
43
|
+
super(exception_fault)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end; end; end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:42.
|
9
|
+
|
10
|
+
require 'ads_common/savon_service'
|
11
|
+
require 'adwords_api/v201109_1/ad_group_service_registry'
|
12
|
+
|
13
|
+
module AdwordsApi; module V201109_1; module AdGroupService
|
14
|
+
class AdGroupService < AdsCommon::SavonService
|
15
|
+
def initialize(config, endpoint)
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/cm/v201109_1'
|
17
|
+
super(config, endpoint, namespace, :v201109_1)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(*args, &block)
|
21
|
+
return execute_action('get', args, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mutate(*args, &block)
|
25
|
+
return execute_action('mutate', args, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def get_service_registry()
|
31
|
+
return AdGroupServiceRegistry
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_module()
|
35
|
+
return AdwordsApi::V201109_1::AdGroupService
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end; end; end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:42.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201109_1; module AdGroupService
|
13
|
+
class AdGroupServiceRegistry
|
14
|
+
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}]}}}
|
15
|
+
ADGROUPSERVICE_TYPES = {:DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue"}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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"}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :PercentCPAAdGroupBids=>{:fields=>[{:name=>:percent_cpa, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupBids"}, :PhoneInteractionBid=>{:fields=>[], :base=>"InteractionBid"}, :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}]}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :Stats=>{:fields=>[{:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"Stats.Network", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_click, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_click, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conv_value, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_click, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:invalid_click_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_missed_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_received_calls, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:call_duration_secs, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_call_duration_secs, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:num_offline_interactions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:avg_cost_for_offline_interaction, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:offline_interaction_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Bid=>{:fields=>[{:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :BidMultiplier=>{:fields=>[{:name=>:multiplier, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:multiplied_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}]}, :BudgetOptimizerAdGroupBids=>{:fields=>[{:name=>:proxy_keyword_max_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:proxy_site_max_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupBids"}, :ConversionOptimizerAdGroupBids=>{:fields=>[{:name=>:target_cpa, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_optimizer_bid_type, :type=>"ConversionOptimizerBidType", :min_occurs=>0, :max_occurs=>1}, {:name=>:deduplication_mode, :type=>"ConversionDeduplicationMode", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupBids"}, :InteractionBid=>{:fields=>[{:name=>:interaction_bid_amount, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:minimum_bid, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:bid_status, :type=>"InteractionBid.BidStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:interaction_bid_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ManualCPCAdGroupBids=>{:fields=>[{:name=>:keyword_max_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_content_max_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:site_max_cpc, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}, {:name=>:enhanced_cpc_enabled, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupBids"}, :ManualCPCAdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:max_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_content_cpc_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupExperimentBidMultipliers"}, :ManualCPMAdGroupBids=>{:fields=>[{:name=>:max_cpm, :type=>"Bid", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupBids"}, :ManualCPMAdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:max_cpm_multiplier, :type=>"BidMultiplier", :min_occurs=>0, :max_occurs=>1}], :base=>"AdGroupExperimentBidMultipliers"}, :AdGroupBids=>{:fields=>[{:name=>:interaction_bids, :type=>"InteractionBid", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_group_bids_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdGroupExperimentBidMultipliers=>{:fields=>[{:name=>:ad_group_experiment_bid_multipliers_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :AdGroupExperimentData=>{:fields=>[{:name=>:experiment_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_delta_status, :type=>"ExperimentDeltaStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data_status, :type=>"ExperimentDataStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_bid_multipliers, :type=>"AdGroupExperimentBidMultipliers", :min_occurs=>0, :max_occurs=>1}]}, :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=>:bids, :type=>"AdGroupBids", :min_occurs=>0, :max_occurs=>1}, {:name=>:experiment_data, :type=>"AdGroupExperimentData", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"Stats", :min_occurs=>0, :max_occurs=>1}]}, :AdGroupOperation=>{:fields=>[{:name=>:operand, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :AdGroupPage=>{:fields=>[{:name=>:entries, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :AdGroupReturnValue=>{:fields=>[{:name=>:value, :type=>"AdGroup", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_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, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"AdGroup.Status"=>{:fields=>[]}, :ConversionDeduplicationMode=>{:fields=>[]}, :ConversionOptimizerBidType=>{:fields=>[]}, :ExperimentDataStatus=>{:fields=>[]}, :ExperimentDeltaStatus=>{:fields=>[]}, :"InteractionBid.BidStatus"=>{:fields=>[]}, :Operator=>{:fields=>[]}, :"Predicate.Operator"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"Stats.Network"=>{:fields=>[]}}
|
16
|
+
ADGROUPSERVICE_NAMESPACES = []
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return ADGROUPSERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return ADGROUPSERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return ADGROUPSERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Base class for exceptions.
|
32
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
33
|
+
attr_reader :message # string
|
34
|
+
attr_reader :application_exception_type # string
|
35
|
+
end
|
36
|
+
|
37
|
+
# Exception class for holding a list of service errors.
|
38
|
+
class ApiException < ApplicationException
|
39
|
+
attr_reader :errors # ApiError
|
40
|
+
def initialize(exception_fault)
|
41
|
+
@array_fields ||= []
|
42
|
+
@array_fields << 'errors'
|
43
|
+
super(exception_fault)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end; end; end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.7.0 on 2012-05-09 17:47:43.
|
9
|
+
|
10
|
+
require 'ads_common/savon_service'
|
11
|
+
require 'adwords_api/v201109_1/ad_param_service_registry'
|
12
|
+
|
13
|
+
module AdwordsApi; module V201109_1; module AdParamService
|
14
|
+
class AdParamService < AdsCommon::SavonService
|
15
|
+
def initialize(config, endpoint)
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/cm/v201109_1'
|
17
|
+
super(config, endpoint, namespace, :v201109_1)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(*args, &block)
|
21
|
+
return execute_action('get', args, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mutate(*args, &block)
|
25
|
+
return execute_action('mutate', args, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def get_service_registry()
|
31
|
+
return AdParamServiceRegistry
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_module()
|
35
|
+
return AdwordsApi::V201109_1::AdParamService
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end; end; end
|