google-dfp-api 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. data/ChangeLog +4 -0
  2. data/README +13 -1
  3. data/Rakefile +7 -1
  4. data/examples/v201111/third_party_slot_service/archive_third_party_slots.rb +125 -0
  5. data/examples/v201111/third_party_slot_service/create_third_party_slot.rb +91 -0
  6. data/examples/v201111/third_party_slot_service/get_all_third_party_slots.rb +93 -0
  7. data/examples/v201111/third_party_slot_service/get_third_party_slot_by_statement.rb +86 -0
  8. data/examples/v201111/third_party_slot_service/update_third_party_slots.rb +95 -0
  9. data/lib/dfp_api/api_config.rb +1 -1
  10. data/lib/dfp_api/v201103/company_service.rb +13 -13
  11. data/lib/dfp_api/v201103/company_service_registry.rb +3 -3
  12. data/lib/dfp_api/v201103/creative_service.rb +5 -5
  13. data/lib/dfp_api/v201103/creative_service_registry.rb +3 -3
  14. data/lib/dfp_api/v201103/custom_targeting_service.rb +17 -17
  15. data/lib/dfp_api/v201103/custom_targeting_service_registry.rb +3 -3
  16. data/lib/dfp_api/v201103/forecast_service.rb +5 -5
  17. data/lib/dfp_api/v201103/forecast_service_registry.rb +3 -3
  18. data/lib/dfp_api/v201103/inventory_service.rb +13 -13
  19. data/lib/dfp_api/v201103/inventory_service_registry.rb +3 -3
  20. data/lib/dfp_api/v201103/line_item_creative_association_service.rb +9 -9
  21. data/lib/dfp_api/v201103/line_item_creative_association_service_registry.rb +3 -3
  22. data/lib/dfp_api/v201103/line_item_service.rb +13 -13
  23. data/lib/dfp_api/v201103/line_item_service_registry.rb +3 -3
  24. data/lib/dfp_api/v201103/network_service.rb +1 -1
  25. data/lib/dfp_api/v201103/network_service_registry.rb +3 -3
  26. data/lib/dfp_api/v201103/order_service.rb +5 -5
  27. data/lib/dfp_api/v201103/order_service_registry.rb +3 -3
  28. data/lib/dfp_api/v201103/placement_service.rb +13 -13
  29. data/lib/dfp_api/v201103/placement_service_registry.rb +3 -3
  30. data/lib/dfp_api/v201103/publisher_query_language_service.rb +1 -1
  31. data/lib/dfp_api/v201103/publisher_query_language_service_registry.rb +3 -3
  32. data/lib/dfp_api/v201103/report_service.rb +1 -1
  33. data/lib/dfp_api/v201103/report_service_registry.rb +3 -3
  34. data/lib/dfp_api/v201103/user_service.rb +9 -9
  35. data/lib/dfp_api/v201103/user_service_registry.rb +3 -3
  36. data/lib/dfp_api/v201104/company_service.rb +13 -13
  37. data/lib/dfp_api/v201104/company_service_registry.rb +3 -3
  38. data/lib/dfp_api/v201104/creative_service.rb +5 -5
  39. data/lib/dfp_api/v201104/creative_service_registry.rb +3 -3
  40. data/lib/dfp_api/v201104/custom_targeting_service.rb +17 -17
  41. data/lib/dfp_api/v201104/custom_targeting_service_registry.rb +3 -3
  42. data/lib/dfp_api/v201104/forecast_service.rb +5 -5
  43. data/lib/dfp_api/v201104/forecast_service_registry.rb +3 -3
  44. data/lib/dfp_api/v201104/inventory_service.rb +13 -13
  45. data/lib/dfp_api/v201104/inventory_service_registry.rb +3 -3
  46. data/lib/dfp_api/v201104/line_item_creative_association_service.rb +9 -9
  47. data/lib/dfp_api/v201104/line_item_creative_association_service_registry.rb +3 -3
  48. data/lib/dfp_api/v201104/line_item_service.rb +13 -13
  49. data/lib/dfp_api/v201104/line_item_service_registry.rb +3 -3
  50. data/lib/dfp_api/v201104/network_service.rb +1 -1
  51. data/lib/dfp_api/v201104/network_service_registry.rb +3 -3
  52. data/lib/dfp_api/v201104/order_service.rb +5 -5
  53. data/lib/dfp_api/v201104/order_service_registry.rb +3 -3
  54. data/lib/dfp_api/v201104/placement_service.rb +13 -13
  55. data/lib/dfp_api/v201104/placement_service_registry.rb +3 -3
  56. data/lib/dfp_api/v201104/publisher_query_language_service.rb +1 -1
  57. data/lib/dfp_api/v201104/publisher_query_language_service_registry.rb +3 -3
  58. data/lib/dfp_api/v201104/report_service.rb +1 -1
  59. data/lib/dfp_api/v201104/report_service_registry.rb +3 -3
  60. data/lib/dfp_api/v201104/user_service.rb +9 -9
  61. data/lib/dfp_api/v201104/user_service_registry.rb +3 -3
  62. data/lib/dfp_api/v201107/company_service.rb +13 -13
  63. data/lib/dfp_api/v201107/company_service_registry.rb +3 -3
  64. data/lib/dfp_api/v201107/creative_service.rb +5 -5
  65. data/lib/dfp_api/v201107/creative_service_registry.rb +3 -3
  66. data/lib/dfp_api/v201107/custom_targeting_service.rb +17 -17
  67. data/lib/dfp_api/v201107/custom_targeting_service_registry.rb +3 -3
  68. data/lib/dfp_api/v201107/forecast_service.rb +5 -5
  69. data/lib/dfp_api/v201107/forecast_service_registry.rb +3 -3
  70. data/lib/dfp_api/v201107/inventory_service.rb +17 -17
  71. data/lib/dfp_api/v201107/inventory_service_registry.rb +3 -3
  72. data/lib/dfp_api/v201107/label_service.rb +13 -13
  73. data/lib/dfp_api/v201107/label_service_registry.rb +3 -3
  74. data/lib/dfp_api/v201107/line_item_creative_association_service.rb +9 -9
  75. data/lib/dfp_api/v201107/line_item_creative_association_service_registry.rb +3 -3
  76. data/lib/dfp_api/v201107/line_item_service.rb +13 -13
  77. data/lib/dfp_api/v201107/line_item_service_registry.rb +3 -3
  78. data/lib/dfp_api/v201107/network_service.rb +1 -1
  79. data/lib/dfp_api/v201107/network_service_registry.rb +3 -3
  80. data/lib/dfp_api/v201107/order_service.rb +5 -5
  81. data/lib/dfp_api/v201107/order_service_registry.rb +3 -3
  82. data/lib/dfp_api/v201107/placement_service.rb +13 -13
  83. data/lib/dfp_api/v201107/placement_service_registry.rb +3 -3
  84. data/lib/dfp_api/v201107/publisher_query_language_service.rb +1 -1
  85. data/lib/dfp_api/v201107/publisher_query_language_service_registry.rb +3 -3
  86. data/lib/dfp_api/v201107/report_service.rb +1 -1
  87. data/lib/dfp_api/v201107/report_service_registry.rb +3 -3
  88. data/lib/dfp_api/v201107/user_service.rb +13 -13
  89. data/lib/dfp_api/v201107/user_service_registry.rb +3 -3
  90. data/lib/dfp_api/v201108/company_service.rb +13 -13
  91. data/lib/dfp_api/v201108/company_service_registry.rb +3 -3
  92. data/lib/dfp_api/v201108/creative_service.rb +5 -5
  93. data/lib/dfp_api/v201108/creative_service_registry.rb +3 -3
  94. data/lib/dfp_api/v201108/custom_targeting_service.rb +17 -17
  95. data/lib/dfp_api/v201108/custom_targeting_service_registry.rb +3 -3
  96. data/lib/dfp_api/v201108/forecast_service.rb +5 -5
  97. data/lib/dfp_api/v201108/forecast_service_registry.rb +3 -3
  98. data/lib/dfp_api/v201108/inventory_service.rb +17 -17
  99. data/lib/dfp_api/v201108/inventory_service_registry.rb +3 -3
  100. data/lib/dfp_api/v201108/label_service.rb +13 -13
  101. data/lib/dfp_api/v201108/label_service_registry.rb +3 -3
  102. data/lib/dfp_api/v201108/line_item_creative_association_service.rb +9 -9
  103. data/lib/dfp_api/v201108/line_item_creative_association_service_registry.rb +3 -3
  104. data/lib/dfp_api/v201108/line_item_service.rb +13 -13
  105. data/lib/dfp_api/v201108/line_item_service_registry.rb +3 -3
  106. data/lib/dfp_api/v201108/network_service.rb +1 -1
  107. data/lib/dfp_api/v201108/network_service_registry.rb +3 -3
  108. data/lib/dfp_api/v201108/order_service.rb +5 -5
  109. data/lib/dfp_api/v201108/order_service_registry.rb +3 -3
  110. data/lib/dfp_api/v201108/placement_service.rb +13 -13
  111. data/lib/dfp_api/v201108/placement_service_registry.rb +3 -3
  112. data/lib/dfp_api/v201108/publisher_query_language_service.rb +1 -1
  113. data/lib/dfp_api/v201108/publisher_query_language_service_registry.rb +3 -3
  114. data/lib/dfp_api/v201108/report_service.rb +1 -1
  115. data/lib/dfp_api/v201108/report_service_registry.rb +3 -3
  116. data/lib/dfp_api/v201108/third_party_slot_service.rb +1 -1
  117. data/lib/dfp_api/v201108/third_party_slot_service_registry.rb +3 -3
  118. data/lib/dfp_api/v201108/user_service.rb +13 -13
  119. data/lib/dfp_api/v201108/user_service_registry.rb +3 -3
  120. data/lib/dfp_api/v201111/company_service.rb +13 -13
  121. data/lib/dfp_api/v201111/company_service_registry.rb +3 -3
  122. data/lib/dfp_api/v201111/content_service.rb +1 -1
  123. data/lib/dfp_api/v201111/content_service_registry.rb +3 -3
  124. data/lib/dfp_api/v201111/creative_service.rb +5 -5
  125. data/lib/dfp_api/v201111/creative_service_registry.rb +3 -3
  126. data/lib/dfp_api/v201111/creative_template_service.rb +1 -1
  127. data/lib/dfp_api/v201111/creative_template_service_registry.rb +3 -3
  128. data/lib/dfp_api/v201111/custom_targeting_service.rb +17 -17
  129. data/lib/dfp_api/v201111/custom_targeting_service_registry.rb +3 -3
  130. data/lib/dfp_api/v201111/forecast_service.rb +5 -5
  131. data/lib/dfp_api/v201111/forecast_service_registry.rb +3 -3
  132. data/lib/dfp_api/v201111/inventory_service.rb +17 -17
  133. data/lib/dfp_api/v201111/inventory_service_registry.rb +3 -3
  134. data/lib/dfp_api/v201111/label_service.rb +13 -13
  135. data/lib/dfp_api/v201111/label_service_registry.rb +3 -3
  136. data/lib/dfp_api/v201111/line_item_creative_association_service.rb +13 -13
  137. data/lib/dfp_api/v201111/line_item_creative_association_service_registry.rb +3 -3
  138. data/lib/dfp_api/v201111/line_item_service.rb +13 -13
  139. data/lib/dfp_api/v201111/line_item_service_registry.rb +3 -3
  140. data/lib/dfp_api/v201111/network_service.rb +1 -1
  141. data/lib/dfp_api/v201111/network_service_registry.rb +3 -3
  142. data/lib/dfp_api/v201111/order_service.rb +5 -5
  143. data/lib/dfp_api/v201111/order_service_registry.rb +3 -3
  144. data/lib/dfp_api/v201111/placement_service.rb +13 -13
  145. data/lib/dfp_api/v201111/placement_service_registry.rb +3 -3
  146. data/lib/dfp_api/v201111/publisher_query_language_service.rb +1 -1
  147. data/lib/dfp_api/v201111/publisher_query_language_service_registry.rb +3 -3
  148. data/lib/dfp_api/v201111/report_service.rb +1 -1
  149. data/lib/dfp_api/v201111/report_service_registry.rb +3 -3
  150. data/lib/dfp_api/v201111/suggested_ad_unit_service.rb +1 -1
  151. data/lib/dfp_api/v201111/suggested_ad_unit_service_registry.rb +3 -3
  152. data/lib/dfp_api/v201111/third_party_slot_service.rb +1 -1
  153. data/lib/dfp_api/v201111/third_party_slot_service_registry.rb +3 -3
  154. data/lib/dfp_api/v201111/user_service.rb +13 -13
  155. data/lib/dfp_api/v201111/user_service_registry.rb +3 -3
  156. data/lib/dfp_api.rb +1 -1
  157. metadata +17 -9
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 0.2.7:
2
+ - Support for GZip compression.
3
+ - Require google-ads-common 0.6.1 or later from now on.
4
+
1
5
  0.2.6:
