google-dfp-api 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. data/ChangeLog +6 -0
  2. data/README +11 -5
  3. data/Rakefile +1 -1
  4. data/examples/{v201101 → v201108}/common/error_handling.rb +1 -1
  5. data/examples/{v201101 → v201108}/common/oauth_handling.rb +1 -1
  6. data/examples/{v201101 → v201108}/company_service/create_companies.rb +1 -1
  7. data/examples/{v201101 → v201108}/company_service/get_all_companies.rb +1 -1
  8. data/examples/{v201101 → v201108}/company_service/get_companies_by_statement.rb +1 -1
  9. data/examples/{v201101 → v201108}/company_service/get_company.rb +1 -1
  10. data/examples/{v201101 → v201108}/company_service/update_companies.rb +1 -1
  11. data/examples/{v201101 → v201108}/creative_service/copy_image_creatives.rb +1 -1
  12. data/examples/{v201101 → v201108}/creative_service/create_creatives.rb +1 -1
  13. data/examples/{v201101 → v201108}/creative_service/get_all_creatives.rb +1 -1
  14. data/examples/{v201101 → v201108}/creative_service/get_creative.rb +1 -1
  15. data/examples/{v201101 → v201108}/creative_service/get_creatives_by_statement.rb +1 -1
  16. data/examples/{v201101 → v201108}/creative_service/update_creatives.rb +1 -1
  17. data/examples/{v201101 → v201108}/custom_targeting_service/create_custom_targeting_keys_and_values.rb +1 -1
  18. data/examples/{v201101 → v201108}/custom_targeting_service/delete_custom_targeting_keys.rb +1 -1
  19. data/examples/{v201101 → v201108}/custom_targeting_service/delete_custom_targeting_values.rb +1 -1
  20. data/examples/{v201101 → v201108}/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +1 -1
  21. data/examples/{v201101 → v201108}/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +1 -1
  22. data/examples/{v201101 → v201108}/custom_targeting_service/get_custom_targeting_values_by_statement.rb +1 -1
  23. data/examples/{v201101 → v201108}/custom_targeting_service/update_custom_targeting_keys.rb +1 -1
  24. data/examples/{v201101 → v201108}/custom_targeting_service/update_custom_targeting_values.rb +1 -1
  25. data/examples/{v201101 → v201108}/forecast_service/get_forecast.rb +8 -4
  26. data/examples/{v201101 → v201108}/forecast_service/get_forecast_by_id.rb +1 -1
  27. data/examples/{v201101 → v201108}/inventory_service/create_ad_units.rb +8 -2
  28. data/examples/{v201101 → v201108}/inventory_service/deactivate_ad_units.rb +1 -1
  29. data/examples/{v201101 → v201108}/inventory_service/get_ad_unit.rb +1 -1
  30. data/examples/v201108/inventory_service/get_ad_unit_sizes.rb +73 -0
  31. data/examples/{v201101 → v201108}/inventory_service/get_ad_units_by_statement.rb +1 -1
  32. data/examples/{v201101 → v201108}/inventory_service/get_all_ad_units.rb +1 -1
  33. data/examples/{v201101 → v201108}/inventory_service/update_ad_units.rb +1 -1
  34. data/examples/v201108/label_service/create_labels.rb +83 -0
  35. data/examples/v201108/label_service/deactivate_labels.rb +118 -0
  36. data/examples/v201108/label_service/get_all_labels.rb +94 -0
  37. data/examples/v201108/label_service/get_label.rb +76 -0
  38. data/examples/v201108/label_service/get_labels_by_statement.rb +91 -0
  39. data/examples/v201108/label_service/update_labels.rb +104 -0
  40. data/examples/{v201101 → v201108}/line_item_creative_association_service/create_licas.rb +1 -1
  41. data/examples/{v201101 → v201108}/line_item_creative_association_service/deactivate_licas.rb +1 -1
  42. data/examples/{v201101 → v201108}/line_item_creative_association_service/get_all_licas.rb +1 -1
  43. data/examples/{v201101 → v201108}/line_item_creative_association_service/get_lica.rb +1 -1
  44. data/examples/{v201101 → v201108}/line_item_creative_association_service/get_licas_by_statement.rb +1 -1
  45. data/examples/{v201101 → v201108}/line_item_creative_association_service/update_licas.rb +1 -1
  46. data/examples/{v201101 → v201108}/line_item_service/activate_line_items.rb +1 -1
  47. data/examples/{v201101 → v201108}/line_item_service/create_line_items.rb +49 -19
  48. data/examples/{v201101 → v201108}/line_item_service/get_all_line_items.rb +1 -1
  49. data/examples/{v201101 → v201108}/line_item_service/get_line_item.rb +1 -1
  50. data/examples/{v201101 → v201108}/line_item_service/get_line_items_by_statement.rb +1 -1
  51. data/examples/{v201101 → v201108}/line_item_service/target_custom_criteria.rb +30 -36
  52. data/examples/{v201101 → v201108}/line_item_service/update_line_items.rb +1 -1
  53. data/examples/{v201101 → v201108}/network_service/get_all_networks.rb +1 -1
  54. data/examples/{v201101 → v201108}/network_service/get_current_network.rb +1 -1
  55. data/examples/{v201101 → v201108}/order_service/approve_orders.rb +1 -1
  56. data/examples/{v201101 → v201108}/order_service/create_orders.rb +1 -1
  57. data/examples/{v201101 → v201108}/order_service/get_all_orders.rb +1 -1
  58. data/examples/{v201101 → v201108}/order_service/get_order.rb +1 -1
  59. data/examples/{v201101 → v201108}/order_service/get_orders_by_statement.rb +1 -1
  60. data/examples/{v201101 → v201108}/order_service/update_orders.rb +1 -1
  61. data/examples/{v201101 → v201108}/placement_service/create_placements.rb +3 -2
  62. data/examples/{v201101 → v201108}/placement_service/deactivate_placements.rb +1 -1
  63. data/examples/{v201101 → v201108}/placement_service/get_all_placements.rb +1 -1
  64. data/examples/{v201101 → v201108}/placement_service/get_placement.rb +1 -1
  65. data/examples/{v201101 → v201108}/placement_service/get_placements_by_statement.rb +1 -1
  66. data/examples/{v201101 → v201108}/placement_service/update_placements.rb +1 -1
  67. data/examples/v201108/publisher_query_language_service/get_all_bandwidth_groups.rb +85 -0
  68. data/examples/v201108/publisher_query_language_service/get_all_browser_languages.rb +85 -0
  69. data/examples/v201108/publisher_query_language_service/get_all_browsers.rb +85 -0
  70. data/examples/{v201101 → v201108}/publisher_query_language_service/get_all_cities.rb +1 -1
  71. data/examples/{v201101 → v201108}/publisher_query_language_service/get_all_countries.rb +1 -1
  72. data/examples/{v201101 → v201108}/publisher_query_language_service/get_all_metros.rb +1 -1
  73. data/examples/v201108/publisher_query_language_service/get_all_operating_systems.rb +85 -0
  74. data/examples/{v201101 → v201108}/publisher_query_language_service/get_all_regions.rb +1 -1
  75. data/examples/{v201101 → v201108}/report_service/download_report.rb +1 -1
  76. data/examples/{v201101 → v201108}/report_service/run_delivery_report.rb +1 -1
  77. data/examples/{v201101 → v201108}/report_service/run_inventory_report.rb +1 -1
  78. data/examples/{v201101 → v201108}/report_service/run_sales_report.rb +1 -1
  79. data/examples/{v201101 → v201108}/user_service/create_users.rb +1 -1
  80. data/examples/{v201101 → v201108}/user_service/deactivate_users.rb +1 -1
  81. data/examples/{v201101 → v201108}/user_service/get_all_roles.rb +1 -1
  82. data/examples/{v201101 → v201108}/user_service/get_all_users.rb +1 -1
  83. data/examples/v201108/user_service/get_current_user.rb +66 -0
  84. data/examples/{v201101 → v201108}/user_service/get_user.rb +1 -1
  85. data/examples/{v201101 → v201108}/user_service/get_users_by_statement.rb +1 -1
  86. data/examples/{v201101 → v201108}/user_service/update_users.rb +1 -1
  87. data/lib/dfp_api.rb +5 -12
  88. data/lib/dfp_api/api_config.rb +14 -13
  89. data/lib/dfp_api/credential_handler.rb +5 -5
  90. data/lib/dfp_api/v201104/company_service.rb +5 -5
  91. data/lib/dfp_api/v201104/company_service_registry.rb +5 -3
  92. data/lib/dfp_api/v201104/creative_service.rb +5 -5
  93. data/lib/dfp_api/v201104/creative_service_registry.rb +5 -3
  94. data/lib/dfp_api/v201104/custom_targeting_service.rb +9 -9
  95. data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +5 -3
  96. data/lib/dfp_api/v201104/forecast_service.rb +5 -5
  97. data/lib/dfp_api/v201104/forecast_service_registry.rb +5 -3
  98. data/lib/dfp_api/v201104/inventory_service.rb +9 -9
  99. data/lib/dfp_api/v201104/inventory_service_registry.rb +5 -3
  100. data/lib/dfp_api/v201104/line_item_creative_association_service.rb +1 -1
  101. data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +5 -3
  102. data/lib/dfp_api/v201104/line_item_service.rb +13 -13
  103. data/lib/dfp_api/v201104/line_item_service_registry.rb +5 -3
  104. data/lib/dfp_api/v201104/network_service.rb +5 -5
  105. data/lib/dfp_api/v201104/network_service_registry.rb +5 -3
  106. data/lib/dfp_api/v201104/order_service.rb +1 -1
  107. data/lib/dfp_api/v201104/order_service_registry.rb +5 -3
  108. data/lib/dfp_api/v201104/placement_service.rb +5 -5
  109. data/lib/dfp_api/v201104/placement_service_registry.rb +5 -3
  110. data/lib/dfp_api/v201104/publisher_query_language_service.rb +1 -1
  111. data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +5 -3
  112. data/lib/dfp_api/v201104/report_service.rb +5 -5
  113. data/lib/dfp_api/v201104/report_service_registry.rb +5 -3
  114. data/lib/dfp_api/v201104/user_service.rb +9 -9
  115. data/lib/dfp_api/v201104/user_service_registry.rb +5 -3
  116. data/lib/dfp_api/v201107/company_service.rb +9 -9
  117. data/lib/dfp_api/v201107/company_service_registry.rb +5 -3
  118. data/lib/dfp_api/v201107/custom_targeting_service.rb +9 -9
  119. data/lib/dfp_api/v201107/custom_targeting_service_registry.rb +5 -3
  120. data/lib/dfp_api/v201107/label_service.rb +5 -5
  121. data/lib/dfp_api/v201107/label_service_registry.rb +5 -3
  122. data/lib/dfp_api/v201107/order_service.rb +13 -13
  123. data/lib/dfp_api/v201107/order_service_registry.rb +5 -3
  124. data/lib/dfp_api/v201107/report_service.rb +5 -5
  125. data/lib/dfp_api/v201107/report_service_registry.rb +5 -3
  126. data/lib/dfp_api/v201107/user_service.rb +19 -19
  127. data/lib/dfp_api/v201107/user_service_registry.rb +5 -3
  128. data/lib/dfp_api/{v201101 → v201108}/company_service.rb +10 -10
  129. data/lib/dfp_api/v201108/company_service_registry.rb +44 -0
  130. data/lib/dfp_api/{v201101 → v201108}/creative_service.rb +10 -10
  131. data/lib/dfp_api/v201108/creative_service_registry.rb +44 -0
  132. data/lib/dfp_api/{v201101 → v201108}/custom_targeting_service.rb +14 -14
  133. data/lib/dfp_api/v201108/custom_targeting_service_registry.rb +44 -0
  134. data/lib/dfp_api/{v201101 → v201108}/forecast_service.rb +10 -10
  135. data/lib/dfp_api/v201108/forecast_service_registry.rb +44 -0
  136. data/lib/dfp_api/{v201101 → v201108}/inventory_service.rb +18 -14
  137. data/lib/dfp_api/v201108/inventory_service_registry.rb +44 -0
  138. data/lib/dfp_api/v201108/label_service.rb +56 -0
  139. data/lib/dfp_api/v201108/label_service_registry.rb +44 -0
  140. data/lib/dfp_api/{v201101 → v201108}/line_item_creative_association_service.rb +6 -6
  141. data/lib/dfp_api/v201108/line_item_creative_association_service_registry.rb +44 -0
  142. data/lib/dfp_api/{v201101 → v201108}/line_item_service.rb +18 -18
  143. data/lib/dfp_api/v201108/line_item_service_registry.rb +44 -0
  144. data/lib/dfp_api/{v201101 → v201108}/network_service.rb +10 -10
  145. data/lib/dfp_api/v201108/network_service_registry.rb +44 -0
  146. data/lib/dfp_api/{v201101 → v201108}/order_service.rb +6 -6
  147. data/lib/dfp_api/v201108/order_service_registry.rb +44 -0
  148. data/lib/dfp_api/{v201101 → v201108}/placement_service.rb +10 -10
  149. data/lib/dfp_api/v201108/placement_service_registry.rb +44 -0
  150. data/lib/dfp_api/{v201101 → v201108}/publisher_query_language_service.rb +6 -6
  151. data/lib/dfp_api/v201108/publisher_query_language_service_registry.rb +44 -0
  152. data/lib/dfp_api/{v201101 → v201108}/report_service.rb +10 -10
  153. data/lib/dfp_api/v201108/report_service_registry.rb +44 -0
  154. data/lib/dfp_api/v201108/third_party_slot_service.rb +44 -0
  155. data/lib/dfp_api/v201108/third_party_slot_service_registry.rb +44 -0
  156. data/lib/dfp_api/{v201101 → v201108}/user_service.rb +18 -14
  157. data/lib/dfp_api/v201108/user_service_registry.rb +44 -0
  158. metadata +120 -104
  159. data/lib/dfp_api/v201101/company_service_registry.rb +0 -42
  160. data/lib/dfp_api/v201101/creative_service_registry.rb +0 -42
  161. data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +0 -42
  162. data/lib/dfp_api/v201101/forecast_service_registry.rb +0 -42
  163. data/lib/dfp_api/v201101/inventory_service_registry.rb +0 -42
  164. data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +0 -42
  165. data/lib/dfp_api/v201101/line_item_service_registry.rb +0 -42
  166. data/lib/dfp_api/v201101/network_service_registry.rb +0 -42
  167. data/lib/dfp_api/v201101/order_service_registry.rb +0 -42
  168. data/lib/dfp_api/v201101/placement_service_registry.rb +0 -42
  169. data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +0 -42
  170. data/lib/dfp_api/v201101/report_service_registry.rb +0 -42
  171. data/lib/dfp_api/v201101/user_service_registry.rb +0 -42
