google-adwords-api 0.11.1 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. data/ChangeLog +3 -0
  2. data/{README → README.md} +0 -0
  3. data/lib/adwords_api/api_config.rb +0 -76
  4. data/lib/adwords_api/version.rb +1 -1
  5. data/test/templates/v201309/basic_operations_get_campaigns.def +1 -1
  6. data/test/templates/v201309/misc_use_oauth2_jwt.def +1 -1
  7. metadata +3 -148
  8. data/examples/v201306/account_management/create_account.rb +0 -95
  9. data/examples/v201306/account_management/get_account_alerts.rb +0 -122
  10. data/examples/v201306/account_management/get_account_changes.rb +0 -145
  11. data/examples/v201306/account_management/get_account_hierarchy.rb +0 -103
  12. data/examples/v201306/advanced_operations/add_ad_group_bid_modifier.rb +0 -105
  13. data/examples/v201306/advanced_operations/add_click_to_download_ad.rb +0 -137
  14. data/examples/v201306/advanced_operations/add_site_links.rb +0 -244
  15. data/examples/v201306/advanced_operations/create_and_attach_shared_keyword_set.rb +0 -147
  16. data/examples/v201306/advanced_operations/find_and_remove_criteria_from_shared_set.rb +0 -181
  17. data/examples/v201306/advanced_operations/get_ad_group_bid_modifiers.rb +0 -106
  18. data/examples/v201306/basic_operations/add_ad_groups.rb +0 -143
  19. data/examples/v201306/basic_operations/add_campaigns.rb +0 -162
  20. data/examples/v201306/basic_operations/add_keywords.rb +0 -116
  21. data/examples/v201306/basic_operations/add_text_ads.rb +0 -113
  22. data/examples/v201306/basic_operations/delete_ad.rb +0 -93
  23. data/examples/v201306/basic_operations/delete_ad_group.rb +0 -110
  24. data/examples/v201306/basic_operations/delete_campaign.rb +0 -111
  25. data/examples/v201306/basic_operations/delete_keyword.rb +0 -98
  26. data/examples/v201306/basic_operations/get_ad_groups.rb +0 -106
  27. data/examples/v201306/basic_operations/get_campaigns.rb +0 -101
  28. data/examples/v201306/basic_operations/get_campaigns_with_awql.rb +0 -93
  29. data/examples/v201306/basic_operations/get_keywords.rb +0 -112
  30. data/examples/v201306/basic_operations/get_text_ads.rb +0 -114
  31. data/examples/v201306/basic_operations/pause_ad.rb +0 -92
  32. data/examples/v201306/basic_operations/update_ad_group.rb +0 -89
  33. data/examples/v201306/basic_operations/update_campaign.rb +0 -90
  34. data/examples/v201306/basic_operations/update_keyword.rb +0 -110
  35. data/examples/v201306/campaign_management/add_experiment.rb +0 -166
  36. data/examples/v201306/campaign_management/add_keywords_in_bulk.rb +0 -158
  37. data/examples/v201306/campaign_management/add_location_extension.rb +0 -125
  38. data/examples/v201306/campaign_management/add_location_extension_override.rb +0 -91
  39. data/examples/v201306/campaign_management/get_all_disapproved_ads.rb +0 -101
  40. data/examples/v201306/campaign_management/get_all_disapproved_ads_with_awql.rb +0 -92
  41. data/examples/v201306/campaign_management/promote_experiment.rb +0 -85
  42. data/examples/v201306/campaign_management/set_ad_parameters.rb +0 -122
  43. data/examples/v201306/campaign_management/set_criterion_bid_modifier.rb +0 -110
  44. data/examples/v201306/campaign_management/validate_text_ad.rb +0 -114
  45. data/examples/v201306/error_handling/handle_captcha_challenge.rb +0 -93
  46. data/examples/v201306/error_handling/handle_partial_failures.rb +0 -134
  47. data/examples/v201306/error_handling/handle_policy_violation_error.rb +0 -145
  48. data/examples/v201306/error_handling/handle_two_factor_authorization_error.rb +0 -88
  49. data/examples/v201306/migration/upgrade_legacy_sitelinks.rb +0 -313
  50. data/examples/v201306/misc/get_all_images_and_videos.rb +0 -108
  51. data/examples/v201306/misc/setup_oauth2.rb +0 -88
  52. data/examples/v201306/misc/upload_image.rb +0 -97
  53. data/examples/v201306/misc/use_oauth2_jwt.rb +0 -97
  54. data/examples/v201306/optimization/estimate_keyword_traffic.rb +0 -137
  55. data/examples/v201306/optimization/get_keyword_bid_simulations.rb +0 -100
  56. data/examples/v201306/optimization/get_keyword_ideas.rb +0 -130
  57. data/examples/v201306/optimization/get_placement_ideas.rb +0 -112
  58. data/examples/v201306/remarketing/add_audience.rb +0 -123
  59. data/examples/v201306/remarketing/add_conversion_tracker.rb +0 -104
  60. data/examples/v201306/reporting/download_criteria_report.rb +0 -87
  61. data/examples/v201306/reporting/download_criteria_report_with_awql.rb +0 -86
  62. data/examples/v201306/reporting/get_campaign_stats.rb +0 -113
  63. data/examples/v201306/reporting/get_report_fields.rb +0 -79
  64. data/examples/v201306/reporting/parallel_report_download.rb +0 -171
  65. data/examples/v201306/targeting/add_campaign_targeting_criteria.rb +0 -123
  66. data/examples/v201306/targeting/add_demographic_targeting_criteria.rb +0 -116
  67. data/examples/v201306/targeting/get_campaign_targeting_criteria.rb +0 -110
  68. data/examples/v201306/targeting/get_targetable_languages_and_carriers.rb +0 -94
  69. data/examples/v201306/targeting/lookup_location.rb +0 -112
  70. data/examples/v201402/advanced_operations/add_places_location_extensions.rb~ +0 -159
  71. data/examples/v201402/basic_operations/add_ad_groups.rb~ +0 -147
  72. data/examples/v201402/misc/create_ad_words_session_without_properties_file.rb~ +0 -94
  73. data/examples/v201402/remarketing/add_conversion_tracker.rb~ +0 -109
  74. data/examples/v201402/shopping_campaigns/add_product_partition_tree.rb~ +0 -269
  75. data/examples/v201402/shopping_campaigns/add_shopping_campaign.rb~ +0 -136
  76. data/examples/v201402/shopping_campaigns/get_product_category_taxonomy.rb~ +0 -128
  77. data/examples/v201402/shopping_campaigns/set_product_sales_channel.rb~ +0 -98
  78. data/lib/adwords_api/v201306/ad_extension_override_service.rb +0 -38
  79. data/lib/adwords_api/v201306/ad_extension_override_service_registry.rb +0 -46
  80. data/lib/adwords_api/v201306/ad_group_ad_service.rb +0 -42
  81. data/lib/adwords_api/v201306/ad_group_ad_service_registry.rb +0 -46
  82. data/lib/adwords_api/v201306/ad_group_bid_modifier_service.rb +0 -38
  83. data/lib/adwords_api/v201306/ad_group_bid_modifier_service_registry.rb +0 -46
  84. data/lib/adwords_api/v201306/ad_group_criterion_service.rb +0 -42
  85. data/lib/adwords_api/v201306/ad_group_criterion_service_registry.rb +0 -46
  86. data/lib/adwords_api/v201306/ad_group_feed_service.rb +0 -38
  87. data/lib/adwords_api/v201306/ad_group_feed_service_registry.rb +0 -46
  88. data/lib/adwords_api/v201306/ad_group_service.rb +0 -42
  89. data/lib/adwords_api/v201306/ad_group_service_registry.rb +0 -46
  90. data/lib/adwords_api/v201306/ad_param_service.rb +0 -38
  91. data/lib/adwords_api/v201306/ad_param_service_registry.rb +0 -46
  92. data/lib/adwords_api/v201306/adwords_user_list_service.rb +0 -38
  93. data/lib/adwords_api/v201306/adwords_user_list_service_registry.rb +0 -46
  94. data/lib/adwords_api/v201306/alert_service.rb +0 -34
  95. data/lib/adwords_api/v201306/alert_service_registry.rb +0 -46
  96. data/lib/adwords_api/v201306/bidding_strategy_service.rb +0 -38
  97. data/lib/adwords_api/v201306/bidding_strategy_service_registry.rb +0 -46
  98. data/lib/adwords_api/v201306/budget_order_service.rb +0 -42
  99. data/lib/adwords_api/v201306/budget_order_service_registry.rb +0 -46
  100. data/lib/adwords_api/v201306/budget_service.rb +0 -38
  101. data/lib/adwords_api/v201306/budget_service_registry.rb +0 -46
  102. data/lib/adwords_api/v201306/campaign_ad_extension_service.rb +0 -38
  103. data/lib/adwords_api/v201306/campaign_ad_extension_service_registry.rb +0 -46
  104. data/lib/adwords_api/v201306/campaign_criterion_service.rb +0 -42
  105. data/lib/adwords_api/v201306/campaign_criterion_service_registry.rb +0 -46
  106. data/lib/adwords_api/v201306/campaign_feed_service.rb +0 -38
  107. data/lib/adwords_api/v201306/campaign_feed_service_registry.rb +0 -46
  108. data/lib/adwords_api/v201306/campaign_service.rb +0 -42
  109. data/lib/adwords_api/v201306/campaign_service_registry.rb +0 -46
  110. data/lib/adwords_api/v201306/campaign_shared_set_service.rb +0 -38
  111. data/lib/adwords_api/v201306/campaign_shared_set_service_registry.rb +0 -47
  112. data/lib/adwords_api/v201306/constant_data_service.rb +0 -62
  113. data/lib/adwords_api/v201306/constant_data_service_registry.rb +0 -46
  114. data/lib/adwords_api/v201306/conversion_tracker_service.rb +0 -38
  115. data/lib/adwords_api/v201306/conversion_tracker_service_registry.rb +0 -46
  116. data/lib/adwords_api/v201306/customer_service.rb +0 -34
  117. data/lib/adwords_api/v201306/customer_service_registry.rb +0 -46
  118. data/lib/adwords_api/v201306/customer_sync_service.rb +0 -34
  119. data/lib/adwords_api/v201306/customer_sync_service_registry.rb +0 -47
  120. data/lib/adwords_api/v201306/data_service.rb +0 -38
  121. data/lib/adwords_api/v201306/data_service_registry.rb +0 -46
  122. data/lib/adwords_api/v201306/experiment_service.rb +0 -38
  123. data/lib/adwords_api/v201306/experiment_service_registry.rb +0 -46
  124. data/lib/adwords_api/v201306/feed_item_service.rb +0 -38
  125. data/lib/adwords_api/v201306/feed_item_service_registry.rb +0 -46
  126. data/lib/adwords_api/v201306/feed_mapping_service.rb +0 -38
  127. data/lib/adwords_api/v201306/feed_mapping_service_registry.rb +0 -46
  128. data/lib/adwords_api/v201306/feed_service.rb +0 -38
  129. data/lib/adwords_api/v201306/feed_service_registry.rb +0 -46
  130. data/lib/adwords_api/v201306/geo_location_service.rb +0 -34
  131. data/lib/adwords_api/v201306/geo_location_service_registry.rb +0 -46
  132. data/lib/adwords_api/v201306/location_criterion_service.rb +0 -34
  133. data/lib/adwords_api/v201306/location_criterion_service_registry.rb +0 -46
  134. data/lib/adwords_api/v201306/managed_customer_service.rb +0 -50
  135. data/lib/adwords_api/v201306/managed_customer_service_registry.rb +0 -46
  136. data/lib/adwords_api/v201306/media_service.rb +0 -38
  137. data/lib/adwords_api/v201306/media_service_registry.rb +0 -46
  138. data/lib/adwords_api/v201306/mutate_job_service.rb +0 -42
  139. data/lib/adwords_api/v201306/mutate_job_service_registry.rb +0 -46
  140. data/lib/adwords_api/v201306/report_definition_service.rb +0 -34
  141. data/lib/adwords_api/v201306/report_definition_service_registry.rb +0 -46
  142. data/lib/adwords_api/v201306/shared_criterion_service.rb +0 -38
  143. data/lib/adwords_api/v201306/shared_criterion_service_registry.rb +0 -47
  144. data/lib/adwords_api/v201306/shared_set_service.rb +0 -38
  145. data/lib/adwords_api/v201306/shared_set_service_registry.rb +0 -47
  146. data/lib/adwords_api/v201306/targeting_idea_service.rb +0 -38
  147. data/lib/adwords_api/v201306/targeting_idea_service_registry.rb +0 -46
  148. data/lib/adwords_api/v201306/traffic_estimator_service.rb +0 -34
  149. data/lib/adwords_api/v201306/traffic_estimator_service_registry.rb +0 -46
  150. data/test/adwords_api/test_adwords_api.rb~ +0 -127
  151. data/test/templates/v201306/basic_operations_get_campaigns.def +0 -114
  152. data/test/templates/v201306/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 2012, Google Inc. All Rights Reserved.