2
6
  - Support for v201111.
3
7
  - Require google-ads-common 0.6.0 or later from now on.
data/README CHANGED
@@ -184,13 +184,25 @@ configuration hash:
184
184
 
185
185
  or via configuration file (see example).
186
186
 
187
+ == How do I enable GZip responses compression?
188
+
189
+ The library offers a transparent compression option which can be enabled in the
190
+ configuration file or by the following setting:
191
+
192
+ config[:connection] = {
193
+ :enable_gzip => true
194
+ }
195
+
196
+ Enabling this option will set the headers required to request the server to
197
+ respond in gzipped format. All requests are sent uncompressed regardless.
198
+
187
199
 
188
200
  = External dependencies:
189
201
 
190
202
  External dependencies should be pulled automatically on gem install. Here is the
191
203
  list though:
192
204
 
193
- - Google Ads Common library (google-ads-common-0.6.0);
205
+ - Google Ads Common library (google-ads-common-0.6.1);
194
206
  - Savon 'the heavy metal Ruby SOAP client' (savon-0.9.7).
195
207
 
196
208
 
data/Rakefile CHANGED
@@ -24,6 +24,12 @@ require 'rubygems/package_task'
24
24
  require 'rake/testtask'
25
25
  require './lib/dfp_api/api_config'