@@ -24,7 +24,7 @@
24
24
  require 'rubygems'
25
25
  require 'dfp_api'
26
26
 
27
- API_VERSION = :v201101
27
+ API_VERSION = :v201108
28
28
  # A string to separate columns in output. Use "," to get CSV.
29
29
  COLUMN_SEPARATOR = "\t"
30
30
 
@@ -27,7 +27,7 @@ require 'dfp_api'
27
27
 
28
28
  require 'open-uri'
29
29
 
30
- API_VERSION = :v201101
30
+ API_VERSION = :v201108
31
31
 
32
32
  def download_report()
33
33
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -25,7 +25,7 @@
25
25
  require 'rubygems'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201101
28
+ API_VERSION = :v201108
29
29
  MAX_RETRIES = 10
30
30
  RETRY_INTERVAL = 30
31
31
 
@@ -25,7 +25,7 @@
25
25
  require 'rubygems'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201101
28
+ API_VERSION = :v201108
29
29
  MAX_RETRIES = 10
30
30
  RETRY_INTERVAL = 30
31
31
 
@@ -25,7 +25,7 @@
25
25
  require 'rubygems'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201101
28
+ API_VERSION = :v201108
29
29
  MAX_RETRIES = 10
30
30
  RETRY_INTERVAL = 30
