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.
- data/ChangeLog +7 -1
- data/README +11 -11
- data/Rakefile +13 -11
- data/examples/v201103/common/error_handling.rb +76 -0
- data/examples/v201103/company_service/create_companies.rb +82 -0
- data/examples/v201103/company_service/get_all_companies.rb +92 -0
- data/examples/v201103/company_service/get_companies_by_statement.rb +88 -0
- data/examples/v201103/company_service/get_company.rb +72 -0
- data/examples/v201103/company_service/update_companies.rb +95 -0
- data/examples/v201103/creative_service/copy_image_creatives.rb +117 -0
- data/examples/v201103/creative_service/create_creatives.rb +109 -0
- data/examples/v201103/creative_service/get_all_creatives.rb +93 -0
- data/examples/v201103/creative_service/get_creative.rb +72 -0
- data/examples/v201103/creative_service/get_creatives_by_statement.rb +87 -0
- data/examples/v201103/creative_service/update_creatives.rb +98 -0
- data/examples/v201103/custom_targeting_service/create_custom_targeting_keys_and_values.rb +118 -0
- data/examples/v201103/custom_targeting_service/delete_custom_targeting_keys.rb +121 -0
- data/examples/v201103/custom_targeting_service/delete_custom_targeting_values.rb +125 -0
- data/examples/v201103/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +148 -0
- data/examples/v201103/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +92 -0
- data/examples/v201103/custom_targeting_service/get_custom_targeting_values_by_statement.rb +98 -0
- data/examples/v201103/custom_targeting_service/update_custom_targeting_keys.rb +94 -0
- data/examples/v201103/custom_targeting_service/update_custom_targeting_values.rb +106 -0
- data/examples/v201103/forecast_service/get_forecast.rb +103 -0
- data/examples/v201103/forecast_service/get_forecast_by_id.rb +80 -0
- data/examples/v201103/inventory_service/create_ad_units.rb +98 -0
- data/examples/v201103/inventory_service/deactivate_ad_units.rb +119 -0
- data/examples/v201103/inventory_service/get_ad_unit.rb +72 -0
- data/examples/v201103/inventory_service/get_ad_units_by_statement.rb +96 -0
- data/examples/v201103/inventory_service/get_all_ad_units.rb +93 -0
- data/examples/v201103/inventory_service/update_ad_units.rb +94 -0
- data/examples/v201103/line_item_creative_association_service/create_licas.rb +94 -0
- data/examples/v201103/line_item_creative_association_service/deactivate_licas.rb +127 -0
- data/examples/v201103/line_item_creative_association_service/get_all_licas.rb +95 -0
- data/examples/v201103/line_item_creative_association_service/get_lica.rb +77 -0
- data/examples/v201103/line_item_creative_association_service/get_licas_by_statement.rb +91 -0
- data/examples/v201103/line_item_creative_association_service/update_licas.rb +92 -0
- data/examples/v201103/line_item_service/activate_line_items.rb +131 -0
- data/examples/v201103/line_item_service/create_line_items.rb +165 -0
- data/examples/v201103/line_item_service/get_all_line_items.rb +94 -0
- data/examples/v201103/line_item_service/get_line_item.rb +74 -0
- data/examples/v201103/line_item_service/get_line_items_by_statement.rb +89 -0
- data/examples/v201103/line_item_service/target_custom_criteria.rb +135 -0
- data/examples/v201103/line_item_service/update_line_items.rb +110 -0
- data/examples/v201103/network_service/get_all_networks.rb +74 -0
- data/examples/v201103/network_service/get_current_network.rb +66 -0
- data/examples/v201103/order_service/approve_orders.rb +116 -0
- data/examples/v201103/order_service/create_orders.rb +93 -0
- data/examples/v201103/order_service/get_all_orders.rb +93 -0
- data/examples/v201103/order_service/get_order.rb +74 -0
- data/examples/v201103/order_service/get_orders_by_statement.rb +90 -0
- data/examples/v201103/order_service/update_orders.rb +95 -0
- data/examples/v201103/placement_service/create_placements.rb +128 -0
- data/examples/v201103/placement_service/deactivate_placements.rb +118 -0
- data/examples/v201103/placement_service/get_all_placements.rb +93 -0
- data/examples/v201103/placement_service/get_placement.rb +74 -0
- data/examples/v201103/placement_service/get_placements_by_statement.rb +86 -0
- data/examples/v201103/placement_service/update_placements.rb +96 -0
- data/examples/v201103/publisher_query_language_service/get_all_cities.rb +85 -0
- data/examples/v201103/publisher_query_language_service/get_all_countries.rb +85 -0
- data/examples/v201103/publisher_query_language_service/get_all_metros.rb +85 -0
- data/examples/v201103/publisher_query_language_service/get_all_regions.rb +85 -0
- data/examples/v201103/report_service/download_report.rb +81 -0
- data/examples/v201103/report_service/run_delivery_report.rb +89 -0
- data/examples/v201103/report_service/run_inventory_report.rb +90 -0
- data/examples/v201103/report_service/run_sales_report.rb +89 -0
- data/examples/v201103/user_service/create_users.rb +89 -0
- data/examples/v201103/user_service/deactivate_users.rb +99 -0
- data/examples/v201103/user_service/get_all_roles.rb +73 -0
- data/examples/v201103/user_service/get_all_users.rb +92 -0
- data/examples/v201103/user_service/get_user.rb +73 -0
- data/examples/v201103/user_service/get_users_by_statement.rb +79 -0
- data/examples/v201103/user_service/update_users.rb +89 -0
- data/examples/v201104/common/error_handling.rb +76 -0
- data/examples/v201104/company_service/create_companies.rb +82 -0
- data/examples/v201104/company_service/get_all_companies.rb +92 -0
- data/examples/v201104/company_service/get_companies_by_statement.rb +88 -0
- data/examples/v201104/company_service/get_company.rb +72 -0
- data/examples/v201104/company_service/update_companies.rb +95 -0
- data/examples/v201104/creative_service/copy_image_creatives.rb +117 -0
- data/examples/v201104/creative_service/create_creatives.rb +109 -0
- data/examples/v201104/creative_service/get_all_creatives.rb +93 -0
- data/examples/v201104/creative_service/get_creative.rb +72 -0
- data/examples/v201104/creative_service/get_creatives_by_statement.rb +87 -0
- data/examples/v201104/creative_service/update_creatives.rb +98 -0
- data/examples/v201104/custom_targeting_service/create_custom_targeting_keys_and_values.rb +118 -0
- data/examples/v201104/custom_targeting_service/delete_custom_targeting_keys.rb +121 -0
- data/examples/v201104/custom_targeting_service/delete_custom_targeting_values.rb +125 -0
- data/examples/v201104/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +148 -0
- data/examples/v201104/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +92 -0
- data/examples/v201104/custom_targeting_service/get_custom_targeting_values_by_statement.rb +98 -0
- data/examples/v201104/custom_targeting_service/update_custom_targeting_keys.rb +94 -0
- data/examples/v201104/custom_targeting_service/update_custom_targeting_values.rb +106 -0
- data/examples/v201104/forecast_service/get_forecast.rb +103 -0
- data/examples/v201104/forecast_service/get_forecast_by_id.rb +80 -0
- data/examples/v201104/inventory_service/create_ad_units.rb +98 -0
- data/examples/v201104/inventory_service/deactivate_ad_units.rb +119 -0
- data/examples/v201104/inventory_service/get_ad_unit.rb +72 -0
- data/examples/v201104/inventory_service/get_ad_units_by_statement.rb +96 -0
- data/examples/v201104/inventory_service/get_all_ad_units.rb +93 -0
- data/examples/v201104/inventory_service/update_ad_units.rb +94 -0
- data/examples/v201104/line_item_creative_association_service/create_licas.rb +94 -0
- data/examples/v201104/line_item_creative_association_service/deactivate_licas.rb +127 -0
- data/examples/v201104/line_item_creative_association_service/get_all_licas.rb +95 -0
- data/examples/v201104/line_item_creative_association_service/get_lica.rb +77 -0
- data/examples/v201104/line_item_creative_association_service/get_licas_by_statement.rb +91 -0
- data/examples/v201104/line_item_creative_association_service/update_licas.rb +92 -0
- data/examples/v201104/line_item_service/activate_line_items.rb +131 -0
- data/examples/v201104/line_item_service/create_line_items.rb +157 -0
- data/examples/v201104/line_item_service/get_all_line_items.rb +94 -0
- data/examples/v201104/line_item_service/get_line_item.rb +74 -0
- data/examples/v201104/line_item_service/get_line_items_by_statement.rb +89 -0
- data/examples/v201104/line_item_service/target_custom_criteria.rb +129 -0
- data/examples/v201104/line_item_service/update_line_items.rb +110 -0
- data/examples/v201104/network_service/get_all_networks.rb +74 -0
- data/examples/v201104/network_service/get_current_network.rb +66 -0
- data/examples/v201104/order_service/approve_orders.rb +116 -0
- data/examples/v201104/order_service/create_orders.rb +93 -0
- data/examples/v201104/order_service/get_all_orders.rb +93 -0
- data/examples/v201104/order_service/get_order.rb +74 -0
- data/examples/v201104/order_service/get_orders_by_statement.rb +90 -0
- data/examples/v201104/order_service/update_orders.rb +95 -0
- data/examples/v201104/placement_service/create_placements.rb +128 -0
- data/examples/v201104/placement_service/deactivate_placements.rb +118 -0
- data/examples/v201104/placement_service/get_all_placements.rb +93 -0
- data/examples/v201104/placement_service/get_placement.rb +74 -0
- data/examples/v201104/placement_service/get_placements_by_statement.rb +86 -0
- data/examples/v201104/placement_service/update_placements.rb +96 -0
- data/examples/v201104/publisher_query_language_service/get_all_cities.rb +85 -0
- data/examples/v201104/publisher_query_language_service/get_all_countries.rb +85 -0
- data/examples/v201104/publisher_query_language_service/get_all_metros.rb +85 -0
- data/examples/v201104/publisher_query_language_service/get_all_regions.rb +85 -0
- data/examples/v201104/report_service/download_report.rb +81 -0
- data/examples/v201104/report_service/run_delivery_report.rb +89 -0
- data/examples/v201104/report_service/run_inventory_report.rb +90 -0
- data/examples/v201104/report_service/run_sales_report.rb +89 -0
- data/examples/v201104/user_service/create_users.rb +89 -0
- data/examples/v201104/user_service/deactivate_users.rb +99 -0
- data/examples/v201104/user_service/get_all_roles.rb +73 -0
- data/examples/v201104/user_service/get_all_users.rb +92 -0
- data/examples/v201104/user_service/get_user.rb +73 -0
- data/examples/v201104/user_service/get_users_by_statement.rb +79 -0
- data/examples/v201104/user_service/update_users.rb +89 -0
- data/lib/dfp_api.rb +32 -45
- data/lib/dfp_api/api_config.rb +30 -7
- data/lib/dfp_api/v201101/company_service.rb +9 -9
- data/lib/dfp_api/v201101/company_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/creative_service.rb +9 -9
- data/lib/dfp_api/v201101/creative_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/custom_targeting_service.rb +9 -9
- data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/forecast_service.rb +5 -5
- data/lib/dfp_api/v201101/forecast_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/inventory_service.rb +13 -13
- data/lib/dfp_api/v201101/inventory_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/line_item_creative_association_service.rb +5 -5
- data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/line_item_service.rb +13 -13
- data/lib/dfp_api/v201101/line_item_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/network_service.rb +5 -5
- data/lib/dfp_api/v201101/network_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/order_service.rb +13 -13
- data/lib/dfp_api/v201101/order_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/placement_service.rb +9 -9
- data/lib/dfp_api/v201101/placement_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/publisher_query_language_service.rb +1 -1
- data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/report_service.rb +5 -5
- data/lib/dfp_api/v201101/report_service_registry.rb +3 -3
- data/lib/dfp_api/v201101/user_service.rb +17 -17
- data/lib/dfp_api/v201101/user_service_registry.rb +3 -3
- data/lib/dfp_api/v201103/company_service.rb +52 -0
- data/lib/dfp_api/v201103/company_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/creative_service.rb +52 -0
- data/lib/dfp_api/v201103/creative_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/custom_targeting_service.rb +60 -0
- data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/forecast_service.rb +36 -0
- data/lib/dfp_api/v201103/forecast_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/inventory_service.rb +56 -0
- data/lib/dfp_api/v201103/inventory_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/line_item_creative_association_service.rb +56 -0
- data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/line_item_service.rb +56 -0
- data/lib/dfp_api/v201103/line_item_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/network_service.rb +40 -0
- data/lib/dfp_api/v201103/network_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/order_service.rb +56 -0
- data/lib/dfp_api/v201103/order_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/placement_service.rb +56 -0
- data/lib/dfp_api/v201103/placement_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/publisher_query_language_service.rb +32 -0
- data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/report_service.rb +40 -0
- data/lib/dfp_api/v201103/report_service_registry.rb +37 -0
- data/lib/dfp_api/v201103/user_service.rb +60 -0
- data/lib/dfp_api/v201103/user_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/company_service.rb +52 -0
- data/lib/dfp_api/v201104/company_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/creative_service.rb +52 -0
- data/lib/dfp_api/v201104/creative_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/custom_targeting_service.rb +60 -0
- data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/forecast_service.rb +36 -0
- data/lib/dfp_api/v201104/forecast_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/inventory_service.rb +56 -0
- data/lib/dfp_api/v201104/inventory_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/line_item_creative_association_service.rb +56 -0
- data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/line_item_service.rb +56 -0
- data/lib/dfp_api/v201104/line_item_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/network_service.rb +40 -0
- data/lib/dfp_api/v201104/network_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/order_service.rb +56 -0
- data/lib/dfp_api/v201104/order_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/placement_service.rb +56 -0
- data/lib/dfp_api/v201104/placement_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/publisher_query_language_service.rb +32 -0
- data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/report_service.rb +40 -0
- data/lib/dfp_api/v201104/report_service_registry.rb +37 -0
- data/lib/dfp_api/v201104/user_service.rb +60 -0
- data/lib/dfp_api/v201104/user_service_registry.rb +37 -0
- data/test/bugs/test_issue_00000016.rb +154 -0
- data/test/dfp_api/test_dfp_api.rb +64 -0
- 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
|