google-dfp-api 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. data/ChangeLog +7 -1
  2. data/README +11 -11
  3. data/Rakefile +13 -11
  4. data/examples/v201103/common/error_handling.rb +76 -0
  5. data/examples/v201103/company_service/create_companies.rb +82 -0
  6. data/examples/v201103/company_service/get_all_companies.rb +92 -0
  7. data/examples/v201103/company_service/get_companies_by_statement.rb +88 -0
  8. data/examples/v201103/company_service/get_company.rb +72 -0
  9. data/examples/v201103/company_service/update_companies.rb +95 -0
  10. data/examples/v201103/creative_service/copy_image_creatives.rb +117 -0
  11. data/examples/v201103/creative_service/create_creatives.rb +109 -0
  12. data/examples/v201103/creative_service/get_all_creatives.rb +93 -0
  13. data/examples/v201103/creative_service/get_creative.rb +72 -0
  14. data/examples/v201103/creative_service/get_creatives_by_statement.rb +87 -0
  15. data/examples/v201103/creative_service/update_creatives.rb +98 -0
  16. data/examples/v201103/custom_targeting_service/create_custom_targeting_keys_and_values.rb +118 -0
  17. data/examples/v201103/custom_targeting_service/delete_custom_targeting_keys.rb +121 -0
  18. data/examples/v201103/custom_targeting_service/delete_custom_targeting_values.rb +125 -0
  19. data/examples/v201103/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +148 -0
  20. data/examples/v201103/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +92 -0
  21. data/examples/v201103/custom_targeting_service/get_custom_targeting_values_by_statement.rb +98 -0
  22. data/examples/v201103/custom_targeting_service/update_custom_targeting_keys.rb +94 -0
  23. data/examples/v201103/custom_targeting_service/update_custom_targeting_values.rb +106 -0
  24. data/examples/v201103/forecast_service/get_forecast.rb +103 -0
  25. data/examples/v201103/forecast_service/get_forecast_by_id.rb +80 -0
  26. data/examples/v201103/inventory_service/create_ad_units.rb +98 -0
  27. data/examples/v201103/inventory_service/deactivate_ad_units.rb +119 -0
  28. data/examples/v201103/inventory_service/get_ad_unit.rb +72 -0
  29. data/examples/v201103/inventory_service/get_ad_units_by_statement.rb +96 -0
  30. data/examples/v201103/inventory_service/get_all_ad_units.rb +93 -0
  31. data/examples/v201103/inventory_service/update_ad_units.rb +94 -0
  32. data/examples/v201103/line_item_creative_association_service/create_licas.rb +94 -0
  33. data/examples/v201103/line_item_creative_association_service/deactivate_licas.rb +127 -0
  34. data/examples/v201103/line_item_creative_association_service/get_all_licas.rb +95 -0
  35. data/examples/v201103/line_item_creative_association_service/get_lica.rb +77 -0
  36. data/examples/v201103/line_item_creative_association_service/get_licas_by_statement.rb +91 -0
  37. data/examples/v201103/line_item_creative_association_service/update_licas.rb +92 -0
  38. data/examples/v201103/line_item_service/activate_line_items.rb +131 -0
  39. data/examples/v201103/line_item_service/create_line_items.rb +165 -0
  40. data/examples/v201103/line_item_service/get_all_line_items.rb +94 -0
  41. data/examples/v201103/line_item_service/get_line_item.rb +74 -0
  42. data/examples/v201103/line_item_service/get_line_items_by_statement.rb +89 -0
  43. data/examples/v201103/line_item_service/target_custom_criteria.rb +135 -0
  44. data/examples/v201103/line_item_service/update_line_items.rb +110 -0
  45. data/examples/v201103/network_service/get_all_networks.rb +74 -0
  46. data/examples/v201103/network_service/get_current_network.rb +66 -0
  47. data/examples/v201103/order_service/approve_orders.rb +116 -0
  48. data/examples/v201103/order_service/create_orders.rb +93 -0
  49. data/examples/v201103/order_service/get_all_orders.rb +93 -0
  50. data/examples/v201103/order_service/get_order.rb +74 -0
  51. data/examples/v201103/order_service/get_orders_by_statement.rb +90 -0
  52. data/examples/v201103/order_service/update_orders.rb +95 -0
  53. data/examples/v201103/placement_service/create_placements.rb +128 -0
  54. data/examples/v201103/placement_service/deactivate_placements.rb +118 -0
  55. data/examples/v201103/placement_service/get_all_placements.rb +93 -0
  56. data/examples/v201103/placement_service/get_placement.rb +74 -0
  57. data/examples/v201103/placement_service/get_placements_by_statement.rb +86 -0
  58. data/examples/v201103/placement_service/update_placements.rb +96 -0
  59. data/examples/v201103/publisher_query_language_service/get_all_cities.rb +85 -0
  60. data/examples/v201103/publisher_query_language_service/get_all_countries.rb +85 -0
  61. data/examples/v201103/publisher_query_language_service/get_all_metros.rb +85 -0
  62. data/examples/v201103/publisher_query_language_service/get_all_regions.rb +85 -0
  63. data/examples/v201103/report_service/download_report.rb +81 -0
  64. data/examples/v201103/report_service/run_delivery_report.rb +89 -0
  65. data/examples/v201103/report_service/run_inventory_report.rb +90 -0
  66. data/examples/v201103/report_service/run_sales_report.rb +89 -0
  67. data/examples/v201103/user_service/create_users.rb +89 -0
  68. data/examples/v201103/user_service/deactivate_users.rb +99 -0
  69. data/examples/v201103/user_service/get_all_roles.rb +73 -0
  70. data/examples/v201103/user_service/get_all_users.rb +92 -0
  71. data/examples/v201103/user_service/get_user.rb +73 -0
  72. data/examples/v201103/user_service/get_users_by_statement.rb +79 -0
  73. data/examples/v201103/user_service/update_users.rb +89 -0
  74. data/examples/v201104/common/error_handling.rb +76 -0
  75. data/examples/v201104/company_service/create_companies.rb +82 -0
  76. data/examples/v201104/company_service/get_all_companies.rb +92 -0
  77. data/examples/v201104/company_service/get_companies_by_statement.rb +88 -0
  78. data/examples/v201104/company_service/get_company.rb +72 -0
  79. data/examples/v201104/company_service/update_companies.rb +95 -0
  80. data/examples/v201104/creative_service/copy_image_creatives.rb +117 -0
  81. data/examples/v201104/creative_service/create_creatives.rb +109 -0
  82. data/examples/v201104/creative_service/get_all_creatives.rb +93 -0
  83. data/examples/v201104/creative_service/get_creative.rb +72 -0
  84. data/examples/v201104/creative_service/get_creatives_by_statement.rb +87 -0
  85. data/examples/v201104/creative_service/update_creatives.rb +98 -0
  86. data/examples/v201104/custom_targeting_service/create_custom_targeting_keys_and_values.rb +118 -0
  87. data/examples/v201104/custom_targeting_service/delete_custom_targeting_keys.rb +121 -0
  88. data/examples/v201104/custom_targeting_service/delete_custom_targeting_values.rb +125 -0
  89. data/examples/v201104/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +148 -0
  90. data/examples/v201104/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +92 -0
  91. data/examples/v201104/custom_targeting_service/get_custom_targeting_values_by_statement.rb +98 -0
  92. data/examples/v201104/custom_targeting_service/update_custom_targeting_keys.rb +94 -0
  93. data/examples/v201104/custom_targeting_service/update_custom_targeting_values.rb +106 -0
  94. data/examples/v201104/forecast_service/get_forecast.rb +103 -0
  95. data/examples/v201104/forecast_service/get_forecast_by_id.rb +80 -0
  96. data/examples/v201104/inventory_service/create_ad_units.rb +98 -0
  97. data/examples/v201104/inventory_service/deactivate_ad_units.rb +119 -0
  98. data/examples/v201104/inventory_service/get_ad_unit.rb +72 -0
  99. data/examples/v201104/inventory_service/get_ad_units_by_statement.rb +96 -0
  100. data/examples/v201104/inventory_service/get_all_ad_units.rb +93 -0
  101. data/examples/v201104/inventory_service/update_ad_units.rb +94 -0
  102. data/examples/v201104/line_item_creative_association_service/create_licas.rb +94 -0
  103. data/examples/v201104/line_item_creative_association_service/deactivate_licas.rb +127 -0
  104. data/examples/v201104/line_item_creative_association_service/get_all_licas.rb +95 -0
  105. data/examples/v201104/line_item_creative_association_service/get_lica.rb +77 -0
  106. data/examples/v201104/line_item_creative_association_service/get_licas_by_statement.rb +91 -0
  107. data/examples/v201104/line_item_creative_association_service/update_licas.rb +92 -0
  108. data/examples/v201104/line_item_service/activate_line_items.rb +131 -0
  109. data/examples/v201104/line_item_service/create_line_items.rb +157 -0
  110. data/examples/v201104/line_item_service/get_all_line_items.rb +94 -0
  111. data/examples/v201104/line_item_service/get_line_item.rb +74 -0
  112. data/examples/v201104/line_item_service/get_line_items_by_statement.rb +89 -0
  113. data/examples/v201104/line_item_service/target_custom_criteria.rb +129 -0
  114. data/examples/v201104/line_item_service/update_line_items.rb +110 -0
  115. data/examples/v201104/network_service/get_all_networks.rb +74 -0
  116. data/examples/v201104/network_service/get_current_network.rb +66 -0
  117. data/examples/v201104/order_service/approve_orders.rb +116 -0
  118. data/examples/v201104/order_service/create_orders.rb +93 -0
  119. data/examples/v201104/order_service/get_all_orders.rb +93 -0
  120. data/examples/v201104/order_service/get_order.rb +74 -0
  121. data/examples/v201104/order_service/get_orders_by_statement.rb +90 -0
  122. data/examples/v201104/order_service/update_orders.rb +95 -0
  123. data/examples/v201104/placement_service/create_placements.rb +128 -0
  124. data/examples/v201104/placement_service/deactivate_placements.rb +118 -0
  125. data/examples/v201104/placement_service/get_all_placements.rb +93 -0
  126. data/examples/v201104/placement_service/get_placement.rb +74 -0
  127. data/examples/v201104/placement_service/get_placements_by_statement.rb +86 -0
  128. data/examples/v201104/placement_service/update_placements.rb +96 -0
  129. data/examples/v201104/publisher_query_language_service/get_all_cities.rb +85 -0
  130. data/examples/v201104/publisher_query_language_service/get_all_countries.rb +85 -0
  131. data/examples/v201104/publisher_query_language_service/get_all_metros.rb +85 -0
  132. data/examples/v201104/publisher_query_language_service/get_all_regions.rb +85 -0
  133. data/examples/v201104/report_service/download_report.rb +81 -0
  134. data/examples/v201104/report_service/run_delivery_report.rb +89 -0
  135. data/examples/v201104/report_service/run_inventory_report.rb +90 -0
  136. data/examples/v201104/report_service/run_sales_report.rb +89 -0
  137. data/examples/v201104/user_service/create_users.rb +89 -0
  138. data/examples/v201104/user_service/deactivate_users.rb +99 -0
  139. data/examples/v201104/user_service/get_all_roles.rb +73 -0
  140. data/examples/v201104/user_service/get_all_users.rb +92 -0
  141. data/examples/v201104/user_service/get_user.rb +73 -0
  142. data/examples/v201104/user_service/get_users_by_statement.rb +79 -0
  143. data/examples/v201104/user_service/update_users.rb +89 -0
  144. data/lib/dfp_api.rb +32 -45
  145. data/lib/dfp_api/api_config.rb +30 -7
  146. data/lib/dfp_api/v201101/company_service.rb +9 -9
  147. data/lib/dfp_api/v201101/company_service_registry.rb +3 -3
  148. data/lib/dfp_api/v201101/creative_service.rb +9 -9
  149. data/lib/dfp_api/v201101/creative_service_registry.rb +3 -3
  150. data/lib/dfp_api/v201101/custom_targeting_service.rb +9 -9
  151. data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +3 -3
  152. data/lib/dfp_api/v201101/forecast_service.rb +5 -5
  153. data/lib/dfp_api/v201101/forecast_service_registry.rb +3 -3
  154. data/lib/dfp_api/v201101/inventory_service.rb +13 -13
  155. data/lib/dfp_api/v201101/inventory_service_registry.rb +3 -3
  156. data/lib/dfp_api/v201101/line_item_creative_association_service.rb +5 -5
  157. data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +3 -3
  158. data/lib/dfp_api/v201101/line_item_service.rb +13 -13
  159. data/lib/dfp_api/v201101/line_item_service_registry.rb +3 -3
  160. data/lib/dfp_api/v201101/network_service.rb +5 -5
  161. data/lib/dfp_api/v201101/network_service_registry.rb +3 -3
  162. data/lib/dfp_api/v201101/order_service.rb +13 -13
  163. data/lib/dfp_api/v201101/order_service_registry.rb +3 -3
  164. data/lib/dfp_api/v201101/placement_service.rb +9 -9
  165. data/lib/dfp_api/v201101/placement_service_registry.rb +3 -3
  166. data/lib/dfp_api/v201101/publisher_query_language_service.rb +1 -1
  167. data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +3 -3
  168. data/lib/dfp_api/v201101/report_service.rb +5 -5
  169. data/lib/dfp_api/v201101/report_service_registry.rb +3 -3
  170. data/lib/dfp_api/v201101/user_service.rb +17 -17
  171. data/lib/dfp_api/v201101/user_service_registry.rb +3 -3
  172. data/lib/dfp_api/v201103/company_service.rb +52 -0
  173. data/lib/dfp_api/v201103/company_service_registry.rb +37 -0
  174. data/lib/dfp_api/v201103/creative_service.rb +52 -0
  175. data/lib/dfp_api/v201103/creative_service_registry.rb +37 -0
  176. data/lib/dfp_api/v201103/custom_targeting_service.rb +60 -0
  177. data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +37 -0
  178. data/lib/dfp_api/v201103/forecast_service.rb +36 -0
  179. data/lib/dfp_api/v201103/forecast_service_registry.rb +37 -0
  180. data/lib/dfp_api/v201103/inventory_service.rb +56 -0
  181. data/lib/dfp_api/v201103/inventory_service_registry.rb +37 -0
  182. data/lib/dfp_api/v201103/line_item_creative_association_service.rb +56 -0
  183. data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +37 -0
  184. data/lib/dfp_api/v201103/line_item_service.rb +56 -0
  185. data/lib/dfp_api/v201103/line_item_service_registry.rb +37 -0
  186. data/lib/dfp_api/v201103/network_service.rb +40 -0
  187. data/lib/dfp_api/v201103/network_service_registry.rb +37 -0
  188. data/lib/dfp_api/v201103/order_service.rb +56 -0
  189. data/lib/dfp_api/v201103/order_service_registry.rb +37 -0
  190. data/lib/dfp_api/v201103/placement_service.rb +56 -0
  191. data/lib/dfp_api/v201103/placement_service_registry.rb +37 -0
  192. data/lib/dfp_api/v201103/publisher_query_language_service.rb +32 -0
  193. data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +37 -0
  194. data/lib/dfp_api/v201103/report_service.rb +40 -0
  195. data/lib/dfp_api/v201103/report_service_registry.rb +37 -0
  196. data/lib/dfp_api/v201103/user_service.rb +60 -0
  197. data/lib/dfp_api/v201103/user_service_registry.rb +37 -0
  198. data/lib/dfp_api/v201104/company_service.rb +52 -0
  199. data/lib/dfp_api/v201104/company_service_registry.rb +37 -0
  200. data/lib/dfp_api/v201104/creative_service.rb +52 -0
  201. data/lib/dfp_api/v201104/creative_service_registry.rb +37 -0
  202. data/lib/dfp_api/v201104/custom_targeting_service.rb +60 -0
  203. data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +37 -0
  204. data/lib/dfp_api/v201104/forecast_service.rb +36 -0
  205. data/lib/dfp_api/v201104/forecast_service_registry.rb +37 -0
  206. data/lib/dfp_api/v201104/inventory_service.rb +56 -0
  207. data/lib/dfp_api/v201104/inventory_service_registry.rb +37 -0
  208. data/lib/dfp_api/v201104/line_item_creative_association_service.rb +56 -0
  209. data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +37 -0
  210. data/lib/dfp_api/v201104/line_item_service.rb +56 -0
  211. data/lib/dfp_api/v201104/line_item_service_registry.rb +37 -0
  212. data/lib/dfp_api/v201104/network_service.rb +40 -0
  213. data/lib/dfp_api/v201104/network_service_registry.rb +37 -0
  214. data/lib/dfp_api/v201104/order_service.rb +56 -0
  215. data/lib/dfp_api/v201104/order_service_registry.rb +37 -0
  216. data/lib/dfp_api/v201104/placement_service.rb +56 -0
  217. data/lib/dfp_api/v201104/placement_service_registry.rb +37 -0
  218. data/lib/dfp_api/v201104/publisher_query_language_service.rb +32 -0
  219. data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +37 -0
  220. data/lib/dfp_api/v201104/report_service.rb +40 -0
  221. data/lib/dfp_api/v201104/report_service_registry.rb +37 -0
  222. data/lib/dfp_api/v201104/user_service.rb +60 -0
  223. data/lib/dfp_api/v201104/user_service_registry.rb +37 -0
  224. data/test/bugs/test_issue_00000016.rb +154 -0
  225. data/test/dfp_api/test_dfp_api.rb +64 -0
  226. metadata +248 -53
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:30.
7
+
8
+ require 'ads_common/savon_service'
9
+ require 'dfp_api/v201104/forecast_service_registry'
10
+
11
+ module DfpApi; module V201104; module ForecastService
12
+ class ForecastService < AdsCommon::SavonService
13
+ def initialize(endpoint)
14
+ namespace = 'https://www.google.com/apis/ads/publisher/v201104'
15
+ super(endpoint, namespace)
16
+ end
17
+
18
+ def get_forecast_by_id(*args)
19
+ return execute_action('get_forecast_by_id', args)
20
+ end
21
+
22
+ def get_forecast(*args)
23
+ return execute_action('get_forecast', args)
24
+ end
25
+
26
+ private
27
+
28
+ def get_service_registry()
29
+ return ForecastServiceRegistry
30
+ end
31
+
32
+ def get_module()
33
+ return DfpApi::V201104::ForecastService
34
+ end
35
+ end
36
+ end; end; end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:30.
7
+
8
+ module DfpApi; module V201104; module ForecastService
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 = {:TimeOfDay=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:hour}, {:type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1, :name=>:minute}]}, :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=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {: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}, :UserDomainTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>nil, :name=>:domains}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:targeted}]}, :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=>"DayPartTargeting", :min_occurs=>0, :max_occurs=>1, :name=>:day_part_targeting}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting}, {:type=>"UserDomainTargeting", :min_occurs=>0, :max_occurs=>1, :name=>:user_domain_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}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :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}]}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :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=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :DayPart=>{:fields=>[{:type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1, :name=>:day_of_week}, {:type=>"TimeOfDay", :min_occurs=>0, :max_occurs=>1, :name=>:start_time}, {:type=>"TimeOfDay", :min_occurs=>0, :max_occurs=>1, :name=>:end_time}]}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :CustomCriteria=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:key_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>nil, :name=>:value_ids}, {: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}]}, :DayPartTargeting=>{:fields=>[{:type=>"DayPart", :min_occurs=>0, :max_occurs=>nil, :name=>:day_parts}, {:type=>"DeliveryTimeZone", :min_occurs=>0, :max_occurs=>1, :name=>:time_zone}]}, :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"}}
12
+
13
+ def self.get_method_signature(method_name)
14
+ return FORECASTSERVICE_METHODS[method_name.to_sym]
15
+ end
16
+
17
+ def self.get_type_signature(type_name)
18
+ return FORECASTSERVICE_TYPES[type_name.to_sym]
19
+ end
20
+ end
21
+
22
+ # Base class for exceptions.
23
+ class ApplicationException < DfpApi::Errors::ApiException
24
+ attr_reader :message # string
25
+ attr_reader :application_exception_type # string
26
+ end
27
+
28
+ # Exception class for holding a list of service errors.
29
+ class ApiException < ApplicationException
30
+ attr_reader :errors # ApiError
31
+ def initialize(exception_fault)
32
+ @array_fields = [] if !defined?(@array_fields)
33
+ @array_fields << 'errors'
34
+ super(exception_fault)
35
+ end
36
+ end
37
+ end; end; end
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:27.
7
+
8
+ require 'ads_common/savon_service'
9
+ require 'dfp_api/v201104/inventory_service_registry'
10
+
11
+ module DfpApi; module V201104; module InventoryService
12
+ class InventoryService < AdsCommon::SavonService
13
+ def initialize(endpoint)
14
+ namespace = 'https://www.google.com/apis/ads/publisher/v201104'
15
+ super(endpoint, namespace)
16
+ end
17
+
18
+ def get_ad_units_by_statement(*args)
19
+ return execute_action('get_ad_units_by_statement', args)
20
+ end
21
+
22
+ def perform_ad_unit_action(*args)
23
+ return execute_action('perform_ad_unit_action', args)
24
+ end
25
+
26
+ def update_ad_unit(*args)
27
+ return execute_action('update_ad_unit', args)
28
+ end
29
+
30
+ def create_ad_unit(*args)
31
+ return execute_action('create_ad_unit', args)
32
+ end
33
+
34
+ def update_ad_units(*args)
35
+ return execute_action('update_ad_units', args)
36
+ end
37
+
38
+ def create_ad_units(*args)
39
+ return execute_action('create_ad_units', args)
40
+ end
41
+
42
+ def get_ad_unit(*args)
43
+ return execute_action('get_ad_unit', args)
44
+ end
45
+
46
+ private
47
+
48
+ def get_service_registry()
49
+ return InventoryServiceRegistry
50
+ end
51
+
52
+ def get_module()
53
+ return DfpApi::V201104::InventoryService
54
+ end
55
+ end
56
+ end; end; end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:27.
7
+
8
+ module DfpApi; module V201104; module InventoryService
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}, :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}, :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=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :DeactivateAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :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"}, :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}]}}
12
+
13
+ def self.get_method_signature(method_name)
14
+ return INVENTORYSERVICE_METHODS[method_name.to_sym]
15
+ end
16
+
17
+ def self.get_type_signature(type_name)
18
+ return INVENTORYSERVICE_TYPES[type_name.to_sym]
19
+ end
20
+ end
21
+
22
+ # Base class for exceptions.
23
+ class ApplicationException < DfpApi::Errors::ApiException
24
+ attr_reader :message # string
25
+ attr_reader :application_exception_type # string
26
+ end
27
+
28
+ # Exception class for holding a list of service errors.
29
+ class ApiException < ApplicationException
30
+ attr_reader :errors # ApiError
31
+ def initialize(exception_fault)
32
+ @array_fields = [] if !defined?(@array_fields)
33
+ @array_fields << 'errors'
34
+ super(exception_fault)
35
+ end
36
+ end
37
+ end; end; end
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:42.
7
+
8
+ require 'ads_common/savon_service'
9
+ require 'dfp_api/v201104/line_item_creative_association_service_registry'
10
+
11
+ module DfpApi; module V201104; module LineItemCreativeAssociationService
12
+ class LineItemCreativeAssociationService < AdsCommon::SavonService
13
+ def initialize(endpoint)
14
+ namespace = 'https://www.google.com/apis/ads/publisher/v201104'
15
+ super(endpoint, namespace)
16
+ end
17
+
18
+ def update_line_item_creative_association(*args)
19
+ return execute_action('update_line_item_creative_association', args)
20
+ end
21
+
22
+ def create_line_item_creative_association(*args)
23
+ return execute_action('create_line_item_creative_association', args)
24
+ end
25
+
26
+ def update_line_item_creative_associations(*args)
27
+ return execute_action('update_line_item_creative_associations', args)
28
+ end
29
+
30
+ def create_line_item_creative_associations(*args)
31
+ return execute_action('create_line_item_creative_associations', args)
32
+ end
33
+
34
+ def get_line_item_creative_association(*args)
35
+ return execute_action('get_line_item_creative_association', args)
36
+ end
37
+
38
+ def get_line_item_creative_associations_by_statement(*args)
39
+ return execute_action('get_line_item_creative_associations_by_statement', args)
40
+ end
41
+
42
+ def perform_line_item_creative_association_action(*args)
43
+ return execute_action('perform_line_item_creative_association_action', args)
44
+ end
45
+
46
+ private
47
+
48
+ def get_service_registry()
49
+ return LineItemCreativeAssociationServiceRegistry
50
+ end
51
+
52
+ def get_module()
53
+ return DfpApi::V201104::LineItemCreativeAssociationService
54
+ end
55
+ end
56
+ end; end; end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:42.
7
+
8
+ module DfpApi; module V201104; module LineItemCreativeAssociationService
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}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :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}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_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=>: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"}, :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}]}}
12
+
13
+ def self.get_method_signature(method_name)
14
+ return LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS[method_name.to_sym]
15
+ end
16
+
17
+ def self.get_type_signature(type_name)
18
+ return LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES[type_name.to_sym]
19
+ end
20
+ end
21
+
22
+ # Base class for exceptions.
23
+ class ApplicationException < DfpApi::Errors::ApiException
24
+ attr_reader :message # string
25
+ attr_reader :application_exception_type # string
26
+ end
27
+
28
+ # Exception class for holding a list of service errors.
29
+ class ApiException < ApplicationException
30
+ attr_reader :errors # ApiError
31
+ def initialize(exception_fault)
32
+ @array_fields = [] if !defined?(@array_fields)
33
+ @array_fields << 'errors'
34
+ super(exception_fault)
35
+ end
36
+ end
37
+ end; end; end
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:21.
7
+
8
+ require 'ads_common/savon_service'
9
+ require 'dfp_api/v201104/line_item_service_registry'
10
+
11
+ module DfpApi; module V201104; module LineItemService
12
+ class LineItemService < AdsCommon::SavonService
13
+ def initialize(endpoint)
14
+ namespace = 'https://www.google.com/apis/ads/publisher/v201104'
15
+ super(endpoint, namespace)
16
+ end
17
+
18
+ def create_line_items(*args)
19
+ return execute_action('create_line_items', args)
20
+ end
21
+
22
+ def get_line_item(*args)
23
+ return execute_action('get_line_item', args)
24
+ end
25
+
26
+ def get_line_items_by_statement(*args)
27
+ return execute_action('get_line_items_by_statement', args)
28
+ end
29
+
30
+ def perform_line_item_action(*args)
31
+ return execute_action('perform_line_item_action', args)
32
+ end
33
+
34
+ def update_line_item(*args)
35
+ return execute_action('update_line_item', args)
36
+ end
37
+
38
+ def create_line_item(*args)
39
+ return execute_action('create_line_item', args)
40
+ end
41
+
42
+ def update_line_items(*args)
43
+ return execute_action('update_line_items', args)
44
+ end
45
+
46
+ private
47
+
48
+ def get_service_registry()
49
+ return LineItemServiceRegistry
50
+ end
51
+
52
+ def get_module()
53
+ return DfpApi::V201104::LineItemService
54
+ end
55
+ end
56
+ end; end; end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:21.
7
+
8
+ module DfpApi; module V201104; module LineItemService
9
+ class LineItemServiceRegistry
10
+ LINEITEMSERVICE_METHODS = {:create_line_items=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>nil, :name=>:line_items}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"create_line_items_response"}}, :get_line_item=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_id}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_line_item_response"}}, :get_line_items_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"LineItemPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_line_items_by_statement_response"}}, :perform_line_item_action=>{:input=>[{:type=>"LineItemAction", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_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_action_response"}}, :update_line_item=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>1, :name=>:line_item}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_line_item_response"}}, :create_line_item=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>1, :name=>:line_item}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_line_item_response"}}, :update_line_items=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>nil, :name=>:line_items}], :output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :max_occurs=>nil, :name=>:rval}], :name=>"update_line_items_response"}}}
11
+ LINEITEMSERVICE_TYPES = {:TimeOfDay=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:hour}, {:type=>"MinuteOfHour", :min_occurs=>0, :max_occurs=>1, :name=>:minute}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>nil, :name=>:values}]}, :ReleaseLineItems=>{:fields=>[], :base=>"LineItemAction"}, :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}]}, :ActivateLineItems=>{:fields=>[], :base=>"LineItemAction"}, :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}]}, :Location=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {: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}, :UserDomainTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>nil, :name=>:domains}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:targeted}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :ReserveAndOverbookLineItems=>{:fields=>[], :base=>"ReserveLineItems"}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :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}]}, :ArchiveLineItems=>{:fields=>[], :base=>"LineItemAction"}, :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=>"DayPartTargeting", :min_occurs=>0, :max_occurs=>1, :name=>:day_part_targeting}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting}, {:type=>"UserDomainTargeting", :min_occurs=>0, :max_occurs=>1, :name=>:user_domain_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}]}, :ReserveLineItems=>{:fields=>[], :base=>"LineItemAction"}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :LineItemAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:line_item_action_type}], :abstract=>true}, :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"}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :UnarchiveLineItems=>{:fields=>[], :base=>"LineItemAction"}, :PauseLineItems=>{:fields=>[], :base=>"LineItemAction"}, :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}]}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :ResumeAndOverbookLineItems=>{:fields=>[], :base=>"ResumeLineItems"}, :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=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :DayPart=>{:fields=>[{:type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1, :name=>:day_of_week}, {:type=>"TimeOfDay", :min_occurs=>0, :max_occurs=>1, :name=>:start_time}, {:type=>"TimeOfDay", :min_occurs=>0, :max_occurs=>1, :name=>:end_time}]}, :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"}, :ResumeLineItems=>{:fields=>[], :base=>"LineItemAction"}, :LineItemPage=>{: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=>"LineItem", :min_occurs=>0, :max_occurs=>nil, :name=>:results}]}, :CustomCriteria=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:key_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>nil, :name=>:value_ids}, {: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}]}, :DayPartTargeting=>{:fields=>[{:type=>"DayPart", :min_occurs=>0, :max_occurs=>nil, :name=>:day_parts}, {:type=>"DeliveryTimeZone", :min_occurs=>0, :max_occurs=>1, :name=>:time_zone}]}, :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"}}
12
+
13
+ def self.get_method_signature(method_name)
14
+ return LINEITEMSERVICE_METHODS[method_name.to_sym]
15
+ end
16
+
17
+ def self.get_type_signature(type_name)
18
+ return LINEITEMSERVICE_TYPES[type_name.to_sym]
19
+ end
20
+ end
21
+
22
+ # Base class for exceptions.
23
+ class ApplicationException < DfpApi::Errors::ApiException
24
+ attr_reader :message # string
25
+ attr_reader :application_exception_type # string
26
+ end
27
+
28
+ # Exception class for holding a list of service errors.
29
+ class ApiException < ApplicationException
30
+ attr_reader :errors # ApiError
31
+ def initialize(exception_fault)
32
+ @array_fields = [] if !defined?(@array_fields)
33
+ @array_fields << 'errors'
34
+ super(exception_fault)
35
+ end
36
+ end
37
+ end; end; end
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:40.
7
+
8
+ require 'ads_common/savon_service'
9
+ require 'dfp_api/v201104/network_service_registry'
10
+
11
+ module DfpApi; module V201104; module NetworkService
12
+ class NetworkService < AdsCommon::SavonService
13
+ def initialize(endpoint)
14
+ namespace = 'https://www.google.com/apis/ads/publisher/v201104'
15
+ super(endpoint, namespace)
16
+ end
17
+
18
+ def update_network(*args)
19
+ return execute_action('update_network', args)
20
+ end
21
+
22
+ def get_all_networks(*args)
23
+ return execute_action('get_all_networks', args)
24
+ end
25
+
26
+ def get_current_network(*args)
27
+ return execute_action('get_current_network', args)
28
+ end
29
+
30
+ private
31
+
32
+ def get_service_registry()
33
+ return NetworkServiceRegistry
34
+ end
35
+
36
+ def get_module()
37
+ return DfpApi::V201104::NetworkService
38
+ end
39
+ end
40
+ end; end; end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:40.
7
+
8
+ module DfpApi; module V201104; module NetworkService
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}]}}
12
+
13
+ def self.get_method_signature(method_name)
14
+ return NETWORKSERVICE_METHODS[method_name.to_sym]
15
+ end
16
+
17
+ def self.get_type_signature(type_name)
18
+ return NETWORKSERVICE_TYPES[type_name.to_sym]
19
+ end
20
+ end
21
+
22
+ # Base class for exceptions.
23
+ class ApplicationException < DfpApi::Errors::ApiException
24
+ attr_reader :message # string
25
+ attr_reader :application_exception_type # string
26
+ end
27
+
28
+ # Exception class for holding a list of service errors.
29
+ class ApiException < ApplicationException
30
+ attr_reader :errors # ApiError
31
+ def initialize(exception_fault)
32
+ @array_fields = [] if !defined?(@array_fields)
33
+ @array_fields << 'errors'
34
+ super(exception_fault)
35
+ end
36
+ end
37
+ end; end; end
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/ruby
2
+ # This is auto-generated code, changes will be overwritten.
3
+ # Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
4
+ # License:: Licensed under the Apache License,Version 2.0 (the "License").
5
+ #
6
+ # Code generated by AdsCommon library 0.4.0 on 2011-06-17 15:27:06.
7
+
8
+ require 'ads_common/savon_service'
9
+ require 'dfp_api/v201104/order_service_registry'
10
+
11
+ module DfpApi; module V201104; module OrderService
12
+ class OrderService < AdsCommon::SavonService
13
+ def initialize(endpoint)
14
+ namespace = 'https://www.google.com/apis/ads/publisher/v201104'
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)
24
+ end
25
+
26
+ def get_orders_by_statement(*args)
27
+ return execute_action('get_orders_by_statement', args)
28
+ end
29
+
30
+ def perform_order_action(*args)
31
+ return execute_action('perform_order_action', args)
32
+ end
33
+
34
+ def update_order(*args)
35
+ return execute_action('update_order', args)
36
+ end
37
+
38
+ def create_order(*args)
39
+ return execute_action('create_order', args)
40
+ end
41
+
42
+ def update_orders(*args)
43
+ return execute_action('update_orders', args)
44
+ end
45
+
46
+ private
47
+
48
+ def get_service_registry()
49
+ return OrderServiceRegistry
50
+ end
51
+
52
+ def get_module()
53
+ return DfpApi::V201104::OrderService
54
+ end
55
+ end
56
+ end; end; end