google-adwords-api 0.21.1 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/examples/{v201603/basic_operations/remove_campaign.rb → v201609/account_management/accept_service_link.rb} +24 -20
- data/examples/v201609/advanced_operations/add_universal_app_campaign.rb +3 -0
- data/examples/v201609/advanced_operations/use_portfolio_bidding_strategy.rb +3 -0
- data/examples/v201609/basic_operations/add_campaigns.rb +3 -0
- data/examples/v201609/campaign_management/add_complete_campaigns_using_batch_job.rb +3 -0
- data/examples/v201609/misc/use_oauth2_jwt.rb +1 -1
- data/examples/v201609/shopping_campaigns/add_shopping_campaign.rb +4 -0
- data/lib/adwords_api/api_config.rb +0 -92
- data/lib/adwords_api/version.rb +1 -1
- data/test/adwords_api/test_choices.rb +88 -25
- metadata +5 -174
- data/examples/v201603/account_management/create_account.rb +0 -88
- data/examples/v201603/account_management/get_account_changes.rb +0 -135
- data/examples/v201603/account_management/get_account_hierarchy.rb +0 -132
- data/examples/v201603/advanced_operations/add_ad_customizers.rb +0 -184
- data/examples/v201603/advanced_operations/add_ad_group_bid_modifier.rb +0 -101
- data/examples/v201603/advanced_operations/add_click_to_download_ad.rb +0 -133
- data/examples/v201603/advanced_operations/add_html5_ad.rb +0 -137
- data/examples/v201603/advanced_operations/add_text_ad_with_upgraded_urls.rb +0 -134
- data/examples/v201603/advanced_operations/create_and_attach_shared_keyword_set.rb +0 -141
- data/examples/v201603/advanced_operations/find_and_remove_criteria_from_shared_set.rb +0 -174
- data/examples/v201603/advanced_operations/get_ad_group_bid_modifiers.rb +0 -102
- data/examples/v201603/advanced_operations/use_portfolio_bidding_strategy.rb +0 -146
- data/examples/v201603/basic_operations/add_ad_groups.rb +0 -142
- data/examples/v201603/basic_operations/add_campaigns.rb +0 -138
- data/examples/v201603/basic_operations/add_keywords.rb +0 -114
- data/examples/v201603/basic_operations/add_text_ads.rb +0 -109
- data/examples/v201603/basic_operations/get_ad_groups.rb +0 -102
- data/examples/v201603/basic_operations/get_campaigns.rb +0 -97
- data/examples/v201603/basic_operations/get_campaigns_with_awql.rb +0 -89
- data/examples/v201603/basic_operations/get_keywords.rb +0 -109
- data/examples/v201603/basic_operations/get_text_ads.rb +0 -110
- data/examples/v201603/basic_operations/pause_ad.rb +0 -88
- data/examples/v201603/basic_operations/remove_ad.rb +0 -89
- data/examples/v201603/basic_operations/remove_ad_group.rb +0 -85
- data/examples/v201603/basic_operations/remove_keyword.rb +0 -94
- data/examples/v201603/basic_operations/update_ad_group.rb +0 -85
- data/examples/v201603/basic_operations/update_campaign.rb +0 -86
- data/examples/v201603/basic_operations/update_keyword.rb +0 -106
- data/examples/v201603/campaign_management/add_campaign_labels.rb +0 -82
- data/examples/v201603/campaign_management/add_complete_campaigns_using_batch_job.rb +0 -355
- data/examples/v201603/campaign_management/add_draft.rb +0 -114
- data/examples/v201603/campaign_management/add_experiment.rb +0 -162
- data/examples/v201603/campaign_management/add_keywords_using_incremental_batch_job.rb +0 -210
- data/examples/v201603/campaign_management/add_trial.rb +0 -142
- data/examples/v201603/campaign_management/get_all_disapproved_ads.rb +0 -97
- data/examples/v201603/campaign_management/get_all_disapproved_ads_with_awql.rb +0 -89
- data/examples/v201603/campaign_management/get_campaigns_by_label.rb +0 -108
- data/examples/v201603/campaign_management/graduate_trial.rb +0 -106
- data/examples/v201603/campaign_management/promote_experiment.rb +0 -81
- data/examples/v201603/campaign_management/set_ad_parameters.rb +0 -118
- data/examples/v201603/campaign_management/set_criterion_bid_modifier.rb +0 -104
- data/examples/v201603/campaign_management/validate_text_ad.rb +0 -110
- data/examples/v201603/error_handling/handle_partial_failures.rb +0 -130
- data/examples/v201603/error_handling/handle_policy_violation_error.rb +0 -141
- data/examples/v201603/extensions/add_google_my_business_location_extensions.rb +0 -193
- data/examples/v201603/extensions/add_site_links.rb +0 -184
- data/examples/v201603/extensions/add_site_links_using_feeds.rb +0 -281
- data/examples/v201603/migration/migrate_to_extension_settings.rb +0 -386
- data/examples/v201603/migration/upgrade_ad_url.rb +0 -93
- data/examples/v201603/misc/get_all_images_and_videos.rb +0 -104
- data/examples/v201603/misc/setup_oauth2.rb +0 -84
- data/examples/v201603/misc/upload_image.rb +0 -93
- data/examples/v201603/misc/upload_media_bundle.rb +0 -90
- data/examples/v201603/misc/use_oauth2_jwt.rb +0 -93
- data/examples/v201603/misc/use_runtime_config.rb +0 -92
- data/examples/v201603/optimization/estimate_keyword_traffic.rb +0 -146
- data/examples/v201603/optimization/get_campaign_criterion_bid_modifier_simulations.rb +0 -128
- data/examples/v201603/optimization/get_keyword_bid_simulations.rb +0 -95
- data/examples/v201603/optimization/get_keyword_ideas.rb +0 -136
- data/examples/v201603/remarketing/add_audience.rb +0 -118
- data/examples/v201603/remarketing/add_conversion_tracker.rb +0 -97
- data/examples/v201603/remarketing/add_crm_based_user_list.rb +0 -116
- data/examples/v201603/remarketing/add_rule_based_user_lists.rb +0 -167
- data/examples/v201603/remarketing/upload_offline_conversions.rb +0 -98
- data/examples/v201603/reporting/download_criteria_report.rb +0 -92
- data/examples/v201603/reporting/download_criteria_report_with_awql.rb +0 -93
- data/examples/v201603/reporting/get_report_fields.rb +0 -75
- data/examples/v201603/reporting/parallel_report_download.rb +0 -164
- data/examples/v201603/reporting/stream_criteria_report_results.rb +0 -97
- data/examples/v201603/shopping_campaigns/add_product_partition_tree.rb +0 -267
- data/examples/v201603/shopping_campaigns/add_product_scope.rb +0 -130
- data/examples/v201603/shopping_campaigns/add_shopping_campaign.rb +0 -129
- data/examples/v201603/shopping_campaigns/get_product_category_taxonomy.rb +0 -115
- data/examples/v201603/targeting/add_campaign_targeting_criteria.rb +0 -180
- data/examples/v201603/targeting/add_demographic_targeting_criteria.rb +0 -112
- data/examples/v201603/targeting/get_campaign_targeting_criteria.rb +0 -106
- data/examples/v201603/targeting/get_targetable_languages_and_carriers.rb +0 -89
- data/examples/v201603/targeting/lookup_location.rb +0 -108
- data/lib/adwords_api/v201603/account_label_service.rb +0 -46
- data/lib/adwords_api/v201603/account_label_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_customizer_feed_service.rb +0 -46
- data/lib/adwords_api/v201603/ad_customizer_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_group_ad_service.rb +0 -70
- data/lib/adwords_api/v201603/ad_group_ad_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_group_bid_modifier_service.rb +0 -54
- data/lib/adwords_api/v201603/ad_group_bid_modifier_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_group_criterion_service.rb +0 -62
- data/lib/adwords_api/v201603/ad_group_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_group_extension_setting_service.rb +0 -54
- data/lib/adwords_api/v201603/ad_group_extension_setting_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_group_feed_service.rb +0 -54
- data/lib/adwords_api/v201603/ad_group_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_group_service.rb +0 -62
- data/lib/adwords_api/v201603/ad_group_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/ad_param_service.rb +0 -46
- data/lib/adwords_api/v201603/ad_param_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/adwords_user_list_service.rb +0 -62
- data/lib/adwords_api/v201603/adwords_user_list_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/batch_job_service.rb +0 -54
- data/lib/adwords_api/v201603/batch_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/bidding_strategy_service.rb +0 -54
- data/lib/adwords_api/v201603/bidding_strategy_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/budget_order_service.rb +0 -54
- data/lib/adwords_api/v201603/budget_order_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/budget_service.rb +0 -54
- data/lib/adwords_api/v201603/budget_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/campaign_criterion_service.rb +0 -54
- data/lib/adwords_api/v201603/campaign_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/campaign_extension_setting_service.rb +0 -54
- data/lib/adwords_api/v201603/campaign_extension_setting_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/campaign_feed_service.rb +0 -54
- data/lib/adwords_api/v201603/campaign_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/campaign_service.rb +0 -62
- data/lib/adwords_api/v201603/campaign_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/campaign_shared_set_service.rb +0 -54
- data/lib/adwords_api/v201603/campaign_shared_set_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/constant_data_service.rb +0 -110
- data/lib/adwords_api/v201603/constant_data_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/conversion_tracker_service.rb +0 -54
- data/lib/adwords_api/v201603/conversion_tracker_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/customer_extension_setting_service.rb +0 -54
- data/lib/adwords_api/v201603/customer_extension_setting_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/customer_feed_service.rb +0 -54
- data/lib/adwords_api/v201603/customer_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/customer_service.rb +0 -54
- data/lib/adwords_api/v201603/customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/customer_sync_service.rb +0 -38
- data/lib/adwords_api/v201603/customer_sync_service_registry.rb +0 -47
- data/lib/adwords_api/v201603/data_service.rb +0 -94
- data/lib/adwords_api/v201603/data_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/draft_async_error_service.rb +0 -46
- data/lib/adwords_api/v201603/draft_async_error_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/draft_service.rb +0 -54
- data/lib/adwords_api/v201603/draft_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/experiment_service.rb +0 -46
- data/lib/adwords_api/v201603/experiment_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/feed_item_service.rb +0 -54
- data/lib/adwords_api/v201603/feed_item_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/feed_mapping_service.rb +0 -54
- data/lib/adwords_api/v201603/feed_mapping_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/feed_service.rb +0 -54
- data/lib/adwords_api/v201603/feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/label_service.rb +0 -54
- data/lib/adwords_api/v201603/label_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/location_criterion_service.rb +0 -46
- data/lib/adwords_api/v201603/location_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/managed_customer_service.rb +0 -78
- data/lib/adwords_api/v201603/managed_customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/media_service.rb +0 -54
- data/lib/adwords_api/v201603/media_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/offline_conversion_feed_service.rb +0 -38
- data/lib/adwords_api/v201603/offline_conversion_feed_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/report_definition_service.rb +0 -38
- data/lib/adwords_api/v201603/report_definition_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/shared_criterion_service.rb +0 -54
- data/lib/adwords_api/v201603/shared_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/shared_set_service.rb +0 -54
- data/lib/adwords_api/v201603/shared_set_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/targeting_idea_service.rb +0 -38
- data/lib/adwords_api/v201603/targeting_idea_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/traffic_estimator_service.rb +0 -38
- data/lib/adwords_api/v201603/traffic_estimator_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/trial_async_error_service.rb +0 -46
- data/lib/adwords_api/v201603/trial_async_error_service_registry.rb +0 -46
- data/lib/adwords_api/v201603/trial_service.rb +0 -54
- data/lib/adwords_api/v201603/trial_service_registry.rb +0 -46
- data/test/templates/v201603/basic_operations_get_campaigns.def +0 -116
- data/test/templates/v201603/basic_operations_update_keyword.def +0 -125
- data/test/templates/v201603/misc_use_oauth2_jwt.def +0 -131
@@ -1,38 +0,0 @@
|
|
1
|
-
# Encoding: utf-8
|
2
|
-
#
|
3
|
-
# This is auto-generated code, changes will be overwritten.
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2016, Google Inc. All Rights Reserved.
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
-
#
|
8
|
-
# Code generated by AdsCommon library 0.11.3 on 2016-03-23 14:53:12.
|
9
|
-
|
10
|
-
require 'ads_common/savon_service'
|
11
|
-
require 'adwords_api/v201603/traffic_estimator_service_registry'
|
12
|
-
|
13
|
-
module AdwordsApi; module V201603; module TrafficEstimatorService
|
14
|
-
class TrafficEstimatorService < AdsCommon::SavonService
|
15
|
-
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://adwords.google.com/api/adwords/o/v201603'
|
17
|
-
super(config, endpoint, namespace, :v201603)
|
18
|
-
end
|
19
|
-
|
20
|
-
def get(*args, &block)
|
21
|
-
return execute_action('get', args, &block)
|
22
|
-
end
|
23
|
-
|
24
|
-
def get_to_xml(*args)
|
25
|
-
return get_soap_xml('get', args)
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
def get_service_registry()
|
31
|
-
return TrafficEstimatorServiceRegistry
|
32
|
-
end
|
33
|
-
|
34
|
-
def get_module()
|
35
|
-
return AdwordsApi::V201603::TrafficEstimatorService
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end; end; end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# Encoding: utf-8
|
2
|
-
#
|
3
|
-
# This is auto-generated code, changes will be overwritten.
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2016, Google Inc. All Rights Reserved.
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
-
#
|
8
|
-
# Code generated by AdsCommon library 0.11.3 on 2016-03-23 14:53:12.
|
9
|
-
|
10
|
-
require 'adwords_api/errors'
|
11
|
-
|
12
|
-
module AdwordsApi; module V201603; module TrafficEstimatorService
|
13
|
-
class TrafficEstimatorServiceRegistry
|
14
|
-
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}]}}}
|
15
|
-
TRAFFICESTIMATORSERVICE_TYPES = {:AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[{: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}, :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}], :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"}, :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}]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}}
|
16
|
-
TRAFFICESTIMATORSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201603"]
|
17
|
-
|
18
|
-
def self.get_method_signature(method_name)
|
19
|
-
return TRAFFICESTIMATORSERVICE_METHODS[method_name.to_sym]
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.get_type_signature(type_name)
|
23
|
-
return TRAFFICESTIMATORSERVICE_TYPES[type_name.to_sym]
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.get_namespace(index)
|
27
|
-
return TRAFFICESTIMATORSERVICE_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, TrafficEstimatorServiceRegistry)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end; end; end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# Encoding: utf-8
|
2
|
-
#
|
3
|
-
# This is auto-generated code, changes will be overwritten.
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2016, Google Inc. All Rights Reserved.
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
-
#
|
8
|
-
# Code generated by AdsCommon library 0.11.3 on 2016-03-23 14:53:14.
|
9
|
-
|
10
|
-
require 'ads_common/savon_service'
|
11
|
-
require 'adwords_api/v201603/trial_async_error_service_registry'
|
12
|
-
|
13
|
-
module AdwordsApi; module V201603; module TrialAsyncErrorService
|
14
|
-
class TrialAsyncErrorService < AdsCommon::SavonService
|
15
|
-
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://adwords.google.com/api/adwords/cm/v201603'
|
17
|
-
super(config, endpoint, namespace, :v201603)
|
18
|
-
end
|
19
|
-
|
20
|
-
def get(*args, &block)
|
21
|
-
return execute_action('get', args, &block)
|
22
|
-
end
|
23
|
-
|
24
|
-
def get_to_xml(*args)
|
25
|
-
return get_soap_xml('get', args)
|
26
|
-
end
|
27
|
-
|
28
|
-
def query(*args, &block)
|
29
|
-
return execute_action('query', args, &block)
|
30
|
-
end
|
31
|
-
|
32
|
-
def query_to_xml(*args)
|
33
|
-
return get_soap_xml('query', args)
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
def get_service_registry()
|
39
|
-
return TrialAsyncErrorServiceRegistry
|
40
|
-
end
|
41
|
-
|
42
|
-
def get_module()
|
43
|
-
return AdwordsApi::V201603::TrialAsyncErrorService
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end; end; end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# Encoding: utf-8
|
2
|
-
#
|
3
|
-
# This is auto-generated code, changes will be overwritten.
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2016, Google Inc. All Rights Reserved.
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
-
#
|
8
|
-
# Code generated by AdsCommon library 0.11.3 on 2016-03-23 14:53:14.
|
9
|
-
|
10
|
-
require 'adwords_api/errors'
|
11
|
-
|
12
|
-
module AdwordsApi; module V201603; module TrialAsyncErrorService
|
13
|
-
class TrialAsyncErrorServiceRegistry
|
14
|
-
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}]}}}
|
15
|
-
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"}, :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"}, :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"}, :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"}, :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}]}, :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.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"}, :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}]}, :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"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError"}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :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}, :"AdError.Reason"=>{:fields=>[]}, :"AdGroupAdError.Reason"=>{:fields=>[]}, :"AdGroupCriterionError.Reason"=>{:fields=>[]}, :"AdGroupFeedError.Reason"=>{:fields=>[]}, :"AdGroupServiceError.Reason"=>{:fields=>[]}, :"AuthenticationError.Reason"=>{:fields=>[]}, :"AuthorizationError.Reason"=>{:fields=>[]}, :"BiddingErrors.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=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"UrlError.Reason"=>{:fields=>[]}, :"VideoError.Reason"=>{:fields=>[]}}
|
16
|
-
TRIALASYNCERRORSERVICE_NAMESPACES = []
|
17
|
-
|
18
|
-
def self.get_method_signature(method_name)
|
19
|
-
return TRIALASYNCERRORSERVICE_METHODS[method_name.to_sym]
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.get_type_signature(type_name)
|
23
|
-
return TRIALASYNCERRORSERVICE_TYPES[type_name.to_sym]
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.get_namespace(index)
|
27
|
-
return TRIALASYNCERRORSERVICE_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, TrialAsyncErrorServiceRegistry)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end; end; end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# Encoding: utf-8
|
2
|
-
#
|
3
|
-
# This is auto-generated code, changes will be overwritten.
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2016, Google Inc. All Rights Reserved.
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
-
#
|
8
|
-
# Code generated by AdsCommon library 0.11.3 on 2016-03-23 14:53:13.
|
9
|
-
|
10
|
-
require 'ads_common/savon_service'
|
11
|
-
require 'adwords_api/v201603/trial_service_registry'
|
12
|
-
|
13
|
-
module AdwordsApi; module V201603; module TrialService
|
14
|
-
class TrialService < AdsCommon::SavonService
|
15
|
-
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://adwords.google.com/api/adwords/cm/v201603'
|
17
|
-
super(config, endpoint, namespace, :v201603)
|
18
|
-
end
|
19
|
-
|
20
|
-
def get(*args, &block)
|
21
|
-
return execute_action('get', args, &block)
|
22
|
-
end
|
23
|
-
|
24
|
-
def get_to_xml(*args)
|
25
|
-
return get_soap_xml('get', args)
|
26
|
-
end
|
27
|
-
|
28
|
-
def mutate(*args, &block)
|
29
|
-
return execute_action('mutate', args, &block)
|
30
|
-
end
|
31
|
-
|
32
|
-
def mutate_to_xml(*args)
|
33
|
-
return get_soap_xml('mutate', args)
|
34
|
-
end
|
35
|
-
|
36
|
-
def query(*args, &block)
|
37
|
-
return execute_action('query', args, &block)
|
38
|
-
end
|
39
|
-
|
40
|
-
def query_to_xml(*args)
|
41
|
-
return get_soap_xml('query', args)
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
def get_service_registry()
|
47
|
-
return TrialServiceRegistry
|
48
|
-
end
|
49
|
-
|
50
|
-
def get_module()
|
51
|
-
return AdwordsApi::V201603::TrialService
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end; end; end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# Encoding: utf-8
|
2
|
-
#
|
3
|
-
# This is auto-generated code, changes will be overwritten.
|
4
|
-
#
|
5
|
-
# Copyright:: Copyright 2016, Google Inc. All Rights Reserved.
|
6
|
-
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
-
#
|
8
|
-
# Code generated by AdsCommon library 0.11.3 on 2016-03-23 14:53:13.
|
9
|
-
|
10
|
-
require 'adwords_api/errors'
|
11
|
-
|
12
|
-
module AdwordsApi; module V201603; module TrialService
|
13
|
-
class TrialServiceRegistry
|
14
|
-
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}]}}}
|
15
|
-
TRIALSERVICE_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"}, :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"}, :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"}, :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"}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :OrderBy=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}]}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Predicate=>{:fields=>[{:name=>:field, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"Predicate.Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}]}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SoapHeader=>{:fields=>[{:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :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=>: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"}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.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}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException"}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Selector=>{:fields=>[{:name=>:fields, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:predicates, :type=>"Predicate", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:ordering, :type=>"OrderBy", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :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"}, :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=>[]}, :"BiddingErrors.Reason"=>{:fields=>[]}, :"BudgetError.Reason"=>{:fields=>[]}, :"CampaignError.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=>[]}, :"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=>[]}, :"StringLengthError.Reason"=>{:fields=>[]}, :"TrialError.Reason"=>{:fields=>[]}, :TrialStatus=>{:fields=>[]}}
|
16
|
-
TRIALSERVICE_NAMESPACES = []
|
17
|
-
|
18
|
-
def self.get_method_signature(method_name)
|
19
|
-
return TRIALSERVICE_METHODS[method_name.to_sym]
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.get_type_signature(type_name)
|
23
|
-
return TRIALSERVICE_TYPES[type_name.to_sym]
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.get_namespace(index)
|
27
|
-
return TRIALSERVICE_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, TrialServiceRegistry)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end; end; end
|
@@ -1,116 +0,0 @@
|
|
1
|
-
def setup_mocks()
|
2
|
-
$api_config = {
|
3
|
-
:service => {:environment => 'PRODUCTION'},
|
4
|
-
:authentication => {
|
5
|
-
:method => 'OAuth2',
|
6
|
-
:oauth2_client_id => 'client_id123',
|
7
|
-
:oauth2_client_secret => 'client_secret123',
|
8
|
-
:developer_token => 'dev_token123',
|
9
|
-
:client_customer_id => '123-456-7890',
|
10
|
-
:user_agent => 'ruby-tests',
|
11
|
-
:oauth2_token => {
|
12
|
-
:refresh_token => 'refresh_token123'
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
stub_request(:post, "https://accounts.google.com/o/oauth2/auth").
|
18
|
-
with(:body => {"client_id"=>"client_id123", "client_secret"=>"client_secret123", "refresh_token"=>"refresh_token123", "grant_type"=>"refresh_token"}).
|
19
|
-
to_return(:status => 200, :body => '{"access_token":"access_token123","token_type":"Bearer","expires_in":"3600"}\n', :headers => {})
|
20
|
-
|
21
|
-
stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201603/CampaignService").
|
22
|
-
with(
|
23
|
-
:body =>
|
24
|
-
# autogenerated code
|
25
|
-
{"env:Envelope"=>
|
26
|
-
{"env:Header"=>
|
27
|
-
{"wsdl:RequestHeader"=>
|
28
|
-
{"userAgent"=>/ruby-tests.*AwApi\-Ruby.*Common\-Ruby/,
|
29
|
-
"developerToken"=>"dev_token123",
|
30
|
-
"clientCustomerId"=>"123-456-7890",
|
31
|
-
"xmlns"=>"https://adwords.google.com/api/adwords/cm/v201603"}},
|
32
|
-
"env:Body"=>
|
33
|
-
{"get"=>
|
34
|
-
{"serviceSelector"=>
|
35
|
-
{"fields"=>["Id", "Name", "Status"],
|
36
|
-
"ordering"=>{"field"=>"Name", "sortOrder"=>"ASCENDING"},
|
37
|
-
"paging"=>{"startIndex"=>"0", "numberResults"=>"5"}},
|
38
|
-
"xmlns"=>"https://adwords.google.com/api/adwords/cm/v201603"}},
|
39
|
-
"xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema",
|
40
|
-
"xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
|
41
|
-
"xmlns:wsdl"=>"https://adwords.google.com/api/adwords/cm/v201603",
|
42
|
-
"xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}},
|
43
|
-
# end of auto-generated code.
|
44
|
-
:headers => {
|
45
|
-
'SOAPAction' => '"get"',
|
46
|
-
'Content-Type' => 'text/xml;charset=UTF-8'
|
47
|
-
}
|
48
|
-
).
|
49
|
-
to_return(
|
50
|
-
:status => 200,
|
51
|
-
:body => '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
52
|
-
<soap:Header>
|
53
|
-
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201603">
|
54
|
-
<requestId>0004c</requestId>
|
55
|
-
<serviceName>CampaignService</serviceName>
|
56
|
-
<methodName>get</methodName>
|
57
|
-
<operations>42</operations>
|
58
|
-
<responseTime>84</responseTime>
|
59
|
-
<units>42</units>
|
60
|
-
</ResponseHeader>
|
61
|
-
</soap:Header>
|
62
|
-
<soap:Body>
|
63
|
-
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201603">
|
64
|
-
<rval>
|
65
|
-
<totalNumEntries>2</totalNumEntries>
|
66
|
-
<Page.Type>CampaignPage</Page.Type>
|
67
|
-
<totalBudget>
|
68
|
-
<period>DAILY</period><amount><ComparableValue.Type>Money</ComparableValue.Type>
|
69
|
-
<microAmount>0</microAmount></amount>
|
70
|
-
</totalBudget>
|
71
|
-
<entries>
|
72
|
-
<id>15</id><name>Campaign name 1</name><status>PAUSED</status><campaignStats><network>ALL</network>
|
73
|
-
<Stats.Type>CampaignStats</Stats.Type></campaignStats><frequencyCap><impressions>0</impressions></frequencyCap>
|
74
|
-
</entries>
|
75
|
-
<entries>
|
76
|
-
<id>16</id><name>Campaign name 2</name><status>ACTIVE</status><campaignStats><network>ALL</network>
|
77
|
-
<Stats.Type>CampaignStats</Stats.Type></campaignStats><frequencyCap><impressions>150</impressions></frequencyCap>
|
78
|
-
</entries>
|
79
|
-
</rval>
|
80
|
-
</getResponse>
|
81
|
-
</soap:Body>
|
82
|
-
</soap:Envelope>',
|
83
|
-
:headers => {'content-type' => 'text/xml;'}
|
84
|
-
)
|
85
|
-
end
|
86
|
-
|
87
|
-
def run_asserts()
|
88
|
-
assert_equal(2, $latest_result[:total_num_entries])
|
89
|
-
assert_equal('CampaignPage', $latest_result[:page_type])
|
90
|
-
entries = $latest_result[:entries]
|
91
|
-
assert_equal(2, entries.size)
|
92
|
-
|
93
|
-
if entries[0][:id] == 15
|
94
|
-
assert_campaign_15(entries[0])
|
95
|
-
assert_campaign_16(entries[1])
|
96
|
-
else
|
97
|
-
assert_campaign_15(entries[1])
|
98
|
-
assert_campaign_16(entries[0])
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
def assert_campaign_15(entry)
|
103
|
-
assert_equal(15, entry[:id])
|
104
|
-
assert_equal('Campaign name 1', entry[:name])
|
105
|
-
assert_equal('PAUSED', entry[:status])
|
106
|
-
assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats])
|
107
|
-
assert_equal({:impressions=>0}, entry[:frequency_cap])
|
108
|
-
end
|
109
|
-
|
110
|
-
def assert_campaign_16(entry)
|
111
|
-
assert_equal(16, entry[:id])
|
112
|
-
assert_equal('Campaign name 2', entry[:name])
|
113
|
-
assert_equal('ACTIVE', entry[:status])
|
114
|
-
assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats])
|
115
|
-
assert_equal({:impressions=>150}, entry[:frequency_cap])
|
116
|
-
end
|
@@ -1,125 +0,0 @@
|
|
1
|
-
def setup_mocks()
|
2
|
-
$api_config = {
|
3
|
-
:service => {:environment => 'PRODUCTION'},
|
4
|
-
:authentication => {
|
5
|
-
:method => 'OAuth2',
|
6
|
-
:oauth2_client_id => 'client_id123',
|
7
|
-
:oauth2_client_secret => 'client_secret123',
|
8
|
-
:developer_token => 'dev_token123',
|
9
|
-
:client_customer_id => '123-456-7890',
|
10
|
-
:user_agent => 'ruby-tests',
|
11
|
-
:oauth2_token => {
|
12
|
-
:refresh_token => 'refresh_token123'
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
stub_request(:post, "https://accounts.google.com/o/oauth2/auth").
|
18
|
-
with(:body => {"client_id"=>"client_id123", "client_secret"=>"client_secret123", "refresh_token"=>"refresh_token123", "grant_type"=>"refresh_token"}).
|
19
|
-
to_return(:status => 200, :body => '{"access_token":"access_token123","token_type":"Bearer","expires_in":"3600"}\n', :headers => {})
|
20
|
-
|
21
|
-
stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201603/AdGroupCriterionService").
|
22
|
-
with(
|
23
|
-
:body =>
|
24
|
-
# autogenerated code
|
25
|
-
{"env:Envelope"=>
|
26
|
-
{"env:Header"=>
|
27
|
-
{"wsdl:RequestHeader"=>
|
28
|
-
{"userAgent"=>/ruby-tests.*AwApi\-Ruby.*Common\-Ruby/,
|
29
|
-
"developerToken"=>"dev_token123",
|
30
|
-
"clientCustomerId"=>"123-456-7890",
|
31
|
-
"xmlns"=>"https://adwords.google.com/api/adwords/cm/v201603"}},
|
32
|
-
"env:Body"=>
|
33
|
-
{"mutate"=>
|
34
|
-
{"operations"=>
|
35
|
-
{"operator"=>"SET",
|
36
|
-
"operand"=>
|
37
|
-
{"adGroupId"=>"0",
|
38
|
-
"criterion"=>{"id"=>"0"},
|
39
|
-
"biddingStrategyConfiguration"=>
|
40
|
-
{"bids"=>
|
41
|
-
{"bid"=>{"microAmount"=>"1000000"}, "xsi:type"=>"CpcBid"}},
|
42
|
-
"xsi:type"=>"BiddableAdGroupCriterion"}},
|
43
|
-
"xmlns"=>"https://adwords.google.com/api/adwords/cm/v201603"}},
|
44
|
-
"xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema",
|
45
|
-
"xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
|
46
|
-
"xmlns:wsdl"=>"https://adwords.google.com/api/adwords/cm/v201603",
|
47
|
-
"xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}},
|
48
|
-
# end of auto-generated code.
|
49
|
-
:headers => {
|
50
|
-
'SOAPAction' => '"mutate"',
|
51
|
-
'Content-Type' => 'text/xml;charset=UTF-8'
|
52
|
-
}
|
53
|
-
).
|
54
|
-
to_return(
|
55
|
-
:status => 200,
|
56
|
-
:body => '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
57
|
-
<soap:Header>
|
58
|
-
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201603">
|
59
|
-
<requestId>0004c</requestId>
|
60
|
-
<serviceName>AdGroupCriterionService</serviceName>
|
61
|
-
<methodName>mutate</methodName>
|
62
|
-
<operations>1</operations>
|
63
|
-
<responseTime>102</responseTime>
|
64
|
-
</ResponseHeader>
|
65
|
-
</soap:Header>
|
66
|
-
<soap:Body>
|
67
|
-
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201603">
|
68
|
-
<rval>
|
69
|
-
<ListReturnValue.Type>AdGroupCriterionReturnValue</ListReturnValue.Type>
|
70
|
-
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="BiddableAdGroupCriterion">
|
71
|
-
<adGroupId>1234</adGroupId>
|
72
|
-
<criterion xsi:type="Keyword">
|
73
|
-
<id>5678</id>
|
74
|
-
<type>KEYWORD</type>
|
75
|
-
<Criterion.Type>Keyword</Criterion.Type>
|
76
|
-
<text>test text</text>
|
77
|
-
<matchType>BROAD</matchType>
|
78
|
-
</criterion>
|
79
|
-
<AdGroupCriterion.Type>BiddableAdGroupCriterion</AdGroupCriterion.Type>
|
80
|
-
<userStatus>PAUSED</userStatus>
|
81
|
-
<systemServingStatus>ELIGIBLE</systemServingStatus>
|
82
|
-
<approvalStatus>PENDING_REVIEW</approvalStatus>
|
83
|
-
<biddingStrategyConfiguration>
|
84
|
-
<biddingStrategyType>MANUAL_CPC</biddingStrategyType>
|
85
|
-
<biddingStrategySource>CAMPAIGN</biddingStrategySource>
|
86
|
-
<biddingScheme xsi:type="ManualCpcBiddingScheme">
|
87
|
-
<BiddingScheme.Type>ManualCpcBiddingScheme</BiddingScheme.Type>
|
88
|
-
<enhancedCpcEnabled>false</enhancedCpcEnabled>
|
89
|
-
</biddingScheme>
|
90
|
-
<bids xsi:type="CpcBid">
|
91
|
-
<Bids.Type>CpcBid</Bids.Type>
|
92
|
-
<bid>
|
93
|
-
<ComparableValue.Type>Money</ComparableValue.Type>
|
94
|
-
<microAmount>1000000</microAmount>
|
95
|
-
</bid>
|
96
|
-
<cpcBidSource>CRITERION</cpcBidSource>
|
97
|
-
</bids>
|
98
|
-
<bids xsi:type="CpmBid">
|
99
|
-
<Bids.Type>CpmBid</Bids.Type>
|
100
|
-
<bid>
|
101
|
-
<ComparableValue.Type>Money</ComparableValue.Type>
|
102
|
-
<microAmount>10000</microAmount>
|
103
|
-
</bid>
|
104
|
-
<cpmBidSource>ADGROUP</cpmBidSource>
|
105
|
-
</bids>
|
106
|
-
</biddingStrategyConfiguration>
|
107
|
-
<finalUrls>
|
108
|
-
<urls>http://example.com/mars</urls>
|
109
|
-
</finalUrls>
|
110
|
-
</value>
|
111
|
-
</rval>
|
112
|
-
</mutateResponse>
|
113
|
-
</soap:Body>
|
114
|
-
</soap:Envelope>',
|
115
|
-
:headers => {'content-type' => 'text/xml;'}
|
116
|
-
)
|
117
|
-
end
|
118
|
-
|
119
|
-
def run_asserts()
|
120
|
-
assert_equal(1, $latest_result[:value].size)
|
121
|
-
ad_group_criterion = $latest_result[:value].first
|
122
|
-
assert_equal(1234, ad_group_criterion[:ad_group_id])
|
123
|
-
assert_equal(5678, ad_group_criterion[:criterion][:id])
|
124
|
-
assert_equal("test text", ad_group_criterion[:criterion][:text])
|
125
|
-
end
|