google-dfp-api 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/ChangeLog +4 -0
  2. data/README +17 -2
  3. data/Rakefile +3 -5
  4. data/examples/v201101/common/oauth_handling.rb +128 -0
  5. data/examples/v201101/company_service/create_companies.rb +1 -1
  6. data/examples/v201101/company_service/get_all_companies.rb +1 -1
  7. data/examples/v201101/creative_service/create_creatives.rb +1 -1
  8. data/examples/v201101/creative_service/get_all_creatives.rb +1 -1
  9. data/examples/v201101/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
  10. data/examples/v201101/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
  11. data/examples/v201101/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
  12. data/examples/v201101/inventory_service/create_ad_units.rb +1 -1
  13. data/examples/v201101/inventory_service/deactivate_ad_units.rb +2 -2
  14. data/examples/v201101/inventory_service/get_ad_units_by_statement.rb +1 -1
  15. data/examples/v201101/inventory_service/get_all_ad_units.rb +1 -1
  16. data/examples/v201101/line_item_creative_association_service/deactivate_licas.rb +2 -2
  17. data/examples/v201101/line_item_creative_association_service/get_all_licas.rb +1 -1
  18. data/examples/v201101/line_item_service/activate_line_items.rb +2 -2
  19. data/examples/v201101/line_item_service/create_line_items.rb +2 -2
  20. data/examples/v201101/line_item_service/get_all_line_items.rb +1 -1
  21. data/examples/v201101/order_service/approve_orders.rb +2 -2
  22. data/examples/v201101/order_service/create_orders.rb +1 -1
  23. data/examples/v201101/order_service/get_all_orders.rb +1 -1
  24. data/examples/v201101/placement_service/create_placements.rb +3 -3
  25. data/examples/v201101/placement_service/deactivate_placements.rb +2 -2
  26. data/examples/v201101/placement_service/get_all_placements.rb +1 -1
  27. data/examples/v201101/user_service/get_all_users.rb +1 -1
  28. data/examples/v201103/common/oauth_handling.rb +128 -0
  29. data/examples/v201103/company_service/create_companies.rb +1 -1
  30. data/examples/v201103/company_service/get_all_companies.rb +1 -1
  31. data/examples/v201103/creative_service/create_creatives.rb +1 -1
  32. data/examples/v201103/creative_service/get_all_creatives.rb +1 -1
  33. data/examples/v201103/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
  34. data/examples/v201103/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
  35. data/examples/v201103/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
  36. data/examples/v201103/inventory_service/create_ad_units.rb +1 -1
  37. data/examples/v201103/inventory_service/deactivate_ad_units.rb +2 -2
  38. data/examples/v201103/inventory_service/get_ad_units_by_statement.rb +1 -1
  39. data/examples/v201103/inventory_service/get_all_ad_units.rb +1 -1
  40. data/examples/v201103/line_item_creative_association_service/deactivate_licas.rb +2 -2
  41. data/examples/v201103/line_item_creative_association_service/get_all_licas.rb +1 -1
  42. data/examples/v201103/line_item_service/activate_line_items.rb +2 -2
  43. data/examples/v201103/line_item_service/create_line_items.rb +2 -2
  44. data/examples/v201103/line_item_service/get_all_line_items.rb +1 -1
  45. data/examples/v201103/order_service/approve_orders.rb +2 -2
  46. data/examples/v201103/order_service/create_orders.rb +1 -1
  47. data/examples/v201103/order_service/get_all_orders.rb +1 -1
  48. data/examples/v201103/placement_service/create_placements.rb +3 -3
  49. data/examples/v201103/placement_service/deactivate_placements.rb +2 -2
  50. data/examples/v201103/placement_service/get_all_placements.rb +1 -1
  51. data/examples/v201103/user_service/get_all_users.rb +1 -1
  52. data/examples/v201104/common/oauth_handling.rb +128 -0
  53. data/examples/v201104/company_service/create_companies.rb +1 -1
  54. data/examples/v201104/company_service/get_all_companies.rb +1 -1
  55. data/examples/v201104/creative_service/create_creatives.rb +1 -1
  56. data/examples/v201104/creative_service/get_all_creatives.rb +1 -1
  57. data/examples/v201104/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
  58. data/examples/v201104/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
  59. data/examples/v201104/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
  60. data/examples/v201104/inventory_service/create_ad_units.rb +1 -1
  61. data/examples/v201104/inventory_service/deactivate_ad_units.rb +2 -2
  62. data/examples/v201104/inventory_service/get_ad_units_by_statement.rb +1 -1
  63. data/examples/v201104/inventory_service/get_all_ad_units.rb +1 -1
  64. data/examples/v201104/line_item_creative_association_service/deactivate_licas.rb +2 -2
  65. data/examples/v201104/line_item_creative_association_service/get_all_licas.rb +1 -1
  66. data/examples/v201104/line_item_service/activate_line_items.rb +2 -2
  67. data/examples/v201104/line_item_service/create_line_items.rb +1 -1
  68. data/examples/v201104/line_item_service/get_all_line_items.rb +1 -1
  69. data/examples/v201104/order_service/approve_orders.rb +2 -2
  70. data/examples/v201104/order_service/create_orders.rb +1 -1
  71. data/examples/v201104/order_service/get_all_orders.rb +1 -1
  72. data/examples/v201104/placement_service/create_placements.rb +3 -3
  73. data/examples/v201104/placement_service/deactivate_placements.rb +2 -2
  74. data/examples/v201104/placement_service/get_all_placements.rb +1 -1
  75. data/examples/v201104/user_service/get_all_users.rb +1 -1
  76. data/lib/dfp_api.rb +24 -70
  77. data/lib/dfp_api/api_config.rb +3 -1
  78. data/lib/dfp_api/client_login_header_handler.rb +56 -0
  79. data/lib/dfp_api/credential_handler.rb +19 -14
  80. data/lib/dfp_api/errors.rb +1 -1
  81. data/lib/dfp_api/v201101/company_service.rb +3 -3
  82. data/lib/dfp_api/v201101/company_service_registry.rb +9 -4
  83. data/lib/dfp_api/v201101/creative_service.rb +3 -3
  84. data/lib/dfp_api/v201101/creative_service_registry.rb +9 -4
  85. data/lib/dfp_api/v201101/custom_targeting_service.rb +7 -7
  86. data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +9 -4
  87. data/lib/dfp_api/v201101/forecast_service.rb +3 -3
  88. data/lib/dfp_api/v201101/forecast_service_registry.rb +9 -4
  89. data/lib/dfp_api/v201101/inventory_service.rb +7 -7
  90. data/lib/dfp_api/v201101/inventory_service_registry.rb +9 -4
  91. data/lib/dfp_api/v201101/line_item_creative_association_service.rb +7 -7
  92. data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +9 -4
  93. data/lib/dfp_api/v201101/line_item_service.rb +7 -7
  94. data/lib/dfp_api/v201101/line_item_service_registry.rb +9 -4
  95. data/lib/dfp_api/v201101/network_service.rb +7 -7
  96. data/lib/dfp_api/v201101/network_service_registry.rb +9 -4
  97. data/lib/dfp_api/v201101/order_service.rb +11 -11
  98. data/lib/dfp_api/v201101/order_service_registry.rb +9 -4
  99. data/lib/dfp_api/v201101/placement_service.rb +3 -3
  100. data/lib/dfp_api/v201101/placement_service_registry.rb +9 -4
  101. data/lib/dfp_api/v201101/publisher_query_language_service.rb +3 -3
  102. data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +9 -4
  103. data/lib/dfp_api/v201101/report_service.rb +3 -3
  104. data/lib/dfp_api/v201101/report_service_registry.rb +9 -4
  105. data/lib/dfp_api/v201101/user_service.rb +7 -7
  106. data/lib/dfp_api/v201101/user_service_registry.rb +9 -4
  107. data/lib/dfp_api/v201103/company_service.rb +3 -3
  108. data/lib/dfp_api/v201103/company_service_registry.rb +9 -4
  109. data/lib/dfp_api/v201103/creative_service.rb +3 -3
  110. data/lib/dfp_api/v201103/creative_service_registry.rb +9 -4
  111. data/lib/dfp_api/v201103/custom_targeting_service.rb +7 -7
  112. data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +9 -4
  113. data/lib/dfp_api/v201103/forecast_service.rb +3 -3
  114. data/lib/dfp_api/v201103/forecast_service_registry.rb +9 -4
  115. data/lib/dfp_api/v201103/inventory_service.rb +7 -7
  116. data/lib/dfp_api/v201103/inventory_service_registry.rb +9 -4
  117. data/lib/dfp_api/v201103/line_item_creative_association_service.rb +7 -7
  118. data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +9 -4
  119. data/lib/dfp_api/v201103/line_item_service.rb +7 -7
  120. data/lib/dfp_api/v201103/line_item_service_registry.rb +9 -4
  121. data/lib/dfp_api/v201103/network_service.rb +7 -7
  122. data/lib/dfp_api/v201103/network_service_registry.rb +9 -4
  123. data/lib/dfp_api/v201103/order_service.rb +11 -11
  124. data/lib/dfp_api/v201103/order_service_registry.rb +9 -4
  125. data/lib/dfp_api/v201103/placement_service.rb +3 -3
  126. data/lib/dfp_api/v201103/placement_service_registry.rb +9 -4
  127. data/lib/dfp_api/v201103/publisher_query_language_service.rb +3 -3
  128. data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +9 -4
  129. data/lib/dfp_api/v201103/report_service.rb +3 -3
  130. data/lib/dfp_api/v201103/report_service_registry.rb +9 -4
  131. data/lib/dfp_api/v201103/user_service.rb +7 -7
  132. data/lib/dfp_api/v201103/user_service_registry.rb +9 -4
  133. data/lib/dfp_api/v201104/company_service.rb +3 -3
  134. data/lib/dfp_api/v201104/company_service_registry.rb +9 -4
  135. data/lib/dfp_api/v201104/creative_service.rb +3 -3
  136. data/lib/dfp_api/v201104/creative_service_registry.rb +9 -4
  137. data/lib/dfp_api/v201104/custom_targeting_service.rb +7 -7
  138. data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +9 -4
  139. data/lib/dfp_api/v201104/forecast_service.rb +3 -3
  140. data/lib/dfp_api/v201104/forecast_service_registry.rb +9 -4
  141. data/lib/dfp_api/v201104/inventory_service.rb +7 -7
  142. data/lib/dfp_api/v201104/inventory_service_registry.rb +9 -4
  143. data/lib/dfp_api/v201104/line_item_creative_association_service.rb +7 -7
  144. data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +9 -4
  145. data/lib/dfp_api/v201104/line_item_service.rb +7 -7
  146. data/lib/dfp_api/v201104/line_item_service_registry.rb +9 -4
  147. data/lib/dfp_api/v201104/network_service.rb +7 -7
  148. data/lib/dfp_api/v201104/network_service_registry.rb +9 -4
  149. data/lib/dfp_api/v201104/order_service.rb +11 -11
  150. data/lib/dfp_api/v201104/order_service_registry.rb +9 -4
  151. data/lib/dfp_api/v201104/placement_service.rb +3 -3
  152. data/lib/dfp_api/v201104/placement_service_registry.rb +9 -4
  153. data/lib/dfp_api/v201104/publisher_query_language_service.rb +3 -3
  154. data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +9 -4
  155. data/lib/dfp_api/v201104/report_service.rb +3 -3
  156. data/lib/dfp_api/v201104/report_service_registry.rb +9 -4
  157. data/lib/dfp_api/v201104/user_service.rb +7 -7
  158. data/lib/dfp_api/v201104/user_service_registry.rb +9 -4
  159. data/test/bugs/test_issue_00000016.rb +6 -5
  160. data/test/dfp_api/test_dfp_api.rb +29 -7
  161. metadata +257 -253
