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
@@ -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:28:19.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:34.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/network_service_registry'
10
10
 
11
11
  module DfpApi; module V201103; module NetworkService
12
12
  class NetworkService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201103'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201103)
16
+ end
17
+
18
+ def get_current_network(*args)
19
+ return execute_action('get_current_network', args)
16
20
  end
17
21
 
18
22
  def update_network(*args)
@@ -23,10 +27,6 @@ module DfpApi; module V201103; module NetworkService
23
27
  return execute_action('get_all_networks', args)
24
28
  end
25
29
 
26
- def get_current_network(*args)
27
- return execute_action('get_current_network', args)
28
- end
29
-
30
30
  private
31
31
 
32
32
  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:28:19.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:34.
7
7
 
8
8
  module DfpApi; module V201103; module NetworkService
9
9
  class NetworkServiceRegistry
10
- NETWORKSERVICE_METHODS = {:update_network=>{:input=>[{:type=>"Network", :min_occurs=>0, :max_occurs=>1, :name=>:network}], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_network_response"}}, :get_all_networks=>{:input=>[], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"get_all_networks_response"}}, :get_current_network=>{:input=>[], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_current_network_response"}}}
11
- NETWORKSERVICE_TYPES = {:Network=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:display_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:property_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:time_zone}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:currency_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:effective_root_ad_unit_id}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :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
+ NETWORKSERVICE_METHODS = {:get_current_network=>{:input=>[], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_current_network_response"}}, :update_network=>{:input=>[{:type=>"Network", :min_occurs=>0, :name=>:network, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_network_response"}}, :get_all_networks=>{:input=>[], :output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"get_all_networks_response"}}}
11
+ NETWORKSERVICE_TYPES = {:OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :Network=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:property_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:effective_root_ad_unit_id, :max_occurs=>1}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :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
+ NETWORKSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return NETWORKSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201103; module NetworkService
17
18
  def self.get_type_signature(type_name)
18
19
  return NETWORKSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return NETWORKSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201103; module NetworkService
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,24 +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:27:45.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:54.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/order_service_registry'
10
10
 
11
11
  module DfpApi; module V201103; module OrderService
12
12
  class OrderService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201103'
15
- super(endpoint, namespace)
16
- end
17
-
18
- def create_orders(*args)
19
- return execute_action('create_orders', args)
20
- end
21
-
22
- def get_order(*args)
23
- return execute_action('get_order', args)
15
+ super(api, endpoint, namespace, :v201103)
24
16
  end
25
17
 
26
18
  def get_orders_by_statement(*args)
@@ -43,6 +35,14 @@ module DfpApi; module V201103; module OrderService
43
35
  return execute_action('update_orders', args)
44
36
  end
45
37
 