31
31
 
@@ -25,7 +25,7 @@
25
25
  require 'rubygems'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201101
28
+ API_VERSION = :v201108
29
29
 
30
30
  def create_users()
31
31
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -27,7 +27,7 @@
27
27
  require 'rubygems'
28
28
  require 'dfp_api'
29
29
 
30
- API_VERSION = :v201101
30
+ API_VERSION = :v201108
31
31
  PAGE_SIZE = 500
32
32
 
33
33
  def deactivate_users()
@@ -25,7 +25,7 @@
25
25
  require 'rubygems'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201101
28
+ API_VERSION = :v201108
29
29
 
30
30
  def get_all_roles()
31
31
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -24,7 +24,7 @@
24
24
  require 'rubygems'
25
25
  require 'dfp_api'
26
26
 
27
- API_VERSION = :v201101
27
+ API_VERSION = :v201108
28
28
  PAGE_SIZE = 500
29
29
 
30
30
  def get_all_users()
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/ruby
2
+ #
3
+ # Author:: api.dklimkin@gmail.com (Danial Klimkin)
4
+ #
5
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
6
+ #
7
+ # License:: Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
+ # implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+ #
20
+ # This example gets the current user.
21
+ #
22
+ # Tags: UserService.getCurrentUser
23
+
24
+ require 'rubygems'
25
+ require 'dfp_api'
26
+
27
+ API_VERSION = :v201108
28
+
29
+ def get_current_user()
30
+ # Get DfpApi instance and load configuration from ~/dfp_api.yml.
31
+ dfp = DfpApi::Api.new
32
+
33
+ # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
34
+ # the configuration file or provide your own logger:
35
+ # dfp.logger = Logger.new('dfp_xml.log')
36
+
37
+ # Get the UserService.
38
+ user_service = dfp.service(:UserService, API_VERSION)
39
+
40
+ # Get the current user.
41
+ user = user_service.get_current_user()
42
+
43
+ puts "Current user has ID %d, email %s and role %s." %
44
+ [user[:id], user[:email], user[:role_name]]
45
+ end
46
+
47
+ if __FILE__ == $0
48
+ begin
49
+ get_current_user()
50
+
51
+ # HTTP errors.
52
+ rescue AdsCommon::Errors::HttpError => e
53
+ puts "HTTP Error: %s" % e
54
+
55
+ # API errors.
56
+ rescue DfpApi::Errors::ApiException => e
57
+ puts "Message: %s" % e.message
58
+ puts 'Errors:'
59
+ e.errors.each_with_index do |error, index|
60
+ puts "\tError [%d]:" % (index + 1)
61
+ error.each do |field, value|
62
+ puts "\t\t%s: %s" % [field, value]
63
+ end
64
+ end
65
+ end
66
+ end
@@ -24,7 +24,7 @@
24
24
  require 'rubygems'
