google-dfp-api 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +201 -0
- data/ChangeLog +10 -0
- data/README +210 -0
- data/Rakefile +83 -0
- data/examples/v201101/common/error_handling.rb +76 -0
- data/examples/v201101/company_service/create_companies.rb +82 -0
- data/examples/v201101/company_service/get_all_companies.rb +92 -0
- data/examples/v201101/company_service/get_companies_by_statement.rb +88 -0
- data/examples/v201101/company_service/get_company.rb +72 -0
- data/examples/v201101/company_service/update_companies.rb +95 -0
- data/examples/v201101/creative_service/copy_image_creatives.rb +117 -0
- data/examples/v201101/creative_service/create_creatives.rb +109 -0
- data/examples/v201101/creative_service/get_all_creatives.rb +93 -0
- data/examples/v201101/creative_service/get_creative.rb +72 -0
- data/examples/v201101/creative_service/get_creatives_by_statement.rb +87 -0
- data/examples/v201101/creative_service/update_creatives.rb +98 -0
- data/examples/v201101/custom_targeting_service/create_custom_targeting_keys_and_values.rb +118 -0
- data/examples/v201101/custom_targeting_service/delete_custom_targeting_keys.rb +121 -0
- data/examples/v201101/custom_targeting_service/delete_custom_targeting_values.rb +125 -0
- data/examples/v201101/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +148 -0
- data/examples/v201101/custom_targeting_service/get_custom_targeting_keys_by_statement.rb +92 -0
- data/examples/v201101/custom_targeting_service/get_custom_targeting_values_by_statement.rb +98 -0
- data/examples/v201101/custom_targeting_service/update_custom_targeting_keys.rb +94 -0
- data/examples/v201101/custom_targeting_service/update_custom_targeting_values.rb +106 -0
- data/examples/v201101/forecast_service/get_forecast.rb +103 -0
- data/examples/v201101/forecast_service/get_forecast_by_id.rb +80 -0
- data/examples/v201101/inventory_service/create_ad_units.rb +98 -0
- data/examples/v201101/inventory_service/deactivate_ad_units.rb +119 -0
- data/examples/v201101/inventory_service/get_ad_unit.rb +72 -0
- data/examples/v201101/inventory_service/get_ad_units_by_statement.rb +96 -0
- data/examples/v201101/inventory_service/get_all_ad_units.rb +93 -0
- data/examples/v201101/inventory_service/update_ad_units.rb +94 -0
- data/examples/v201101/line_item_creative_association_service/create_licas.rb +94 -0
- data/examples/v201101/line_item_creative_association_service/deactivate_licas.rb +127 -0
- data/examples/v201101/line_item_creative_association_service/get_all_licas.rb +95 -0
- data/examples/v201101/line_item_creative_association_service/get_lica.rb +77 -0
- data/examples/v201101/line_item_creative_association_service/get_licas_by_statement.rb +91 -0
- data/examples/v201101/line_item_creative_association_service/update_licas.rb +92 -0
- data/examples/v201101/line_item_service/activate_line_items.rb +131 -0
- data/examples/v201101/line_item_service/create_line_items.rb +141 -0
- data/examples/v201101/line_item_service/get_all_line_items.rb +94 -0
- data/examples/v201101/line_item_service/get_line_item.rb +74 -0
- data/examples/v201101/line_item_service/get_line_items_by_statement.rb +89 -0
- data/examples/v201101/line_item_service/target_custom_criteria.rb +135 -0
- data/examples/v201101/line_item_service/update_line_items.rb +110 -0
- data/examples/v201101/network_service/get_all_networks.rb +74 -0
- data/examples/v201101/network_service/get_current_network.rb +66 -0
- data/examples/v201101/order_service/approve_orders.rb +116 -0
- data/examples/v201101/order_service/create_orders.rb +93 -0
- data/examples/v201101/order_service/get_all_orders.rb +93 -0
- data/examples/v201101/order_service/get_order.rb +74 -0
- data/examples/v201101/order_service/get_orders_by_statement.rb +90 -0
- data/examples/v201101/order_service/update_orders.rb +95 -0
- data/examples/v201101/placement_service/create_placements.rb +128 -0
- data/examples/v201101/placement_service/deactivate_placements.rb +118 -0
- data/examples/v201101/placement_service/get_all_placements.rb +93 -0
- data/examples/v201101/placement_service/get_placement.rb +74 -0
- data/examples/v201101/placement_service/get_placements_by_statement.rb +86 -0
- data/examples/v201101/placement_service/update_placements.rb +96 -0
- data/examples/v201101/publisher_query_language_service/get_all_cities.rb +85 -0
- data/examples/v201101/publisher_query_language_service/get_all_countries.rb +85 -0
- data/examples/v201101/publisher_query_language_service/get_all_metros.rb +85 -0
- data/examples/v201101/publisher_query_language_service/get_all_regions.rb +85 -0
- data/examples/v201101/report_service/download_report.rb +81 -0
- data/examples/v201101/report_service/run_delivery_report.rb +89 -0
- data/examples/v201101/report_service/run_inventory_report.rb +90 -0
- data/examples/v201101/report_service/run_sales_report.rb +89 -0
- data/examples/v201101/user_service/create_users.rb +89 -0
- data/examples/v201101/user_service/deactivate_users.rb +99 -0
- data/examples/v201101/user_service/get_all_roles.rb +73 -0
- data/examples/v201101/user_service/get_all_users.rb +92 -0
- data/examples/v201101/user_service/get_user.rb +73 -0
- data/examples/v201101/user_service/get_users_by_statement.rb +79 -0
- data/examples/v201101/user_service/update_users.rb +89 -0
- data/lib/dfp_api.rb +142 -0
- data/lib/dfp_api/api_config.rb +126 -0
- data/lib/dfp_api/credential_handler.rb +60 -0
- data/lib/dfp_api/errors.rb +59 -0
- data/lib/dfp_api/extensions.rb +54 -0
- data/lib/dfp_api/v201101/company_service.rb +52 -0
- data/lib/dfp_api/v201101/company_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/creative_service.rb +52 -0
- data/lib/dfp_api/v201101/creative_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/custom_targeting_service.rb +60 -0
- data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/forecast_service.rb +36 -0
- data/lib/dfp_api/v201101/forecast_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/inventory_service.rb +56 -0
- data/lib/dfp_api/v201101/inventory_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/line_item_creative_association_service.rb +56 -0
- data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/line_item_service.rb +56 -0
- data/lib/dfp_api/v201101/line_item_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/network_service.rb +40 -0
- data/lib/dfp_api/v201101/network_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/order_service.rb +56 -0
- data/lib/dfp_api/v201101/order_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/placement_service.rb +56 -0
- data/lib/dfp_api/v201101/placement_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/publisher_query_language_service.rb +32 -0
- data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/report_service.rb +40 -0
- data/lib/dfp_api/v201101/report_service_registry.rb +37 -0
- data/lib/dfp_api/v201101/user_service.rb +60 -0
- data/lib/dfp_api/v201101/user_service_registry.rb +37 -0
- metadata +204 -0
|
@@ -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.3.0 on 2011-06-09 13:32:35.
|
|
7
|
+
|
|
8
|
+
require 'ads_common/savon_service'
|
|
9
|
+
require 'dfp_api/v201101/forecast_service_registry'
|
|
10
|
+
|
|
11
|
+
module DfpApi; module V201101; module ForecastService
|
|
12
|
+
class ForecastService < AdsCommon::SavonService
|
|
13
|
+
def initialize(endpoint)
|
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
|
15
|
+
super(endpoint, namespace)
|
|
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::V201101::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.3.0 on 2011-06-09 13:32:35.
|
|
7
|
+
|
|
8
|
+
module DfpApi; module V201101; module ForecastService
|
|
9
|
+
class ForecastServiceRegistry
|
|
10
|
+
FORECASTSERVICE_METHODS = {:get_forecast=>{:output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_forecast_response"}, :input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}]}, :get_forecast_by_id=>{:output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_forecast_by_id_response"}, :input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}]}}
|
|
11
|
+
FORECASTSERVICE_TYPES = {:SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :PredefinedCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:value_ids, :max_occurs=>nil}]}, :FreeFormCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>nil}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :CustomCriteria=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:key_id, :max_occurs=>1}, {:type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :name=>:operator, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :RegionLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}]}, :FrequencyCap=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:max_impressions, :max_occurs=>1}, {:type=>"TimeUnit", :min_occurs=>0, :name=>:time_unit, :max_occurs=>1}]}, :Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:width, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:height, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_aspect_ratio, :max_occurs=>1}]}, :LineItemSummary=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:order_name, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"StartDateTimeType", :min_occurs=>0, :name=>:start_date_time_type, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:unlimited_end_date_time, :max_occurs=>1}, {:type=>"CreativeRotationType", :min_occurs=>0, :name=>:creative_rotation_type, :max_occurs=>1}, {:type=>"DeliveryRateType", :min_occurs=>0, :name=>:delivery_rate_type, :max_occurs=>1}, {:type=>"RoadblockingType", :min_occurs=>0, :name=>:roadblocking_type, :max_occurs=>1}, {:type=>"FrequencyCap", :min_occurs=>0, :name=>:frequency_caps, :max_occurs=>nil}, {:type=>"LineItemType", :min_occurs=>0, :name=>:line_item_type, :max_occurs=>1}, {:type=>"UnitType", :min_occurs=>0, :name=>:unit_type, :max_occurs=>1}, {:type=>"LineItemSummary.Duration", :min_occurs=>0, :name=>:duration, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:units_bought, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:cost_per_unit, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:value_cost_per_unit, :max_occurs=>1}, {:type=>"CostType", :min_occurs=>0, :name=>:cost_type, :max_occurs=>1}, {:type=>"LineItemDiscountType", :min_occurs=>0, :name=>:discount_type, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:discount, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:creative_sizes, :max_occurs=>nil}, {:type=>"boolean", :min_occurs=>0, :name=>:allow_overbook, :max_occurs=>1}, {:type=>"Stats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}, {:type=>"DeliveryIndicator", :min_occurs=>0, :name=>:delivery_indicator, :max_occurs=>1}, {:type=>"DeliveryData", :min_occurs=>0, :name=>:delivery_data, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:budget, :max_occurs=>1}, {:type=>"ComputedStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemSummary.ReservationStatus", :min_occurs=>0, :name=>:reservation_status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_archived, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:line_item_summary_type, :max_occurs=>1}]}, :CustomCriteriaSet=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :name=>:logical_operator, :max_occurs=>1}, {:type=>"CustomCriteriaNode", :min_occurs=>0, :name=>:children, :max_occurs=>nil}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :min_occurs=>0, :name=>:targeted_locations, :max_occurs=>nil}, {:type=>"Location", :min_occurs=>0, :name=>:excluded_locations, :max_occurs=>nil}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:clicks_delivered, :max_occurs=>1}]}, :Location=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:location_type, :max_occurs=>1}]}, :CustomCriteriaNode=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_criteria_node_type, :max_occurs=>1}], :abstract=>true}, :InventoryTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>nil}, {:type=>"string", :min_occurs=>0, :name=>:excluded_ad_unit_ids, :max_occurs=>nil}, {:type=>"long", :min_occurs=>0, :name=>:targeted_placement_ids, :max_occurs=>nil}]}, :Forecast=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}, {:type=>"UnitType", :min_occurs=>0, :name=>:unit_type, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:available_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:delivered_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:matched_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:possible_units, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:reserved_units, :max_occurs=>1}]}, :Targeting=>{:fields=>[{:type=>"GeoTargeting", :min_occurs=>0, :name=>:geo_targeting, :max_occurs=>1}, {:type=>"InventoryTargeting", :min_occurs=>0, :name=>:inventory_targeting, :max_occurs=>1}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :name=>:custom_targeting, :max_occurs=>1}]}, :MetroLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:metro_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :DeliveryData=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:units, :max_occurs=>nil}]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:custom_targeting_key_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :name=>:match_type, :max_occurs=>1}]}, :CityLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:city_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :DeliveryIndicator=>{:fields=>[{:type=>"double", :min_occurs=>0, :name=>:expected_delivery_percentage, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:actual_delivery_percentage, :max_occurs=>1}]}, :LineItem=>{:base=>"LineItemSummary", :fields=>[{:type=>"Targeting", :min_occurs=>0, :name=>:targeting, :max_occurs=>1}]}, :CountryLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}}
|
|
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.3.0 on 2011-06-09 13:32:30.
|
|
7
|
+
|
|
8
|
+
require 'ads_common/savon_service'
|
|
9
|
+
require 'dfp_api/v201101/inventory_service_registry'
|
|
10
|
+
|
|
11
|
+
module DfpApi; module V201101; module InventoryService
|
|
12
|
+
class InventoryService < AdsCommon::SavonService
|
|
13
|
+
def initialize(endpoint)
|
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
|
15
|
+
super(endpoint, namespace)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def update_ad_units(*args)
|
|
19
|
+
return execute_action('update_ad_units', args)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def create_ad_units(*args)
|
|
23
|
+
return execute_action('create_ad_units', args)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def get_ad_unit(*args)
|
|
27
|
+
return execute_action('get_ad_unit', args)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def get_ad_units_by_statement(*args)
|
|
31
|
+
return execute_action('get_ad_units_by_statement', args)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def perform_ad_unit_action(*args)
|
|
35
|
+
return execute_action('perform_ad_unit_action', args)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def update_ad_unit(*args)
|
|
39
|
+
return execute_action('update_ad_unit', args)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def create_ad_unit(*args)
|
|
43
|
+
return execute_action('create_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::V201101::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.3.0 on 2011-06-09 13:32:30.
|
|
7
|
+
|
|
8
|
+
module DfpApi; module V201101; module InventoryService
|
|
9
|
+
class InventoryServiceRegistry
|
|
10
|
+
INVENTORYSERVICE_METHODS = {:update_ad_units=>{:output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"update_ad_units_response"}, :input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_units, :max_occurs=>nil}]}, :create_ad_units=>{:output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"create_ad_units_response"}, :input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_units, :max_occurs=>nil}]}, :get_ad_unit=>{:output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_ad_unit_response"}, :input=>[{:type=>"string", :min_occurs=>0, :name=>:ad_unit_id, :max_occurs=>1}]}, :get_ad_units_by_statement=>{:output=>{:fields=>[{:type=>"AdUnitPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_ad_units_by_statement_response"}, :input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}]}, :perform_ad_unit_action=>{:output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_ad_unit_action_response"}, :input=>[{:type=>"AdUnitAction", :min_occurs=>0, :name=>:ad_unit_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}]}, :update_ad_unit=>{:output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_ad_unit_response"}, :input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_unit, :max_occurs=>1}]}, :create_ad_unit=>{:output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_ad_unit_response"}, :input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_unit, :max_occurs=>1}]}}
|
|
11
|
+
INVENTORYSERVICE_TYPES = {:SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :DeactivateAdUnits=>{:base=>"AdUnitAction", :fields=>[]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :AdUnitPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"AdUnit", :min_occurs=>0, :name=>:results, :max_occurs=>nil}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :Size_StringMapEntry=>{:fields=>[{:type=>"Size", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}], :abstract=>true}, :Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:width, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:height, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_aspect_ratio, :max_occurs=>1}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>nil}]}, :AdSenseSettings=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:ad_sense_enabled, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:border_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:title_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:background_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:text_color, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:url_color, :max_occurs=>1}, {:type=>"AdSenseSettings.AdType", :min_occurs=>0, :name=>:ad_type, :max_occurs=>1}, {:type=>"AdSenseSettings.BorderStyle", :min_occurs=>0, :name=>:border_style, :max_occurs=>1}, {:type=>"AdSenseSettings.FontFamily", :min_occurs=>0, :name=>:font_family, :max_occurs=>1}, {:type=>"AdSenseSettings.FontSize", :min_occurs=>0, :name=>:font_size, :max_occurs=>1}, {:type=>"Size_StringMapEntry", :min_occurs=>0, :name=>:afc_formats, :max_occurs=>nil}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :ActivateAdUnits=>{:base=>"AdUnitAction", :fields=>[]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :AdSenseSettingsInheritedProperty=>{:fields=>[{:type=>"AdSenseSettings", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ArchiveAdUnits=>{:base=>"AdUnitAction", :fields=>[]}, :AdUnitAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:ad_unit_action_type, :max_occurs=>1}], :abstract=>true}, :AssignAdUnitsToPlacement=>{:base=>"AdUnitAction", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:placement_id, :max_occurs=>1}]}, :AdUnit=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:parent_id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:description, :max_occurs=>1}, {:type=>"AdUnit.TargetWindow", :min_occurs=>0, :name=>:target_window, :max_occurs=>1}, {:type=>"InventoryStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:ad_unit_code, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:sizes, :max_occurs=>nil}, {:type=>"boolean", :min_occurs=>0, :name=>:explicitly_targeted, :max_occurs=>1}, {:type=>"AdSenseSettingsInheritedProperty", :min_occurs=>0, :name=>:inherited_ad_sense_settings, :max_occurs=>1}]}}
|
|
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.3.0 on 2011-06-09 13:32:50.
|
|
7
|
+
|
|
8
|
+
require 'ads_common/savon_service'
|
|
9
|
+
require 'dfp_api/v201101/line_item_creative_association_service_registry'
|
|
10
|
+
|
|
11
|
+
module DfpApi; module V201101; module LineItemCreativeAssociationService
|
|
12
|
+
class LineItemCreativeAssociationService < AdsCommon::SavonService
|
|
13
|
+
def initialize(endpoint)
|
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
|
15
|
+
super(endpoint, namespace)
|
|
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::V201101::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.3.0 on 2011-06-09 13:32:50.
|
|
7
|
+
|
|
8
|
+
module DfpApi; module V201101; module LineItemCreativeAssociationService
|
|
9
|
+
class LineItemCreativeAssociationServiceRegistry
|
|
10
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS = {:create_line_item_creative_association=>{:output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_line_item_creative_association_response"}, :input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_association, :max_occurs=>1}]}, :update_line_item_creative_associations=>{:output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"update_line_item_creative_associations_response"}, :input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_associations, :max_occurs=>nil}]}, :create_line_item_creative_associations=>{:output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"create_line_item_creative_associations_response"}, :input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_associations, :max_occurs=>nil}]}, :get_line_item_creative_association=>{:output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_creative_association_response"}, :input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}]}, :get_line_item_creative_associations_by_statement=>{:output=>{:fields=>[{:type=>"LineItemCreativeAssociationPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_creative_associations_by_statement_response"}, :input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}]}, :perform_line_item_creative_association_action=>{:output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_line_item_creative_association_action_response"}, :input=>[{:type=>"LineItemCreativeAssociationAction", :min_occurs=>0, :name=>:line_item_creative_association_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}]}, :update_line_item_creative_association=>{:output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_line_item_creative_association_response"}, :input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_association, :max_occurs=>1}]}}
|
|
11
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES = {:SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :LineItemCreativeAssociation=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:manual_creative_rotation_weight, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"StartDateTimeType", :min_occurs=>0, :name=>:start_date_time_type, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:destination_url, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:sizes, :max_occurs=>nil}, {:type=>"LineItemCreativeAssociation.Status", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemCreativeAssociationStats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :LineItemCreativeAssociationPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:results, :max_occurs=>nil}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}], :abstract=>true}, :Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:width, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:height, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_aspect_ratio, :max_occurs=>1}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>nil}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :LineItemCreativeAssociationStats=>{:fields=>[{:type=>"Stats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:cost_in_order_currency, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:clicks_delivered, :max_occurs=>1}]}, :ActivateLineItemCreativeAssociations=>{:base=>"LineItemCreativeAssociationAction", :fields=>[]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :DeactivateLineItemCreativeAssociations=>{:base=>"LineItemCreativeAssociationAction", :fields=>[]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :LineItemCreativeAssociationAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:line_item_creative_association_action_type, :max_occurs=>1}], :abstract=>true}}
|
|
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.3.0 on 2011-06-09 13:32:23.
|
|
7
|
+
|
|
8
|
+
require 'ads_common/savon_service'
|
|
9
|
+
require 'dfp_api/v201101/line_item_service_registry'
|
|
10
|
+
|
|
11
|
+
module DfpApi; module V201101; module LineItemService
|
|
12
|
+
class LineItemService < AdsCommon::SavonService
|
|
13
|
+
def initialize(endpoint)
|
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
|
15
|
+
super(endpoint, namespace)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def update_line_item(*args)
|
|
19
|
+
return execute_action('update_line_item', args)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def create_line_item(*args)
|
|
23
|
+
return execute_action('create_line_item', args)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def update_line_items(*args)
|
|
27
|
+
return execute_action('update_line_items', args)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def create_line_items(*args)
|
|
31
|
+
return execute_action('create_line_items', args)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def get_line_item(*args)
|
|
35
|
+
return execute_action('get_line_item', args)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def get_line_items_by_statement(*args)
|
|
39
|
+
return execute_action('get_line_items_by_statement', args)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def perform_line_item_action(*args)
|
|
43
|
+
return execute_action('perform_line_item_action', 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::V201101::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.3.0 on 2011-06-09 13:32:23.
|
|
7
|
+
|
|
8
|
+
module DfpApi; module V201101; module LineItemService
|
|
9
|
+
class LineItemServiceRegistry
|
|
10
|
+
LINEITEMSERVICE_METHODS = {:update_line_item=>{:output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_line_item_response"}, :input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}]}, :create_line_item=>{:output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_line_item_response"}, :input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}]}, :update_line_items=>{:output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"update_line_items_response"}, :input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_items, :max_occurs=>nil}]}, :create_line_items=>{:output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"create_line_items_response"}, :input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_items, :max_occurs=>nil}]}, :get_line_item=>{:output=>{:fields=>[{:type=>"LineItem", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_response"}, :input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}]}, :get_line_items_by_statement=>{:output=>{:fields=>[{:type=>"LineItemPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_items_by_statement_response"}, :input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}]}, :perform_line_item_action=>{:output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_line_item_action_response"}, :input=>[{:type=>"LineItemAction", :min_occurs=>0, :name=>:line_item_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}]}}
|
|
11
|
+
LINEITEMSERVICE_TYPES = {:SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :PredefinedCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:value_ids, :max_occurs=>nil}]}, :FreeFormCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>nil}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ResumeLineItems=>{:base=>"LineItemAction", :fields=>[]}, :LineItemPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"LineItem", :min_occurs=>0, :name=>:results, :max_occurs=>nil}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :CustomCriteria=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"long", :min_occurs=>0, :name=>:key_id, :max_occurs=>1}, {:type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :name=>:operator, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :RegionLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}]}, :FrequencyCap=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:max_impressions, :max_occurs=>1}, {:type=>"TimeUnit", :min_occurs=>0, :name=>:time_unit, :max_occurs=>1}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}], :abstract=>true}, :Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:width, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:height, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_aspect_ratio, :max_occurs=>1}]}, :LineItemSummary=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:order_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:order_name, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:start_date_time, :max_occurs=>1}, {:type=>"StartDateTimeType", :min_occurs=>0, :name=>:start_date_time_type, :max_occurs=>1}, {:type=>"DateTime", :min_occurs=>0, :name=>:end_date_time, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:unlimited_end_date_time, :max_occurs=>1}, {:type=>"CreativeRotationType", :min_occurs=>0, :name=>:creative_rotation_type, :max_occurs=>1}, {:type=>"DeliveryRateType", :min_occurs=>0, :name=>:delivery_rate_type, :max_occurs=>1}, {:type=>"RoadblockingType", :min_occurs=>0, :name=>:roadblocking_type, :max_occurs=>1}, {:type=>"FrequencyCap", :min_occurs=>0, :name=>:frequency_caps, :max_occurs=>nil}, {:type=>"LineItemType", :min_occurs=>0, :name=>:line_item_type, :max_occurs=>1}, {:type=>"UnitType", :min_occurs=>0, :name=>:unit_type, :max_occurs=>1}, {:type=>"LineItemSummary.Duration", :min_occurs=>0, :name=>:duration, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:units_bought, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:cost_per_unit, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:value_cost_per_unit, :max_occurs=>1}, {:type=>"CostType", :min_occurs=>0, :name=>:cost_type, :max_occurs=>1}, {:type=>"LineItemDiscountType", :min_occurs=>0, :name=>:discount_type, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:discount, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:creative_sizes, :max_occurs=>nil}, {:type=>"boolean", :min_occurs=>0, :name=>:allow_overbook, :max_occurs=>1}, {:type=>"Stats", :min_occurs=>0, :name=>:stats, :max_occurs=>1}, {:type=>"DeliveryIndicator", :min_occurs=>0, :name=>:delivery_indicator, :max_occurs=>1}, {:type=>"DeliveryData", :min_occurs=>0, :name=>:delivery_data, :max_occurs=>1}, {:type=>"Money", :min_occurs=>0, :name=>:budget, :max_occurs=>1}, {:type=>"ComputedStatus", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemSummary.ReservationStatus", :min_occurs=>0, :name=>:reservation_status, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:is_archived, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:line_item_summary_type, :max_occurs=>1}]}, :CustomCriteriaSet=>{:base=>"CustomCriteriaNode", :fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :name=>:logical_operator, :max_occurs=>1}, {:type=>"CustomCriteriaNode", :min_occurs=>0, :name=>:children, :max_occurs=>nil}]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>nil}]}, :ReleaseLineItems=>{:base=>"LineItemAction", :fields=>[]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :min_occurs=>0, :name=>:targeted_locations, :max_occurs=>nil}, {:type=>"Location", :min_occurs=>0, :name=>:excluded_locations, :max_occurs=>nil}]}, :ActivateLineItems=>{:base=>"LineItemAction", :fields=>[]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :Stats=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:impressions_delivered, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:clicks_delivered, :max_occurs=>1}]}, :Location=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:location_type, :max_occurs=>1}]}, :CustomCriteriaNode=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_criteria_node_type, :max_occurs=>1}], :abstract=>true}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ReserveAndOverbookLineItems=>{:base=>"ReserveLineItems", :fields=>[]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :InventoryTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>nil}, {:type=>"string", :min_occurs=>0, :name=>:excluded_ad_unit_ids, :max_occurs=>nil}, {:type=>"long", :min_occurs=>0, :name=>:targeted_placement_ids, :max_occurs=>nil}]}, :ArchiveLineItems=>{:base=>"LineItemAction", :fields=>[]}, :Targeting=>{:fields=>[{:type=>"GeoTargeting", :min_occurs=>0, :name=>:geo_targeting, :max_occurs=>1}, {:type=>"InventoryTargeting", :min_occurs=>0, :name=>:inventory_targeting, :max_occurs=>1}, {:type=>"CustomCriteriaSet", :min_occurs=>0, :name=>:custom_targeting, :max_occurs=>1}]}, :MetroLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:metro_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :DeliveryData=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:units, :max_occurs=>nil}]}, :ReserveLineItems=>{:base=>"LineItemAction", :fields=>[]}, :LineItemAction=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:line_item_action_type, :max_occurs=>1}], :abstract=>true}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:custom_targeting_key_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :name=>:match_type, :max_occurs=>1}]}, :CityLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:city_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:region_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}, :UnarchiveLineItems=>{:base=>"LineItemAction", :fields=>[]}, :PauseLineItems=>{:base=>"LineItemAction", :fields=>[]}, :DeliveryIndicator=>{:fields=>[{:type=>"double", :min_occurs=>0, :name=>:expected_delivery_percentage, :max_occurs=>1}, {:type=>"double", :min_occurs=>0, :name=>:actual_delivery_percentage, :max_occurs=>1}]}, :ResumeAndOverbookLineItems=>{:base=>"ResumeLineItems", :fields=>[]}, :LineItem=>{:base=>"LineItemSummary", :fields=>[{:type=>"Targeting", :min_occurs=>0, :name=>:targeting, :max_occurs=>1}]}, :CountryLocation=>{:base=>"Location", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:country_code, :max_occurs=>1}]}}
|
|
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.3.0 on 2011-06-09 13:32:48.
|
|
7
|
+
|
|
8
|
+
require 'ads_common/savon_service'
|
|
9
|
+
require 'dfp_api/v201101/network_service_registry'
|
|
10
|
+
|
|
11
|
+
module DfpApi; module V201101; module NetworkService
|
|
12
|
+
class NetworkService < AdsCommon::SavonService
|
|
13
|
+
def initialize(endpoint)
|
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
|
15
|
+
super(endpoint, namespace)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def get_all_networks(*args)
|
|
19
|
+
return execute_action('get_all_networks', args)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def get_current_network(*args)
|
|
23
|
+
return execute_action('get_current_network', args)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def update_network(*args)
|
|
27
|
+
return execute_action('update_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::V201101::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.3.0 on 2011-06-09 13:32:48.
|
|
7
|
+
|
|
8
|
+
module DfpApi; module V201101; module NetworkService
|
|
9
|
+
class NetworkServiceRegistry
|
|
10
|
+
NETWORKSERVICE_METHODS = {:get_all_networks=>{:output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>nil}], :name=>"get_all_networks_response"}, :input=>[]}, :get_current_network=>{:output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_current_network_response"}, :input=>[]}, :update_network=>{:output=>{:fields=>[{:type=>"Network", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_network_response"}, :input=>[{:type=>"Network", :min_occurs=>0, :name=>:network, :max_occurs=>1}]}}
|
|
11
|
+
NETWORKSERVICE_TYPES = {:SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:auth_token, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:application_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:o_auth_token, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :Network=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:network_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:property_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:effective_root_ad_unit_id, :max_occurs=>1}]}}
|
|
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.3.0 on 2011-06-09 13:32:05.
|
|
7
|
+
|
|
8
|
+
require 'ads_common/savon_service'
|
|
9
|
+
require 'dfp_api/v201101/order_service_registry'
|
|
10
|
+
|
|
11
|
+
module DfpApi; module V201101; module OrderService
|
|
12
|
+
class OrderService < AdsCommon::SavonService
|
|
13
|
+
def initialize(endpoint)
|
|
14
|
+
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
|
15
|
+
super(endpoint, namespace)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def update_order(*args)
|
|
19
|
+
return execute_action('update_order', args)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def create_order(*args)
|
|
23
|
+
return execute_action('create_order', args)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def update_orders(*args)
|
|
27
|
+
return execute_action('update_orders', args)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def create_orders(*args)
|
|
31
|
+
return execute_action('create_orders', args)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def get_order(*args)
|
|
35
|
+
return execute_action('get_order', args)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def get_orders_by_statement(*args)
|
|
39
|
+
return execute_action('get_orders_by_statement', args)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def perform_order_action(*args)
|
|
43
|
+
return execute_action('perform_order_action', 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::V201101::OrderService
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end; end; end
|