26
26
 
27
+ # Workaround for the current mess of different yamlers in Ruby world.
28
+ if RUBY_VERSION>='1.9.2'
29
+ gem 'psych'
30
+ YAML::ENGINE.yamler = 'psych'
31
+ end
32
+
27
33
  # Google common ads library used for wrapper code generation.
28
34
  gem 'google-ads-common'
29
35
  require 'ads_common/build/savon_generator'
@@ -47,7 +53,7 @@ spec = Gem::Specification.new do |s|
47
53
  s.test_files = tests
48
54
  s.has_rdoc = true
49
55
  s.extra_rdoc_files = docs
50
- s.add_dependency('google-ads-common', '~> 0.6.0')
56
+ s.add_dependency('google-ads-common', '~> 0.6.1')
51
57
  s.add_dependency('savon', '= 0.9.7')
52
58
  end
53
59
 
@@ -0,0 +1,125 @@
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 archives all active third party slots for a company. To determine
21
+ # which third party slots exist, run get_all_third_party_slots.rb.
22
+ #
23
+ # Tags: ThirdPartSlotService.getThirdPartySlotsByStatement,
24
+ # ThirdPartSlotService.performThirdPartySlotsAction
25
+
26
+ require 'rubygems'
27
+ require 'dfp_api'
28
+
29
+ API_VERSION = :v201111
30
+ PAGE_SIZE = 500
31
+
32
+ def archive_third_party_slots()
33
+ # Get DfpApi instance and load configuration from ~/dfp_api.yml.
34
+ dfp = DfpApi::Api.new
35
+
36
+ # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
37
+ # the configuration file or provide your own logger:
38
+ # dfp.logger = Logger.new('dfp_xml.log')
39
+
40
+ # Get the ThirdPartySlotService.
41
+ third_party_slot_service = dfp.service(:ThirdPartySlotService, API_VERSION)
42
+
43
+ # Set the company that the third party slots to archive belong to.
44
+ company_id = 'INSERT_COMPANY_ID_HERE'.to_i
45
+
46
+ # Create a statement to only select active third party slots.
47
+ statement_text = 'WHERE status = :status AND companyId = :company_id'
48
+
49
+ # Create statement bind variables.
50
+ statement = {
51
+ :query => statement_text,
52
+ :values => [
53
+ {:key => 'status',
54
+ :value => {:value => 'ARCHIVED', :xsi_type => 'TextValue'}},
55
+ {:key => 'company_id',
56
+ :value => {:value => company_id, :xsi_type => 'NumberValue'}},
57
+ ]
58
+ }
59
+
60
+ # Define initial values.
61
+ offset = 0
62
+ page = {}
63
+ third_party_slot_ids = []
64
+
65
+ begin
66
+ # Update the statement to get one page with current offset.
67
+ statement[:query] =
68
+ statement_text + " LIMIT %d OFFSET %d" % [PAGE_SIZE, offset]
69
+
70
+ # Get third party slots by statement.
71
+ page = third_party_slot_service.get_third_party_slots_by_statement(statement)
72
+
73
+ if page[:results]
74
+ # Increase query offset by page size.
75
+ offset += PAGE_SIZE
76
+
77
+ page[:results].each do |slot|
78
+ puts "%d) Third party slot ID: %d and name: '%s' will be archived." %
79
+ [third_party_slot_ids.size, slot[:id], slot[:name]]
80
+ third_party_slot_ids << slot[:id]
81
+ end
82
+ end
83
+ end while offset < page[:total_result_set_size]
84
+
85
+ puts "Number of third party slots to be archived: %d" % third_party_slot_ids.size
86
+
87
+ unless third_party_slot_ids.empty?
88
+ # Create statement for action.
89
+ statement = {:query => "WHERE id IN (%s)" % third_party_slot_ids.join(', ')}
90
+
91
+ # Perform action.
92
+ result = third_party_slot_service.perform_third_party_slot_action(
93
+ {:xsi_type => 'ArchiveThirdPartySlots'}, statement)
94
+
95
+ # Display results.
96
+ if result and result[:num_changes] > 0
97
+ puts "Number of third party slots archived: %d" % result[:num_changes]
98
+ else
99
+ puts 'No third party slots were archived.'
100
+ end
101
+ else
102
+ puts 'No third party slots found to archive.'
103
+ end
104
+ end
105
+
106
+ if __FILE__ == $0
107
+ begin
108
+ archive_third_party_slots()
109
+
110
+ # HTTP errors.
111
+ rescue AdsCommon::Errors::HttpError => e
112
+ puts "HTTP Error: %s" % e
113
+
114
+ # API errors.
115
+ rescue DfpApi::Errors::ApiException => e
116
+ puts "Message: %s" % e.message
117
+ puts 'Errors:'
118
+ e.errors.each_with_index do |error, index|
119
+ puts "\tError [%d]:" % (index + 1)
120
+ error.each do |field, value|
121
+ puts "\t\t%s: %s" % [field, value]
122
+ end
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,91 @@
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 creates a new third party slot. To determine which third party
21
+ # slots exist, run get_all_third_party_slots.rb.
22
+ #
23
+ # Tags: ThirdPartySlotService.createThirdPartySlot
24
+
25
+ require 'rubygems'
26
+ require 'dfp_api'
27
+
28
+ API_VERSION = :v201111
29
+
30
+ def create_third_party_slot()
31
+ # Get DfpApi instance and load configuration from ~/dfp_api.yml.
32
+ dfp = DfpApi::Api.new
33
+
34
+ # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in
35
+ # the configuration file or provide your own logger:
36
+ # dfp.logger = Logger.new('dfp_xml.log')
37
+
38
+ # Get the ThirdPartySlotService.
39
+ third_party_slot_service = dfp.service(:ThirdPartySlotService, API_VERSION)
40
+
41
+ # Set the company ID to associate with this third party slot.
42
+ company_id = 'INSERT_COMPANY_ID_HERE'.to_i
43
+
44
+ # Set the external unique ID and name to associate with this third party slot.
45
+ external_unique_id = 'INSERT_EXTERNAL_UNIQUE_ID_HERE'.to_i
46
+ external_unique_name = 'INSERT_EXTERNAL_UNIQUE_NAME_HERE'.to_s
47
+
48
+ # Set the creative IDs to associate with this third party slot.
49
+ creative_ids = ['INSERT_CREATIVE_ID_HERE'.to_i]
50
+
51
+ # Create the ThirdPartySlot object.
52
+ third_party_slot = {
53
+ :company_id => company_id,
54
+ :description => 'Third party slot description.',
55
+ :external_unique_id => external_unique_id,
56
+ :external_unique_name => external_unique_name,
57
+ :creative_ids => creative_ids
58
+ }
59
+
60
+ # Create the third party slot.
61
+ return_slot =
62
+ third_party_slot_service.create_third_party_slot(third_party_slot)
63
+
64
+ if return_slot
65
+ puts "Third party slot with ID: %d and name: '%s' was created." %
66
+ [return_slot[:id], return_slot[:name]]
67
+ else
68
+ raise 'No third party slots were created.'
69
+ end
70
+ end
71
+
72
+ if __FILE__ == $0
73
+ begin
74
+ create_third_party_slot()
75
+
76
+ # HTTP errors.
77
+ rescue AdsCommon::Errors::HttpError => e
78
+ puts "HTTP Error: %s" % e
79
+
80
+ # API errors.
81
+ rescue DfpApi::Errors::ApiException => e
82
+ puts "Message: %s" % e.message
83
+ puts 'Errors:'
84
+ e.errors.each_with_index do |error, index|
85
+ puts "\tError [%d]:" % (index + 1)
86
+ error.each do |field, value|
87
+ puts "\t\t%s: %s" % [field, value]
88
+ end
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,93 @@
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 third party slots. To create third party slots, run
21
+ # create_third_party_slot.rb.
22
+ #
23
+ # Tags: ThirdPartySlotService.getThirdPartySlotsByStatement
24
+
25
+ require 'rubygems'
26
+ require 'dfp_api'
27
+
28
+ API_VERSION = :v201111
29
+ PAGE_SIZE = 500
30
+
31
+ def get_all_third_party_slots()
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 ThirdPartySlotService.
40
+ third_party_slot_service = dfp.service(:ThirdPartySlotService, API_VERSION)
41
+
42
+ # Define initial values.
43
+ offset = 0
44
+ page = {}
45
+
46
+ begin
47
+ # Create statement for one page with current offset.
48
+ statement = {:query => "LIMIT %d OFFSET %d" % [PAGE_SIZE, offset]}
49
+
50
+ # Get third party slots by statement.
51
+ page = third_party_slot_service.get_third_party_slots_by_statement(statement)
52
+
53
+ if page[:results]
54
+ # Increase query offset by page size.
55
+ offset += PAGE_SIZE
56
+
57
+ # Get the start index for printout.
58
+ start_index = page[:start_index]
59
+
60
+ # Print details about each third party slot in results page.
61
+ page[:results].each_with_index do |slot, index|
62
+ puts "%d) Third party slot ID: %d, name: '%s'" %
63
+ [index + start_index, slot[:id], slot[:name]]
64
+ end
65
+ end
66
+ end while offset < page[:total_result_set_size]
67
+
68
+ # Print a footer
69
+ if page.include?(:total_result_set_size)
70
+ puts "Total number of third party slots: %d" % page[:total_result_set_size]
71
+ end
72
+ end
73
+
74
+ if __FILE__ == $0
75
+ begin
76
+ get_all_third_party_slots()
77
+
78
+ # HTTP errors.
79
+ rescue AdsCommon::Errors::HttpError => e
80
+ puts "HTTP Error: %s" % e
81
+
82
+ # API errors.
83
+ rescue DfpApi::Errors::ApiException => e
84
+ puts "Message: %s" % e.message
85
+ puts 'Errors:'
86
+ e.errors.each_with_index do |error, index|
87
+ puts "\tError [%d]:" % (index + 1)
88
+ error.each do |field, value|
89
+ puts "\t\t%s: %s" % [field, value]
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,86 @@
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 archived third party slots. The statement retrieves up to
21
+ # the maximum page size limit of 500. To create third party slots, run
22
+ # create_third_party_slot.rb.
23
+ #
24
+ # Tags: ThirdPartySlotService.getThirdPartySlotsByStatement
25
+
26
+ require 'rubygems'
27
+ require 'dfp_api'
28
+
29
+ API_VERSION = :v201111
30
+
31
+ def get_third_party_slot_by_statement()
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 ThirdPartySlotService.
40
+ third_party_slot_service = dfp.service(:ThirdPartySlotService, API_VERSION)
41
+
42
+ # Create a statement to get all slots with status 'ARCHIVED'.
43
+ statement = {
44
+ :query => 'WHERE status = :status LIMIT 500',
45
+ :values => [
46
+ {:key => 'status',
47
+ :value => {:value => 'ARCHIVED', :xsi_type => 'TextValue'}}
48
+ ]
49
+ }
50
+
51
+ # Get third party slots by statement.
52
+ page = third_party_slot_service.get_third_party_slots_by_statement(statement)
53
+
54
+ if page and page[:results]
55
+ page[:results].each_with_index do |slot, index|
56
+ puts "%d) Third party slot ID: %d, name: '%s'" %
57
+ [index, slot[:id], slot[:name]]
58
+ end
59
+ end
60
+
61
+ # Print a footer.
62
+ if page.include?(:total_result_set_size)
63
+ puts "Number of results found: %d" % page[:total_result_set_size]
64
+ end
65
+ end
66
+
67
+ if __FILE__ == $0
68
+ begin
69
+ get_third_party_slot_by_statement()
70
+
71
+ # HTTP errors.
72
+ rescue AdsCommon::Errors::HttpError => e
73
+ puts "HTTP Error: %s" % e
74
+
75
+ # API errors.
76
+ rescue DfpApi::Errors::ApiException => e
77
+ puts "Message: %s" % e.message
78
+ puts 'Errors:'
79
+ e.errors.each_with_index do |error, index|
80
+ puts "\tError [%d]:" % (index + 1)
81
+ error.each do |field, value|
82
+ puts "\t\t%s: %s" % [field, value]
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,95 @@
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 updates the first third party slot description.
21
+ #
22
+ # Tags: ThirdPartySlotService.getThirdPartySlotsByStatement,
23
+ # ThirdPartySlotService.updateThirdPartySlots
24
+
25
+ require 'rubygems'
26
+ require 'dfp_api'
27
+
28
+ API_VERSION = :v201111
29
+ PAGE_SIZE = 500
30
+
31
+ def update_third_party_slots()
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 ThirdPartySlotService.
40
+ third_party_slot_service = dfp.service(:ThirdPartySlotService, API_VERSION)
41
+
42
+ # Create statement to get one active third party slot.
43
+ statement = {
44
+ :query => 'WHERE status = :status LIMIT 1',
45
+ :values => [
46
+ {:key => 'status',
47
+ :value => {:value => 'ACTIVE', :xsi_type => 'TextValue'}},
48
+ ]
49
+ }
50
+
51
+ # Get third party slots by statement.
52
+ page = third_party_slot_service.get_third_party_slots_by_statement(statement)
53
+
54
+ if page[:results] and !page[:results].empty?
55
+ slot = page[:results].first
56
+
57
+ # Update local third party slot by changing its description.
58
+ slot[:description] = 'Updated description'
59
+
60
+ # Update the third party slot on the server.
61
+ return_slot = third_party_slot_service.update_third_party_slot(slot)
62
+
63
+ # Display results.
64
+ if return_slot
65
+ puts ("Third party slot with ID %d and name '%s' was updated with " +
66
+ "description '%s'.") %
67
+ [return_slot[:id], return_slot[:name], return_slot[:description]]
68
+ else
69
+ puts 'No third party slots were updated.'
70
+ end
71
+ else
72
+ puts 'No third party slots found to update.'
73
+ end
74
+ end
75
+
76
+ if __FILE__ == $0
77
+ begin
78
+ update_third_party_slots()
79
+
80
+ # HTTP errors.
81
+ rescue AdsCommon::Errors::HttpError => e
82
+ puts "HTTP Error: %s" % e
83
+
84
+ # API errors.
85
+ rescue DfpApi::Errors::ApiException => e
86
+ puts "Message: %s" % e.message
87
+ puts 'Errors:'
88
+ e.errors.each_with_index do |error, index|
89
+ puts "\tError [%d]:" % (index + 1)
90
+ error.each do |field, value|
91
+ puts "\t\t%s: %s" % [field, value]
92
+ end
93
+ end
94
+ end
95
+ end
@@ -40,7 +40,7 @@ module DfpApi
40
40
 