25
25
  require 'dfp_api'
26
26
 
27
- API_VERSION = :v201101
27
+ API_VERSION = :v201108
28
28
 
29
29
  def get_user()
30
30
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -25,7 +25,7 @@
25
25
  require 'rubygems'
26
26
  require 'dfp_api'
27
27
 
28
- API_VERSION = :v201101
28
+ API_VERSION = :v201108
29
29
 
30
30
  def get_users_by_statement()
31
31
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -26,7 +26,7 @@
26
26
  require 'rubygems'
27
27
  require 'dfp_api'
28
28
 
29
- API_VERSION = :v201101
29
+ API_VERSION = :v201108
30
30
 
31
31
  def update_users()
32
32
  # Get DfpApi instance and load configuration from ~/dfp_api.yml.
@@ -20,11 +20,10 @@
20
20
  # Contains the main classes for the client library. Takes care of all
21
21
  # dependencies.
22
22
 
23
- gem 'google-ads-common', '~>0.5.0'
24
-
25
- require 'savon'
23
+ gem 'google-ads-common', '~>0.5.1'
26
24
 
27
25
  require 'ads_common/api'
26
+ require 'ads_common/savon_service'
28
27
  require 'ads_common/savon_headers/oauth_header_handler'
29
28
  require 'ads_common/savon_headers/simple_header_handler'