38
+ def create_orders(*args)
39
+ return execute_action('create_orders', args)
40
+ end
41
+
42
+ def get_order(*args)
43
+ return execute_action('get_order', 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:45.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:54.
7
7
 
8
8
  module DfpApi; module V201103; module OrderService
9
9
  class OrderServiceRegistry
10
- ORDERSERVICE_METHODS = {:create_orders=>{:input=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>nil, :name=>:orders}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_orders_response"}}, :get_order=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:order_id}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_order_response"}}, :get_orders_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"OrderPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_orders_by_statement_response"}}, :perform_order_action=>{:input=>[{:type=>"OrderAction", :min_occurs=>0, :max_occurs=>1, :name=>:order_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_order_action_response"}}, :update_order=>{:input=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>1, :name=>:order}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_order_response"}}, :create_order=>{:input=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>1, :name=>:order}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_order_response"}}, :update_orders=>{:input=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>nil, :name=>:orders}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_orders_response"}}}
11
- ORDERSERVICE_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}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:num_changes}]}, :ResumeAndOverbookOrders=>{:fields=>[], :base=>"ResumeOrders"}, :ApproveAndOverbookOrders=>{:fields=>[], :base=>"ApproveOrders"}, :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"}, :ResumeOrders=>{:fields=>[], :base=>"OrderAction"}, :ApproveOrders=>{:fields=>[], :base=>"OrderAction"}, :SubmitOrdersForApproval=>{:fields=>[], :base=>"OrderAction"}, :OrderAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:order_action_type}], :abstract=>true}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :RetractOrders=>{:fields=>[], :base=>"OrderAction"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :ArchiveOrders=>{:fields=>[], :base=>"OrderAction"}, :SubmitOrdersForApprovalAndOverbook=>{:fields=>[], :base=>"SubmitOrdersForApproval"}, :Order=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"DateTime", :min_occurs=>0, :max_occurs=>1, :name=>:start_date_time}, {: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=>"OrderStatus", :min_occurs=>0, :max_occurs=>1, :name=>:status}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_archived}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:notes}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:external_id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:currency_code}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:advertiser_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:agency_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:creator_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:trafficker_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:salesperson_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:total_impressions_delivered}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:total_clicks_delivered}, {:type=>"Money", :min_occurs=>0, :max_occurs=>1, :name=>:total_budget}]}, :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=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :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"}, :OrderPage=>{: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=>"Order", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :DisapproveOrders=>{:fields=>[], :base=>"OrderAction"}, :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}]}, :UnarchiveOrders=>{:fields=>[], :base=>"OrderAction"}, :PauseOrders=>{:fields=>[], :base=>"OrderAction"}}
10
+ ORDERSERVICE_METHODS = {:get_orders_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"OrderPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_orders_by_statement_response"}}, :perform_order_action=>{:input=>[{:type=>"OrderAction", :min_occurs=>0, :name=>:order_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_order_action_response"}}, :update_order=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:order, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_order_response"}}, :create_order=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:order, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_order_response"}}, :update_orders=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:orders, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_orders_response"}}, :create_orders=>{:input=>[{:type=>"Order", :min_occurs=>0, :name=>:orders, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_orders_response"}}, :get_order=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Order", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_order_response"}}}
11
+ ORDERSERVICE_TYPES = {:UnarchiveOrders=>{:base=>"OrderAction", :fields=>[]}, :PauseOrders=>{:base=>"OrderAction", :fields=>[]}, :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}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :ResumeAndOverbookOrders=>{:base=>"ResumeOrders", :fields=>[]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :ApproveAndOverbookOrders=>{:base=>"ApproveOrders", :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}]}, :ResumeOrders=>{:base=>"OrderAction", :fields=>[]}, :ApproveOrders=>{:base=>"OrderAction", :fields=>[]}, :SubmitOrdersForApproval=>{:base=>"OrderAction", :fields=>[]}, :OrderAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:order_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :RetractOrders=>{:base=>"OrderAction", :fields=>[]}, :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}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :ArchiveOrders=>{:base=>"OrderAction", :fields=>[]}, :SubmitOrdersForApprovalAndOverbook=>{:base=>"SubmitOrdersForApproval", :fields=>[]}, :Order=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :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=>"OrderStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_archived, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:notes, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:external_id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:advertiser_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:agency_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creator_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:trafficker_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:salesperson_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:total_impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:total_clicks_delivered, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:total_budget, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :OrderPage=>{: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=>"Order", :min_occurs=>0, :name=>:results, :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}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :DisapproveOrders=>{:base=>"OrderAction", :fields=>[]}}
12
+ ORDERSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return ORDERSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201103; module OrderService
17
18
  def self.get_type_signature(type_name)
18
19
  return ORDERSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return ORDERSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201103; module OrderService
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:28:12.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:25.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/placement_service_registry'
10
10
 
11
11
  module DfpApi; module V201103; module PlacementService
12
12
  class PlacementService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201103'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201103)
16
16
  end
17
17
 
18
18
  def perform_placement_action(*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:28:12.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:25.
7
7
 
8
8
  module DfpApi; module V201103; module PlacementService
9
9
  class PlacementServiceRegistry
10
- PLACEMENTSERVICE_METHODS = {:perform_placement_action=>{:input=>[{:type=>"PlacementAction", :min_occurs=>0, :max_occurs=>1, :name=>:placement_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_placement_action_response"}}, :update_placement=>{:input=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>1, :name=>:placement}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_placement_response"}}, :create_placement=>{:input=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>1, :name=>:placement}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_placement_response"}}, :update_placements=>{:input=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>nil, :name=>:placements}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_placements_response"}}, :create_placements=>{:input=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>nil, :name=>:placements}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_placements_response"}}, :get_placement=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:placement_id}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_placement_response"}}, :get_placements_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"PlacementPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_placements_by_statement_response"}}}
11
- PLACEMENTSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :ArchivePlacements=>{:fields=>[], :base=>"PlacementAction"}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:num_changes}]}, :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"}, :DeactivatePlacements=>{:fields=>[], :base=>"PlacementAction"}, :PlacementAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:placement_action_type}], :abstract=>true}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :Placement=>{: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=>:description}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:placement_code}, {:type=>"InventoryStatus", :min_occurs=>0, :max_occurs=>1, :name=>:status}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_ad_sense_targeting_enabled}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_ad_planner_targeting_enabled}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:ad_sense_targeting_locale}, {:type=>"string", :min_occurs=>0, :max_occurs=>nil, :name=>:targeted_ad_unit_ids}], :base=>"SiteTargetingInfo"}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :SiteTargetingInfo=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:targeting_description}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:targeting_site_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:targeting_ad_location}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:site_targeting_info_type}]}, :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}]}, :ActivatePlacements=>{:fields=>[], :base=>"PlacementAction"}, :PlacementPage=>{: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=>"Placement", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}}
10
+ PLACEMENTSERVICE_METHODS = {:perform_placement_action=>{:input=>[{:type=>"PlacementAction", :min_occurs=>0, :name=>:placement_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_placement_action_response"}}, :update_placement=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_placement_response"}}, :create_placement=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_placement_response"}}, :update_placements=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placements, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_placements_response"}}, :create_placements=>{:input=>[{:type=>"Placement", :min_occurs=>0, :name=>:placements, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_placements_response"}}, :get_placement=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:placement_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Placement", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_placement_response"}}, :get_placements_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"PlacementPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_placements_by_statement_response"}}}
11
+ PLACEMENTSERVICE_TYPES = {:PlacementPage=>{: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=>"Placement", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :ArchivePlacements=>{:base=>"PlacementAction", :fields=>[]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :DeactivatePlacements=>{:base=>"PlacementAction", :fields=>[]}, :PlacementAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:placement_action_type, :max_occurs=>1}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :Placement=>{:base=>"SiteTargetingInfo", :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=>:description, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:placement_code, :max_occurs=>1}, {:type=>"InventoryStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_ad_sense_targeting_enabled, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_ad_planner_targeting_enabled, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:ad_sense_targeting_locale, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>:unbounded}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SiteTargetingInfo=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeting_description, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:targeting_site_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:targeting_ad_location, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:site_targeting_info_type, :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}]}, :ActivatePlacements=>{:base=>"PlacementAction", :fields=>[]}}
12
+ PLACEMENTSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return PLACEMENTSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201103; module PlacementService
17
18
  def self.get_type_signature(type_name)
18
19
  return PLACEMENTSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return PLACEMENTSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201103; module PlacementService
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:28:15.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:28.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/publisher_query_language_service_registry'
10
10
 
11
11
  module DfpApi; module V201103; module PublisherQueryLanguageService
12
12
  class PublisherQueryLanguageService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201103'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201103)
16
16
  end
17
17
 
18
18
  def select(*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:28:15.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:28.
7
7
 
8
8
  module DfpApi; module V201103; module PublisherQueryLanguageService
9
9
  class PublisherQueryLanguageServiceRegistry
10
- PUBLISHERQUERYLANGUAGESERVICE_METHODS = {:select=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:select_statement}], :output=>{:fields=>[{:type=>"ResultSet", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"select_response"}}}
11
- PUBLISHERQUERYLANGUAGESERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :ResultSet=>{:fields=>[{:type=>"ColumnType", :min_occurs=>0, :max_occurs=>nil, :name=>:column_types}, {:type=>"Row", :min_occurs=>0, :max_occurs=>nil, :name=>:rows}]}, :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"}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :ColumnType=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:label_name}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :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"}, :Row=>{:fields=>[{:type=>"Value", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :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
+ PUBLISHERQUERYLANGUAGESERVICE_METHODS = {:select=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:select_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"ResultSet", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"select_response"}}}
11
+ PUBLISHERQUERYLANGUAGESERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :ResultSet=>{:fields=>[{:type=>"ColumnType", :min_occurs=>0, :name=>:column_types, :max_occurs=>:unbounded}, {:type=>"Row", :min_occurs=>0, :name=>:rows, :max_occurs=>:unbounded}]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ColumnType=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:label_name, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Row=>{:fields=>[{:type=>"Value", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :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
+ PUBLISHERQUERYLANGUAGESERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return PUBLISHERQUERYLANGUAGESERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201103; module PublisherQueryLanguageService
17
18
  def self.get_type_signature(type_name)
18
19
  return PUBLISHERQUERYLANGUAGESERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return PUBLISHERQUERYLANGUAGESERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201103; module PublisherQueryLanguageService
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:27:58.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:07.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/report_service_registry'
10
10
 
11
11
  module DfpApi; module V201103; module ReportService
12
12
  class ReportService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201103'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201103)
16
16
  end
17
17
 
18
18
  def get_report_download_url(*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:27:58.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:08.
7
7
 
8
8
  module DfpApi; module V201103; module ReportService
9
9
  class ReportServiceRegistry
10
- REPORTSERVICE_METHODS = {:get_report_download_url=>{:original_name=>"getReportDownloadURL", :input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:report_job_id}, {:type=>"ExportFormat", :min_occurs=>0, :max_occurs=>1, :name=>:export_format}], :output=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_report_download_url_response"}}, :get_report_job=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:report_job_id}], :output=>{:fields=>[{:type=>"ReportJob", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_report_job_response"}}, :run_report_job=>{:input=>[{:type=>"ReportJob", :min_occurs=>0, :max_occurs=>1, :name=>:report_job}], :output=>{:fields=>[{:type=>"ReportJob", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"run_report_job_response"}}}
11
- REPORTSERVICE_TYPES = {:OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :ReportQuery=>{:fields=>[{:type=>"Dimension", :min_occurs=>0, :max_occurs=>nil, :name=>:dimensions}, {:type=>"Column", :min_occurs=>0, :max_occurs=>nil, :name=>:columns}, {:type=>"Date", :min_occurs=>0, :max_occurs=>1, :name=>:start_date}, {:type=>"Date", :min_occurs=>0, :max_occurs=>1, :name=>:end_date}, {:type=>"DateRangeType", :min_occurs=>0, :max_occurs=>1, :name=>:date_range_type}, {:type=>"DimensionFilter", :min_occurs=>0, :max_occurs=>nil, :name=>:dimension_filters}]}, :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=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :ReportJob=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"ReportQuery", :min_occurs=>0, :max_occurs=>1, :name=>:report_query}, {:type=>"ReportJobStatus", :min_occurs=>0, :max_occurs=>1, :name=>:report_job_status}]}, :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
+ REPORTSERVICE_METHODS = {:get_report_download_url=>{:original_name=>"getReportDownloadURL", :input=>[{:type=>"long", :min_occurs=>0, :name=>:report_job_id, :max_occurs=>1}, {:type=>"ExportFormat", :min_occurs=>0, :name=>:export_format, :max_occurs=>1}], :output=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_report_download_url_response"}}, :get_report_job=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:report_job_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"ReportJob", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_report_job_response"}}, :run_report_job=>{:input=>[{:type=>"ReportJob", :min_occurs=>0, :name=>:report_job, :max_occurs=>1}], :output=>{:fields=>[{:type=>"ReportJob", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"run_report_job_response"}}}
11
+ REPORTSERVICE_TYPES = {:OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_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}]}, :ReportQuery=>{:fields=>[{:type=>"Dimension", :min_occurs=>0, :name=>:dimensions, :max_occurs=>:unbounded}, {:type=>"Column", :min_occurs=>0, :name=>:columns, :max_occurs=>:unbounded}, {:type=>"Date", :min_occurs=>0, :name=>:start_date, :max_occurs=>1}, {:type=>"Date", :min_occurs=>0, :name=>:end_date, :max_occurs=>1}, {:type=>"DateRangeType", :min_occurs=>0, :name=>:date_range_type, :max_occurs=>1}, {:type=>"DimensionFilter", :min_occurs=>0, :name=>:dimension_filters, :max_occurs=>:unbounded}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :ReportJob=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"ReportQuery", :min_occurs=>0, :name=>:report_query, :max_occurs=>1}, {:type=>"ReportJobStatus", :min_occurs=>0, :name=>:report_job_status, :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
+ REPORTSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return REPORTSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201103; module ReportService
17
18
  def self.get_type_signature(type_name)
18
19
  return REPORTSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return REPORTSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201103; module ReportService
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:52.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:01.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/user_service_registry'
10
10
 
11
11
  module DfpApi; module V201103; module UserService
12
12
  class UserService < AdsCommon::SavonService
13
- def initialize(endpoint)
13
+ def initialize(api, endpoint)
14
14
  namespace = 'https://www.google.com/apis/ads/publisher/v201103'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201103)
16
+ end
17
+
18
+ def create_users(*args)
19
+ return execute_action('create_users', args)
16
20
  end
17
21
 
18
22
  def update_users(*args)
@@ -43,10 +47,6 @@ module DfpApi; module V201103; module UserService
43
47
  return execute_action('update_user', args)
44
48
  end
45
49
 
46
- def create_users(*args)
47
- return execute_action('create_users', 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:27:52.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:34:01.
7
7
 
8
8
  module DfpApi; module V201103; module UserService
9
9
  class UserServiceRegistry
10
- USERSERVICE_METHODS = {:update_users=>{:input=>[{:type=>"User", :min_occurs=>0, :max_occurs=>nil, :name=>:users}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_users_response"}}, :get_all_roles=>{:input=>[], :output=>{:fields=>[{:type=>"Role", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"get_all_roles_response"}}, :get_user=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:user_id}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_user_response"}}, :get_users_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"UserPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_users_by_statement_response"}}, :perform_user_action=>{:input=>[{:type=>"UserAction", :min_occurs=>0, :max_occurs=>1, :name=>:user_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_user_action_response"}}, :create_user=>{:input=>[{:type=>"User", :min_occurs=>0, :max_occurs=>1, :name=>:user}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_user_response"}}, :update_user=>{:input=>[{:type=>"User", :min_occurs=>0, :max_occurs=>1, :name=>:user}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_user_response"}}, :create_users=>{:input=>[{:type=>"User", :min_occurs=>0, :max_occurs=>nil, :name=>:users}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_users_response"}}}
11
- USERSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :UserRecord=>{: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=>:email}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:role_id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:role_name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:preferred_locale}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:user_record_type}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:num_changes}]}, :ActivateUsers=>{:fields=>[], :base=>"UserAction"}, :UserPage=>{: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=>"User", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :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"}, :DeactivateUsers=>{:fields=>[], :base=>"UserAction"}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :Role=>{: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=>:description}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :UserAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:user_action_type}], :abstract=>true}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :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"}, :User=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_active}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_email_notification_allowed}], :base=>"UserRecord"}, :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
+ USERSERVICE_METHODS = {:create_users=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:users, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_users_response"}}, :update_users=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:users, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_users_response"}}, :get_all_roles=>{:input=>[], :output=>{:fields=>[{:type=>"Role", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"get_all_roles_response"}}, :get_user=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:user_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_user_response"}}, :get_users_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UserPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_users_by_statement_response"}}, :perform_user_action=>{:input=>[{:type=>"UserAction", :min_occurs=>0, :name=>:user_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_user_action_response"}}, :create_user=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:user, :max_occurs=>1}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_user_response"}}, :update_user=>{:input=>[{:type=>"User", :min_occurs=>0, :name=>:user, :max_occurs=>1}], :output=>{:fields=>[{:type=>"User", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_user_response"}}}
11
+ USERSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :UserRecord=>{: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=>:email, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:role_id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:role_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:preferred_locale, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:user_record_type, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :ActivateUsers=>{:base=>"UserAction", :fields=>[]}, :UserPage=>{: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=>"User", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :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}]}, :DeactivateUsers=>{:base=>"UserAction", :fields=>[]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :Role=>{: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=>:description, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :UserAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:user_action_type, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :User=>{:base=>"UserRecord", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:is_active, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_email_notification_allowed, :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
+ USERSERVICE_NAMESPACES = []
12
13
 
13
14
  def self.get_method_signature(method_name)
14
15
  return USERSERVICE_METHODS[method_name.to_sym]
@@ -17,6 +18,10 @@ module DfpApi; module V201103; module UserService
17
18
  def self.get_type_signature(type_name)
18
19
  return USERSERVICE_TYPES[type_name.to_sym]
19
20
  end
21
+
22
+ def self.get_namespace(index)
23
+ return USERSERVICE_NAMESPACES[index]
24
+ end
20
25
  end
21
26
 
22
27
  # Base class for exceptions.
@@ -29,7 +34,7 @@ module DfpApi; module V201103; module UserService
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:27:17.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:21.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201104/company_service_registry'
10
10
 
11
11
  module DfpApi; module V201104; 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/v201104'
15
- super(endpoint, namespace)
15
+ super(api, endpoint, namespace, :v201104)
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:27:17.
6
+ # Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:21.
7
7
 
8
8
  module DfpApi; module V201104; 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"}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :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}]}, :OAuth=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:parameters, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :CompanyPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"Company", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Authentication=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:authentication_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"Authentication", :min_occurs=>0, :name=>:authentication, :max_occurs=>1}]}, :ClientLogin=>{:base=>"Authentication", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:token, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
12
+ COMPANYSERVICE_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 V201104; 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 V201104; 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