41
41
  # Set other constants
42
42
  API_NAME = 'DfpApi'
43
- CLIENT_LIB_VERSION = '0.2.6'
43
+ CLIENT_LIB_VERSION = '0.2.7'
44
44
  DEFAULT_CONFIG_FILENAME = 'dfp_api.yml'
45
45
 
46
46
  # Configure the services available to each version
@@ -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.6.0 on 2011-12-02 16:50:12.
6
+ # Code generated by AdsCommon library 0.6.1 on 2011-12-20 18:01:52.
7
7
 
8
8
  require 'ads_common/savon_service'
9
9
  require 'dfp_api/v201103/company_service_registry'
@@ -15,18 +15,6 @@ module DfpApi; module V201103; module CompanyService
15
15
  super(api, endpoint, namespace, :v201103)
16
16
  end
17
17
 
18
- def create_companies(*args, &block)
19
- return execute_action('create_companies', args, &block)
20
- end
21
-
22
- def create_company(*args, &block)
23
- return execute_action('create_company', args, &block)
24
- end
25
-
26
- def get_companies_by_statement(*args, &block)
27
- return execute_action('get_companies_by_statement', args, &block)
28
- end
29
-
30
18
  def get_company(*args, &block)
31
19
  return execute_action('get_company', args, &block)