30
29
  require 'dfp_api/api_config'
@@ -54,10 +53,7 @@ module DfpApi
54
53
  # Sets the logger to use.
55
54
  def logger=(logger)
56
55
  super(logger)
57
- Savon.configure do |config|
58
- config.log_level = :debug
59
- config.logger = logger
60
- end
56
+ AdsCommon::SavonService.logger = logger
61
57
  end
62
58
 
63
59
  private
@@ -65,13 +61,10 @@ module DfpApi
65
61
  # Retrieve DFP HeaderHandlers per credential.
66
62
  def soap_header_handlers(auth_handler, header_list, version, namespace)
67
63
  handler = nil
68
- auth_method = @config.read('authentication.method',
69
- 'ClientLogin').to_s.upcase.to_sym
64
+ auth_method = @config.read('authentication.method', :CLIENTLOGIN)
70
65
  handler = case auth_method
71
66
  when :CLIENTLOGIN
72
- (version == :v201101) ?
73
- AdsCommon::SavonHeaders::SimpleHeaderHandler :
74
- DfpApi::ClientLoginHeaderHandler
67
+ DfpApi::ClientLoginHeaderHandler
75
68
  when :OAUTH
76
69
  AdsCommon::SavonHeaders::OAuthHeaderHandler
77
70
  end
@@ -34,23 +34,18 @@ module DfpApi
34
34
  end
35
35
 
36
36
  # Set defaults
37
- DEFAULT_VERSION = :v201107
37
+ DEFAULT_VERSION = :v201108
38
38
  DEFAULT_ENVIRONMENT = :PRODUCTION
39
- LATEST_VERSION = :v201107
39
+ LATEST_VERSION = :v201108
40
40
 
41
41
  # Set other constants
42
42
  API_NAME = 'DfpApi'
43
43
  API_PATH = 'dfp_api'
44
- CLIENT_LIB_VERSION = '0.2.3'
44
+ CLIENT_LIB_VERSION = '0.2.4'
45
45
  DEFAULT_CONFIG_FILENAME = 'dfp_api.yml'
46
46
 
47
47
  # Configure the services available to each version
