google-dfp-api 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/examples/v201101/company_service/create_companies.rb +3 -4
- data/examples/v201101/company_service/update_companies.rb +2 -2
- data/examples/v201101/creative_service/create_creatives.rb +8 -11
- data/examples/v201101/inventory_service/create_ad_units.rb +7 -10
- data/examples/v201101/inventory_service/update_ad_units.rb +1 -1
- data/examples/v201101/line_item_service/create_line_items.rb +2 -3
- data/examples/v201101/line_item_service/update_line_items.rb +1 -1
- data/examples/v201101/order_service/create_orders.rb +5 -6
- data/examples/v201101/order_service/update_orders.rb +1 -1
- data/examples/v201101/placement_service/create_placements.rb +1 -1
- data/examples/v201101/placement_service/update_placements.rb +2 -1
- data/examples/v201101/user_service/update_users.rb +1 -1
- data/examples/v201103/company_service/create_companies.rb +3 -4
- data/examples/v201103/company_service/update_companies.rb +2 -2
- data/examples/v201103/creative_service/create_creatives.rb +8 -11
- data/examples/v201103/inventory_service/create_ad_units.rb +7 -10
- data/examples/v201103/inventory_service/update_ad_units.rb +1 -1
- data/examples/v201103/line_item_service/create_line_items.rb +2 -3
- data/examples/v201103/line_item_service/update_line_items.rb +1 -1
- data/examples/v201103/order_service/create_orders.rb +5 -6
- data/examples/v201103/order_service/update_orders.rb +1 -1
- data/examples/v201103/placement_service/create_placements.rb +1 -1
- data/examples/v201103/placement_service/update_placements.rb +2 -1
- data/examples/v201103/user_service/update_users.rb +1 -1
- data/examples/v201104/company_service/create_companies.rb +3 -4
- data/examples/v201104/company_service/update_companies.rb +2 -2
- data/examples/v201104/creative_service/create_creatives.rb +8 -11
- data/examples/v201104/inventory_service/create_ad_units.rb +7 -10
- data/examples/v201104/inventory_service/update_ad_units.rb +1 -1
- data/examples/v201104/line_item_service/create_line_items.rb +2 -3
- data/examples/v201104/line_item_service/update_line_items.rb +1 -1
- data/examples/v201104/order_service/create_orders.rb +5 -6
- data/examples/v201104/order_service/update_orders.rb +1 -1
- data/examples/v201104/placement_service/create_placements.rb +1 -1
- data/examples/v201104/placement_service/update_placements.rb +2 -1
- data/examples/v201104/user_service/update_users.rb +1 -1
- data/examples/v201107/common/error_handling.rb +76 -0
- data/examples/v201107/common/oauth_handling.rb +128 -0
- data/examples/v201107/company_service/create_companies.rb +81 -0
- data/examples/v201107/company_service/get_all_companies.rb +92 -0
- data/examples/v201107/company_service/get_companies_by_statement.rb +88 -0
- data/examples/v201107/company_service/get_company.rb +72 -0
- data/examples/v201107/company_service/update_companies.rb +95 -0
- data/examples/v201107/creative_service/copy_image_creatives.rb +117 -0
- data/examples/v201107/creative_service/create_creatives.rb +106 -0
- data/examples/v201107/creative_service/get_all_creatives.rb +93 -0
- data/examples/v201107/creative_service/get_creative.rb +72 -0
- data/examples/v201107/creative_service/get_creatives_by_statement.rb +87 -0
- data/examples/v201107/creative_service/update_creatives.rb +98 -0
- data/examples/v201107/custom_targeting_service/create_custom_targeting_keys_and_values.rb +118 -0
- data/examples/v201107/custom_targeting_service/delete_custom_targeting_keys.rb +121 -0
- data/examples/v201107/custom_targeting_service/delete_custom_targeting_values.rb +125 -0
- data/examples/v201107/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +148 -0
- data/examples/v201107/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +92 -0
- data/examples/v201107/custom_targeting_service/get_custom_targeting_values_by_statement.rb +98 -0
- data/examples/v201107/custom_targeting_service/update_custom_targeting_keys.rb +94 -0
- data/examples/v201107/custom_targeting_service/update_custom_targeting_values.rb +106 -0
- data/examples/v201107/forecast_service/get_forecast.rb +103 -0
- data/examples/v201107/forecast_service/get_forecast_by_id.rb +80 -0
- data/examples/v201107/inventory_service/create_ad_units.rb +95 -0
- data/examples/v201107/inventory_service/deactivate_ad_units.rb +119 -0
- data/examples/v201107/inventory_service/get_ad_unit.rb +72 -0
- data/examples/v201107/inventory_service/get_ad_unit_sizes.rb +73 -0
- data/examples/v201107/inventory_service/get_ad_units_by_statement.rb +96 -0
- data/examples/v201107/inventory_service/get_all_ad_units.rb +93 -0
- data/examples/v201107/inventory_service/update_ad_units.rb +94 -0
- data/examples/v201107/label_service/create_labels.rb +83 -0
- data/examples/v201107/label_service/deactivate_labels.rb +118 -0
- data/examples/v201107/label_service/get_all_labels.rb +94 -0
- data/examples/v201107/label_service/get_label.rb +76 -0
- data/examples/v201107/label_service/get_labels_by_statement.rb +91 -0
- data/examples/v201107/label_service/update_labels.rb +104 -0
- data/examples/v201107/line_item_creative_association_service/create_licas.rb +94 -0
- data/examples/v201107/line_item_creative_association_service/deactivate_licas.rb +127 -0
- data/examples/v201107/line_item_creative_association_service/get_all_licas.rb +95 -0
- data/examples/v201107/line_item_creative_association_service/get_lica.rb +77 -0
- data/examples/v201107/line_item_creative_association_service/get_licas_by_statement.rb +91 -0
- data/examples/v201107/line_item_creative_association_service/update_licas.rb +92 -0
- data/examples/v201107/line_item_service/activate_line_items.rb +131 -0
- data/examples/v201107/line_item_service/create_line_items.rb +167 -0
- data/examples/v201107/line_item_service/get_all_line_items.rb +94 -0
- data/examples/v201107/line_item_service/get_line_item.rb +74 -0
- data/examples/v201107/line_item_service/get_line_items_by_statement.rb +89 -0
- data/examples/v201107/line_item_service/target_custom_criteria.rb +129 -0
- data/examples/v201107/line_item_service/update_line_items.rb +110 -0
- data/examples/v201107/network_service/get_all_networks.rb +74 -0
- data/examples/v201107/network_service/get_current_network.rb +66 -0
- data/examples/v201107/order_service/approve_orders.rb +116 -0
- data/examples/v201107/order_service/create_orders.rb +92 -0
- data/examples/v201107/order_service/get_all_orders.rb +93 -0
- data/examples/v201107/order_service/get_order.rb +74 -0
- data/examples/v201107/order_service/get_orders_by_statement.rb +90 -0
- data/examples/v201107/order_service/update_orders.rb +95 -0
- data/examples/v201107/placement_service/create_placements.rb +128 -0
- data/examples/v201107/placement_service/deactivate_placements.rb +118 -0
- data/examples/v201107/placement_service/get_all_placements.rb +93 -0
- data/examples/v201107/placement_service/get_placement.rb +74 -0
- data/examples/v201107/placement_service/get_placements_by_statement.rb +86 -0
- data/examples/v201107/placement_service/update_placements.rb +97 -0
- data/examples/v201107/publisher_query_language_service/get_all_bandwidth_groups.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_browser_languages.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_browsers.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_cities.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_countries.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_metros.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_operating_systems.rb +85 -0
- data/examples/v201107/publisher_query_language_service/get_all_regions.rb +85 -0
- data/examples/v201107/report_service/download_report.rb +81 -0
- data/examples/v201107/report_service/run_delivery_report.rb +89 -0
- data/examples/v201107/report_service/run_inventory_report.rb +90 -0
- data/examples/v201107/report_service/run_sales_report.rb +89 -0
- data/examples/v201107/user_service/create_users.rb +89 -0
- data/examples/v201107/user_service/deactivate_users.rb +99 -0
- data/examples/v201107/user_service/get_all_roles.rb +73 -0
- data/examples/v201107/user_service/get_all_users.rb +92 -0
- data/examples/v201107/user_service/get_current_user.rb +66 -0
- data/examples/v201107/user_service/get_user.rb +73 -0
- data/examples/v201107/user_service/get_users_by_statement.rb +79 -0
- data/examples/v201107/user_service/update_users.rb +89 -0
- data/lib/dfp_api/api_config.rb +16 -7
- data/lib/dfp_api/v201107/company_service.rb +52 -0
- data/lib/dfp_api/v201107/company_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/creative_service.rb +52 -0
- data/lib/dfp_api/v201107/creative_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/custom_targeting_service.rb +60 -0
- data/lib/dfp_api/v201107/custom_targeting_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/forecast_service.rb +36 -0
- data/lib/dfp_api/v201107/forecast_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/inventory_service.rb +60 -0
- data/lib/dfp_api/v201107/inventory_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/label_service.rb +56 -0
- data/lib/dfp_api/v201107/label_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/line_item_creative_association_service.rb +56 -0
- data/lib/dfp_api/v201107/line_item_creative_association_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/line_item_service.rb +56 -0
- data/lib/dfp_api/v201107/line_item_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/network_service.rb +40 -0
- data/lib/dfp_api/v201107/network_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/order_service.rb +56 -0
- data/lib/dfp_api/v201107/order_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/placement_service.rb +56 -0
- data/lib/dfp_api/v201107/placement_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/publisher_query_language_service.rb +32 -0
- data/lib/dfp_api/v201107/publisher_query_language_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/report_service.rb +40 -0
- data/lib/dfp_api/v201107/report_service_registry.rb +42 -0
- data/lib/dfp_api/v201107/user_service.rb +64 -0
- data/lib/dfp_api/v201107/user_service_registry.rb +42 -0
- metadata +115 -4
@@ -0,0 +1,42 @@
|
|
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.5.0 on 2011-08-03 17:27:33.
|
7
|
+
|
8
|
+
module DfpApi; module V201107; module CustomTargetingService
|
9
|
+
class CustomTargetingServiceRegistry
|
10
|
+
CUSTOMTARGETINGSERVICE_METHODS = {:perform_custom_targeting_key_action=>{:input=>[{:type=>"CustomTargetingKeyAction", :max_occurs=>1, :name=>:custom_targeting_key_action, :min_occurs=>0}, {:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"UpdateResult", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"perform_custom_targeting_key_action_response"}}, :perform_custom_targeting_value_action=>{:input=>[{:type=>"CustomTargetingValueAction", :max_occurs=>1, :name=>:custom_targeting_value_action, :min_occurs=>0}, {:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"UpdateResult", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"perform_custom_targeting_value_action_response"}}, :create_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :max_occurs=>:unbounded, :name=>:keys, :min_occurs=>0}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"create_custom_targeting_keys_response"}}, :update_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :max_occurs=>:unbounded, :name=>:keys, :min_occurs=>0}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"update_custom_targeting_keys_response"}}, :create_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :max_occurs=>:unbounded, :name=>:values, :min_occurs=>0}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"create_custom_targeting_values_response"}}, :update_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :max_occurs=>:unbounded, :name=>:values, :min_occurs=>0}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"update_custom_targeting_values_response"}}, :get_custom_targeting_keys_by_statement=>{:input=>[{:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"CustomTargetingKeyPage", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_custom_targeting_keys_by_statement_response"}}, :get_custom_targeting_values_by_statement=>{:input=>[{:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"CustomTargetingValuePage", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_custom_targeting_values_by_statement_response"}}}
|
11
|
+
CUSTOMTARGETINGSERVICE_TYPES = {:SoapResponseHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:request_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:response_time, :min_occurs=>0}]}, :DeleteCustomTargetingValues=>{:fields=>[], :base=>"CustomTargetingValueAction"}, :Statement=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:query, :min_occurs=>0}, {:type=>"String_ValueMapEntry", :max_occurs=>:unbounded, :name=>:values, :min_occurs=>0}]}, :CustomTargetingKey=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:display_name, :min_occurs=>0}, {:type=>"CustomTargetingKey.Type", :max_occurs=>1, :name=>:type, :min_occurs=>0}]}, :CustomTargetingKeyAction=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:custom_targeting_key_action_type, :min_occurs=>0}], :abstract=>true}, :UpdateResult=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:num_changes, :min_occurs=>0}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:key, :min_occurs=>0}, {:type=>"Value", :max_occurs=>1, :name=>:value, :min_occurs=>0}]}, :NumberValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :CustomTargetingKeyPage=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:total_result_set_size, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:start_index, :min_occurs=>0}, {:type=>"CustomTargetingKey", :max_occurs=>:unbounded, :name=>:results, :min_occurs=>0}]}, :CustomTargetingValueAction=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:custom_targeting_value_action_type, :min_occurs=>0}], :abstract=>true}, :Authentication=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:authentication_type, :min_occurs=>0}], :abstract=>true}, :OAuth=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:parameters, :min_occurs=>0}], :base=>"Authentication"}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:custom_targeting_key_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:display_name, :min_occurs=>0}, {:type=>"CustomTargetingValue.MatchType", :max_occurs=>1, :name=>:match_type, :min_occurs=>0}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :Value=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value_type, :min_occurs=>0}], :abstract=>true}, :CustomTargetingValuePage=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:total_result_set_size, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:start_index, :min_occurs=>0}, {:type=>"CustomTargetingValue", :max_occurs=>:unbounded, :name=>:results, :min_occurs=>0}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:network_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:application_name, :min_occurs=>0}, {:type=>"Authentication", :max_occurs=>1, :name=>:authentication, :min_occurs=>0}]}, :ClientLogin=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:token, :min_occurs=>0}], :base=>"Authentication"}, :TextValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :DeleteCustomTargetingKeys=>{:fields=>[], :base=>"CustomTargetingKeyAction"}}
|
12
|
+
CUSTOMTARGETINGSERVICE_NAMESPACES = []
|
13
|
+
|
14
|
+
def self.get_method_signature(method_name)
|
15
|
+
return CUSTOMTARGETINGSERVICE_METHODS[method_name.to_sym]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.get_type_signature(type_name)
|
19
|
+
return CUSTOMTARGETINGSERVICE_TYPES[type_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return CUSTOMTARGETINGSERVICE_NAMESPACES[index]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Base class for exceptions.
|
28
|
+
class ApplicationException < DfpApi::Errors::ApiException
|
29
|
+
attr_reader :message # string
|
30
|
+
attr_reader :application_exception_type # string
|
31
|
+
end
|
32
|
+
|
33
|
+
# Exception class for holding a list of service errors.
|
34
|
+
class ApiException < ApplicationException
|
35
|
+
attr_reader :errors # ApiError
|
36
|
+
def initialize(exception_fault)
|
37
|
+
@array_fields ||= []
|
38
|
+
@array_fields << 'errors'
|
39
|
+
super(exception_fault)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end; end; end
|
@@ -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.5.0 on 2011-08-03 17:28:03.
|
7
|
+
|
8
|
+
require 'ads_common/savon_service'
|
9
|
+
require 'dfp_api/v201107/forecast_service_registry'
|
10
|
+
|
11
|
+
module DfpApi; module V201107; module ForecastService
|
12
|
+
class ForecastService < AdsCommon::SavonService
|
13
|
+
def initialize(api, endpoint)
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201107'
|
15
|
+
super(api, endpoint, namespace, :v201107)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_forecast(*args)
|
19
|
+
return execute_action('get_forecast', args)
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_forecast_by_id(*args)
|
23
|
+
return execute_action('get_forecast_by_id', 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::V201107::ForecastService
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end; end; end
|
@@ -0,0 +1,42 @@
|
|
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.5.0 on 2011-08-03 17:28:03.
|
7
|
+
|
8
|
+
module DfpApi; module V201107; module ForecastService
|
9
|
+
class ForecastServiceRegistry
|
10
|
+
FORECASTSERVICE_METHODS = {:get_forecast=>{:input=>[{:type=>"LineItem", :max_occurs=>1, :name=>:line_item, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Forecast", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_forecast_response"}}, :get_forecast_by_id=>{:input=>[{:type=>"long", :max_occurs=>1, :name=>:line_item_id, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Forecast", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_forecast_by_id_response"}}}
|
11
|
+
FORECASTSERVICE_TYPES = {:SoapResponseHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:request_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:response_time, :min_occurs=>0}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :max_occurs=>:unbounded, :name=>:targeted_locations, :min_occurs=>0}, {:type=>"Location", :max_occurs=>:unbounded, :name=>:excluded_locations, :min_occurs=>0}]}, :BrowserTargeting=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:is_targeted, :min_occurs=>0}, {:type=>"Technology", :max_occurs=>:unbounded, :name=>:browsers, :min_occurs=>0}]}, :Targeting=>{:fields=>[{:type=>"GeoTargeting", :max_occurs=>1, :name=>:geo_targeting, :min_occurs=>0}, {:type=>"InventoryTargeting", :max_occurs=>1, :name=>:inventory_targeting, :min_occurs=>0}, {:type=>"DayPartTargeting", :max_occurs=>1, :name=>:day_part_targeting, :min_occurs=>0}, {:type=>"TechnologyTargeting", :max_occurs=>1, :name=>:technology_targeting, :min_occurs=>0}, {:type=>"CustomCriteriaSet", :max_occurs=>1, :name=>:custom_targeting, :min_occurs=>0}, {:type=>"UserDomainTargeting", :max_occurs=>1, :name=>:user_domain_targeting, :min_occurs=>0}]}, :Location=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:location_type, :min_occurs=>0}]}, :DayPart=>{:fields=>[{:type=>"DayOfWeek", :max_occurs=>1, :name=>:day_of_week, :min_occurs=>0}, {:type=>"TimeOfDay", :max_occurs=>1, :name=>:start_time, :min_occurs=>0}, {:type=>"TimeOfDay", :max_occurs=>1, :name=>:end_time, :min_occurs=>0}]}, :BandwidthGroup=>{:fields=>[], :base=>"Technology"}, :Money=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:currency_code, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:micro_amount, :min_occurs=>0}]}, :InventoryTargeting=>{:fields=>[{:type=>"string", :max_occurs=>:unbounded, :name=>:targeted_ad_unit_ids, :min_occurs=>0}, {:type=>"string", :max_occurs=>:unbounded, :name=>:excluded_ad_unit_ids, :min_occurs=>0}, {:type=>"long", :max_occurs=>:unbounded, :name=>:targeted_placement_ids, :min_occurs=>0}]}, :CityLocation=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:city_name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:region_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:country_code, :min_occurs=>0}], :base=>"Location"}, :TimeOfDay=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:hour, :min_occurs=>0}, {:type=>"MinuteOfHour", :max_occurs=>1, :name=>:minute, :min_occurs=>0}]}, :MetroLocation=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:metro_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:country_code, :min_occurs=>0}], :base=>"Location"}, :DayPartTargeting=>{:fields=>[{:type=>"DayPart", :max_occurs=>:unbounded, :name=>:day_parts, :min_occurs=>0}, {:type=>"DeliveryTimeZone", :max_occurs=>1, :name=>:time_zone, :min_occurs=>0}]}, :BandwidthGroupTargeting=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:is_targeted, :min_occurs=>0}, {:type=>"Technology", :max_occurs=>:unbounded, :name=>:bandwidth_groups, :min_occurs=>0}]}, :OperatingSystem=>{:fields=>[], :base=>"Technology"}, :Forecast=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:order_id, :min_occurs=>0}, {:type=>"UnitType", :max_occurs=>1, :name=>:unit_type, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:available_units, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:delivered_units, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:matched_units, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:possible_units, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:reserved_units, :min_occurs=>0}]}, :CountryLocation=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:country_code, :min_occurs=>0}], :base=>"Location"}, :DeliveryData=>{:fields=>[{:type=>"long", :max_occurs=>:unbounded, :name=>:units, :min_occurs=>0}]}, :Browser=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:major_version, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:minor_version, :min_occurs=>0}], :base=>"Technology"}, :Authentication=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:authentication_type, :min_occurs=>0}], :abstract=>true}, :AppliedLabel=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:label_id, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:is_negated, :min_occurs=>0}]}, :OperatingSystemTargeting=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:is_targeted, :min_occurs=>0}, {:type=>"Technology", :max_occurs=>:unbounded, :name=>:operating_systems, :min_occurs=>0}]}, :OAuth=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:parameters, :min_occurs=>0}], :base=>"Authentication"}, :LineItem=>{:fields=>[{:type=>"Targeting", :max_occurs=>1, :name=>:targeting, :min_occurs=>0}], :base=>"LineItemSummary"}, :Date=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:year, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:month, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:day, :min_occurs=>0}]}, :CustomCriteria=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:key_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>:unbounded, :name=>:value_ids, :min_occurs=>0}, {:type=>"CustomCriteria.ComparisonOperator", :max_occurs=>1, :name=>:operator, :min_occurs=>0}], :base=>"CustomCriteriaNode"}, :UserDomainTargeting=>{:fields=>[{:type=>"string", :max_occurs=>:unbounded, :name=>:domains, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:targeted, :min_occurs=>0}]}, :RegionLocation=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:region_code, :min_occurs=>0}], :base=>"Location"}, :DeliveryIndicator=>{:fields=>[{:type=>"double", :max_occurs=>1, :name=>:expected_delivery_percentage, :min_occurs=>0}, {:type=>"double", :max_occurs=>1, :name=>:actual_delivery_percentage, :min_occurs=>0}]}, :BrowserLanguage=>{:fields=>[], :base=>"Technology"}, :Technology=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:technology_type, :min_occurs=>0}]}, :Size=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:width, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:height, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:is_aspect_ratio, :min_occurs=>0}]}, :CustomCriteriaSet=>{:fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :max_occurs=>1, :name=>:logical_operator, :min_occurs=>0}, {:type=>"CustomCriteriaNode", :max_occurs=>:unbounded, :name=>:children, :min_occurs=>0}], :base=>"CustomCriteriaNode"}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:network_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:application_name, :min_occurs=>0}, {:type=>"Authentication", :max_occurs=>1, :name=>:authentication, :min_occurs=>0}]}, :FrequencyCap=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:max_impressions, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:num_time_units, :min_occurs=>0}, {:type=>"TimeUnit", :max_occurs=>1, :name=>:time_unit, :min_occurs=>0}]}, :DateTime=>{:fields=>[{:type=>"Date", :max_occurs=>1, :name=>:date, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:hour, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:minute, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:second, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:time_zone_id, :min_occurs=>0}]}, :ClientLogin=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:token, :min_occurs=>0}], :base=>"Authentication"}, :BrowserLanguageTargeting=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:is_targeted, :min_occurs=>0}, {:type=>"Technology", :max_occurs=>:unbounded, :name=>:browser_languages, :min_occurs=>0}]}, :Stats=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:impressions_delivered, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:clicks_delivered, :min_occurs=>0}]}, :LineItemSummary=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:order_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:external_id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:order_name, :min_occurs=>0}, {:type=>"DateTime", :max_occurs=>1, :name=>:start_date_time, :min_occurs=>0}, {:type=>"StartDateTimeType", :max_occurs=>1, :name=>:start_date_time_type, :min_occurs=>0}, {:type=>"DateTime", :max_occurs=>1, :name=>:end_date_time, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:unlimited_end_date_time, :min_occurs=>0}, {:type=>"CreativeRotationType", :max_occurs=>1, :name=>:creative_rotation_type, :min_occurs=>0}, {:type=>"DeliveryRateType", :max_occurs=>1, :name=>:delivery_rate_type, :min_occurs=>0}, {:type=>"RoadblockingType", :max_occurs=>1, :name=>:roadblocking_type, :min_occurs=>0}, {:type=>"FrequencyCap", :max_occurs=>:unbounded, :name=>:frequency_caps, :min_occurs=>0}, {:type=>"LineItemType", :max_occurs=>1, :name=>:line_item_type, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:priority, :min_occurs=>0}, {:type=>"UnitType", :max_occurs=>1, :name=>:unit_type, :min_occurs=>0}, {:type=>"LineItemSummary.Duration", :max_occurs=>1, :name=>:duration, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:units_bought, :min_occurs=>0}, {:type=>"Money", :max_occurs=>1, :name=>:cost_per_unit, :min_occurs=>0}, {:type=>"Money", :max_occurs=>1, :name=>:value_cost_per_unit, :min_occurs=>0}, {:type=>"CostType", :max_occurs=>1, :name=>:cost_type, :min_occurs=>0}, {:type=>"LineItemDiscountType", :max_occurs=>1, :name=>:discount_type, :min_occurs=>0}, {:type=>"double", :max_occurs=>1, :name=>:discount, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:contracted_units_bought, :min_occurs=>0}, {:type=>"Size", :max_occurs=>:unbounded, :name=>:creative_sizes, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:allow_overbook, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:reserve_at_creation, :min_occurs=>0}, {:type=>"Stats", :max_occurs=>1, :name=>:stats, :min_occurs=>0}, {:type=>"DeliveryIndicator", :max_occurs=>1, :name=>:delivery_indicator, :min_occurs=>0}, {:type=>"DeliveryData", :max_occurs=>1, :name=>:delivery_data, :min_occurs=>0}, {:type=>"Money", :max_occurs=>1, :name=>:budget, :min_occurs=>0}, {:type=>"ComputedStatus", :max_occurs=>1, :name=>:status, :min_occurs=>0}, {:type=>"LineItemSummary.ReservationStatus", :max_occurs=>1, :name=>:reservation_status, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:is_archived, :min_occurs=>0}, {:type=>"AppliedLabel", :max_occurs=>:unbounded, :name=>:applied_labels, :min_occurs=>0}, {:type=>"AppliedLabel", :max_occurs=>:unbounded, :name=>:effective_applied_labels, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:disable_same_advertiser_competitive_exclusion, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:last_modified_by_app, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:notes, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:line_item_summary_type, :min_occurs=>0}]}, :CustomCriteriaNode=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:custom_criteria_node_type, :min_occurs=>0}], :abstract=>true}, :TechnologyTargeting=>{:fields=>[{:type=>"BandwidthGroupTargeting", :max_occurs=>1, :name=>:bandwidth_group_targeting, :min_occurs=>0}, {:type=>"BrowserTargeting", :max_occurs=>1, :name=>:browser_targeting, :min_occurs=>0}, {:type=>"BrowserLanguageTargeting", :max_occurs=>1, :name=>:browser_language_targeting, :min_occurs=>0}, {:type=>"OperatingSystemTargeting", :max_occurs=>1, :name=>:operating_system_targeting, :min_occurs=>0}]}}
|
12
|
+
FORECASTSERVICE_NAMESPACES = []
|
13
|
+
|
14
|
+
def self.get_method_signature(method_name)
|
15
|
+
return FORECASTSERVICE_METHODS[method_name.to_sym]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.get_type_signature(type_name)
|
19
|
+
return FORECASTSERVICE_TYPES[type_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return FORECASTSERVICE_NAMESPACES[index]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Base class for exceptions.
|
28
|
+
class ApplicationException < DfpApi::Errors::ApiException
|
29
|
+
attr_reader :message # string
|
30
|
+
attr_reader :application_exception_type # string
|
31
|
+
end
|
32
|
+
|
33
|
+
# Exception class for holding a list of service errors.
|
34
|
+
class ApiException < ApplicationException
|
35
|
+
attr_reader :errors # ApiError
|
36
|
+
def initialize(exception_fault)
|
37
|
+
@array_fields ||= []
|
38
|
+
@array_fields << 'errors'
|
39
|
+
super(exception_fault)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end; end; end
|
@@ -0,0 +1,60 @@
|
|
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.5.0 on 2011-08-03 17:27:58.
|
7
|
+
|
8
|
+
require 'ads_common/savon_service'
|
9
|
+
require 'dfp_api/v201107/inventory_service_registry'
|
10
|
+
|
11
|
+
module DfpApi; module V201107; module InventoryService
|
12
|
+
class InventoryService < AdsCommon::SavonService
|
13
|
+
def initialize(api, endpoint)
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201107'
|
15
|
+
super(api, endpoint, namespace, :v201107)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_ad_unit(*args)
|
19
|
+
return execute_action('get_ad_unit', args)
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_ad_units_by_statement(*args)
|
23
|
+
return execute_action('get_ad_units_by_statement', args)
|
24
|
+
end
|
25
|
+
|
26
|
+
def perform_ad_unit_action(*args)
|
27
|
+
return execute_action('perform_ad_unit_action', args)
|
28
|
+
end
|
29
|
+
|
30
|
+
def update_ad_unit(*args)
|
31
|
+
return execute_action('update_ad_unit', args)
|
32
|
+
end
|
33
|
+
|
34
|
+
def create_ad_unit(*args)
|
35
|
+
return execute_action('create_ad_unit', args)
|
36
|
+
end
|
37
|
+
|
38
|
+
def update_ad_units(*args)
|
39
|
+
return execute_action('update_ad_units', args)
|
40
|
+
end
|
41
|
+
|
42
|
+
def get_ad_unit_sizes(*args)
|
43
|
+
return execute_action('get_ad_unit_sizes', args)
|
44
|
+
end
|
45
|
+
|
46
|
+
def create_ad_units(*args)
|
47
|
+
return execute_action('create_ad_units', args)
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def get_service_registry()
|
53
|
+
return InventoryServiceRegistry
|
54
|
+
end
|
55
|
+
|
56
|
+
def get_module()
|
57
|
+
return DfpApi::V201107::InventoryService
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end; end; end
|
@@ -0,0 +1,42 @@
|
|
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.5.0 on 2011-08-03 17:27:58.
|
7
|
+
|
8
|
+
module DfpApi; module V201107; module InventoryService
|
9
|
+
class InventoryServiceRegistry
|
10
|
+
INVENTORYSERVICE_METHODS = {:get_ad_unit=>{:input=>[{:type=>"string", :max_occurs=>1, :name=>:ad_unit_id, :min_occurs=>0}], :output=>{:fields=>[{:type=>"AdUnit", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_ad_unit_response"}}, :get_ad_units_by_statement=>{:input=>[{:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"AdUnitPage", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_ad_units_by_statement_response"}}, :perform_ad_unit_action=>{:input=>[{:type=>"AdUnitAction", :max_occurs=>1, :name=>:ad_unit_action, :min_occurs=>0}, {:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"UpdateResult", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"perform_ad_unit_action_response"}}, :update_ad_unit=>{:input=>[{:type=>"AdUnit", :max_occurs=>1, :name=>:ad_unit, :min_occurs=>0}], :output=>{:fields=>[{:type=>"AdUnit", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"update_ad_unit_response"}}, :create_ad_unit=>{:input=>[{:type=>"AdUnit", :max_occurs=>1, :name=>:ad_unit, :min_occurs=>0}], :output=>{:fields=>[{:type=>"AdUnit", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"create_ad_unit_response"}}, :update_ad_units=>{:input=>[{:type=>"AdUnit", :max_occurs=>:unbounded, :name=>:ad_units, :min_occurs=>0}], :output=>{:fields=>[{:type=>"AdUnit", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"update_ad_units_response"}}, :get_ad_unit_sizes=>{:input=>[], :output=>{:fields=>[{:type=>"AdUnitSize", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"get_ad_unit_sizes_response"}}, :create_ad_units=>{:input=>[{:type=>"AdUnit", :max_occurs=>:unbounded, :name=>:ad_units, :min_occurs=>0}], :output=>{:fields=>[{:type=>"AdUnit", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"create_ad_units_response"}}}
|
11
|
+
INVENTORYSERVICE_TYPES = {:SoapResponseHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:request_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:response_time, :min_occurs=>0}]}, :Size_StringMapEntry=>{:fields=>[{:type=>"Size", :max_occurs=>1, :name=>:key, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}]}, :AdUnitSize=>{:fields=>[{:type=>"Size", :max_occurs=>1, :name=>:size, :min_occurs=>0}]}, :Statement=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:query, :min_occurs=>0}, {:type=>"String_ValueMapEntry", :max_occurs=>:unbounded, :name=>:values, :min_occurs=>0}]}, :AdSenseSettings=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:ad_sense_enabled, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:border_color, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:title_color, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:background_color, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:text_color, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:url_color, :min_occurs=>0}, {:type=>"AdSenseSettings.AdType", :max_occurs=>1, :name=>:ad_type, :min_occurs=>0}, {:type=>"AdSenseSettings.BorderStyle", :max_occurs=>1, :name=>:border_style, :min_occurs=>0}, {:type=>"AdSenseSettings.FontFamily", :max_occurs=>1, :name=>:font_family, :min_occurs=>0}, {:type=>"AdSenseSettings.FontSize", :max_occurs=>1, :name=>:font_size, :min_occurs=>0}, {:type=>"Size_StringMapEntry", :max_occurs=>:unbounded, :name=>:afc_formats, :min_occurs=>0}]}, :UpdateResult=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:num_changes, :min_occurs=>0}]}, :ActivateAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:key, :min_occurs=>0}, {:type=>"Value", :max_occurs=>1, :name=>:value, :min_occurs=>0}]}, :AdSenseSettingsInheritedProperty=>{:fields=>[{:type=>"AdSenseSettings", :max_occurs=>1, :name=>:value, :min_occurs=>0}]}, :NumberValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :Authentication=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:authentication_type, :min_occurs=>0}], :abstract=>true}, :ArchiveAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :AdUnitAction=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:ad_unit_action_type, :min_occurs=>0}], :abstract=>true}, :OAuth=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:parameters, :min_occurs=>0}], :base=>"Authentication"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :AssignAdUnitsToPlacement=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:placement_id, :min_occurs=>0}], :base=>"AdUnitAction"}, :AdUnit=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:parent_id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:description, :min_occurs=>0}, {:type=>"AdUnit.TargetWindow", :max_occurs=>1, :name=>:target_window, :min_occurs=>0}, {:type=>"InventoryStatus", :max_occurs=>1, :name=>:status, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:ad_unit_code, :min_occurs=>0}, {:type=>"Size", :max_occurs=>:unbounded, :name=>:sizes, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:explicitly_targeted, :min_occurs=>0}, {:type=>"AdSenseSettingsInheritedProperty", :max_occurs=>1, :name=>:inherited_ad_sense_settings, :min_occurs=>0}]}, :Value=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value_type, :min_occurs=>0}], :abstract=>true}, :Size=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:width, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:height, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:is_aspect_ratio, :min_occurs=>0}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:network_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:application_name, :min_occurs=>0}, {:type=>"Authentication", :max_occurs=>1, :name=>:authentication, :min_occurs=>0}]}, :DeactivateAdUnits=>{:fields=>[], :base=>"AdUnitAction"}, :ClientLogin=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:token, :min_occurs=>0}], :base=>"Authentication"}, :AdUnitPage=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:total_result_set_size, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:start_index, :min_occurs=>0}, {:type=>"AdUnit", :max_occurs=>:unbounded, :name=>:results, :min_occurs=>0}]}, :TextValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}}
|
12
|
+
INVENTORYSERVICE_NAMESPACES = []
|
13
|
+
|
14
|
+
def self.get_method_signature(method_name)
|
15
|
+
return INVENTORYSERVICE_METHODS[method_name.to_sym]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.get_type_signature(type_name)
|
19
|
+
return INVENTORYSERVICE_TYPES[type_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return INVENTORYSERVICE_NAMESPACES[index]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Base class for exceptions.
|
28
|
+
class ApplicationException < DfpApi::Errors::ApiException
|
29
|
+
attr_reader :message # string
|
30
|
+
attr_reader :application_exception_type # string
|
31
|
+
end
|
32
|
+
|
33
|
+
# Exception class for holding a list of service errors.
|
34
|
+
class ApiException < ApplicationException
|
35
|
+
attr_reader :errors # ApiError
|
36
|
+
def initialize(exception_fault)
|
37
|
+
@array_fields ||= []
|
38
|
+
@array_fields << 'errors'
|
39
|
+
super(exception_fault)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
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.5.0 on 2011-08-03 17:27:46.
|
7
|
+
|
8
|
+
require 'ads_common/savon_service'
|
9
|
+
require 'dfp_api/v201107/label_service_registry'
|
10
|
+
|
11
|
+
module DfpApi; module V201107; module LabelService
|
12
|
+
class LabelService < AdsCommon::SavonService
|
13
|
+
def initialize(api, endpoint)
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201107'
|
15
|
+
super(api, endpoint, namespace, :v201107)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_labels(*args)
|
19
|
+
return execute_action('create_labels', args)
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_label(*args)
|
23
|
+
return execute_action('get_label', args)
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_labels_by_statement(*args)
|
27
|
+
return execute_action('get_labels_by_statement', args)
|
28
|
+
end
|
29
|
+
|
30
|
+
def perform_label_action(*args)
|
31
|
+
return execute_action('perform_label_action', args)
|
32
|
+
end
|
33
|
+
|
34
|
+
def update_label(*args)
|
35
|
+
return execute_action('update_label', args)
|
36
|
+
end
|
37
|
+
|
38
|
+
def create_label(*args)
|
39
|
+
return execute_action('create_label', args)
|
40
|
+
end
|
41
|
+
|
42
|
+
def update_labels(*args)
|
43
|
+
return execute_action('update_labels', args)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def get_service_registry()
|
49
|
+
return LabelServiceRegistry
|
50
|
+
end
|
51
|
+
|
52
|
+
def get_module()
|
53
|
+
return DfpApi::V201107::LabelService
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end; end; end
|
@@ -0,0 +1,42 @@
|
|
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.5.0 on 2011-08-03 17:27:46.
|
7
|
+
|
8
|
+
module DfpApi; module V201107; module LabelService
|
9
|
+
class LabelServiceRegistry
|
10
|
+
LABELSERVICE_METHODS = {:create_labels=>{:input=>[{:type=>"Label", :max_occurs=>:unbounded, :name=>:labels, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Label", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"create_labels_response"}}, :get_label=>{:input=>[{:type=>"long", :max_occurs=>1, :name=>:label_id, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Label", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_label_response"}}, :get_labels_by_statement=>{:input=>[{:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LabelPage", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_labels_by_statement_response"}}, :perform_label_action=>{:input=>[{:type=>"LabelAction", :max_occurs=>1, :name=>:label_action, :min_occurs=>0}, {:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"UpdateResult", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"perform_label_action_response"}}, :update_label=>{:input=>[{:type=>"Label", :max_occurs=>1, :name=>:label, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Label", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"update_label_response"}}, :create_label=>{:input=>[{:type=>"Label", :max_occurs=>1, :name=>:label, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Label", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"create_label_response"}}, :update_labels=>{:input=>[{:type=>"Label", :max_occurs=>:unbounded, :name=>:labels, :min_occurs=>0}], :output=>{:fields=>[{:type=>"Label", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"update_labels_response"}}}
|
11
|
+
LABELSERVICE_TYPES = {:SoapResponseHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:request_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:response_time, :min_occurs=>0}]}, :DeactivateLabels=>{:fields=>[], :base=>"LabelAction"}, :Statement=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:query, :min_occurs=>0}, {:type=>"String_ValueMapEntry", :max_occurs=>:unbounded, :name=>:values, :min_occurs=>0}]}, :UpdateResult=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:num_changes, :min_occurs=>0}]}, :LabelAction=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:label_action_type, :min_occurs=>0}], :abstract=>true}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:key, :min_occurs=>0}, {:type=>"Value", :max_occurs=>1, :name=>:value, :min_occurs=>0}]}, :NumberValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :Authentication=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:authentication_type, :min_occurs=>0}], :abstract=>true}, :Label=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:id, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:name, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:description, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:is_active, :min_occurs=>0}, {:type=>"LabelType", :max_occurs=>1, :name=>:type, :min_occurs=>0}]}, :OAuth=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:parameters, :min_occurs=>0}], :base=>"Authentication"}, :LabelPage=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:total_result_set_size, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:start_index, :min_occurs=>0}, {:type=>"Label", :max_occurs=>:unbounded, :name=>:results, :min_occurs=>0}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :Value=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value_type, :min_occurs=>0}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:network_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:application_name, :min_occurs=>0}, {:type=>"Authentication", :max_occurs=>1, :name=>:authentication, :min_occurs=>0}]}, :ClientLogin=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:token, :min_occurs=>0}], :base=>"Authentication"}, :TextValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :ActivateLabels=>{:fields=>[], :base=>"LabelAction"}}
|
12
|
+
LABELSERVICE_NAMESPACES = []
|
13
|
+
|
14
|
+
def self.get_method_signature(method_name)
|
15
|
+
return LABELSERVICE_METHODS[method_name.to_sym]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.get_type_signature(type_name)
|
19
|
+
return LABELSERVICE_TYPES[type_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return LABELSERVICE_NAMESPACES[index]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Base class for exceptions.
|
28
|
+
class ApplicationException < DfpApi::Errors::ApiException
|
29
|
+
attr_reader :message # string
|
30
|
+
attr_reader :application_exception_type # string
|
31
|
+
end
|
32
|
+
|
33
|
+
# Exception class for holding a list of service errors.
|
34
|
+
class ApiException < ApplicationException
|
35
|
+
attr_reader :errors # ApiError
|
36
|
+
def initialize(exception_fault)
|
37
|
+
@array_fields ||= []
|
38
|
+
@array_fields << 'errors'
|
39
|
+
super(exception_fault)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
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.5.0 on 2011-08-03 17:28:17.
|
7
|
+
|
8
|
+
require 'ads_common/savon_service'
|
9
|
+
require 'dfp_api/v201107/line_item_creative_association_service_registry'
|
10
|
+
|
11
|
+
module DfpApi; module V201107; module LineItemCreativeAssociationService
|
12
|
+
class LineItemCreativeAssociationService < AdsCommon::SavonService
|
13
|
+
def initialize(api, endpoint)
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201107'
|
15
|
+
super(api, endpoint, namespace, :v201107)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_line_item_creative_association(*args)
|
19
|
+
return execute_action('create_line_item_creative_association', args)
|
20
|
+
end
|
21
|
+
|
22
|
+
def update_line_item_creative_associations(*args)
|
23
|
+
return execute_action('update_line_item_creative_associations', args)
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_line_item_creative_associations(*args)
|
27
|
+
return execute_action('create_line_item_creative_associations', args)
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_line_item_creative_association(*args)
|
31
|
+
return execute_action('get_line_item_creative_association', args)
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_line_item_creative_associations_by_statement(*args)
|
35
|
+
return execute_action('get_line_item_creative_associations_by_statement', args)
|
36
|
+
end
|
37
|
+
|
38
|
+
def perform_line_item_creative_association_action(*args)
|
39
|
+
return execute_action('perform_line_item_creative_association_action', args)
|
40
|
+
end
|
41
|
+
|
42
|
+
def update_line_item_creative_association(*args)
|
43
|
+
return execute_action('update_line_item_creative_association', 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::V201107::LineItemCreativeAssociationService
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end; end; end
|
@@ -0,0 +1,42 @@
|
|
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.5.0 on 2011-08-03 17:28:17.
|
7
|
+
|
8
|
+
module DfpApi; module V201107; module LineItemCreativeAssociationService
|
9
|
+
class LineItemCreativeAssociationServiceRegistry
|
10
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS = {:create_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>1, :name=>:line_item_creative_association, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"create_line_item_creative_association_response"}}, :update_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>:unbounded, :name=>:line_item_creative_associations, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"update_line_item_creative_associations_response"}}, :create_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>:unbounded, :name=>:line_item_creative_associations, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>:unbounded, :name=>:rval, :min_occurs=>0}], :name=>"create_line_item_creative_associations_response"}}, :get_line_item_creative_association=>{:input=>[{:type=>"long", :max_occurs=>1, :name=>:line_item_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:creative_id, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_line_item_creative_association_response"}}, :get_line_item_creative_associations_by_statement=>{:input=>[{:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociationPage", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"get_line_item_creative_associations_by_statement_response"}}, :perform_line_item_creative_association_action=>{:input=>[{:type=>"LineItemCreativeAssociationAction", :max_occurs=>1, :name=>:line_item_creative_association_action, :min_occurs=>0}, {:type=>"Statement", :max_occurs=>1, :name=>:filter_statement, :min_occurs=>0}], :output=>{:fields=>[{:type=>"UpdateResult", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"perform_line_item_creative_association_action_response"}}, :update_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>1, :name=>:line_item_creative_association, :min_occurs=>0}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :max_occurs=>1, :name=>:rval, :min_occurs=>0}], :name=>"update_line_item_creative_association_response"}}}
|
11
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES = {:SoapResponseHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:request_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:response_time, :min_occurs=>0}]}, :LineItemCreativeAssociation=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:line_item_id, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:creative_id, :min_occurs=>0}, {:type=>"double", :max_occurs=>1, :name=>:manual_creative_rotation_weight, :min_occurs=>0}, {:type=>"DateTime", :max_occurs=>1, :name=>:start_date_time, :min_occurs=>0}, {:type=>"StartDateTimeType", :max_occurs=>1, :name=>:start_date_time_type, :min_occurs=>0}, {:type=>"DateTime", :max_occurs=>1, :name=>:end_date_time, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:destination_url, :min_occurs=>0}, {:type=>"Size", :max_occurs=>:unbounded, :name=>:sizes, :min_occurs=>0}, {:type=>"LineItemCreativeAssociation.Status", :max_occurs=>1, :name=>:status, :min_occurs=>0}, {:type=>"LineItemCreativeAssociationStats", :max_occurs=>1, :name=>:stats, :min_occurs=>0}]}, :Statement=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:query, :min_occurs=>0}, {:type=>"String_ValueMapEntry", :max_occurs=>:unbounded, :name=>:values, :min_occurs=>0}]}, :Money=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:currency_code, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:micro_amount, :min_occurs=>0}]}, :LineItemCreativeAssociationPage=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:total_result_set_size, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:start_index, :min_occurs=>0}, {:type=>"LineItemCreativeAssociation", :max_occurs=>:unbounded, :name=>:results, :min_occurs=>0}]}, :UpdateResult=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:num_changes, :min_occurs=>0}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:key, :min_occurs=>0}, {:type=>"Value", :max_occurs=>1, :name=>:value, :min_occurs=>0}]}, :NumberValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :LineItemCreativeAssociationStats=>{:fields=>[{:type=>"Stats", :max_occurs=>1, :name=>:stats, :min_occurs=>0}, {:type=>"Money", :max_occurs=>1, :name=>:cost_in_order_currency, :min_occurs=>0}]}, :Authentication=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:authentication_type, :min_occurs=>0}], :abstract=>true}, :ActivateLineItemCreativeAssociations=>{:fields=>[], :base=>"LineItemCreativeAssociationAction"}, :OAuth=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:parameters, :min_occurs=>0}], :base=>"Authentication"}, :Date=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:year, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:month, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:day, :min_occurs=>0}]}, :DeactivateLineItemCreativeAssociations=>{:fields=>[], :base=>"LineItemCreativeAssociationAction"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :Value=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value_type, :min_occurs=>0}], :abstract=>true}, :Size=>{:fields=>[{:type=>"int", :max_occurs=>1, :name=>:width, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:height, :min_occurs=>0}, {:type=>"boolean", :max_occurs=>1, :name=>:is_aspect_ratio, :min_occurs=>0}]}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:network_code, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:application_name, :min_occurs=>0}, {:type=>"Authentication", :max_occurs=>1, :name=>:authentication, :min_occurs=>0}]}, :LineItemCreativeAssociationAction=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:line_item_creative_association_action_type, :min_occurs=>0}], :abstract=>true}, :DateTime=>{:fields=>[{:type=>"Date", :max_occurs=>1, :name=>:date, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:hour, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:minute, :min_occurs=>0}, {:type=>"int", :max_occurs=>1, :name=>:second, :min_occurs=>0}, {:type=>"string", :max_occurs=>1, :name=>:time_zone_id, :min_occurs=>0}]}, :ClientLogin=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:token, :min_occurs=>0}], :base=>"Authentication"}, :TextValue=>{:fields=>[{:type=>"string", :max_occurs=>1, :name=>:value, :min_occurs=>0}], :base=>"Value"}, :Stats=>{:fields=>[{:type=>"long", :max_occurs=>1, :name=>:impressions_delivered, :min_occurs=>0}, {:type=>"long", :max_occurs=>1, :name=>:clicks_delivered, :min_occurs=>0}]}}
|
12
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_NAMESPACES = []
|
13
|
+
|
14
|
+
def self.get_method_signature(method_name)
|
15
|
+
return LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS[method_name.to_sym]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.get_type_signature(type_name)
|
19
|
+
return LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES[type_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return LINEITEMCREATIVEASSOCIATIONSERVICE_NAMESPACES[index]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Base class for exceptions.
|
28
|
+
class ApplicationException < DfpApi::Errors::ApiException
|
29
|
+
attr_reader :message # string
|
30
|
+
attr_reader :application_exception_type # string
|
31
|
+
end
|
32
|
+
|
33
|
+
# Exception class for holding a list of service errors.
|
34
|
+
class ApiException < ApplicationException
|
35
|
+
attr_reader :errors # ApiError
|
36
|
+
def initialize(exception_fault)
|
37
|
+
@array_fields ||= []
|
38
|
+
@array_fields << 'errors'
|
39
|
+
super(exception_fault)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
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.5.0 on 2011-08-03 17:27:50.
|
7
|
+
|
8
|
+
require 'ads_common/savon_service'
|
9
|
+
require 'dfp_api/v201107/line_item_service_registry'
|
10
|
+
|
11
|
+
module DfpApi; module V201107; module LineItemService
|
12
|
+
class LineItemService < AdsCommon::SavonService
|
13
|
+
def initialize(api, endpoint)
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201107'
|
15
|
+
super(api, endpoint, namespace, :v201107)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_line_item(*args)
|
19
|
+
return execute_action('create_line_item', args)
|
20
|
+
end
|
21
|
+
|
22
|
+
def update_line_items(*args)
|
23
|
+
return execute_action('update_line_items', args)
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_line_items(*args)
|
27
|
+
return execute_action('create_line_items', args)
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_line_item(*args)
|
31
|
+
return execute_action('get_line_item', args)
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_line_items_by_statement(*args)
|
35
|
+
return execute_action('get_line_items_by_statement', args)
|
36
|
+
end
|
37
|
+
|
38
|
+
def perform_line_item_action(*args)
|
39
|
+
return execute_action('perform_line_item_action', args)
|
40
|
+
end
|
41
|
+
|
42
|
+
def update_line_item(*args)
|
43
|
+
return execute_action('update_line_item', 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::V201107::LineItemService
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end; end; end
|