google-dfp-api 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/README +17 -2
- data/Rakefile +3 -5
- data/examples/v201101/common/oauth_handling.rb +128 -0
- data/examples/v201101/company_service/create_companies.rb +1 -1
- data/examples/v201101/company_service/get_all_companies.rb +1 -1
- data/examples/v201101/creative_service/create_creatives.rb +1 -1
- data/examples/v201101/creative_service/get_all_creatives.rb +1 -1
- data/examples/v201101/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
- data/examples/v201101/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
- data/examples/v201101/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
- data/examples/v201101/inventory_service/create_ad_units.rb +1 -1
- data/examples/v201101/inventory_service/deactivate_ad_units.rb +2 -2
- data/examples/v201101/inventory_service/get_ad_units_by_statement.rb +1 -1
- data/examples/v201101/inventory_service/get_all_ad_units.rb +1 -1
- data/examples/v201101/line_item_creative_association_service/deactivate_licas.rb +2 -2
- data/examples/v201101/line_item_creative_association_service/get_all_licas.rb +1 -1
- data/examples/v201101/line_item_service/activate_line_items.rb +2 -2
- data/examples/v201101/line_item_service/create_line_items.rb +2 -2
- data/examples/v201101/line_item_service/get_all_line_items.rb +1 -1
- data/examples/v201101/order_service/approve_orders.rb +2 -2
- data/examples/v201101/order_service/create_orders.rb +1 -1
- data/examples/v201101/order_service/get_all_orders.rb +1 -1
- data/examples/v201101/placement_service/create_placements.rb +3 -3
- data/examples/v201101/placement_service/deactivate_placements.rb +2 -2
- data/examples/v201101/placement_service/get_all_placements.rb +1 -1
- data/examples/v201101/user_service/get_all_users.rb +1 -1
- data/examples/v201103/common/oauth_handling.rb +128 -0
- data/examples/v201103/company_service/create_companies.rb +1 -1
- data/examples/v201103/company_service/get_all_companies.rb +1 -1
- data/examples/v201103/creative_service/create_creatives.rb +1 -1
- data/examples/v201103/creative_service/get_all_creatives.rb +1 -1
- data/examples/v201103/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
- data/examples/v201103/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
- data/examples/v201103/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
- data/examples/v201103/inventory_service/create_ad_units.rb +1 -1
- data/examples/v201103/inventory_service/deactivate_ad_units.rb +2 -2
- data/examples/v201103/inventory_service/get_ad_units_by_statement.rb +1 -1
- data/examples/v201103/inventory_service/get_all_ad_units.rb +1 -1
- data/examples/v201103/line_item_creative_association_service/deactivate_licas.rb +2 -2
- data/examples/v201103/line_item_creative_association_service/get_all_licas.rb +1 -1
- data/examples/v201103/line_item_service/activate_line_items.rb +2 -2
- data/examples/v201103/line_item_service/create_line_items.rb +2 -2
- data/examples/v201103/line_item_service/get_all_line_items.rb +1 -1
- data/examples/v201103/order_service/approve_orders.rb +2 -2
- data/examples/v201103/order_service/create_orders.rb +1 -1
- data/examples/v201103/order_service/get_all_orders.rb +1 -1
- data/examples/v201103/placement_service/create_placements.rb +3 -3
- data/examples/v201103/placement_service/deactivate_placements.rb +2 -2
- data/examples/v201103/placement_service/get_all_placements.rb +1 -1
- data/examples/v201103/user_service/get_all_users.rb +1 -1
- data/examples/v201104/common/oauth_handling.rb +128 -0
- data/examples/v201104/company_service/create_companies.rb +1 -1
- data/examples/v201104/company_service/get_all_companies.rb +1 -1
- data/examples/v201104/creative_service/create_creatives.rb +1 -1
- data/examples/v201104/creative_service/get_all_creatives.rb +1 -1
- data/examples/v201104/custom_targeting_service/delete_custom_targeting_keys.rb +2 -2
- data/examples/v201104/custom_targeting_service/delete_custom_targeting_values.rb +2 -2
- data/examples/v201104/custom_targeting_service/get_all_custom_targeting_keys_and_values.rb +2 -2
- data/examples/v201104/inventory_service/create_ad_units.rb +1 -1
- data/examples/v201104/inventory_service/deactivate_ad_units.rb +2 -2
- data/examples/v201104/inventory_service/get_ad_units_by_statement.rb +1 -1
- data/examples/v201104/inventory_service/get_all_ad_units.rb +1 -1
- data/examples/v201104/line_item_creative_association_service/deactivate_licas.rb +2 -2
- data/examples/v201104/line_item_creative_association_service/get_all_licas.rb +1 -1
- data/examples/v201104/line_item_service/activate_line_items.rb +2 -2
- data/examples/v201104/line_item_service/create_line_items.rb +1 -1
- data/examples/v201104/line_item_service/get_all_line_items.rb +1 -1
- data/examples/v201104/order_service/approve_orders.rb +2 -2
- data/examples/v201104/order_service/create_orders.rb +1 -1
- data/examples/v201104/order_service/get_all_orders.rb +1 -1
- data/examples/v201104/placement_service/create_placements.rb +3 -3
- data/examples/v201104/placement_service/deactivate_placements.rb +2 -2
- data/examples/v201104/placement_service/get_all_placements.rb +1 -1
- data/examples/v201104/user_service/get_all_users.rb +1 -1
- data/lib/dfp_api.rb +24 -70
- data/lib/dfp_api/api_config.rb +3 -1
- data/lib/dfp_api/client_login_header_handler.rb +56 -0
- data/lib/dfp_api/credential_handler.rb +19 -14
- data/lib/dfp_api/errors.rb +1 -1
- data/lib/dfp_api/v201101/company_service.rb +3 -3
- data/lib/dfp_api/v201101/company_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/creative_service.rb +3 -3
- data/lib/dfp_api/v201101/creative_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/custom_targeting_service.rb +7 -7
- data/lib/dfp_api/v201101/custom_targeting_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/forecast_service.rb +3 -3
- data/lib/dfp_api/v201101/forecast_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/inventory_service.rb +7 -7
- data/lib/dfp_api/v201101/inventory_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/line_item_creative_association_service.rb +7 -7
- data/lib/dfp_api/v201101/line_item_creative_association_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/line_item_service.rb +7 -7
- data/lib/dfp_api/v201101/line_item_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/network_service.rb +7 -7
- data/lib/dfp_api/v201101/network_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/order_service.rb +11 -11
- data/lib/dfp_api/v201101/order_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/placement_service.rb +3 -3
- data/lib/dfp_api/v201101/placement_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201101/publisher_query_language_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/report_service.rb +3 -3
- data/lib/dfp_api/v201101/report_service_registry.rb +9 -4
- data/lib/dfp_api/v201101/user_service.rb +7 -7
- data/lib/dfp_api/v201101/user_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/company_service.rb +3 -3
- data/lib/dfp_api/v201103/company_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/creative_service.rb +3 -3
- data/lib/dfp_api/v201103/creative_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/custom_targeting_service.rb +7 -7
- data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/forecast_service.rb +3 -3
- data/lib/dfp_api/v201103/forecast_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/inventory_service.rb +7 -7
- data/lib/dfp_api/v201103/inventory_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/line_item_creative_association_service.rb +7 -7
- data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/line_item_service.rb +7 -7
- data/lib/dfp_api/v201103/line_item_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/network_service.rb +7 -7
- data/lib/dfp_api/v201103/network_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/order_service.rb +11 -11
- data/lib/dfp_api/v201103/order_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/placement_service.rb +3 -3
- data/lib/dfp_api/v201103/placement_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/report_service.rb +3 -3
- data/lib/dfp_api/v201103/report_service_registry.rb +9 -4
- data/lib/dfp_api/v201103/user_service.rb +7 -7
- data/lib/dfp_api/v201103/user_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/company_service.rb +3 -3
- data/lib/dfp_api/v201104/company_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/creative_service.rb +3 -3
- data/lib/dfp_api/v201104/creative_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/custom_targeting_service.rb +7 -7
- data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/forecast_service.rb +3 -3
- data/lib/dfp_api/v201104/forecast_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/inventory_service.rb +7 -7
- data/lib/dfp_api/v201104/inventory_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/line_item_creative_association_service.rb +7 -7
- data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/line_item_service.rb +7 -7
- data/lib/dfp_api/v201104/line_item_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/network_service.rb +7 -7
- data/lib/dfp_api/v201104/network_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/order_service.rb +11 -11
- data/lib/dfp_api/v201104/order_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/placement_service.rb +3 -3
- data/lib/dfp_api/v201104/placement_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/report_service.rb +3 -3
- data/lib/dfp_api/v201104/report_service_registry.rb +9 -4
- data/lib/dfp_api/v201104/user_service.rb +7 -7
- data/lib/dfp_api/v201104/user_service_registry.rb +9 -4
- data/test/bugs/test_issue_00000016.rb +6 -5
- data/test/dfp_api/test_dfp_api.rb +29 -7
- metadata +257 -253
@@ -28,16 +28,27 @@ module DfpApi
|
|
28
28
|
# generation.
|
29
29
|
def credentials(version = nil)
|
30
30
|
validate_headers_for_server()
|
31
|
+
|
32
|
+
method = @credentials[:method].to_s.upcase.to_sym
|
33
|
+
result = case method
|
34
|
+
when :CLIENTLOGIN
|
35
|
+
{:email => @credentials[:email],
|
36
|
+
:password => @credentials[:password],
|
37
|
+
:auth_token => @credentials[:auth_token]}
|
38
|
+
when :OAUTH
|
39
|
+
{:oauth_consumer_key => @credentials[:oauth_consumer_key],
|
40
|
+
:oauth_consumer_secret => @credentials[:oauth_consumer_secret],
|
41
|
+
:oauth_verification_code => @credentials[:oauth_verification_code],
|
42
|
+
:oauth_token => @credentials[:oauth_token],
|
43
|
+
:oauth_token_secret => @credentials[:oauth_token_secret],
|
44
|
+
:oauth_callback => @credentials[:oauth_callback],
|
45
|
+
:oauth_method => @credentials[:oauth_method]}
|
46
|
+
end
|
31
47
|
client_lib = "Ruby-DfpApi-%s" % DfpApi::ApiConfig::CLIENT_LIB_VERSION
|
32
48
|
application_name = @credentials[:application_name] || $0
|
33
|
-
result =
|
34
|
-
|
35
|
-
|
36
|
-
:applicationName => "%s|%s" % [client_lib, application_name]
|
37
|
-
}
|
38
|
-
network_code = @credentials[:network_code]
|
39
|
-
result[:networkCode] = network_code if !network_code.nil?
|
40
|
-
return result
|
49
|
+
result[:applicationName] = "%s|%s" % [client_lib, application_name]
|
50
|
+
result[:networkCode] = @credentials[:network_code]
|
51
|
+
return result.reject {|k, v| v.nil?}
|
41
52
|
end
|
42
53
|
|
43
54
|
private
|
@@ -45,12 +56,6 @@ module DfpApi
|
|
45
56
|
# Validates that the right credentials are being used for the chosen
|
46
57
|
# environment.
|
47
58
|
def validate_headers_for_server()
|
48
|
-
if @credentials[:email].nil?
|
49
|
-
raise AdsCommon::Errors::AuthError, "Login email is not specified"
|
50
|
-
end
|
51
|
-
if @credentials[:password].nil?
|
52
|
-
raise AdsCommon::Errors::AuthError, "Password is not specified"
|
53
|
-
end
|
54
59
|
if @credentials[:application_name].nil?
|
55
60
|
raise AdsCommon::Errors::AuthError, "Application name is not specified"
|
56
61
|
end
|
data/lib/dfp_api/errors.rb
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:38.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/company_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module CompanyService
|
12
12
|
class CompanyService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
16
|
end
|
17
17
|
|
18
18
|
def update_companies(*args)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:38.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module CompanyService
|
9
9
|
class CompanyServiceRegistry
|
10
|
-
COMPANYSERVICE_METHODS = {:update_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :
|
11
|
-
COMPANYSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1
|
10
|
+
COMPANYSERVICE_METHODS = {:update_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:companies, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_companies_response"}}, :update_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:company, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_company_response"}}, :create_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:companies, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_companies_response"}}, :create_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :name=>:company, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_company_response"}}, :get_companies_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CompanyPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_companies_by_statement_response"}}, :get_company=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:company_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_company_response"}}}
|
11
|
+
COMPANYSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :Company=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"Company.Type", :min_occurs=>0, :name=>:type, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :CompanyPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:total_result_set_size, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:start_index, :max_occurs=>1}, {:type=>"Company", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :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}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
|
12
|
+
COMPANYSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return COMPANYSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module CompanyService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return COMPANYSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return COMPANYSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module CompanyService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:01.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/creative_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module CreativeService
|
12
12
|
class CreativeService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
16
|
end
|
17
17
|
|
18
18
|
def update_creatives(*args)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:01.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module CreativeService
|
9
9
|
class CreativeServiceRegistry
|
10
|
-
CREATIVESERVICE_METHODS = {:update_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :
|
11
|
-
CREATIVESERVICE_TYPES = {:
|
10
|
+
CREATIVESERVICE_METHODS = {:update_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creatives, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_creatives_response"}}, :create_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creative, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_creative_response"}}, :create_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creatives, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_creatives_response"}}, :get_creative=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_creative_response"}}, :get_creatives_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CreativePage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_creatives_by_statement_response"}}, :update_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :name=>:creative, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_creative_response"}}}
|
11
|
+
CREATIVESERVICE_TYPES = {: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}]}, :FlashRedirectCreative=>{:base=>"BaseFlashRedirectCreative", :fields=>[]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :BaseImageCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:image_name, :max_occurs=>1}, {:type=>"base64Binary", :min_occurs=>0, :name=>:image_byte_array, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:override_size, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:asset_size, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:image_url, :max_occurs=>1}]}, :HasDestinationUrlCreative=>{:abstract=>true, :base=>"Creative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:destination_url, :max_occurs=>1}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:key, :max_occurs=>1}, {:type=>"Value", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :NumberValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :BaseImageRedirectCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:image_url, :max_occurs=>1}]}, :ImageCreative=>{:base=>"BaseImageCreative", :fields=>[]}, :Creative=>{:abstract=>true, :fields=>[{:type=>"long", :min_occurs=>0, :name=>:advertiser_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=>"Size", :min_occurs=>0, :name=>:size, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:preview_url, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:creative_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :ImageRedirectCreative=>{:base=>"BaseImageRedirectCreative", :fields=>[]}, :CreativePage=>{: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=>"Creative", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :ThirdPartyCreative=>{:base=>"Creative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:snippet, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:expanded_snippet, :max_occurs=>1}, {:type=>"ThirdPartyCreative.FormatStatus", :min_occurs=>0, :name=>:format_status, :max_occurs=>1}]}, :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}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :BaseFlashCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:flash_name, :max_occurs=>1}, {:type=>"base64Binary", :min_occurs=>0, :name=>:flash_byte_array, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_image_name, :max_occurs=>1}, {:type=>"base64Binary", :min_occurs=>0, :name=>:fallback_image_byte_array, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:override_size, :max_occurs=>1}, {:type=>"boolean", :min_occurs=>0, :name=>:click_tag_required, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_preview_url, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:flash_asset_size, :max_occurs=>1}, {:type=>"Size", :min_occurs=>0, :name=>:fallback_asset_size, :max_occurs=>1}]}, :TextValue=>{:base=>"Value", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :FlashCreative=>{:base=>"BaseFlashCreative", :fields=>[]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}, :BaseFlashRedirectCreative=>{:abstract=>true, :base=>"HasDestinationUrlCreative", :fields=>[{:type=>"string", :min_occurs=>0, :name=>:flash_url, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_url, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:fallback_preview_url, :max_occurs=>1}]}}
|
12
|
+
CREATIVESERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return CREATIVESERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module CreativeService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return CREATIVESERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return CREATIVESERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module CreativeService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,20 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:30.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/custom_targeting_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module CustomTargetingService
|
12
12
|
class CustomTargetingService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
|
+
end
|
17
|
+
|
18
|
+
def perform_custom_targeting_key_action(*args)
|
19
|
+
return execute_action('perform_custom_targeting_key_action', args)
|
16
20
|
end
|
17
21
|
|
18
22
|
def perform_custom_targeting_value_action(*args)
|
@@ -43,10 +47,6 @@ module DfpApi; module V201101; module CustomTargetingService
|
|
43
47
|
return execute_action('get_custom_targeting_values_by_statement', args)
|
44
48
|
end
|
45
49
|
|
46
|
-
def perform_custom_targeting_key_action(*args)
|
47
|
-
return execute_action('perform_custom_targeting_key_action', args)
|
48
|
-
end
|
49
|
-
|
50
50
|
private
|
51
51
|
|
52
52
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:30.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module CustomTargetingService
|
9
9
|
class CustomTargetingServiceRegistry
|
10
|
-
CUSTOMTARGETINGSERVICE_METHODS = {:
|
11
|
-
CUSTOMTARGETINGSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1
|
10
|
+
CUSTOMTARGETINGSERVICE_METHODS = {:perform_custom_targeting_key_action=>{:input=>[{:type=>"CustomTargetingKeyAction", :min_occurs=>0, :name=>:custom_targeting_key_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_custom_targeting_key_action_response"}}, :perform_custom_targeting_value_action=>{:input=>[{:type=>"CustomTargetingValueAction", :min_occurs=>0, :name=>:custom_targeting_value_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_custom_targeting_value_action_response"}}, :create_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:keys, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_custom_targeting_keys_response"}}, :update_custom_targeting_keys=>{:input=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:keys, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingKey", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_custom_targeting_keys_response"}}, :create_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_custom_targeting_values_response"}}, :update_custom_targeting_values=>{:input=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_custom_targeting_values_response"}}, :get_custom_targeting_keys_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CustomTargetingKeyPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_custom_targeting_keys_by_statement_response"}}, :get_custom_targeting_values_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"CustomTargetingValuePage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_custom_targeting_values_by_statement_response"}}}
|
11
|
+
CUSTOMTARGETINGSERVICE_TYPES = {:DeleteCustomTargetingKeys=>{:base=>"CustomTargetingKeyAction", :fields=>[]}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:query, :max_occurs=>1}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :CustomTargetingKey=>{:fields=>[{:type=>"long", :min_occurs=>0, :name=>:id, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:name, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:display_name, :max_occurs=>1}, {:type=>"CustomTargetingKey.Type", :min_occurs=>0, :name=>:type, :max_occurs=>1}]}, :UpdateResult=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:num_changes, :max_occurs=>1}]}, :DeleteCustomTargetingValueAction=>{:base=>"DeleteCustomTargetingValues", :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}]}, :CustomTargetingKeyPage=>{: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=>"CustomTargetingKey", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :DeleteCustomTargetingValues=>{:base=>"CustomTargetingValueAction", :fields=>[]}, :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}]}, :CustomTargetingKeyAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_targeting_key_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :CustomTargetingValuePage=>{: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=>"CustomTargetingValue", :min_occurs=>0, :name=>:results, :max_occurs=>:unbounded}]}, :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}]}, :CustomTargetingValueAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_targeting_value_action_type, :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}]}, :DeleteCustomTargetingKeyAction=>{:base=>"DeleteCustomTargetingKeys", :fields=>[]}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:request_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:response_time, :max_occurs=>1}]}}
|
12
|
+
CUSTOMTARGETINGSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return CUSTOMTARGETINGSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module CustomTargetingService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return CUSTOMTARGETINGSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return CUSTOMTARGETINGSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module CustomTargetingService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,16 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:53.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/forecast_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module ForecastService
|
12
12
|
class ForecastService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
16
|
end
|
17
17
|
|
18
18
|
def get_forecast_by_id(*args)
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:53.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module ForecastService
|
9
9
|
class ForecastServiceRegistry
|
10
|
-
FORECASTSERVICE_METHODS = {:get_forecast_by_id=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1
|
11
|
-
FORECASTSERVICE_TYPES = {:
|
10
|
+
FORECASTSERVICE_METHODS = {:get_forecast_by_id=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_forecast_by_id_response"}}, :get_forecast=>{:input=>[{:type=>"LineItem", :min_occurs=>0, :name=>:line_item, :max_occurs=>1}], :output=>{:fields=>[{:type=>"Forecast", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_forecast_response"}}}
|
11
|
+
FORECASTSERVICE_TYPES = {: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=>:unbounded}, {: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=>:unbounded}, {: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=>:unbounded}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :GeoTargeting=>{:fields=>[{:type=>"Location", :min_occurs=>0, :name=>:targeted_locations, :max_occurs=>:unbounded}, {:type=>"Location", :min_occurs=>0, :name=>:excluded_locations, :max_occurs=>:unbounded}]}, :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=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:custom_criteria_node_type, :max_occurs=>1}]}, :InventoryTargeting=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:targeted_ad_unit_ids, :max_occurs=>:unbounded}, {:type=>"string", :min_occurs=>0, :name=>:excluded_ad_unit_ids, :max_occurs=>:unbounded}, {:type=>"long", :min_occurs=>0, :name=>:targeted_placement_ids, :max_occurs=>:unbounded}]}, :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=>:unbounded}]}, :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}]}, :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}]}, :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}]}, :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=>:unbounded}]}, :FreeFormCustomCriteria=>{:base=>"CustomCriteria", :fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :name=>:values, :max_occurs=>:unbounded}]}, :DateTime=>{:fields=>[{:type=>"Date", :min_occurs=>0, :name=>:date, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:hour, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:minute, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:second, :max_occurs=>1}, {:type=>"string", :min_occurs=>0, :name=>:time_zone_id, :max_occurs=>1}]}, :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}]}}
|
12
|
+
FORECASTSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return FORECASTSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module ForecastService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return FORECASTSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return FORECASTSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module ForecastService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,20 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:49.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/inventory_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module InventoryService
|
12
12
|
class InventoryService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_ad_unit(*args)
|
19
|
+
return execute_action('get_ad_unit', args)
|
16
20
|
end
|
17
21
|
|
18
22
|
def get_ad_units_by_statement(*args)
|
@@ -39,10 +43,6 @@ module DfpApi; module V201101; module InventoryService
|
|
39
43
|
return execute_action('create_ad_units', args)
|
40
44
|
end
|
41
45
|
|
42
|
-
def get_ad_unit(*args)
|
43
|
-
return execute_action('get_ad_unit', args)
|
44
|
-
end
|
45
|
-
|
46
46
|
private
|
47
47
|
|
48
48
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:32:49.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module InventoryService
|
9
9
|
class InventoryServiceRegistry
|
10
|
-
INVENTORYSERVICE_METHODS = {:
|
11
|
-
INVENTORYSERVICE_TYPES = {:
|
10
|
+
INVENTORYSERVICE_METHODS = {:get_ad_unit=>{:input=>[{:type=>"string", :min_occurs=>0, :name=>:ad_unit_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_ad_unit_response"}}, :get_ad_units_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnitPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_ad_units_by_statement_response"}}, :perform_ad_unit_action=>{:input=>[{:type=>"AdUnitAction", :min_occurs=>0, :name=>:ad_unit_action, :max_occurs=>1}, {:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_ad_unit_action_response"}}, :update_ad_unit=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_unit, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_ad_unit_response"}}, :create_ad_unit=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_unit, :max_occurs=>1}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_ad_unit_response"}}, :update_ad_units=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_units, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_ad_units_response"}}, :create_ad_units=>{:input=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:ad_units, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"AdUnit", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_ad_units_response"}}}
|
11
|
+
INVENTORYSERVICE_TYPES = {: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=>:unbounded}]}, :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=>:unbounded}]}, :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=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:ad_unit_action_type, :max_occurs=>1}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :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=>:unbounded}, {:type=>"boolean", :min_occurs=>0, :name=>:explicitly_targeted, :max_occurs=>1}, {:type=>"AdSenseSettingsInheritedProperty", :min_occurs=>0, :name=>:inherited_ad_sense_settings, :max_occurs=>1}]}, :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=>:unbounded}]}, :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}]}}
|
12
|
+
INVENTORYSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return INVENTORYSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module InventoryService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return INVENTORYSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return INVENTORYSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module InventoryService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|
@@ -3,16 +3,20 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:06.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201101/line_item_creative_association_service_registry'
|
10
10
|
|
11
11
|
module DfpApi; module V201101; module LineItemCreativeAssociationService
|
12
12
|
class LineItemCreativeAssociationService < AdsCommon::SavonService
|
13
|
-
def initialize(endpoint)
|
13
|
+
def initialize(api, endpoint)
|
14
14
|
namespace = 'https://www.google.com/apis/ads/publisher/v201101'
|
15
|
-
super(endpoint, namespace)
|
15
|
+
super(api, endpoint, namespace, :v201101)
|
16
|
+
end
|
17
|
+
|
18
|
+
def perform_line_item_creative_association_action(*args)
|
19
|
+
return execute_action('perform_line_item_creative_association_action', args)
|
16
20
|
end
|
17
21
|
|
18
22
|
def update_line_item_creative_association(*args)
|
@@ -39,10 +43,6 @@ module DfpApi; module V201101; module LineItemCreativeAssociationService
|
|
39
43
|
return execute_action('get_line_item_creative_associations_by_statement', args)
|
40
44
|
end
|
41
45
|
|
42
|
-
def perform_line_item_creative_association_action(*args)
|
43
|
-
return execute_action('perform_line_item_creative_association_action', args)
|
44
|
-
end
|
45
|
-
|
46
46
|
private
|
47
47
|
|
48
48
|
def get_service_registry()
|
@@ -3,12 +3,13 @@
|
|
3
3
|
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
4
4
|
# License:: Licensed under the Apache License,Version 2.0 (the "License").
|
5
5
|
#
|
6
|
-
# Code generated by AdsCommon library 0.
|
6
|
+
# Code generated by AdsCommon library 0.5.0 on 2011-08-02 15:33:06.
|
7
7
|
|
8
8
|
module DfpApi; module V201101; module LineItemCreativeAssociationService
|
9
9
|
class LineItemCreativeAssociationServiceRegistry
|
10
|
-
LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS = {:
|
11
|
-
LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES = {:
|
10
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS = {:perform_line_item_creative_association_action=>{: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}], :output=>{:fields=>[{:type=>"UpdateResult", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"perform_line_item_creative_association_action_response"}}, :update_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_association, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"update_line_item_creative_association_response"}}, :create_line_item_creative_association=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_association, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"create_line_item_creative_association_response"}}, :update_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_associations, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"update_line_item_creative_associations_response"}}, :create_line_item_creative_associations=>{:input=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:line_item_creative_associations, :max_occurs=>:unbounded}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>:unbounded}], :name=>"create_line_item_creative_associations_response"}}, :get_line_item_creative_association=>{:input=>[{:type=>"long", :min_occurs=>0, :name=>:line_item_id, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:creative_id, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociation", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_creative_association_response"}}, :get_line_item_creative_associations_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :name=>:filter_statement, :max_occurs=>1}], :output=>{:fields=>[{:type=>"LineItemCreativeAssociationPage", :min_occurs=>0, :name=>:rval, :max_occurs=>1}], :name=>"get_line_item_creative_associations_by_statement_response"}}}
|
11
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES = {: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=>:unbounded}]}, :Money=>{:fields=>[{:type=>"string", :min_occurs=>0, :name=>:currency_code, :max_occurs=>1}, {:type=>"long", :min_occurs=>0, :name=>:micro_amount, :max_occurs=>1}]}, :LineItemCreativeAssociationAction=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:line_item_creative_association_action_type, :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}]}, :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}]}, :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=>:unbounded}, {:type=>"LineItemCreativeAssociation.Status", :min_occurs=>0, :name=>:status, :max_occurs=>1}, {:type=>"LineItemCreativeAssociationStats", :min_occurs=>0, :name=>:stats, :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=>:unbounded}]}, :Value=>{:abstract=>true, :fields=>[{:type=>"string", :min_occurs=>0, :name=>:value_type, :max_occurs=>1}]}, :Date=>{:fields=>[{:type=>"int", :min_occurs=>0, :name=>:year, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:month, :max_occurs=>1}, {:type=>"int", :min_occurs=>0, :name=>:day, :max_occurs=>1}]}, :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}]}, :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}]}, :BooleanValue=>{:base=>"Value", :fields=>[{:type=>"boolean", :min_occurs=>0, :name=>:value, :max_occurs=>1}]}, :ActivateLineItemCreativeAssociations=>{:base=>"LineItemCreativeAssociationAction", :fields=>[]}, :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}]}, :DeactivateLineItemCreativeAssociations=>{:base=>"LineItemCreativeAssociationAction", :fields=>[]}}
|
12
|
+
LINEITEMCREATIVEASSOCIATIONSERVICE_NAMESPACES = []
|
12
13
|
|
13
14
|
def self.get_method_signature(method_name)
|
14
15
|
return LINEITEMCREATIVEASSOCIATIONSERVICE_METHODS[method_name.to_sym]
|
@@ -17,6 +18,10 @@ module DfpApi; module V201101; module LineItemCreativeAssociationService
|
|
17
18
|
def self.get_type_signature(type_name)
|
18
19
|
return LINEITEMCREATIVEASSOCIATIONSERVICE_TYPES[type_name.to_sym]
|
19
20
|
end
|
21
|
+
|
22
|
+
def self.get_namespace(index)
|
23
|
+
return LINEITEMCREATIVEASSOCIATIONSERVICE_NAMESPACES[index]
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Base class for exceptions.
|
@@ -29,7 +34,7 @@ module DfpApi; module V201101; module LineItemCreativeAssociationService
|
|
29
34
|
class ApiException < ApplicationException
|
30
35
|
attr_reader :errors # ApiError
|
31
36
|
def initialize(exception_fault)
|
32
|
-
@array_fields
|
37
|
+
@array_fields ||= []
|
33
38
|
@array_fields << 'errors'
|
34
39
|
super(exception_fault)
|
35
40
|
end
|