48
48
  @@service_config = {
49
- :v201101 => [:CompanyService, :CreativeService, :ForecastService,
50
- :InventoryService, :LineItemCreativeAssociationService,
51
- :LineItemService, :NetworkService, :OrderService,
52
- :PlacementService, :ReportService, :UserService,
53
- :CustomTargetingService, :PublisherQueryLanguageService],
54
49
  :v201103 => [:CompanyService, :CreativeService, :ForecastService,
55
50
  :InventoryService, :LineItemCreativeAssociationService,
56
51
  :LineItemService, :NetworkService, :OrderService,
@@ -66,24 +61,30 @@ module DfpApi
66
61
  :LineItemService, :NetworkService, :OrderService,
67
62
  :PlacementService, :ReportService, :UserService,
68
63
  :CustomTargetingService, :PublisherQueryLanguageService,
69
- :LabelService]
64
+ :LabelService],
65
+ :v201108 => [:CompanyService, :CreativeService, :ForecastService,
66
+ :InventoryService, :LineItemCreativeAssociationService,
67
+ :LineItemService, :NetworkService, :OrderService,
68
+ :PlacementService, :ReportService, :UserService,
69
+ :CustomTargetingService, :PublisherQueryLanguageService,
70
+ :LabelService, :ThirdPartySlotService]
70
71
  }
71
72
 
72
73
  # Configure the different environments, with the base URL for each one
73
74
  @@environment_config = {
74
75
  :PRODUCTION => {
75
76
  :oauth_scope => 'https://www.google.com/apis/ads/publisher/',
76
- :v201101 => 'https://www.google.com/apis/ads/publisher/',
77
77
  :v201103 => 'https://www.google.com/apis/ads/publisher/',
78
78
  :v201104 => 'https://www.google.com/apis/ads/publisher/',
79
- :v201107 => 'https://www.google.com/apis/ads/publisher/'
79
+ :v201107 => 'https://www.google.com/apis/ads/publisher/',
80
+ :v201108 => 'https://www.google.com/apis/ads/publisher/'
80
81
  },
81
82
  :SANDBOX => {
82
83
  :oauth_scope => 'https://sandbox.google.com/apis/ads/publisher/',
83
- :v201101 => 'https://sandbox.google.com/apis/ads/publisher/',
84
84
  :v201103 => 'https://sandbox.google.com/apis/ads/publisher/',
85
85
  :v201104 => 'https://sandbox.google.com/apis/ads/publisher/',
86
- :v201107 => 'https://sandbox.google.com/apis/ads/publisher/'
86
+ :v201107 => 'https://sandbox.google.com/apis/ads/publisher/',
87
+ :v201108 => 'https://sandbox.google.com/apis/ads/publisher/'
87
88
  }
88
89
  }
89
90
 
@@ -29,8 +29,7 @@ module DfpApi
29
29
  def credentials(version = nil)
30
30
  validate_headers_for_server()
31
31
 
32
- method = @credentials[:method].to_s.upcase.to_sym
33
- result = case method
32
+ result = case @credentials[:method]
34
33
  when :CLIENTLOGIN
35
34
  {:email => @credentials[:email],
36
35
  :password => @credentials[:password],
@@ -42,9 +41,10 @@ module DfpApi
42
41
  :oauth_token => @credentials[:oauth_token],
43
42
  :oauth_token_secret => @credentials[:oauth_token_secret],
44
43
  :oauth_callback => @credentials[:oauth_callback],
45
- :oauth_method => @credentials[:oauth_method]}
44
+ :oauth_method => @credentials[:oauth_method],
45
+ :oauth_request_token => @credentials[:oauth_request_token]}
46
46
  end
47
- client_lib = "Ruby-DfpApi-%s" % DfpApi::ApiConfig::CLIENT_LIB_VERSION
47
+ client_lib = "DfpApi-Ruby-%s" % DfpApi::ApiConfig::CLIENT_LIB_VERSION
48
48
  application_name = @credentials[:application_name] || $0
49
49
  result[:applicationName] = "%s|%s" % [client_lib, application_name]
50
50
  result[:networkCode] = @credentials[:network_code]
@@ -57,7 +57,7 @@ module DfpApi
57
57
  # environment.
58
58
  def validate_headers_for_server()
59
59
  if @credentials[:application_name].nil?
60
- raise AdsCommon::Errors::AuthError, "Application name is not specified"
60
+ raise AdsCommon::Errors::AuthError, 'Application name is not specified'
61
61
  end
62
62
  return nil
63
63
  end
@@ -3,7 +3,7 @@
3
3
  # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
4
  # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
5
  #
6
- # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:21.
6
+ # Code generated by AdsCommon library 0.5.1 on 2011-09-23 16:12:05.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201104/company_service_registry'
@@ -15,6 +15,10 @@ module DfpApi; module V201104; module CompanyService
15
15
  super(api, endpoint, namespace, :v201104)
16
16
  end
17
17
 
18
+ def get_company(*args)
19
+ return execute_action('get_company', args)
20
+ end
21
+
18
22
  def update_companies(*args)