6
- # License:: Licensed under the Apache License, Version 2.0.
7
- #
8
- # Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:48.
9
-
10
- require 'ads_common/savon_service'
11
- require 'adwords_api/v201306/targeting_idea_service_registry'
12
-
13
- module AdwordsApi; module V201306; module TargetingIdeaService
14
- class TargetingIdeaService < AdsCommon::SavonService
15
- def initialize(config, endpoint)
16
- namespace = 'https://adwords.google.com/api/adwords/o/v201306'
17
- super(config, endpoint, namespace, :v201306)
18
- end
19
-
20
- def get(*args, &block)
21
- return execute_action('get', args, &block)
22
- end
23
-
24
- def get_bulk_keyword_ideas(*args, &block)
25
- return execute_action('get_bulk_keyword_ideas', args, &block)
26
- end
27
-
28
- private
29
-
30
- def get_service_registry()
31
- return TargetingIdeaServiceRegistry
32
- end
33
-
34
- def get_module()
35
- return AdwordsApi::V201306::TargetingIdeaService
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 2012, Google Inc. All Rights Reserved.
6
- # License:: Licensed under the Apache License, Version 2.0.
7
- #
8
- # Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:49.
9
-
10
- require 'adwords_api/errors'
11
-
12
- module AdwordsApi; module V201306; module TargetingIdeaService
13
- class TargetingIdeaServiceRegistry
14
- TARGETINGIDEASERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"TargetingIdeaSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"TargetingIdeaPage", :min_occurs=>0, :max_occurs=>1}]}}, :get_bulk_keyword_ideas=>{:input=>[{:name=>:selector, :type=>"TargetingIdeaSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_bulk_keyword_ideas_response", :fields=>[{:name=>:rval, :type=>"TargetingIdeaPage", :min_occurs=>0, :max_occurs=>1}]}}}
15
- TARGETINGIDEASERVICE_TYPES = {:AdGroupBidLandscape=>{:fields=>[{:name=>:type, :type=>"AdGroupBidLandscape.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:landscape_current, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape", :ns=>0}, :AdGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"AdGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AdGroupCriterionLimitExceeded=>{:fields=>[{:name=>:limit_type, :type=>"AdGroupCriterionLimitExceeded.CriteriaLimitType", :min_occurs=>0, :max_occurs=>1}], :base=>"EntityCountLimitExceeded", :ns=>0}, :AdxError=>{:fields=>[{:name=>:reason, :type=>"AdxError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BidLandscape=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:landscape_points, :type=>"BidLandscape.LandscapePoint", :min_occurs=>0, :max_occurs=>:unbounded}], :abstract=>true, :base=>"DataEntry", :ns=>0}, :"BidLandscape.LandscapePoint"=>{:fields=>[{:name=>:bid, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:marginal_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:promoted_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :BiddingError=>{:fields=>[{:name=>:reason, :type=>"BiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BudgetError=>{:fields=>[{:name=>:reason, :type=>"BudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :CriterionBidLandscape=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"BidLandscape", :ns=>0}, :CriterionError=>{:fields=>[{:name=>:reason, :type=>"CriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :CriterionPolicyError=>{:fields=>[], :base=>"PolicyViolationError", :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :EntityCountLimitExceeded=>{:fields=>[{:name=>:reason, :type=>"EntityCountLimitExceeded.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:enclosing_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:limit, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:account_limit_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:existing_count, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NetworkSetting=>{:fields=>[{:name=>:target_google_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_content_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_partner_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Platform=>{:fields=>[{:name=>:platform_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError", :ns=>0}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StatsQueryError=>{:fields=>[{:name=>:reason, :type=>"StatsQueryError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DataEntry=>{:fields=>[{:name=>:data_entry_type, :original_name=>"DataEntry.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :TargetError=>{:fields=>[{:name=>:reason, :type=>"TargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter", :ns=>0}, :"AdGroupBidLandscape.Type"=>{:fields=>[], :ns=>0}, :"AdGroupCriterionError.Reason"=>{:fields=>[], :ns=>0}, :"AdGroupCriterionLimitExceeded.CriteriaLimitType"=>{:fields=>[], :ns=>0}, :"AdxError.Reason"=>{:fields=>[], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"BiddingError.Reason"=>{:fields=>[], :ns=>0}, :"BudgetError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"Criterion.Type"=>{:fields=>[], :ns=>0}, :"CriterionError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"EntityCountLimitExceeded.Reason"=>{:fields=>[], :ns=>0}, :"EntityNotFound.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :KeywordMatchType=>{:fields=>[], :ns=>0}, :LocationTargetingStatus=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StatsQueryError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"TargetError.Reason"=>{:fields=>[], :ns=>0}, :"CriterionUserList.MembershipStatus"=>{:fields=>[], :ns=>0}, :WebpageConditionOperand=>{:fields=>[], :ns=>0}, :AdFormatSpec=>{:fields=>[{:name=>:format, :type=>"SiteConstants.AdFormat", :min_occurs=>0, :max_occurs=>1}]}, :AdFormatSpecListAttribute=>{:fields=>[{:name=>:value, :type=>"AdFormatSpec", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :AdSpec=>{:fields=>[], :choices=>[{:name=>:display_ad_spec, :original_name=>"DisplayAdSpec", :type=>"DisplayAdSpec", :min_occurs=>1, :max_occurs=>1}, {:name=>:in_stream_ad_spec, :original_name=>"InStreamAdSpec", :type=>"InStreamAdSpec", :min_occurs=>1, :max_occurs=>1}, {:name=>:text_ad_spec, :original_name=>"TextAdSpec", :type=>"TextAdSpec", :min_occurs=>1, :max_occurs=>1}]}, :AdSpecListAttribute=>{:fields=>[{:name=>:value, :type=>"AdSpec", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :AdSpecListSearchParameter=>{:fields=>[{:name=>:ad_specs, :type=>"AdSpec", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :Attribute=>{:fields=>[{:name=>:attribute_type, :original_name=>"Attribute.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BidLandscapeAttribute=>{:fields=>[{:name=>:value, :type=>"BidLandscape", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :BooleanAttribute=>{:fields=>[{:name=>:value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :CategoryProductsAndServicesSearchParameter=>{:fields=>[{:name=>:category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :CompetitionSearchParameter=>{:fields=>[{:name=>:levels, :type=>"CompetitionSearchParameter.Level", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :CriterionAttribute=>{:fields=>[{:name=>:value, :type=>"Criterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :DisplayAdSpec=>{:fields=>[{:name=>:display_types, :type=>"DisplayType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:activation_options, :type=>"DisplayAdSpec.ActivationOption", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ad_size_specs, :type=>"DisplayAdSpec.AdSizeSpec", :min_occurs=>0, :max_occurs=>:unbounded}]}, :"DisplayAdSpec.AdSizeSpec"=>{:fields=>[{:name=>:width, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:height, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:activation_option_filter, :type=>"DisplayAdSpec.ActivationOption", :min_occurs=>0, :max_occurs=>:unbounded}]}, :DisplayType=>{:fields=>[], :choices=>[{:name=>:flash_display_type, :original_name=>"FlashDisplayType", :type=>"FlashDisplayType", :min_occurs=>1, :max_occurs=>1}, {:name=>:html_display_type, :original_name=>"HtmlDisplayType", :type=>"HtmlDisplayType", :min_occurs=>1, :max_occurs=>1}, {:name=>:image_display_type, :original_name=>"ImageDisplayType", :type=>"ImageDisplayType", :min_occurs=>1, :max_occurs=>1}]}, :DoubleAttribute=>{:fields=>[{:name=>:value, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :ExcludedKeywordSearchParameter=>{:fields=>[{:name=>:keywords, :type=>"Keyword", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :FlashDisplayType=>{:fields=>[]}, :HtmlDisplayType=>{:fields=>[{:name=>:html_option, :type=>"HtmlDisplayType.HtmlOption", :min_occurs=>0, :max_occurs=>1}]}, :IdeaTextFilterSearchParameter=>{:fields=>[{:name=>:included, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:excluded, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :IdeaTypeAttribute=>{:fields=>[{:name=>:value, :type=>"IdeaType", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :ImageDisplayType=>{:fields=>[]}, :InStreamAdInfo=>{:fields=>[{:name=>:max_ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:min_ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:median_ad_duration, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:pre_roll_percent, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:mid_roll_percent, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:post_roll_percent, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :InStreamAdInfoAttribute=>{:fields=>[{:name=>:value, :type=>"InStreamAdInfo", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :InStreamAdSpec=>{:fields=>[{:name=>:in_stream_types, :type=>"InStreamAdSpec.InStreamType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:durations, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :IncludeAdultContentSearchParameter=>{:fields=>[], :base=>"SearchParameter"}, :IntegerAttribute=>{:fields=>[{:name=>:value, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :IntegerSetAttribute=>{:fields=>[{:name=>:value, :type=>"int", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :KeywordAttribute=>{:fields=>[{:name=>:value, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :LanguageSearchParameter=>{:fields=>[{:name=>:languages, :type=>"Language", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :LocationSearchParameter=>{:fields=>[{:name=>:locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :LongAttribute=>{:fields=>[{:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :LongComparisonOperation=>{:fields=>[{:name=>:minimum, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:maximum, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :LongRangeAttribute=>{:fields=>[{:name=>:value, :type=>"Range", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :MoneyAttribute=>{:fields=>[{:name=>:value, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :MonthlySearchVolume=>{:fields=>[{:name=>:year, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:month, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:count, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :MonthlySearchVolumeAttribute=>{:fields=>[{:name=>:value, :type=>"MonthlySearchVolume", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Attribute"}, :NetworkSearchParameter=>{:fields=>[{:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :OpportunityIdeaTypeAttribute=>{:fields=>[{:name=>:value, :type=>"OpportunityIdeaType", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :PlacementAttribute=>{:fields=>[{:name=>:value, :type=>"Placement", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :PlacementTypeAttribute=>{:fields=>[{:name=>:value, :type=>"SiteConstants.PlacementType", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :PlacementTypeSearchParameter=>{:fields=>[{:name=>:placement_types, :type=>"SiteConstants.PlacementType", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :Range=>{:fields=>[{:name=>:min, :type=>"ComparableValue", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"ComparableValue", :min_occurs=>0, :max_occurs=>1}]}, :RelatedToQuerySearchParameter=>{:fields=>[{:name=>:queries, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"SearchParameter"}, :RelatedToUrlSearchParameter=>{:fields=>[{:name=>:urls, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:include_sub_urls, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :SearchParameter=>{:fields=>[{:name=>:search_parameter_type, :original_name=>"SearchParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :SearchVolumeSearchParameter=>{:fields=>[{:name=>:operation, :type=>"LongComparisonOperation", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :SeedAdGroupIdSearchParameter=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"SearchParameter"}, :StringAttribute=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :TargetingIdea=>{:fields=>[{:name=>:data, :type=>"Type_AttributeMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TargetingIdeaError=>{:fields=>[{:name=>:reason, :type=>"TargetingIdeaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TargetingIdeaPage=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:entries, :type=>"TargetingIdea", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TargetingIdeaSelector=>{:fields=>[{:name=>:search_parameters, :type=>"SearchParameter", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:idea_type, :type=>"IdeaType", :min_occurs=>0, :max_occurs=>1}, {:name=>:request_type, :type=>"RequestType", :min_occurs=>0, :max_occurs=>1}, {:name=>:requested_attribute_types, :type=>"AttributeType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}, {:name=>:locale_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:currency_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TextAdSpec=>{:fields=>[]}, :TrafficEstimatorError=>{:fields=>[{:name=>:reason, :type=>"TrafficEstimatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Type_AttributeMapEntry=>{:fields=>[{:name=>:key, :type=>"AttributeType", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Attribute", :min_occurs=>0, :max_occurs=>1}]}, :WebpageDescriptor=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:title, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :WebpageDescriptorAttribute=>{:fields=>[{:name=>:value, :type=>"WebpageDescriptor", :min_occurs=>0, :max_occurs=>1}], :base=>"Attribute"}, :AttributeType=>{:fields=>[]}, :"CompetitionSearchParameter.Level"=>{:fields=>[]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"DisplayAdSpec.ActivationOption"=>{:fields=>[]}, :"HtmlDisplayType.HtmlOption"=>{:fields=>[]}, :IdeaType=>{:fields=>[]}, :"InStreamAdSpec.InStreamType"=>{:fields=>[]}, :"MatchesRegexError.Reason"=>{:fields=>[]}, :OpportunityIdeaType=>{:fields=>[]}, :RequestType=>{:fields=>[]}, :"SiteConstants.AdFormat"=>{:fields=>[]}, :"SiteConstants.PlacementType"=>{:fields=>[]}, :"TargetingIdeaError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}}
16
- TARGETINGIDEASERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"]
17
-
18
- def self.get_method_signature(method_name)
19
- return TARGETINGIDEASERVICE_METHODS[method_name.to_sym]
20
- end
21
-
22
- def self.get_type_signature(type_name)
23
- return TARGETINGIDEASERVICE_TYPES[type_name.to_sym]
24
- end
25
-
26
- def self.get_namespace(index)
27
- return TARGETINGIDEASERVICE_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, TargetingIdeaServiceRegistry)
44
- end
45
- end
46
- end; end; end
@@ -1,34 +0,0 @@
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.9.2 on 2013-07-10 22:04:52.
9
-
10
- require 'ads_common/savon_service'
11
- require 'adwords_api/v201306/traffic_estimator_service_registry'
12
-
13
- module AdwordsApi; module V201306; module TrafficEstimatorService
14
- class TrafficEstimatorService < AdsCommon::SavonService
15
- def initialize(config, endpoint)
16
- namespace = 'https://adwords.google.com/api/adwords/o/v201306'
17
- super(config, endpoint, namespace, :v201306)
18
- end
19
-
20
- def get(*args, &block)
21
- return execute_action('get', args, &block)
22
- end
23
-
24
- private
25
-
26
- def get_service_registry()
27
- return TrafficEstimatorServiceRegistry
28
- end
29
-
30
- def get_module()
31
- return AdwordsApi::V201306::TrafficEstimatorService
32
- end
33
- end
34
- 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 2012, Google Inc. All Rights Reserved.
6
- # License:: Licensed under the Apache License, Version 2.0.
7
- #
8
- # Code generated by AdsCommon library 0.9.2 on 2013-07-10 22:04:53.
9
-
10
- require 'adwords_api/errors'
11
-
12
- module AdwordsApi; module V201306; 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=>[], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Criterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Criterion.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion_type, :original_name=>"Criterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :CriterionParameter=>{:fields=>[{:name=>:criterion_parameter_type, :original_name=>"CriterionParameter.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :EntityAccessDenied=>{:fields=>[{:name=>:reason, :type=>"EntityAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :EntityNotFound=>{:fields=>[{:name=>:reason, :type=>"EntityNotFound.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Keyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"KeywordMatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Language=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Location=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_status, :type=>"LocationTargetingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"Location", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MobileAppCategory=>{:fields=>[{:name=>:mobile_app_category_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :MobileApplication=>{:fields=>[{:name=>:app_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NetworkSetting=>{:fields=>[{:name=>:target_google_search, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_content_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:target_partner_search_network, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperationAccessDenied=>{:fields=>[{:name=>:reason, :type=>"OperationAccessDenied.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Placement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Product=>{:fields=>[{:name=>:conditions, :type=>"ProductCondition", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :ProductCondition=>{:fields=>[{:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operand, :type=>"ProductConditionOperand", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :ProductConditionOperand=>{:fields=>[{:name=>:operand, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :TargetError=>{:fields=>[{:name=>:reason, :type=>"TargetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CriterionUserInterest=>{:fields=>[{:name=>:user_interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_interest_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :CriterionUserList=>{:fields=>[{:name=>:user_list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_list_membership_status, :type=>"CriterionUserList.MembershipStatus", :min_occurs=>0, :max_occurs=>1}], :base=>"Criterion", :ns=>0}, :Vertical=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_parent_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :Webpage=>{:fields=>[{:name=>:parameter, :type=>"WebpageParameter", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_coverage, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:criteria_samples, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Criterion", :ns=>0}, :WebpageCondition=>{:fields=>[{:name=>:operand, :type=>"WebpageConditionOperand", :min_occurs=>0, :max_occurs=>1}, {:name=>:argument, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :WebpageParameter=>{:fields=>[{:name=>:criterion_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:conditions, :type=>"WebpageCondition", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CriterionParameter", :ns=>0}, :"AdxError.Reason"=>{:fields=>[], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"Criterion.Type"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"EntityAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"EntityNotFound.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :KeywordMatchType=>{:fields=>[], :ns=>0}, :LocationTargetingStatus=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :"OperationAccessDenied.Reason"=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :"TargetError.Reason"=>{:fields=>[], :ns=>0}, :"CriterionUserList.MembershipStatus"=>{:fields=>[], :ns=>0}, :WebpageConditionOperand=>{:fields=>[], :ns=>0}, :AdGroupEstimate=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_estimates, :type=>"KeywordEstimate", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Estimate"}, :AdGroupEstimateRequest=>{:fields=>[{:name=>:ad_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:keyword_estimate_requests, :type=>"KeywordEstimateRequest", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:max_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"EstimateRequest"}, :CampaignEstimate=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_estimates, :type=>"AdGroupEstimate", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Estimate"}, :CampaignEstimateRequest=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_group_estimate_requests, :type=>"AdGroupEstimateRequest", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:criteria, :type=>"Criterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:network_setting, :type=>"NetworkSetting", :min_occurs=>0, :max_occurs=>1}, {:name=>:daily_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}], :base=>"EstimateRequest"}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Estimate=>{:fields=>[{:name=>:estimate_type, :original_name=>"Estimate.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :EstimateRequest=>{:fields=>[{:name=>:estimate_request_type, :original_name=>"EstimateRequest.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :KeywordEstimate=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:min, :type=>"StatsEstimate", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"StatsEstimate", :min_occurs=>0, :max_occurs=>1}], :base=>"Estimate"}, :KeywordEstimateRequest=>{:fields=>[{:name=>:keyword, :type=>"Keyword", :min_occurs=>0, :max_occurs=>1}, {:name=>:max_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_negative, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"EstimateRequest"}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StatsEstimate=>{:fields=>[{:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_position, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:clicks_per_day, :type=>"float", :min_occurs=>0, :max_occurs=>1}, {:name=>:impressions_per_day, :type=>"float", :min_occurs=>0, :max_occurs=>1}, {:name=>:click_through_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :TrafficEstimatorError=>{:fields=>[{:name=>:reason, :type=>"TrafficEstimatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TrafficEstimatorResult=>{:fields=>[{:name=>:campaign_estimates, :type=>"CampaignEstimate", :min_occurs=>0, :max_occurs=>:unbounded}]}, :TrafficEstimatorSelector=>{:fields=>[{:name=>:campaign_estimate_requests, :type=>"CampaignEstimateRequest", :min_occurs=>0, :max_occurs=>:unbounded}]}, :"CurrencyCodeError.Reason"=>{:fields=>[]}, :"MatchesRegexError.Reason"=>{:fields=>[]}, :"TrafficEstimatorError.Reason"=>{:fields=>[]}}
16
- TRAFFICESTIMATORSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201306"]
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,127 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # Encoding: utf-8
3
- #
4
- # Author:: api.dklimkin@gmail.com (Danial Klimkin)
5
- #
6
- # Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
7
- #
8
- # License:: Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17
- # implied.
18
- # See the License for the specific language governing permissions and
19
- # limitations under the License.
20
- #
21
- # Tests the AdWords API class features.
22
-
23
- require 'test/unit'
24
-
25
- require 'ads_common/config'
26
- require 'ads_common/api_config'
27
- require 'adwords_api'
28
-
29
-
30
- class LoggerStub
31
- attr_reader :last_warning
32
- def warn(message)
33
- @last_warning = message
34
- end
35
- end
36
-
37
- class TestAdwordsApi < Test::Unit::TestCase
38
-
39
- API_VERSION = :v201402
40
- API_VERSION_OLD = :v201309
41
-
42
- def setup()
43
- @logger = LoggerStub.new
44
- end
45
-
46
- def test_initialize()
47
- assert_nothing_raised do
48
- adwords_api = AdwordsApi::Api.new({})
49
- end
50
- end
51
-
52
- def test_api_config()
53
- assert_nothing_raised do
54
- adwords_api = AdwordsApi::Api.new({})
55
- api_config = adwords_api.api_config()
56
- assert_not_nil(api_config)
57
- assert_kind_of(AdsCommon::ApiConfig, api_config)
58
- end
59
- end
60
-
61
- def test_use_mcc()
62
- adwords_api = AdwordsApi::Api.new({})
63
- adwords_api.use_mcc = false
64
- assert(!adwords_api.use_mcc)
65
- adwords_api.use_mcc do
66
- assert(adwords_api.use_mcc)
67
- end
68
- end
69
-
70
- def test_validate_only()
71
- adwords_api = AdwordsApi::Api.new({})
72
- adwords_api.validate_only = false
73
- assert(!adwords_api.validate_only)
74
- adwords_api.validate_only do
75
- assert(adwords_api.validate_only)
76
- end
77
- end
78
-
79
- def test_partial_failure()
80
- adwords_api = AdwordsApi::Api.new({})
81
- adwords_api.partial_failure = false
82
- assert(!adwords_api.partial_failure)
83
- adwords_api.partial_failure do
84
- assert(adwords_api.partial_failure)
85
- end
86
- end
87
-
88
- def test_no_sandbox_env()
89
- adwords_api = AdwordsApi::Api.new({
90
- :service => {:environment => 'SANDBOX'}
91
- })
92
- assert_raise(AdsCommon::Errors::Error) do
93
- service = adwords_api.service(:ManagedCustomerService, API_VERSION)
94
- end
95
- end
96
-
97
- def test_prod_env()
98
- adwords_api = AdwordsApi::Api.new({
99
- :library => {:logger => @logger},
100
- :service => {:environment => 'PRODUCTION'}
101
- })
102
- service = adwords_api.service(:ManagedCustomerService, API_VERSION)
103
- end
104
-
105
- def test_clientlogin_deprecation_warning()
106
- assert_nothing_raised do
107
- adwords_api = AdwordsApi::Api.new({
108
- :library => {:logger => @logger},
109
- :authentication => {:method => 'ClientLogin'},
110
- :service => {:environment => 'PRODUCTION'}
111
- })
112
- service = adwords_api.service(:CampaignService, API_VERSION_OLD)
113
- assert_not_nil(@logger.last_warning)
114
- end
115
- end
116
-
117
- def test_clientlogin_error_raised()
118
- assert_raise do
119
- adwords_api = AdwordsApi::Api.new({
120
- :library => {:logger => @logger},
121
- :authentication => {:method => 'ClientLogin'},
122
- :service => {:environment => 'PRODUCTION'}
123
- })
124
- service = adwords_api.service(:CampaignService, API_VERSION)
125
- end
126
- end
127
- end
@@ -1,114 +0,0 @@
1
- def setup_mocks()
2
- $api_config = {
3
- :service => {:environment => 'PRODUCTION'},
4
- :authentication => {
5
- :method => 'ClientLogin',
6
- :email => 'noreply@google.com',
7
- :password => 'noreply_password',
8
- :developer_token => 'dev_token123',
9
- :client_customer_id => '123-456-7890',
10
- :user_agent => 'ruby-tests'
11
- }
12
- }
13
-
14
- stub_request(:post, "https://www.google.com/accounts/ClientLogin").
15
- with(:body => {"Email"=>"noreply@google.com", "Passwd"=>"noreply_password", "accountType"=>"GOOGLE", "service"=>"adwords"}).
16
- to_return(:status => 200, :body => "SID=abcSIDbcd\nLSID=abcLSIDbcd\nAuth=abcAuthbcd\n", :headers => {})
17
-
18
- stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201306/CampaignService").
19
- with(
20
- :body =>
21
- # autogenerated code
22
- {"env:Envelope"=>
23
- {"env:Header"=>
24
- {"wsdl:RequestHeader"=>
25
- {"userAgent"=>"ruby-tests (AwApi-Ruby/0.11.1, Common-Ruby/0.9.6, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
26
- "developerToken"=>"dev_token123",
27
- "clientCustomerId"=>"123-456-7890",
28
- "authToken"=>"abcAuthbcd",
29
- "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}},
30
- "env:Body"=>
31
- {"get"=>
32
- {"serviceSelector"=>
33
- {"fields"=>["Id", "Name", "Status"],
34
- "ordering"=>{"field"=>"Name", "sortOrder"=>"ASCENDING"},
35
- "paging"=>{"startIndex"=>"0", "numberResults"=>"5"}},
36
- "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}},
37
- "xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema",
38
- "xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
39
- "xmlns:wsdl"=>"https://adwords.google.com/api/adwords/cm/v201306",
40
- "xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}},
41
- # end of auto-generated code.
42
- :headers => {
43
- 'SOAPAction' => '"get"',
44
- 'Content-Type' => 'text/xml;charset=UTF-8'
45
- }
46
- ).
47
- to_return(
48
- :status => 200,
49
- :body => '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
50
- <soap:Header>
51
- <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201306">
52
- <requestId>0004c</requestId>
53
- <serviceName>CampaignService</serviceName>
54
- <methodName>get</methodName>
55
- <operations>42</operations>
56
- <responseTime>84</responseTime>
57
- <units>42</units>
58
- </ResponseHeader>
59
- </soap:Header>
60
- <soap:Body>
61
- <getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201306">
62
- <rval>
63
- <totalNumEntries>2</totalNumEntries>
64
- <Page.Type>CampaignPage</Page.Type>
65
- <totalBudget>
66
- <period>DAILY</period><amount><ComparableValue.Type>Money</ComparableValue.Type>
67
- <microAmount>0</microAmount></amount>
68
- </totalBudget>
69
- <entries>
70
- <id>15</id><name>Campaign name 1</name><status>PAUSED</status><campaignStats><network>ALL</network>
71
- <Stats.Type>CampaignStats</Stats.Type></campaignStats><frequencyCap><impressions>0</impressions></frequencyCap>
72
- </entries>
73
- <entries>
74
- <id>16</id><name>Campaign name 2</name><status>ACTIVE</status><campaignStats><network>ALL</network>
75
- <Stats.Type>CampaignStats</Stats.Type></campaignStats><frequencyCap><impressions>150</impressions></frequencyCap>
76
- </entries>
77
- </rval>
78
- </getResponse>
79
- </soap:Body>
80
- </soap:Envelope>',
81
- :headers => {'content-type' => 'text/xml;'}
82
- )
83
- end
84
-
85
- def run_asserts()
86
- assert_equal(2, $latest_result[:total_num_entries])
87
- assert_equal('CampaignPage', $latest_result[:page_type])
88
- entries = $latest_result[:entries]
89
- assert_equal(2, entries.size)
90
-
91
- if entries[0][:id] == 15
92
- assert_campaign_15(entries[0])
93
- assert_campaign_16(entries[1])
94
- else
95
- assert_campaign_15(entries[1])
96
- assert_campaign_16(entries[0])
97
- end
98
- end
99
-
100
- def assert_campaign_15(entry)
101
- assert_equal(15, entry[:id])
102
- assert_equal('Campaign name 1', entry[:name])
103
- assert_equal('PAUSED', entry[:status])
104
- assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats])
105
- assert_equal({:impressions=>0}, entry[:frequency_cap])
106
- end
107
-
108
- def assert_campaign_16(entry)
109
- assert_equal(16, entry[:id])
110
- assert_equal('Campaign name 2', entry[:name])
111
- assert_equal('ACTIVE', entry[:status])
112
- assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats])
113
- assert_equal({:impressions=>150}, entry[:frequency_cap])
114
- end
@@ -1,131 +0,0 @@
1
- def setup_mocks()
2
- file_name = 'privatekey.p12'
3
- file_contents = 'file contents'
4
- key_secret = 'not-secret'
5
-
6
- $api_config = {
7
- :service => {:environment => 'PRODUCTION'},
8
- :authentication => {
9
- :method => 'OAUTH2_JWT',
10
- :oauth2_issuer => 'not-valid@developer.gserviceaccount.com',
11
- :oauth2_secret => key_secret,
12
- :oauth2_keyfile => file_name,
13
- :developer_token => 'dev_token123',
14
- :client_customer_id => '123-456-7890',
15
- :user_agent => 'ruby-tests'
16
- }
17
- }
18
-
19
- stub(File).file?(file_name) { true }
20
- stub.proxy(File).file?
21
-
22
- stub(File).read(file_name) { file_contents }
23
- stub.proxy(File).read
24
-
25
- key = mock!.key { 'pkcs12 key' }
26
- stub(OpenSSL::PKCS12).new.with(file_contents, key_secret) { key }
27
-
28
- stub_request(:post, "https://accounts.google.com/o/oauth2/token").
29
- with(:body => hash_including({"grant_type"=>"urn:ietf:params:oauth:grant-type:jwt-bearer"}),
30
- :headers => {'Accept'=>'*/*', 'Cache-Control'=>'no-store', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Ruby'}).
31
- with(:body => /assertion=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9/).
32
- to_return(:status => 200,
33
- :body => "{\n \"access_token\" : \"ab01.CBEF2GHi3JKlMnOpqRstUvW4X-YzaBcdEFG5IjKLMNPPqRStuV\",\n \"token_type\" : \"Bearer\",\n \"expires_in\" : 3600\n}",
34
- :headers => {"Content-Type"=>"application/json"})
35
-
36
- stub_request(:post, "https://adwords.google.com/api/adwords/cm/v201306/CampaignService").
37
- with(
38
- :body =>
39
- # autogenerated code
40
- {"env:Envelope"=>
41
- {"env:Header"=>
42
- {"wsdl:RequestHeader"=>
43
- {"userAgent"=>"ruby-tests (AwApi-Ruby/0.11.1, Common-Ruby/0.9.6, Savon/1.2.0, ruby/1.9.3, HTTPI/1.1.1, net_http)",
44
- "developerToken"=>"dev_token123",
45
- "clientCustomerId"=>"123-456-7890",
46
- "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}},
47
- "env:Body"=>
48
- {"get"=>
49
- {"serviceSelector"=>
50
- {"fields"=>["Id", "Name", "Status"],
51
- "ordering"=>{"field"=>"Name", "sortOrder"=>"ASCENDING"}},
52
- "xmlns"=>"https://adwords.google.com/api/adwords/cm/v201306"}},
53
- "xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema",
54
- "xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance",
55
- "xmlns:wsdl"=>"https://adwords.google.com/api/adwords/cm/v201306",
56
- "xmlns:env"=>"http://schemas.xmlsoap.org/soap/envelope/"}},
57
- # end of auto-generated code.
58
- :headers => {
59
- 'SOAPAction' => '"get"',
60
- 'Content-Type' => 'text/xml;charset=UTF-8',
61
- 'Authorization' => 'Bearer ab01.CBEF2GHi3JKlMnOpqRstUvW4X-YzaBcdEFG5IjKLMNPPqRStuV'
62
- }
63
- ).
64
- to_return(
65
- :status => 200,
66
- :body => '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
67
- <soap:Header>
68
- <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201306">
69
- <requestId>0004c</requestId>
70
- <serviceName>CampaignService</serviceName>
71
- <methodName>get</methodName>
72
- <operations>42</operations>
73
- <responseTime>84</responseTime>
74
- <units>42</units>
75
- </ResponseHeader>
76
- </soap:Header>
77
- <soap:Body>
78
- <getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201306">
79
- <rval>
80
- <totalNumEntries>2</totalNumEntries>
81
- <Page.Type>CampaignPage</Page.Type>
82
- <totalBudget>
83
- <period>DAILY</period><amount><ComparableValue.Type>Money</ComparableValue.Type>
84
- <microAmount>0</microAmount></amount>
85
- </totalBudget>
86
- <entries>
87
- <id>15</id><name>Campaign name 1</name><status>PAUSED</status><campaignStats><network>ALL</network>
88
- <Stats.Type>CampaignStats</Stats.Type></campaignStats><frequencyCap><impressions>0</impressions></frequencyCap>
89
- </entries>
90
- <entries>
91
- <id>16</id><name>Campaign name 2</name><status>ACTIVE</status><campaignStats><network>ALL</network>
92
- <Stats.Type>CampaignStats</Stats.Type></campaignStats><frequencyCap><impressions>150</impressions></frequencyCap>
93
- </entries>
94
- </rval>
95
- </getResponse>
96
- </soap:Body>
97
- </soap:Envelope>',
98
- :headers => {'content-type' => 'text/xml;'}
99
- )
100
- end
101
-
102
- def run_asserts()
103
- assert_equal(2, $latest_result[:total_num_entries])
104
- assert_equal('CampaignPage', $latest_result[:page_type])
105
- entries = $latest_result[:entries]
106
- assert_equal(2, entries.size)
107
-
108
- if entries[0][:id] == 15
109
- assert_campaign_15(entries[0])
110
- assert_campaign_16(entries[1])
111
- else
112
- assert_campaign_15(entries[1])
113
- assert_campaign_16(entries[0])
114
- end
115
- end
116
-
117
- def assert_campaign_15(entry)
118
- assert_equal(15, entry[:id])
119
- assert_equal('Campaign name 1', entry[:name])
120
- assert_equal('PAUSED', entry[:status])
121
- assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats])
122
- assert_equal({:impressions=>0}, entry[:frequency_cap])
123
- end
124
-
125
- def assert_campaign_16(entry)
126
- assert_equal(16, entry[:id])
127
- assert_equal('Campaign name 2', entry[:name])
128
- assert_equal('ACTIVE', entry[:status])
129
- assert_equal({:network=>"ALL", :stats_type=>"CampaignStats"}, entry[:campaign_stats])
130
- assert_equal({:impressions=>150}, entry[:frequency_cap])
131
- end