@@ -28,16 +28,27 @@ module DfpApi
28
28
  # generation.
29
29
  def credentials(version = nil)
30
30
  validate_headers_for_server()
31
+
32
+ method = @credentials[:method].to_s.upcase.to_sym
33
+ result = case method
34
+ when :CLIENTLOGIN
35
+ {:email => @credentials[:email],
36
+ :password => @credentials[:password],
37
+ :auth_token => @credentials[:auth_token]}
38
+ when :OAUTH
39
+ {:oauth_consumer_key => @credentials[:oauth_consumer_key],
40
+ :oauth_consumer_secret => @credentials[:oauth_consumer_secret],
41
+ :oauth_verification_code => @credentials[:oauth_verification_code],
42
+ :oauth_token => @credentials[:oauth_token],
43
+ :oauth_token_secret => @credentials[:oauth_token_secret],
44
+ :oauth_callback => @credentials[:oauth_callback],
45
+ :oauth_method => @credentials[:oauth_method]}
46
+ end
31
47
  client_lib = "Ruby-DfpApi-%s" % DfpApi::ApiConfig::CLIENT_LIB_VERSION
32
48
  application_name = @credentials[:application_name] || $0
33
- result = {
34
- :email => @credentials[:email],
35
- :password => @credentials[:password],
36
- :applicationName => "%s|%s" % [client_lib, application_name]
37
- }
38
- network_code = @credentials[:network_code]
39
- result[:networkCode] = network_code if !network_code.nil?
40
- return result
49
+ result[:applicationName] = "%s|%s" % [client_lib, application_name]
50
+ result[:networkCode] = @credentials[:network_code]
51
+ return result.reject {|k, v| v.nil?}
41
52
  end