19
23
  return execute_action('update_companies', args)
20
24
  end
@@ -35,10 +39,6 @@ module DfpApi; module V201104; module CompanyService
35
39
  return execute_action('get_companies_by_statement', args)
36
40
  end
37
41
 
38
- def get_company(*args)
39
- return execute_action('get_company', args)
40
- end
41
-
42
42
  private
43
43
 
44
44
  def get_service_registry()
@@ -3,12 +3,14 @@
3
3
  # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
4
  # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
5
  #
6
- # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:21.
6
+ # Code generated by AdsCommon library 0.5.1 on 2011-09-23 16:12:05.
7
+
8
+ require 'dfp_api/errors'
7
9
 
8
10
  module DfpApi; module V201104; module CompanyService
9
11
  class CompanyServiceRegistry
10
- COMPANYSERVICE_METHODS = {:update_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:companies, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_companies_response"}}, :update_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:company, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_company_response"}}, :create_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:companies, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_companies_response"}}, :create_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:company, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_company_response"}}, :get_companies_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CompanyPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_companies_by_statement_response"}}, :get_company=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:company_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_company_response"}}}
11
- COMPANYSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :Company=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"Company.Type", :min_occurs=>0, :name=>:type, :max_occurs=>1}]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :CompanyPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"Company", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
12
+ COMPANYSERVICE_METHODS = {:get_company=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_company_response"}, :input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:company_id}]}, :update_companies=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"update_companies_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:companies}]}, :update_company=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_company_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}]}, :create_companies=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"create_companies_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:companies}]}, :create_company=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_company_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}]}, :get_companies_by_statement=>{:output=>{:fields=>[{:type=>"CompanyPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_companies_by_statement_response"}, :input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}]}}
13
+ COMPANYSERVICE_TYPES = {:Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:values}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :Company=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"Company.Type", :min_occurs=>0, :max_occurs=>1, :name=>:type}]}, :CompanyPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:total_result_set_size}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:start_index}, {:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:results}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}}
12
14
  COMPANYSERVICE_NAMESPACES = []
13
15
 
14
16
  def self.get_method_signature(method_name)
@@ -3,7 +3,7 @@
3
3
  # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
4
  # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
5
  #
6
- # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:44.
6
+ # Code generated by AdsCommon library 0.5.1 on 2011-09-23 16:12:39.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201104/creative_service_registry'
@@ -15,6 +15,10 @@ module DfpApi; module V201104; module CreativeService
15
15
  super(api, endpoint, namespace, :v201104)
16
16
  end
17
17
 
18
+ def update_creative(*args)
19
+ return execute_action('update_creative', args)
20
+ end
21
+
18
22
  def update_creatives(*args)
19
23
  return execute_action('update_creatives', args)
20
24
  end
@@ -35,10 +39,6 @@ module DfpApi; module V201104; module CreativeService
35
39
  return execute_action('get_creatives_by_statement', args)
36
40
  end
37
41
 
38
- def update_creative(*args)
39
- return execute_action('update_creative', args)
40
- end
41
-
42
42
  private
43
43
 
44
44
  def get_service_registry()
@@ -3,12 +3,14 @@
3
3
  # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
4
  # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
5
  #
6
- # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:44.
6
+ # Code generated by AdsCommon library 0.5.1 on 2011-09-23 16:12:39.
7
+
8
+ require 'dfp_api/errors'
7
9
 
8
10
  module DfpApi; module V201104; module CreativeService
9
11
  class CreativeServiceRegistry
