google-dfp-api 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/README +1 -1
- data/Rakefile +2 -2
- data/examples/v201103/creative_service/copy_image_creatives.rb +0 -2
- data/examples/v201103/creative_service/update_creatives.rb +0 -2
- data/examples/v201103/line_item_service/update_line_items.rb +0 -1
- data/examples/v201104/creative_service/copy_image_creatives.rb +0 -2
- data/examples/v201104/creative_service/update_creatives.rb +0 -2
- data/examples/v201104/line_item_service/update_line_items.rb +0 -1
- data/examples/v201107/creative_service/copy_image_creatives.rb +0 -2
- data/examples/v201107/creative_service/update_creatives.rb +0 -2
- data/examples/v201107/line_item_service/update_line_items.rb +0 -1
- data/examples/v201108/creative_service/copy_image_creatives.rb +0 -2
- data/examples/v201108/creative_service/update_creatives.rb +0 -2
- data/examples/v201108/line_item_service/create_line_items.rb +12 -5
- data/examples/v201108/line_item_service/update_line_items.rb +0 -1
- data/examples/v201108/publisher_query_language_service/get_all_postal_codes.rb +85 -0
- data/lib/dfp_api.rb +1 -1
- data/lib/dfp_api/api_config.rb +1 -16
- data/lib/dfp_api/v201103/company_service.rb +13 -13
- data/lib/dfp_api/v201103/company_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/creative_service.rb +13 -13
- data/lib/dfp_api/v201103/creative_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/custom_targeting_service.rb +17 -17
- data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/forecast_service.rb +5 -5
- data/lib/dfp_api/v201103/forecast_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/inventory_service.rb +15 -15
- data/lib/dfp_api/v201103/inventory_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/line_item_creative_association_service.rb +15 -15
- data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/line_item_service.rb +15 -15
- data/lib/dfp_api/v201103/line_item_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/network_service.rb +7 -7
- data/lib/dfp_api/v201103/network_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/order_service.rb +15 -15
- data/lib/dfp_api/v201103/order_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/placement_service.rb +15 -15
- data/lib/dfp_api/v201103/placement_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/report_service.rb +7 -7
- data/lib/dfp_api/v201103/report_service_registry.rb +5 -3
- data/lib/dfp_api/v201103/user_service.rb +17 -17
- data/lib/dfp_api/v201103/user_service_registry.rb +5 -3
- data/lib/dfp_api/v201104/company_service.rb +13 -13
- data/lib/dfp_api/v201104/company_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/creative_service.rb +13 -13
- data/lib/dfp_api/v201104/creative_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/custom_targeting_service.rb +17 -17
- data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/forecast_service.rb +5 -5
- data/lib/dfp_api/v201104/forecast_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/inventory_service.rb +15 -15
- data/lib/dfp_api/v201104/inventory_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/line_item_creative_association_service.rb +15 -15
- data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/line_item_service.rb +15 -15
- data/lib/dfp_api/v201104/line_item_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/network_service.rb +7 -7
- data/lib/dfp_api/v201104/network_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/order_service.rb +15 -15
- data/lib/dfp_api/v201104/order_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/placement_service.rb +15 -15
- data/lib/dfp_api/v201104/placement_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/report_service.rb +7 -7
- data/lib/dfp_api/v201104/report_service_registry.rb +3 -3
- data/lib/dfp_api/v201104/user_service.rb +17 -17
- data/lib/dfp_api/v201104/user_service_registry.rb +3 -3
- data/lib/dfp_api/v201107/company_service.rb +13 -13
- data/lib/dfp_api/v201107/company_service_registry.rb +3 -3
- data/lib/dfp_api/v201107/creative_service.rb +13 -13
- data/lib/dfp_api/v201107/creative_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/custom_targeting_service.rb +17 -17
- data/lib/dfp_api/v201107/custom_targeting_service_registry.rb +3 -3
- data/lib/dfp_api/v201107/forecast_service.rb +5 -5
- data/lib/dfp_api/v201107/forecast_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/inventory_service.rb +17 -17
- data/lib/dfp_api/v201107/inventory_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/label_service.rb +15 -15
- data/lib/dfp_api/v201107/label_service_registry.rb +3 -3
- data/lib/dfp_api/v201107/line_item_creative_association_service.rb +15 -15
- data/lib/dfp_api/v201107/line_item_creative_association_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/line_item_service.rb +15 -15
- data/lib/dfp_api/v201107/line_item_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/network_service.rb +7 -7
- data/lib/dfp_api/v201107/network_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/order_service.rb +15 -15
- data/lib/dfp_api/v201107/order_service_registry.rb +3 -3
- data/lib/dfp_api/v201107/placement_service.rb +15 -15
- data/lib/dfp_api/v201107/placement_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201107/publisher_query_language_service_registry.rb +5 -3
- data/lib/dfp_api/v201107/report_service.rb +7 -7
- data/lib/dfp_api/v201107/report_service_registry.rb +3 -3
- data/lib/dfp_api/v201107/user_service.rb +19 -19
- data/lib/dfp_api/v201107/user_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/company_service.rb +13 -13
- data/lib/dfp_api/v201108/company_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/creative_service.rb +13 -13
- data/lib/dfp_api/v201108/creative_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/custom_targeting_service.rb +17 -17
- data/lib/dfp_api/v201108/custom_targeting_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/forecast_service.rb +5 -5
- data/lib/dfp_api/v201108/forecast_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/inventory_service.rb +17 -17
- data/lib/dfp_api/v201108/inventory_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/label_service.rb +15 -15
- data/lib/dfp_api/v201108/label_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/line_item_creative_association_service.rb +15 -15
- data/lib/dfp_api/v201108/line_item_creative_association_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/line_item_service.rb +15 -15
- data/lib/dfp_api/v201108/line_item_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/network_service.rb +7 -7
- data/lib/dfp_api/v201108/network_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/order_service.rb +15 -15
- data/lib/dfp_api/v201108/order_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/placement_service.rb +15 -15
- data/lib/dfp_api/v201108/placement_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/publisher_query_language_service.rb +3 -3
- data/lib/dfp_api/v201108/publisher_query_language_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/report_service.rb +7 -7
- data/lib/dfp_api/v201108/report_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/third_party_slot_service.rb +9 -9
- data/lib/dfp_api/v201108/third_party_slot_service_registry.rb +3 -3
- data/lib/dfp_api/v201108/user_service.rb +19 -19
- data/lib/dfp_api/v201108/user_service_registry.rb +3 -3
- data/test/bugs/test_issue_00000016.rb +10 -10
- data/test/dfp_api/test_dfp_api.rb +1 -1
- metadata +362 -366
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -189,7 +189,7 @@ or via configuration file (see example).
|
|
189
189
|
External dependencies should be pulled automatically on gem install. Here is the
|
190
190
|
list though:
|
191
191
|
|
192
|
-
- Google Ads Common library (google-ads-common-0.5.
|
192
|
+
- Google Ads Common library (google-ads-common-0.5.4);
|
193
193
|
- Savon 'the heavy metal Ruby SOAP client' (savon-0.9.6).
|
194
194
|
|
195
195
|
|
data/Rakefile
CHANGED
@@ -47,7 +47,7 @@ spec = Gem::Specification.new do |s|
|
|
47
47
|
s.test_files = tests
|
48
48
|
s.has_rdoc = true
|
49
49
|
s.extra_rdoc_files = docs
|
50
|
-
s.add_dependency('google-ads-common', '~> 0.5.
|
50
|
+
s.add_dependency('google-ads-common', '~> 0.5.4')
|
51
51
|
s.add_dependency('savon', '= 0.9.6')
|
52
52
|
end
|
53
53
|
|
@@ -70,7 +70,7 @@ task :generate do
|
|
70
70
|
api_config = DfpApi::ApiConfig
|
71
71
|
versions = api_config.versions()
|
72
72
|
versions.each do |version|
|
73
|
-
code_path = "lib/%s/%s" % [api_config.
|
73
|
+
code_path = "lib/%s/%s" % [api_config.api_name.to_s.snakecase, version]
|
74
74
|
wsdls = DfpApi::ApiConfig.get_wsdls(version)
|
75
75
|
wsdls.each do |service_name, wsdl_url|
|
76
76
|
logger.info("Processing %s at [%s]..." % [service_name, wsdl_url])
|
@@ -73,8 +73,6 @@ def copy_image_creatives()
|
|
73
73
|
image_url = new_creative.delete(:image_url)
|
74
74
|
new_creative[:image_byte_array] =
|
75
75
|
Base64.encode64(AdsCommon::Http.get(image_url))
|
76
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
77
|
-
new_creative[:xsi_type] = 'ImageCreative'
|
78
76
|
new_creative
|
79
77
|
end
|
80
78
|
|
@@ -56,8 +56,6 @@ def update_creatives()
|
|
56
56
|
# Update each local creative object by changing its destination URL.
|
57
57
|
creatives.each do |creative|
|
58
58
|
creative[:destination_url] = 'http://news.google.com'
|
59
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
60
|
-
creative[:xsi_type] = 'ImageCreative'
|
61
59
|
end
|
62
60
|
|
63
61
|
# Update the creatives on the server.
|
@@ -73,8 +73,6 @@ def copy_image_creatives()
|
|
73
73
|
image_url = new_creative.delete(:image_url)
|
74
74
|
new_creative[:image_byte_array] =
|
75
75
|
Base64.encode64(AdsCommon::Http.get(image_url))
|
76
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
77
|
-
new_creative[:xsi_type] = 'ImageCreative'
|
78
76
|
new_creative
|
79
77
|
end
|
80
78
|
|
@@ -56,8 +56,6 @@ def update_creatives()
|
|
56
56
|
# Update each local creative object by changing its destination URL.
|
57
57
|
creatives.each do |creative|
|
58
58
|
creative[:destination_url] = 'http://news.google.com'
|
59
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
60
|
-
creative[:xsi_type] = 'ImageCreative'
|
61
59
|
end
|
62
60
|
|
63
61
|
# Update the creatives on the server.
|
@@ -73,8 +73,6 @@ def copy_image_creatives()
|
|
73
73
|
image_url = new_creative.delete(:image_url)
|
74
74
|
new_creative[:image_byte_array] =
|
75
75
|
Base64.encode64(AdsCommon::Http.get(image_url))
|
76
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
77
|
-
new_creative[:xsi_type] = 'ImageCreative'
|
78
76
|
new_creative
|
79
77
|
end
|
80
78
|
|
@@ -56,8 +56,6 @@ def update_creatives()
|
|
56
56
|
# Update each local creative object by changing its destination URL.
|
57
57
|
creatives.each do |creative|
|
58
58
|
creative[:destination_url] = 'http://news.google.com'
|
59
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
60
|
-
creative[:xsi_type] = 'ImageCreative'
|
61
59
|
end
|
62
60
|
|
63
61
|
# Update the creatives on the server.
|
@@ -73,8 +73,6 @@ def copy_image_creatives()
|
|
73
73
|
image_url = new_creative.delete(:image_url)
|
74
74
|
new_creative[:image_byte_array] =
|
75
75
|
Base64.encode64(AdsCommon::Http.get(image_url))
|
76
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
77
|
-
new_creative[:xsi_type] = 'ImageCreative'
|
78
76
|
new_creative
|
79
77
|
end
|
80
78
|
|
@@ -56,8 +56,6 @@ def update_creatives()
|
|
56
56
|
# Update each local creative object by changing its destination URL.
|
57
57
|
creatives.each do |creative|
|
58
58
|
creative[:destination_url] = 'http://news.google.com'
|
59
|
-
# Savon doesn't get us xsi_type back yet so we have to specify it.
|
60
|
-
creative[:xsi_type] = 'ImageCreative'
|
61
59
|
end
|
62
60
|
|
63
61
|
# Update the creatives on the server.
|
@@ -56,10 +56,17 @@ def create_line_items()
|
|
56
56
|
|
57
57
|
# Create geographical targeting.
|
58
58
|
geo_targeting = {
|
59
|
-
# Include
|
60
|
-
:targeted_locations => [
|
61
|
-
|
62
|
-
|
59
|
+
# Include targets.
|
60
|
+
:targeted_locations => [
|
61
|
+
{:id => 2840}, # USA.
|
62
|
+
{:id => 20123}, # Quebec, Canada.
|
63
|
+
{:id => 9000093} # Postal code B3P (Canada).
|
64
|
+
],
|
65
|
+
# Exclude targets.
|
66
|
+
:excluded_locations => [
|
67
|
+
{:id => 1016367}, # Chicago.
|
68
|
+
{:id => 200501} # New York.
|
69
|
+
]
|
63
70
|
}
|
64
71
|
|
65
72
|
# Create user domain targeting. Exclude domains that are not under the
|
@@ -100,7 +107,7 @@ def create_line_items()
|
|
100
107
|
|
101
108
|
# Create an array to store local line item objects.
|
102
109
|
line_items = (1..ITEM_COUNT).map do |index|
|
103
|
-
line_item = {:name => "Line item #%d" % index,
|
110
|
+
line_item = {:name => "Line item #%d-%d" % [Time.new.to_f * 1000, index],
|
104
111
|
:order_id => order_id,
|
105
112
|
:targeting => targeting,
|
106
113
|
:line_item_type => 'STANDARD',
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# Author:: api.dklimkin@gmail.com (Danial Klimkin)
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
+
#
|
7
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
+
# implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
# This example gets all targetable postal codes.
|
21
|
+
#
|
22
|
+
# Tags: PublisherQueryLanguageService.select
|
23
|
+
|
24
|
+
require 'rubygems'
|
25
|
+
require 'dfp_api'
|
26
|
+
|
27
|
+
API_VERSION = :v201108
|
28
|
+
# A string to separate columns in output. Use "," to get CSV.
|
29
|
+
COLUMN_SEPARATOR = "\t"
|
30
|
+
|
31
|
+
def get_all_postal_codes()
|
32
|
+
# Get DfpApi instance and load configuration from ~/dfp_api.yml.
|
33
|
+
dfp = DfpApi::Api.new
|
34
|
+
|
35
|
+
# To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
|
36
|
+
# the configuration file or provide your own logger:
|
37
|
+
# dfp.logger = Logger.new('dfp_xml.log')
|
38
|
+
|
39
|
+
# Get the PublisherQueryLanguageService.
|
40
|
+
pql_service = dfp.service(:PublisherQueryLanguageService, API_VERSION)
|
41
|
+
|
42
|
+
# Create statement to select all postal codes.
|
43
|
+
statement = {:query => 'SELECT * FROM Postal_Code WHERE targetable = true'}
|
44
|
+
|
45
|
+
# Get all postal codes.
|
46
|
+
result_set = pql_service.select(statement)
|
47
|
+
|
48
|
+
if result_set
|
49
|
+
# Print out columns header.
|
50
|
+
columns = result_set[:column_types].collect {|col| col[:label_name]}
|
51
|
+
puts columns.join(COLUMN_SEPARATOR)
|
52
|
+
|
53
|
+
# Print out every row.
|
54
|
+
result_set[:rows].each do |row_set|
|
55
|
+
row = row_set[:values].collect {|item| item[:value]}
|
56
|
+
puts row.join(COLUMN_SEPARATOR)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Print a footer.
|
61
|
+
if result_set[:rows]
|
62
|
+
puts "Total number of rows found: %d" % result_set[:rows].size
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
if __FILE__ == $0
|
67
|
+
begin
|
68
|
+
get_all_postal_codes()
|
69
|
+
|
70
|
+
# HTTP errors.
|
71
|
+
rescue AdsCommon::Errors::HttpError => e
|
72
|
+
puts "HTTP Error: %s" % e
|
73
|
+
|
74
|
+
# API errors.
|
75
|
+
rescue DfpApi::Errors::ApiException => e
|
76
|
+
puts "Message: %s" % e.message
|
77
|
+
puts 'Errors:'
|
78
|
+
e.errors.each_with_index do |error, index|
|
79
|
+
puts "\tError [%d]:" % (index + 1)
|
80
|
+
error.each do |field, value|
|
81
|
+
puts "\t\t%s: %s" % [field, value]
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
data/lib/dfp_api.rb
CHANGED
data/lib/dfp_api/api_config.rb
CHANGED
@@ -40,8 +40,7 @@ module DfpApi
|
|
40
40
|
|
41
41
|
# Set other constants
|
42
42
|
API_NAME = 'DfpApi'
|
43
|
-
|
44
|
-
CLIENT_LIB_VERSION = '0.2.4'
|
43
|
+
CLIENT_LIB_VERSION = '0.2.5'
|
45
44
|
DEFAULT_CONFIG_FILENAME = 'dfp_api.yml'
|
46
45
|
|
47
46
|
# Configure the services available to each version
|
@@ -103,16 +102,6 @@ module DfpApi
|
|
103
102
|
|
104
103
|
public
|
105
104
|
|
106
|
-
def self.do_require(version, service)
|
107
|
-
service_name = service.to_s.snakecase()
|
108
|
-
filename = "%s/%s/%s" % [api_path, version, service_name]
|
109
|
-
require filename
|
110
|
-
end
|
111
|
-
|
112
|
-
def self.interface_name(version, service)
|
113
|
-
return module_name(version, service) + "::" + service.to_s
|
114
|
-
end
|
115
|
-
|
116
105
|
# Getters for constants and module variables.
|
117
106
|
def self.default_version
|
118
107
|
DEFAULT_VERSION
|
@@ -130,10 +119,6 @@ module DfpApi
|
|
130
119
|
API_NAME
|
131
120
|
end
|
132
121
|
|
133
|
-
def self.api_path
|
134
|
-
API_PATH
|
135
|
-
end
|
136
|
-
|
137
122
|
def self.service_config
|
138
123
|
@@service_config
|
139
124
|
end
|
@@ -3,7 +3,7 @@
|
|
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.5.
|
6
|
+
# Code generated by AdsCommon library 0.5.3 on 2011-10-24 17:30:27.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201103/company_service_registry'
|
@@ -15,28 +15,28 @@ module DfpApi; module V201103; module CompanyService
|
|
15
15
|
super(api, endpoint, namespace, :v201103)
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
return execute_action('
|
18
|
+
def update_company(*args, &block)
|
19
|
+
return execute_action('update_company', args, &block)
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
23
|
-
return execute_action('
|
22
|
+
def create_companies(*args, &block)
|
23
|
+
return execute_action('create_companies', args, &block)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
return execute_action('
|
26
|
+
def create_company(*args, &block)
|
27
|
+
return execute_action('create_company', args, &block)
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
return execute_action('
|
30
|
+
def get_companies_by_statement(*args, &block)
|
31
|
+
return execute_action('get_companies_by_statement', args, &block)
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
35
|
-
return execute_action('
|
34
|
+
def get_company(*args, &block)
|
35
|
+
return execute_action('get_company', args, &block)
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
39
|
-
return execute_action('
|
38
|
+
def update_companies(*args, &block)
|
39
|
+
return execute_action('update_companies', args, &block)
|
40
40
|
end
|
41
41
|
|
42
42
|
private
|
@@ -3,12 +3,14 @@
|
|
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.5.
|
6
|
+
# Code generated by AdsCommon library 0.5.3 on 2011-10-24 17:30:27.
|
7
|
+
|
8
|
+
require 'dfp_api/errors'
|
7
9
|
|
8
10
|
module DfpApi; module V201103; module CompanyService
|
9
11
|
class CompanyServiceRegistry
|
10
|
-
COMPANYSERVICE_METHODS = {:
|
11
|
-
COMPANYSERVICE_TYPES = {:
|
12
|
+
COMPANYSERVICE_METHODS = {:update_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_company_response"}}, :create_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:companies}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"create_companies_response"}}, :create_company=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_company_response"}}, :get_companies_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"CompanyPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_companies_by_statement_response"}}, :get_company=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:company_id}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_company_response"}}, :update_companies=>{:input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:companies}], :output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"update_companies_response"}}}
|
13
|
+
COMPANYSERVICE_TYPES = {:ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :Company=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"Company.Type", :min_occurs=>0, :max_occurs=>1, :name=>:type}]}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :CompanyPage=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:total_result_set_size}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:start_index}, {:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:results}]}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:values}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}}
|
12
14
|
COMPANYSERVICE_NAMESPACES = []
|
13
15
|
|
14
16
|
def self.get_method_signature(method_name)
|
@@ -3,7 +3,7 @@
|
|
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.5.
|
6
|
+
# Code generated by AdsCommon library 0.5.3 on 2011-10-24 17:31:02.
|
7
7
|
|
8
8
|
require 'ads_common/savon_service'
|
9
9
|
require 'dfp_api/v201103/creative_service_registry'
|
@@ -15,28 +15,28 @@ module DfpApi; module V201103; module CreativeService
|
|
15
15
|
super(api, endpoint, namespace, :v201103)
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
return execute_action('
|
18
|
+
def get_creative(*args, &block)
|
19
|
+
return execute_action('get_creative', args, &block)
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
23
|
-
return execute_action('
|
22
|
+
def get_creatives_by_statement(*args, &block)
|
23
|
+
return execute_action('get_creatives_by_statement', args, &block)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
return execute_action('
|
26
|
+
def update_creative(*args, &block)
|
27
|
+
return execute_action('update_creative', args, &block)
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
return execute_action('
|
30
|
+
def update_creatives(*args, &block)
|
31
|
+
return execute_action('update_creatives', args, &block)
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
35
|
-
return execute_action('
|
34
|
+
def create_creative(*args, &block)
|
35
|
+
return execute_action('create_creative', args, &block)
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
39
|
-
return execute_action('
|
38
|
+
def create_creatives(*args, &block)
|
39
|
+
return execute_action('create_creatives', args, &block)
|
40
40
|
end
|
41
41
|
|
42
42
|
private
|
@@ -3,12 +3,14 @@
|
|
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.5.
|
6
|
+
# Code generated by AdsCommon library 0.5.3 on 2011-10-24 17:31:02.
|
7
|
+
|
8
|
+
require 'dfp_api/errors'
|
7
9
|
|
8
10
|
module DfpApi; module V201103; module CreativeService
|
9
11
|
class CreativeServiceRegistry
|
10
|
-
CREATIVESERVICE_METHODS = {:
|
11
|
-
CREATIVESERVICE_TYPES = {:
|
12
|
+
CREATIVESERVICE_METHODS = {:get_creative=>{:input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:creative_id}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_creative_response"}}, :get_creatives_by_statement=>{:input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}], :output=>{:fields=>[{:type=>"CreativePage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_creatives_by_statement_response"}}, :update_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:creative}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_creative_response"}}, :update_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:creatives}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"update_creatives_response"}}, :create_creative=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:creative}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_creative_response"}}, :create_creatives=>{:input=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:creatives}], :output=>{:fields=>[{:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"create_creatives_response"}}}
|
13
|
+
CREATIVESERVICE_TYPES = {:ThirdPartyCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:snippet}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:expanded_snippet}], :base=>"Creative"}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :FlashRedirectCreative=>{:fields=>[], :base=>"BaseFlashRedirectCreative"}, :HasDestinationUrlCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:destination_url}], :abstract=>true, :base=>"Creative"}, :BaseFlashCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:flash_name}, {:type=>"base64Binary", :min_occurs=>0, :max_occurs=>1, :name=>:flash_byte_array}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_image_name}, {:type=>"base64Binary", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_image_byte_array}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:override_size}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:click_tag_required}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_preview_url}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:flash_asset_size}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_asset_size}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :Creative=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:advertiser_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:size}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:preview_url}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:creative_type}], :abstract=>true}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :ImageCreative=>{:fields=>[], :base=>"BaseImageCreative"}, :BaseFlashRedirectCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:flash_url}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_url}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:fallback_preview_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :SoapRequestHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:network_code}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:application_name}, {:type=>"Authentication", :min_occurs=>0, :max_occurs=>1, :name=>:authentication}]}, :CreativePage=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:total_result_set_size}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:start_index}, {:type=>"Creative", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:results}]}, :ImageRedirectCreative=>{:fields=>[], :base=>"BaseImageRedirectCreative"}, :BaseImageCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_name}, {:type=>"base64Binary", :min_occurs=>0, :max_occurs=>1, :name=>:image_byte_array}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:override_size}, {:type=>"Size", :min_occurs=>0, :max_occurs=>1, :name=>:asset_size}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :Size=>{:fields=>[{:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:width}, {:type=>"int", :min_occurs=>0, :max_occurs=>1, :name=>:height}, {:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:is_aspect_ratio}]}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :BaseImageRedirectCreative=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:image_url}], :abstract=>true, :base=>"HasDestinationUrlCreative"}, :Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:values}]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :FlashCreative=>{:fields=>[], :base=>"BaseFlashCreative"}}
|
12
14
|
CREATIVESERVICE_NAMESPACES = []
|
13
15
|
|
14
16
|
def self.get_method_signature(method_name)
|