42
53
 
43
54
  private
@@ -45,12 +56,6 @@ module DfpApi
45
56
  # Validates that the right credentials are being used for the chosen
46
57
  # environment.
47
58
  def validate_headers_for_server()
48
- if @credentials[:email].nil?
49
- raise AdsCommon::Errors::AuthError, "Login email is not specified"
50
- end
51
- if @credentials[:password].nil?
52
- raise AdsCommon::Errors::AuthError, "Password is not specified"
53
- end
54
59
  if @credentials[:application_name].nil?
55
60
  raise AdsCommon::Errors::AuthError, "Application name is not specified"
56
61
  end
@@ -46,7 +46,7 @@ module DfpApi
46
46
 
47
47
  # Makes sure object is an array
48
48
  def arrayize(object)
49
- return Array.new if object.nil?
49
+ return [] if object.nil?
50
50
  return object.is_a?(Array) ? object : [object]
51
51
  end
52
52
 
@@ -3,16 +3,16 @@
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.4.0 on 2011-06-17 15:26:39.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:38.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201101/company_service_registry'
10
10
 
11
11
  module DfpApi; module V201101; module CompanyService
12
12
  class CompanyService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201101'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201101)
16
16
  end
17
17
 
18
18
  def update_companies(*args)
@@ -3,12 +3,13 @@
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.4.0 on 2011-06-17 15:26:39.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:38.
7
7
 
8
8
  module DfpApi; module V201101; module CompanyService
9
9
  class CompanyServiceRegistry
10
- COMPANYSERVICE_METHODS = {:update_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>nil, :name=>:companies}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_companies_response"}}, :update_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_company_response"}}, :create_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>nil, :name=>:companies}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_companies_response"}}, :create_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_company_response"}}, :get_companies_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"CompanyPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_companies_by_statement_response"}}, :get_company=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:company_id}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_company_response"}}}
11
- COMPANYSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :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}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :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=>nil, :name=>:results}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :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=>:auth_token}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:o_auth_token}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}}
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}]}, :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}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_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_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return COMPANYSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module CompanyService
17
18
  def self.get_type_signature(type_name)
18
19
  return COMPANYSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return COMPANYSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module CompanyService
29
34
  class ApiException < ApplicationException
30
35
  attr_reader :errors # ApiError
31
36
  def initialize(exception_fault)
32
- @array_fields = [] if !defined?(@array_fields)
37
+ @array_fields ||= []
33
38
  @array_fields << 'errors'
34
39
  super(exception_fault)
35
40
  end
@@ -3,16 +3,16 @@
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.4.0 on 2011-06-17 15:26:58.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:01.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201101/creative_service_registry'
10
10
 
11
11
  module DfpApi; module V201101; module CreativeService
12
12
  class CreativeService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201101'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201101)
16
16
  end
17
17
 
18
18
  def update_creatives(*args)
@@ -3,12 +3,13 @@
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.4.0 on 2011-06-17 15:26:58.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:01.
7
7
 
8
8
  module DfpApi; module V201101; module CreativeService
9
9
  class CreativeServiceRegistry