10
- CREATIVESERVICE_METHODS = {:update_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creatives, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_creatives_response"}}, :create_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creative, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_creative_response"}}, :create_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creatives, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_creatives_response"}}, :get_creative=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_creative_response"}}, :get_creatives_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CreativePage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_creatives_by_statement_response"}}, :update_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creative, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_creative_response"}}}
11
- CREATIVESERVICE_TYPES = {:Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:width, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:height, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_aspect_ratio, :max_occurs=>1}]}, :FlashRedirectCreative=>{:base=>"BaseFlashRedirectCreative", :fields=>[]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :BaseImageCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:image_name, :max_occurs=>1}, {:type=>"base64Binary", :min_occurs=>0, :name=>:image_byte_array, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:override_size, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:asset_size, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:image_url, :max_occurs=>1}]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :HasDestinationUrlCreative=>{:abstract=>true, :base=>"Creative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:destination_url, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :BaseImageRedirectCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:image_url, :max_occurs=>1}]}, :ImageCreative=>{:base=>"BaseImageCreative", :fields=>[]}, :Creative=>{:abstract=>true, :fields=>[{:type=>"long", :min_occurs=>0, :name=>:advertiser_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:size, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:preview_url, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:creative_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :ImageRedirectCreative=>{:base=>"BaseImageRedirectCreative", :fields=>[]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :CreativePage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"Creative", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :ThirdPartyCreative=>{:base=>"Creative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:snippet, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:expanded_snippet, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :BaseFlashCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:flash_name, :max_occurs=>1}, {:type=>"base64Binary", :min_occurs=>0, :name=>:flash_byte_array, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_image_name, :max_occurs=>1}, {:type=>"base64Binary", :min_occurs=>0, :name=>:fallback_image_byte_array, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:override_size, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:click_tag_required, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_preview_url, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:flash_asset_size, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:fallback_asset_size, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :FlashCreative=>{:base=>"BaseFlashCreative", :fields=>[]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :BaseFlashRedirectCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:flash_url, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_url, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_preview_url, :max_occurs=>1}]}}
12
+ CREATIVESERVICE_METHODS = {:update_creative=>{:output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_creative_response"}, :input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:creative}]}, :update_creatives=>{:output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"update_creatives_response"}, :input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:creatives}]}, :create_creative=>{:output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_creative_response"}, :input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:creative}]}, :create_creatives=>{:output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"create_creatives_response"}, :input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:creatives}]}, :get_creative=>{:output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_creative_response"}, :input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:creative_id}]}, :get_creatives_by_statement=>{:output=>{:fields=>[{:type=>"CreativePage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_creatives_by_statement_response"}, :input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}]}}
13
+ CREATIVESERVICE_TYPES = {:ThirdPartyCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:snippet}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:expanded_snippet}], :base=>"Creative"}, :BaseFlashRedirectCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:flash_url}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_url}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_preview_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :FlashCreative=>{:fields=>[], :base=>"BaseFlashCreative"}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:width}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:height}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_aspect_ratio}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :BaseImageCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_name}, {:type=>"base64Binary", :min_occurs=>0, :max_occurs=>1, :name=>:image_byte_array}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:override_size}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:asset_size}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:values}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :FlashRedirectCreative=>{:fields=>[], :base=>"BaseFlashRedirectCreative"}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :BaseImageRedirectCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :HasDestinationUrlCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:destination_url}], :abstract=>true, :base=>"Creative"}, :ImageCreative=>{:fields=>[], :base=>"BaseImageCreative"}, :Creative=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:advertiser_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:size}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:preview_url}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:creative_type}], :abstract=>true}, :ImageRedirectCreative=>{:fields=>[], :base=>"BaseImageRedirectCreative"}, :BaseFlashCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:flash_name}, {:type=>"base64Binary", :min_occurs=>0, :max_occurs=>1, :name=>:flash_byte_array}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_image_name}, {:type=>"base64Binary", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_image_byte_array}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:override_size}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:click_tag_required}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_preview_url}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:flash_asset_size}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_asset_size}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :CreativePage=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:total_result_set_size}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:start_index}, {:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:results}]}}
12
14
  CREATIVESERVICE_NAMESPACES = []
13
15
 
14
16
  def self.get_method_signature(method_name)
@@ -3,7 +3,7 @@
3
3
  # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
4
  # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
5
  #
6
- # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:13.
6
+ # Code generated by AdsCommon library 0.5.1 on 2011-09-23 16:11:55.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201104/custom_targeting_service_registry'
@@ -15,6 +15,14 @@ module DfpApi; module V201104; module CustomTargetingService
15
15
  super(api, endpoint, namespace, :v201104)
16
16
  end
17
17
 
18
+ def get_custom_targeting_keys_by_statement(*args)
19
+ return execute_action('get_custom_targeting_keys_by_statement', args)
20
+ end
21
+
22
+ def get_custom_targeting_values_by_statement(*args)
23
+ return execute_action('get_custom_targeting_values_by_statement', args)
24
+ end
25
+
18
26
  def perform_custom_targeting_key_action(*args)
19
27
  return execute_action('perform_custom_targeting_key_action', args)
20
28
  end
@@ -39,14 +47,6 @@ module DfpApi; module V201104; module CustomTargetingService
39
47
  return execute_action('update_custom_targeting_values', args)
40
48
  end
41
49
 
42
- def get_custom_targeting_keys_by_statement(*args)
43
- return execute_action('get_custom_targeting_keys_by_statement', args)
44
- end
45
-
46
- def get_custom_targeting_values_by_statement(*args)
47
- return execute_action('get_custom_targeting_values_by_statement', args)
48
- end
49
-
50
50
  private
51
51
 
52
52
  def get_service_registry()