32
20
  end
@@ -39,6 +27,18 @@ module DfpApi; module V201103; module CompanyService
39
27
  return execute_action('update_company', args, &block)
40
28
  end
41
29
 
30
+ def create_companies(*args, &block)
31
+ return execute_action('create_companies', args, &block)
32
+ end
33
+
34
+ def create_company(*args, &block)
35
+ return execute_action('create_company', args, &block)
36
+ end
37
+
38
+ def get_companies_by_statement(*args, &block)
39
+ return execute_action('get_companies_by_statement', args, &block)
40
+ end
41
+
42
42
  private
43
43
 
44
44
  def get_service_registry()
@@ -3,14 +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.6.0 on 2011-12-02 16:50:12.
6
+ # Code generated by AdsCommon library 0.6.1 on 2011-12-20 18:01:52.
7
7
 
8
8
  require 'dfp_api/errors'
9
9
 
10
10
  module DfpApi; module V201103; module CompanyService
11
11
  class CompanyServiceRegistry
12
- COMPANYSERVICE_METHODS = {:create_companies=>{:input=>[{:name=>:companies, :type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"create_companies_response", :fields=>[{:name=>:rval, :type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :create_company=>{:input=>[{:name=>:company, :type=>"Company", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"create_company_response", :fields=>[{:name=>:rval, :type=>"Company", :min_occurs=>0, :max_occurs=>1}]}}, :get_companies_by_statement=>{:input=>[{:name=>:filter_statement, :type=>"Statement", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_companies_by_statement_response", :fields=>[{:name=>:rval, :type=>"CompanyPage", :min_occurs=>0, :max_occurs=>1}]}}, :get_company=>{:input=>[{:name=>:company_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_company_response", :fields=>[{:name=>:rval, :type=>"Company", :min_occurs=>0, :max_occurs=>1}]}}, :update_companies=>{:input=>[{:name=>:companies, :type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"update_companies_response", :fields=>[{:name=>:rval, :type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded}]}}, :update_company=>{:input=>[{:name=>:company, :type=>"Company", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"update_company_response", :fields=>[{:name=>:rval, :type=>"Company", :min_occurs=>0, :max_occurs=>1}]}}}
13
- COMPANYSERVICE_TYPES = {:Authentication=>{:fields=>[{:name=>:authentication_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :BooleanValue=>{:fields=>[{:name=>:value, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"Value"}, :ClientLogin=>{:fields=>[{:name=>:token, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Authentication"}, :Company=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:type, :type=>"Company.Type", :min_occurs=>0, :max_occurs=>1}]}, :CompanyPage=>{:fields=>[{:name=>:total_result_set_size, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:results, :type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded}]}, :CustomCriteria=>{:fields=>[{:name=>:key_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:operator, :type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :max_occurs=>1}], :base=>"CustomCriteriaNode"}, :CustomCriteriaSet=>{:fields=>[{:name=>:logical_operator, :type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :max_occurs=>1}, {:name=>:children, :type=>"CustomCriteriaNode", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CustomCriteriaNode"}, :CustomCriteriaNode=>{:fields=>[{:name=>:custom_criteria_node_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :CustomTargetingValue=>{:fields=>[{:name=>:custom_targeting_key_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :max_occurs=>1}]}, :FreeFormCustomCriteria=>{:fields=>[{:name=>:values, :type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CustomCriteria"}, :NumberValue=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Value"}, :OAuth=>{:fields=>[{:name=>:parameters, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Authentication"}, :PredefinedCustomCriteria=>{:fields=>[{:name=>:value_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"CustomCriteria"}, :SoapRequestHeader=>{:fields=>[{:name=>:network_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:authentication, :type=>"Authentication", :min_occurs=>0, :max_occurs=>1}]}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :Statement=>{:fields=>[{:name=>:query, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:values, :type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}]}, :String_ValueMapEntry=>{:fields=>[{:name=>:key, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"Value", :min_occurs=>0, :max_occurs=>1}]}, :TextValue=>{:fields=>[{:name=>:value, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"Value"}, :Value=>{:fields=>[{:name=>:value_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true}, :"Company.Type"=>{:fields=>[]}, :"CustomCriteria.ComparisonOperator"=>{:fields=>[]}, :"CustomCriteriaSet.LogicalOperator"=>{:fields=>[]}, :"CustomTargetingValue.MatchType"=>{:fields=>[]}}
12
+ COMPANYSERVICE_METHODS = {:get_company=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_company_response"}, :input=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:company_id}]}, :update_companies=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"update_companies_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:companies}]}, :update_company=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"update_company_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}]}, :create_companies=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:rval}], :name=>"create_companies_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:companies}]}, :create_company=>{:output=>{:fields=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"create_company_response"}, :input=>[{:type=>"Company", :min_occurs=>0, :max_occurs=>1, :name=>:company}]}, :get_companies_by_statement=>{:output=>{:fields=>[{:type=>"CompanyPage", :min_occurs=>0, :max_occurs=>1, :name=>:rval}], :name=>"get_companies_by_statement_response"}, :input=>[{:type=>"Statement", :min_occurs=>0, :max_occurs=>1, :name=>:filter_statement}]}}
13
+ COMPANYSERVICE_TYPES = {:Statement=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:query}, {:type=>"String_ValueMapEntry", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:values}]}, :Value=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value_type}], :abstract=>true}, :PredefinedCustomCriteria=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:value_ids}], :base=>"CustomCriteria"}, :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}]}, :String_ValueMapEntry=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:key}, {:type=>"Value", :min_occurs=>0, :max_occurs=>1, :name=>:value}]}, :NumberValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :CustomCriteria=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:key_id}, {:type=>"CustomCriteria.ComparisonOperator", :min_occurs=>0, :max_occurs=>1, :name=>:operator}], :base=>"CustomCriteriaNode"}, :Authentication=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:authentication_type}], :abstract=>true}, :"CustomTargetingValue.MatchType"=>{:fields=>[]}, :"Company.Type"=>{:fields=>[]}, :CustomCriteriaSet=>{:fields=>[{:type=>"CustomCriteriaSet.LogicalOperator", :min_occurs=>0, :max_occurs=>1, :name=>:logical_operator}, {:type=>"CustomCriteriaNode", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:children}], :base=>"CustomCriteriaNode"}, :BooleanValue=>{:fields=>[{:type=>"boolean", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :"CustomCriteria.ComparisonOperator"=>{:fields=>[]}, :OAuth=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:parameters}], :base=>"Authentication"}, :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}]}, :CustomCriteriaNode=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:custom_criteria_node_type}], :abstract=>true}, :ClientLogin=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:token}], :base=>"Authentication"}, :"CustomCriteriaSet.LogicalOperator"=>{:fields=>[]}, :TextValue=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:value}], :base=>"Value"}, :SoapResponseHeader=>{:fields=>[{:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:request_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:response_time}]}, :FreeFormCustomCriteria=>{:fields=>[{:type=>"CustomTargetingValue", :min_occurs=>0, :max_occurs=>:unbounded, :name=>:values}], :base=>"CustomCriteria"}, :CustomTargetingValue=>{:fields=>[{:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:custom_targeting_key_id}, {:type=>"long", :min_occurs=>0, :max_occurs=>1, :name=>:id}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:name}, {:type=>"string", :min_occurs=>0, :max_occurs=>1, :name=>:display_name}, {:type=>"CustomTargetingValue.MatchType", :min_occurs=>0, :max_occurs=>1, :name=>:match_type}]}, :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}]}}
14
14
  COMPANYSERVICE_NAMESPACES = []
15
15
 
16
16
  def self.get_method_signature(method_name)