10
- CREATIVESERVICE_METHODS = {:update_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>nil, :name=>:creatives}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_creatives_response"}}, :create_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:creative}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_creative_response"}}, :create_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>nil, :name=>:creatives}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_creatives_response"}}, :get_creative=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:creative_id}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_creative_response"}}, :get_creatives_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"CreativePage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_creatives_by_statement_response"}}, :update_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:creative}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_creative_response"}}}
11
- CREATIVESERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :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"}, :HasDestinationUrlCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:destination_url}], :abstract=>true, :base=>"Creative"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :BaseImageRedirectCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :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}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :ImageRedirectCreative=>{:fields=>[], :base=>"BaseImageRedirectCreative"}, :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=>nil, :name=>:results}]}, :ThirdPartyCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:snippet}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:expanded_snippet}, {:type=>"ThirdPartyCreative.FormatStatus", :min_occurs=>0, :max_occurs=>1, :name=>:format_status}], :base=>"Creative"}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:auth_token}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:o_auth_token}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :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"}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :FlashCreative=>{:fields=>[], :base=>"BaseFlashCreative"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :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"}, :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}]}, :FlashRedirectCreative=>{:fields=>[], :base=>"BaseFlashRedirectCreative"}}
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}]}, :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=>[]}, :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}, {:type=>"ThirdPartyCreative.FormatStatus", :min_occurs=>0, :name=>:format_status, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_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_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return CREATIVESERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module CreativeService
17
18
  def self.get_type_signature(type_name)
18
19
  return CREATIVESERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return CREATIVESERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module CreativeService
29
34
  class ApiException < ApplicationException
30
35
  attr_reader :errors # ApiError
31
36
  def initialize(exception_fault)
32
- @array_fields = [] if !defined?(@array_fields)
37
+ @array_fields ||= []
33
38
  @array_fields << 'errors'
34
39
  super(exception_fault)
35
40
  end
@@ -3,16 +3,20 @@
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.4.0 on 2011-06-17 15:26:32.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:30.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201101/custom_targeting_service_registry'
10
10
 
11
11
  module DfpApi; module V201101; module CustomTargetingService
12
12
  class CustomTargetingService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201101'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201101)
16
+ end
17
+
18
+ def perform_custom_targeting_key_action(*args)
19
+ return execute_action('perform_custom_targeting_key_action', args)
16
20
  end
17
21
 
18
22
  def perform_custom_targeting_value_action(*args)
@@ -43,10 +47,6 @@ module DfpApi; module V201101; module CustomTargetingService
43
47
  return execute_action('get_custom_targeting_values_by_statement', args)
44
48
  end
45
49
 
46
- def perform_custom_targeting_key_action(*args)
47
- return execute_action('perform_custom_targeting_key_action', args)
48
- end
49
-
50
50
  private
51
51
 
52
52
  def get_service_registry()
@@ -3,12 +3,13 @@
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.4.0 on 2011-06-17 15:26:32.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:30.
7
7
 
8
8
  module DfpApi; module V201101; module CustomTargetingService
9
9
  class CustomTargetingServiceRegistry
10
- CUSTOMTARGETINGSERVICE_METHODS = {:perform_custom_targeting_value_action=>{:input=>[{:type=>"CustomTargetingValueAction", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_value_action}, {:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"perform_custom_targeting_value_action_response"}}, :create_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :max_occurs=>nil, :name=>:keys}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_custom_targeting_keys_response"}}, :update_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :max_occurs=>nil, :name=>:keys}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_custom_targeting_keys_response"}}, :create_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>nil, :name=>:values}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_custom_targeting_values_response"}}, :update_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>nil, :name=>:values}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_custom_targeting_values_response"}}, :get_custom_targeting_keys_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"CustomTargetingKeyPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_custom_targeting_keys_by_statement_response"}}, :get_custom_targeting_values_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"CustomTargetingValuePage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_custom_targeting_values_by_statement_response"}}, :perform_custom_targeting_key_action=>{:input=>[{:type=>"CustomTargetingKeyAction", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_key_action}, {:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"perform_custom_targeting_key_action_response"}}}
11
- CUSTOMTARGETINGSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :CustomTargetingKey=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:display_name}, {:type=>"CustomTargetingKey.Type", :min_occurs=>0, :max_occurs=>1, :name=>:type}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:num_changes}]}, :DeleteCustomTargetingValueAction=>{:fields=>[], :base=>"DeleteCustomTargetingValues"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :CustomTargetingKeyPage=>{: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=>"CustomTargetingKey", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :DeleteCustomTargetingValues=>{:fields=>[], :base=>"CustomTargetingValueAction"}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_key_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:display_name}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :max_occurs=>1, :name=>:match_type}]}, :CustomTargetingKeyAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_key_action_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :CustomTargetingValuePage=>{: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=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:auth_token}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:o_auth_token}]}, :CustomTargetingValueAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_value_action_type}], :abstract=>true}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :DeleteCustomTargetingKeyAction=>{:fields=>[], :base=>"DeleteCustomTargetingKeys"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :DeleteCustomTargetingKeys=>{:fields=>[], :base=>"CustomTargetingKeyAction"}}
10
+ CUSTOMTARGETINGSERVICE_METHODS = {:perform_custom_targeting_key_action=>{:input=>[{:type=>"CustomTargetingKeyAction", :min_occurs=>0, :name=>:custom_targeting_key_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_custom_targeting_key_action_response"}}, :perform_custom_targeting_value_action=>{:input=>[{:type=>"CustomTargetingValueAction", :min_occurs=>0, :name=>:custom_targeting_value_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_custom_targeting_value_action_response"}}, :create_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:keys, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_custom_targeting_keys_response"}}, :update_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:keys, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_custom_targeting_keys_response"}}, :create_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_custom_targeting_values_response"}}, :update_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_custom_targeting_values_response"}}, :get_custom_targeting_keys_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CustomTargetingKeyPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_custom_targeting_keys_by_statement_response"}}, :get_custom_targeting_values_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CustomTargetingValuePage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_custom_targeting_values_by_statement_response"}}}
11
+ CUSTOMTARGETINGSERVICE_TYPES = {:DeleteCustomTargetingKeys=>{:base=>"CustomTargetingKeyAction", :fields=>[]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :CustomTargetingKey=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingKey.Type", :min_occurs=>0, :name=>:type, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :DeleteCustomTargetingValueAction=>{:base=>"DeleteCustomTargetingValues", :fields=>[]}, :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}]}, :CustomTargetingKeyPage=>{: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=>"CustomTargetingKey", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :DeleteCustomTargetingValues=>{:base=>"CustomTargetingValueAction", :fields=>[]}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:custom_targeting_key_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=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :name=>:match_type, :max_occurs=>1}]}, :CustomTargetingKeyAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_targeting_key_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :CustomTargetingValuePage=>{: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=>"CustomTargetingValue", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :CustomTargetingValueAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_targeting_value_action_type, :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}]}, :DeleteCustomTargetingKeyAction=>{:base=>"DeleteCustomTargetingKeys", :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}]}}
12
+ CUSTOMTARGETINGSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return CUSTOMTARGETINGSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module CustomTargetingService
17
18
  def self.get_type_signature(type_name)
18
19
  return CUSTOMTARGETINGSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return CUSTOMTARGETINGSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module CustomTargetingService
29
34
  class ApiException < ApplicationException
30
35
  attr_reader :errors # ApiError
31
36
  def initialize(exception_fault)
32
- @array_fields = [] if !defined?(@array_fields)
37
+ @array_fields ||= []
33
38
  @array_fields << 'errors'
34
39
  super(exception_fault)
35
40
  end
@@ -3,16 +3,16 @@
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.4.0 on 2011-06-17 15:26:52.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:53.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201101/forecast_service_registry'
10
10
 
11
11
  module DfpApi; module V201101; module ForecastService
12
12
  class ForecastService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201101'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201101)
16
16
  end
17
17
 
18
18
  def get_forecast_by_id(*args)
@@ -3,12 +3,13 @@
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.4.0 on 2011-06-17 15:26:52.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:53.
7
7
 
8
8
  module DfpApi; module V201101; module ForecastService
9
9
  class ForecastServiceRegistry
10
- FORECASTSERVICE_METHODS = {:get_forecast_by_id=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_id}], :output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_forecast_by_id_response"}}, :get_forecast=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>1, :name=>:line_item}], :output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_forecast_response"}}}
11
- FORECASTSERVICE_TYPES = {:Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:currency_code}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:micro_amount}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :min_occurs=>0, :max_occurs=>nil, :name=>:targeted_locations}, {:type=>"Location", :min_occurs=>0, :max_occurs=>nil, :name=>:excluded_locations}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:impressions_delivered}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:clicks_delivered}]}, :Location=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:location_type}]}, :CustomCriteriaNode=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:custom_criteria_node_type}], :abstract=>true}, :InventoryTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>nil, :name=>:targeted_ad_unit_ids}, {:type=>"string", :min_occurs=>0, :max_occurs=>nil, :name=>:excluded_ad_unit_ids}, {:type=>"long", :min_occurs=>0, :max_occurs=>nil, :name=>:targeted_placement_ids}]}, :Forecast=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:order_id}, {:type=>"UnitType", :min_occurs=>0, :max_occurs=>1, :name=>:unit_type}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:available_units}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:delivered_units}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:matched_units}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:possible_units}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:reserved_units}]}, :Targeting=>{:fields=>[{:type=>"GeoTargeting", :min_occurs=>0, :max_occurs=>1, :name=>:geo_targeting}, {:type=>"InventoryTargeting", :min_occurs=>0, :max_occurs=>1, :name=>:inventory_targeting}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting}]}, :MetroLocation=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:metro_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:country_code}], :base=>"Location"}, :DeliveryData=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>nil, :name=>:units}]}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_key_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:display_name}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :max_occurs=>1, :name=>:match_type}]}, :CityLocation=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:city_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:region_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:country_code}], :base=>"Location"}, :DeliveryIndicator=>{:fields=>[{:type=>"double", :min_occurs=>0, :max_occurs=>1, :name=>:expected_delivery_percentage}, {:type=>"double", :min_occurs=>0, :max_occurs=>1, :name=>:actual_delivery_percentage}]}, :LineItem=>{:fields=>[{:type=>"Targeting", :min_occurs=>0, :max_occurs=>1, :name=>:targeting}], :base=>"LineItemSummary"}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:year}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:month}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:day}]}, :CountryLocation=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:country_code}], :base=>"Location"}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:auth_token}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:o_auth_token}]}, :PredefinedCustomCriteria=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>nil, :name=>:value_ids}], :base=>"CustomCriteria"}, :FreeFormCustomCriteria=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>nil, :name=>:values}], :base=>"CustomCriteria"}, :CustomCriteria=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:key_id}, {:type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :max_occurs=>1, :name=>:operator}], :base=>"CustomCriteriaNode"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :RegionLocation=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:region_code}], :base=>"Location"}, :FrequencyCap=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:max_impressions}, {:type=>"TimeUnit", :min_occurs=>0, :max_occurs=>1, :name=>:time_unit}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :max_occurs=>1, :name=>:date}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:hour}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:minute}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:second}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:time_zone_id}]}, :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}]}, :LineItemSummary=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:order_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:order_name}, {:type=>"DateTime", :min_occurs=>0, :max_occurs=>1, :name=>:start_date_time}, {:type=>"StartDateTimeType", :min_occurs=>0, :max_occurs=>1, :name=>:start_date_time_type}, {:type=>"DateTime", :min_occurs=>0, :max_occurs=>1, :name=>:end_date_time}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:unlimited_end_date_time}, {:type=>"CreativeRotationType", :min_occurs=>0, :max_occurs=>1, :name=>:creative_rotation_type}, {:type=>"DeliveryRateType", :min_occurs=>0, :max_occurs=>1, :name=>:delivery_rate_type}, {:type=>"RoadblockingType", :min_occurs=>0, :max_occurs=>1, :name=>:roadblocking_type}, {:type=>"FrequencyCap", :min_occurs=>0, :max_occurs=>nil, :name=>:frequency_caps}, {:type=>"LineItemType", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_type}, {:type=>"UnitType", :min_occurs=>0, :max_occurs=>1, :name=>:unit_type}, {:type=>"LineItemSummary.Duration", :min_occurs=>0, :max_occurs=>1, :name=>:duration}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:units_bought}, {:type=>"Money", :min_occurs=>0, :max_occurs=>1, :name=>:cost_per_unit}, {:type=>"Money", :min_occurs=>0, :max_occurs=>1, :name=>:value_cost_per_unit}, {:type=>"CostType", :min_occurs=>0, :max_occurs=>1, :name=>:cost_type}, {:type=>"LineItemDiscountType", :min_occurs=>0, :max_occurs=>1, :name=>:discount_type}, {:type=>"double", :min_occurs=>0, :max_occurs=>1, :name=>:discount}, {:type=>"Size", :min_occurs=>0, :max_occurs=>nil, :name=>:creative_sizes}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:allow_overbook}, {:type=>"Stats", :min_occurs=>0, :max_occurs=>1, :name=>:stats}, {:type=>"DeliveryIndicator", :min_occurs=>0, :max_occurs=>1, :name=>:delivery_indicator}, {:type=>"DeliveryData", :min_occurs=>0, :max_occurs=>1, :name=>:delivery_data}, {:type=>"Money", :min_occurs=>0, :max_occurs=>1, :name=>:budget}, {:type=>"ComputedStatus", :min_occurs=>0, :max_occurs=>1, :name=>:status}, {:type=>"LineItemSummary.ReservationStatus", :min_occurs=>0, :max_occurs=>1, :name=>:reservation_status}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_archived}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_summary_type}]}, :CustomCriteriaSet=>{:fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :max_occurs=>1, :name=>:logical_operator}, {:type=>"CustomCriteriaNode", :min_occurs=>0, :max_occurs=>nil, :name=>:children}], :base=>"CustomCriteriaNode"}}
10
+ FORECASTSERVICE_METHODS = {:get_forecast_by_id=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_forecast_by_id_response"}}, :get_forecast=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_forecast_response"}}}
11
+ FORECASTSERVICE_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}]}, :LineItemSummary=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:order_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=>"string", :min_occurs=>0, :name=>:order_name, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"StartDateTimeType", :min_occurs=>0, :name=>:start_date_time_type, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:unlimited_end_date_time, :max_occurs=>1}, {:type=>"CreativeRotationType", :min_occurs=>0, :name=>:creative_rotation_type, :max_occurs=>1}, {:type=>"DeliveryRateType", :min_occurs=>0, :name=>:delivery_rate_type, :max_occurs=>1}, {:type=>"RoadblockingType", :min_occurs=>0, :name=>:roadblocking_type, :max_occurs=>1}, {:type=>"FrequencyCap", :min_occurs=>0, :name=>:frequency_caps, :max_occurs=>:unbounded}, {:type=>"LineItemType", :min_occurs=>0, :name=>:line_item_type, :max_occurs=>1}, {:type=>"UnitType", :min_occurs=>0, :name=>:unit_type, :max_occurs=>1}, {:type=>"LineItemSummary.Duration", :min_occurs=>0, :name=>:duration, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:units_bought, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:cost_per_unit, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:value_cost_per_unit, :max_occurs=>1}, {:type=>"CostType", :min_occurs=>0, :name=>:cost_type, :max_occurs=>1}, {:type=>"LineItemDiscountType", :min_occurs=>0, :name=>:discount_type, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:discount, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:creative_sizes, :max_occurs=>:unbounded}, {:type=>"boolean", :min_occurs=>0, :name=>:allow_overbook, :max_occurs=>1}, {:type=>"Stats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}, {:type=>"DeliveryIndicator", :min_occurs=>0, :name=>:delivery_indicator, :max_occurs=>1}, {:type=>"DeliveryData", :min_occurs=>0, :name=>:delivery_data, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:budget, :max_occurs=>1}, {:type=>"ComputedStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemSummary.ReservationStatus", :min_occurs=>0, :name=>:reservation_status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_archived, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:line_item_summary_type, :max_occurs=>1}]}, :CustomCriteriaSet=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :name=>:logical_operator, :max_occurs=>1}, {:type=>"CustomCriteriaNode", :min_occurs=>0, :name=>:children, :max_occurs=>:unbounded}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :min_occurs=>0, :name=>:targeted_locations, :max_occurs=>:unbounded}, {:type=>"Location", :min_occurs=>0, :name=>:excluded_locations, :max_occurs=>:unbounded}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:clicks_delivered, :max_occurs=>1}]}, :Location=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:location_type, :max_occurs=>1}]}, :CustomCriteriaNode=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_criteria_node_type, :max_occurs=>1}]}, :InventoryTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>:unbounded}, {:type=>"string", :min_occurs=>0, :name=>:excluded_ad_unit_ids, :max_occurs=>:unbounded}, {:type=>"long", :min_occurs=>0, :name=>:targeted_placement_ids, :max_occurs=>:unbounded}]}, :Forecast=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}, {:type=>"UnitType", :min_occurs=>0, :name=>:unit_type, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:available_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:delivered_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:matched_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:possible_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:reserved_units, :max_occurs=>1}]}, :Targeting=>{:fields=>[{:type=>"GeoTargeting", :min_occurs=>0, :name=>:geo_targeting, :max_occurs=>1}, {:type=>"InventoryTargeting", :min_occurs=>0, :name=>:inventory_targeting, :max_occurs=>1}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :name=>:custom_targeting, :max_occurs=>1}]}, :MetroLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:metro_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :DeliveryData=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:units, :max_occurs=>:unbounded}]}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:custom_targeting_key_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=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :name=>:match_type, :max_occurs=>1}]}, :CityLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:city_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :DeliveryIndicator=>{:fields=>[{:type=>"double", :min_occurs=>0, :name=>:expected_delivery_percentage, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:actual_delivery_percentage, :max_occurs=>1}]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :LineItem=>{:base=>"LineItemSummary", :fields=>[{:type=>"Targeting", :min_occurs=>0, :name=>:targeting, :max_occurs=>1}]}, :CountryLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :PredefinedCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:value_ids, :max_occurs=>:unbounded}]}, :FreeFormCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :CustomCriteria=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:key_id, :max_occurs=>1}, {:type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :name=>:operator, :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}]}, :RegionLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}]}, :FrequencyCap=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:max_impressions, :max_occurs=>1}, {:type=>"TimeUnit", :min_occurs=>0, :name=>:time_unit, :max_occurs=>1}]}}
12
+ FORECASTSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return FORECASTSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module ForecastService
17
18
  def self.get_type_signature(type_name)
18
19
  return FORECASTSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return FORECASTSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module ForecastService
29
34
  class ApiException < ApplicationException
30
35
  attr_reader :errors # ApiError
31
36
  def initialize(exception_fault)
32
- @array_fields = [] if !defined?(@array_fields)
37
+ @array_fields ||= []
33
38
  @array_fields << 'errors'
34
39
  super(exception_fault)
35
40
  end
@@ -3,16 +3,20 @@
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.4.0 on 2011-06-17 15:26:48.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:49.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201101/inventory_service_registry'
10
10
 
11
11
  module DfpApi; module V201101; module InventoryService
12
12
  class InventoryService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201101'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201101)
16
+ end
17
+
18
+ def get_ad_unit(*args)
19
+ return execute_action('get_ad_unit', args)
16
20
  end
17
21
 
18
22
  def get_ad_units_by_statement(*args)
@@ -39,10 +43,6 @@ module DfpApi; module V201101; module InventoryService
39
43
  return execute_action('create_ad_units', args)
40
44
  end
41
45
 
42
- def get_ad_unit(*args)
43
- return execute_action('get_ad_unit', args)
44
- end
45
-
46
46
  private
47
47
 
48
48
  def get_service_registry()
@@ -3,12 +3,13 @@
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.4.0 on 2011-06-17 15:26:48.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:49.
7
7
 
8
8
  module DfpApi; module V201101; module InventoryService
9
9
  class InventoryServiceRegistry
10
- INVENTORYSERVICE_METHODS = {:get_ad_units_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"AdUnitPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_ad_units_by_statement_response"}}, :perform_ad_unit_action=>{:input=>[{:type=>"AdUnitAction", :min_occurs=>0, :max_occurs=>1, :name=>:ad_unit_action}, {:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"perform_ad_unit_action_response"}}, :update_ad_unit=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>1, :name=>:ad_unit}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_ad_unit_response"}}, :create_ad_unit=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>1, :name=>:ad_unit}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_ad_unit_response"}}, :update_ad_units=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>nil, :name=>:ad_units}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_ad_units_response"}}, :create_ad_units=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>nil, :name=>:ad_units}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_ad_units_response"}}, :get_ad_unit=>{:input=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:ad_unit_id}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_ad_unit_response"}}}
11
- INVENTORYSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :AdSenseSettings=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:ad_sense_enabled}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:border_color}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:title_color}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:background_color}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:text_color}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:url_color}, {:type=>"AdSenseSettings.AdType", :min_occurs=>0, :max_occurs=>1, :name=>:ad_type}, {:type=>"AdSenseSettings.BorderStyle", :min_occurs=>0, :max_occurs=>1, :name=>:border_style}, {:type=>"AdSenseSettings.FontFamily", :min_occurs=>0, :max_occurs=>1, :name=>:font_family}, {:type=>"AdSenseSettings.FontSize", :min_occurs=>0, :max_occurs=>1, :name=>:font_size}, {:type=>"Size_StringMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:afc_formats}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:num_changes}]}, :ActivateAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :AdSenseSettingsInheritedProperty=>{:fields=>[{:type=>"AdSenseSettings", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :ArchiveAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :AdUnitAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:ad_unit_action_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :AssignAdUnitsToPlacement=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:placement_id}], :base=>"AdUnitAction"}, :AdUnit=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parent_id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:description}, {:type=>"AdUnit.TargetWindow", :min_occurs=>0, :max_occurs=>1, :name=>:target_window}, {:type=>"InventoryStatus", :min_occurs=>0, :max_occurs=>1, :name=>:status}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:ad_unit_code}, {:type=>"Size", :min_occurs=>0, :max_occurs=>nil, :name=>:sizes}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:explicitly_targeted}, {:type=>"AdSenseSettingsInheritedProperty", :min_occurs=>0, :max_occurs=>1, :name=>:inherited_ad_sense_settings}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:auth_token}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:o_auth_token}]}, :DeactivateAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :AdUnitPage=>{: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=>"AdUnit", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :Size_StringMapEntry=>{:fields=>[{:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>: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}]}}
10
+ INVENTORYSERVICE_METHODS = {:get_ad_unit=>{:input=>[{:type=>"string", :min_occurs=>0, :name=>:ad_unit_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_ad_unit_response"}}, :get_ad_units_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnitPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_ad_units_by_statement_response"}}, :perform_ad_unit_action=>{:input=>[{:type=>"AdUnitAction", :min_occurs=>0, :name=>:ad_unit_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_ad_unit_action_response"}}, :update_ad_unit=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_unit, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_ad_unit_response"}}, :create_ad_unit=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_unit, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_ad_unit_response"}}, :update_ad_units=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_units, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_ad_units_response"}}, :create_ad_units=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_units, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_ad_units_response"}}}
11
+ INVENTORYSERVICE_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}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :AdSenseSettings=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:ad_sense_enabled, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:border_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:title_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:background_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:text_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:url_color, :max_occurs=>1}, {:type=>"AdSenseSettings.AdType", :min_occurs=>0, :name=>:ad_type, :max_occurs=>1}, {:type=>"AdSenseSettings.BorderStyle", :min_occurs=>0, :name=>:border_style, :max_occurs=>1}, {:type=>"AdSenseSettings.FontFamily", :min_occurs=>0, :name=>:font_family, :max_occurs=>1}, {:type=>"AdSenseSettings.FontSize", :min_occurs=>0, :name=>:font_size, :max_occurs=>1}, {:type=>"Size_StringMapEntry", :min_occurs=>0, :name=>:afc_formats, :max_occurs=>:unbounded}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :ActivateAdUnits=>{:base=>"AdUnitAction", :fields=>[]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :AdSenseSettingsInheritedProperty=>{:fields=>[{:type=>"AdSenseSettings", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ArchiveAdUnits=>{:base=>"AdUnitAction", :fields=>[]}, :AdUnitAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:ad_unit_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :AssignAdUnitsToPlacement=>{:base=>"AdUnitAction", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:placement_id, :max_occurs=>1}]}, :AdUnit=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:parent_id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:description, :max_occurs=>1}, {:type=>"AdUnit.TargetWindow", :min_occurs=>0, :name=>:target_window, :max_occurs=>1}, {:type=>"InventoryStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:ad_unit_code, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:sizes, :max_occurs=>:unbounded}, {:type=>"boolean", :min_occurs=>0, :name=>:explicitly_targeted, :max_occurs=>1}, {:type=>"AdSenseSettingsInheritedProperty", :min_occurs=>0, :name=>:inherited_ad_sense_settings, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :DeactivateAdUnits=>{:base=>"AdUnitAction", :fields=>[]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :AdUnitPage=>{: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=>"AdUnit", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :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}]}, :Size_StringMapEntry=>{:fields=>[{:type=>"Size", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}}
12
+ INVENTORYSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return INVENTORYSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module InventoryService
17
18
  def self.get_type_signature(type_name)
18
19
  return INVENTORYSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return INVENTORYSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module InventoryService
29
34
  class ApiException < ApplicationException
30
35
  attr_reader :errors # ApiError
31
36
  def initialize(exception_fault)
32
- @array_fields = [] if !defined?(@array_fields)
37
+ @array_fields ||= []
33
38
  @array_fields << 'errors'
34
39
  super(exception_fault)
35
40
  end
@@ -3,16 +3,20 @@
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.4.0 on 2011-06-17 15:27:03.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:06.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201101/line_item_creative_association_service_registry'
10
10
 
11
11
  module DfpApi; module V201101; module LineItemCreativeAssociationService
12
12
  class LineItemCreativeAssociationService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201101'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201101)
16
+ end
17
+
18
+ def perform_line_item_creative_association_action(*args)
19
+ return execute_action('perform_line_item_creative_association_action', args)
16
20
  end
17
21
 
18
22
  def update_line_item_creative_association(*args)
@@ -39,10 +43,6 @@ module DfpApi; module V201101; module LineItemCreativeAssociationService
39
43
  return execute_action('get_line_item_creative_associations_by_statement', args)
40
44
  end
41
45
 
42
- def perform_line_item_creative_association_action(*args)
43
- return execute_action('perform_line_item_creative_association_action', args)
44
- end
45
-
46
46
  private
47
47
 
48
48
  def get_service_registry()
@@ -3,12 +3,13 @@
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.4.0 on 2011-06-17 15:27:03.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:06.
7
7
 
8
8
  module DfpApi; module V201101; module LineItemCreativeAssociationService
9
9
  class LineItemCreativeAssociationServiceRegistry
10
- LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS = {:update_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_creative_association}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_line_item_creative_association_response"}}, :create_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_creative_association}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_line_item_creative_association_response"}}, :update_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>nil, :name=>:line_item_creative_associations}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_line_item_creative_associations_response"}}, :create_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>nil, :name=>:line_item_creative_associations}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_line_item_creative_associations_response"}}, :get_line_item_creative_association=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:creative_id}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_line_item_creative_association_response"}}, :get_line_item_creative_associations_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociationPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_line_item_creative_associations_by_statement_response"}}, :perform_line_item_creative_association_action=>{:input=>[{:type=>"LineItemCreativeAssociationAction", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_creative_association_action}, {:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"perform_line_item_creative_association_action_response"}}}
11
- LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:currency_code}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:micro_amount}]}, :LineItemCreativeAssociationAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_creative_association_action_type}], :abstract=>true}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:num_changes}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:impressions_delivered}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:clicks_delivered}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :LineItemCreativeAssociation=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:creative_id}, {:type=>"double", :min_occurs=>0, :max_occurs=>1, :name=>:manual_creative_rotation_weight}, {:type=>"DateTime", :min_occurs=>0, :max_occurs=>1, :name=>:start_date_time}, {:type=>"StartDateTimeType", :min_occurs=>0, :max_occurs=>1, :name=>:start_date_time_type}, {:type=>"DateTime", :min_occurs=>0, :max_occurs=>1, :name=>:end_date_time}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:destination_url}, {:type=>"Size", :min_occurs=>0, :max_occurs=>nil, :name=>:sizes}, {:type=>"LineItemCreativeAssociation.Status", :min_occurs=>0, :max_occurs=>1, :name=>:status}, {:type=>"LineItemCreativeAssociationStats", :min_occurs=>0, :max_occurs=>1, :name=>:stats}]}, :LineItemCreativeAssociationPage=>{: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=>"LineItemCreativeAssociation", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :LineItemCreativeAssociationStats=>{:fields=>[{:type=>"Stats", :min_occurs=>0, :max_occurs=>1, :name=>:stats}, {:type=>"Money", :min_occurs=>0, :max_occurs=>1, :name=>:cost_in_order_currency}]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:year}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:month}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:day}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:auth_token}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:o_auth_token}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :ActivateLineItemCreativeAssociations=>{:fields=>[], :base=>"LineItemCreativeAssociationAction"}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :DeactivateLineItemCreativeAssociations=>{:fields=>[], :base=>"LineItemCreativeAssociationAction"}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :max_occurs=>1, :name=>:date}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:hour}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:minute}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:second}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:time_zone_id}]}, :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}]}}
10
+ LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS = {:perform_line_item_creative_association_action=>{:input=>[{:type=>"LineItemCreativeAssociationAction", :min_occurs=>0, :name=>:line_item_creative_association_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_line_item_creative_association_action_response"}}, :update_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_association, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_line_item_creative_association_response"}}, :create_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_association, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_line_item_creative_association_response"}}, :update_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_associations, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_line_item_creative_associations_response"}}, :create_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_associations, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_line_item_creative_associations_response"}}, :get_line_item_creative_association=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_creative_association_response"}}, :get_line_item_creative_associations_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociationPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_creative_associations_by_statement_response"}}}
11
+ LINEITEMCREATIVEASSOCIATIONSERVICE_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}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :LineItemCreativeAssociationAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:line_item_creative_association_action_type, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:clicks_delivered, :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}]}, :LineItemCreativeAssociation=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:manual_creative_rotation_weight, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"StartDateTimeType", :min_occurs=>0, :name=>:start_date_time_type, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:destination_url, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:sizes, :max_occurs=>:unbounded}, {:type=>"LineItemCreativeAssociation.Status", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemCreativeAssociationStats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}]}, :LineItemCreativeAssociationPage=>{: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=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :LineItemCreativeAssociationStats=>{:fields=>[{:type=>"Stats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:cost_in_order_currency, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ActivateLineItemCreativeAssociations=>{:base=>"LineItemCreativeAssociationAction", :fields=>[]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :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}]}, :DeactivateLineItemCreativeAssociations=>{:base=>"LineItemCreativeAssociationAction", :fields=>[]}}
12
+ LINEITEMCREATIVEASSOCIATIONSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module LineItemCreativeAssociationService
17
18
  def self.get_type_signature(type_name)
18
19
  return LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return LINEITEMCREATIVEASSOCIATIONSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module LineItemCreativeAssociationService
29
34
  class ApiException < ApplicationException
30
35
  attr_reader :errors # ApiError
31
36
  def initialize(exception_fault)
32
- @array_fields = [] if !defined?(@array_fields)
37
+ @array_fields ||= []
33
38
  @array_fields << 'errors'
34
39
  super(exception_fault)
35
40
  end