bing_ads_api 0.0.5

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 (48) hide show
  1. data/README.md +57 -0
  2. data/lib/ads_common_for_bing_ads.rb +49 -0
  3. data/lib/ads_common_for_bing_ads/api_config.rb +41 -0
  4. data/lib/ads_common_for_bing_ads/auth/client_login_handler.rb +168 -0
  5. data/lib/ads_common_for_bing_ads/build/savon_registry.rb +15 -0
  6. data/lib/ads_common_for_bing_ads/parameters_validator.rb +36 -0
  7. data/lib/ads_common_for_bing_ads/savon_headers_base_header_handler.rb +9 -0
  8. data/lib/ads_common_for_bing_ads/savon_service.rb +141 -0
  9. data/lib/bing_ads_api.rb +175 -0
  10. data/lib/bing_ads_api/api_config.rb +162 -0
  11. data/lib/bing_ads_api/client_login_header_handler.rb +21 -0
  12. data/lib/bing_ads_api/credential_handler.rb +91 -0
  13. data/lib/bing_ads_api/errors.rb +564 -0
  14. data/lib/bing_ads_api/report_header_handler.rb +46 -0
  15. data/lib/bing_ads_api/report_utils.rb +202 -0
  16. data/lib/bing_ads_api/v7/administration_service.rb +37 -0
  17. data/lib/bing_ads_api/v7/administration_service_registry.rb +30 -0
  18. data/lib/bing_ads_api/v7/campaign_management_service.rb +398 -0
  19. data/lib/bing_ads_api/v7/campaign_management_service_registry.rb +30 -0
  20. data/lib/bing_ads_api/v7/customer_billing_service.rb +58 -0
  21. data/lib/bing_ads_api/v7/customer_billing_service_registry.rb +30 -0
  22. data/lib/bing_ads_api/v7/customer_management_service.rb +98 -0
  23. data/lib/bing_ads_api/v7/customer_management_service_registry.rb +30 -0
  24. data/lib/bing_ads_api/v7/notification_service.rb +38 -0
  25. data/lib/bing_ads_api/v7/notification_service_registry.rb +30 -0
  26. data/lib/bing_ads_api/v7/reporting_service.rb +38 -0
  27. data/lib/bing_ads_api/v7/reporting_service_registry.rb +30 -0
  28. data/lib/bing_ads_api/v8/ad_intelligence_service.rb +86 -0
  29. data/lib/bing_ads_api/v8/ad_intelligence_service_registry.rb +30 -0
  30. data/lib/bing_ads_api/v8/administration_service.rb +38 -0
  31. data/lib/bing_ads_api/v8/administration_service_registry.rb +30 -0
  32. data/lib/bing_ads_api/v8/bulk_service.rb +42 -0
  33. data/lib/bing_ads_api/v8/bulk_service_registry.rb +30 -0
  34. data/lib/bing_ads_api/v8/campaign_management_service.rb +390 -0
  35. data/lib/bing_ads_api/v8/campaign_management_service_registry.rb +30 -0
  36. data/lib/bing_ads_api/v8/customer_billing_service.rb +62 -0
  37. data/lib/bing_ads_api/v8/customer_billing_service_registry.rb +30 -0
  38. data/lib/bing_ads_api/v8/customer_management_service.rb +162 -0
  39. data/lib/bing_ads_api/v8/customer_management_service_registry.rb +30 -0
  40. data/lib/bing_ads_api/v8/notification_service.rb +38 -0
  41. data/lib/bing_ads_api/v8/notification_service_registry.rb +30 -0
  42. data/lib/bing_ads_api/v8/optimizer_service.rb +46 -0
  43. data/lib/bing_ads_api/v8/optimizer_service_registry.rb +30 -0
  44. data/lib/bing_ads_api/v8/reporting_service.rb +38 -0
  45. data/lib/bing_ads_api/v8/reporting_service_registry.rb +30 -0
  46. data/lib/bing_ads_api/version.rb +5 -0
  47. data/rakefile.rb +54 -0
  48. metadata +156 -0
@@ -0,0 +1,46 @@
1
+ # Handles HTTP headers for AdHoc reporting requests.
2
+
3
+ module BingAdsApi
4
+ class ReportHeaderHandler
5
+
6
+ # Initializes a header handler.
7
+ #
8
+ # Args:
9
+ # - credential_handler: a header with credential data
10
+ # - auth_handler: a header with auth data
11
+ # - config: API config
12
+ #
13
+ def initialize(credential_handler, auth_handler, config)
14
+ @credential_handler = credential_handler
15
+ @auth_handler = auth_handler
16
+ @config = config
17
+ end
18
+
19
+ # Returns the headers set for the report request.
20
+ #
21
+ # Args:
22
+ # - url: URL for the report requests
23
+ # - cid: clientCustomerId to use
24
+ #
25
+ # Returns:
26
+ # - a Hash with HTTP headers.
27
+ #
28
+ def headers(url, cid)
29
+ override = (cid.nil?) ? nil : {:client_customer_id => cid}
30
+ credentials = @credential_handler.credentials(override)
31
+ headers = {
32
+ 'Content-Type' => 'application/x-www-form-urlencoded',
33
+ 'Authorization' =>
34
+ @auth_handler.auth_string(credentials, HTTPI::Request.new(url)),
35
+ 'User-Agent' => @credential_handler.generate_user_agent(),
36
+ 'clientCustomerId' => credentials[:client_customer_id].to_s,
37
+ 'developerToken' => credentials[:developer_token]
38
+ }
39
+ money_in_micros = @config.read('library.return_money_in_micros')
40
+ unless money_in_micros.nil?
41
+ headers['returnMoneyInMicros'] = money_in_micros
42
+ end
43
+ return headers
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,202 @@
1
+ # Contains utility methods specific to reporting.
2
+
3
+ require 'cgi'
4
+ require 'gyoku'
5
+
6
+ require 'bing_ads_api/errors'
7
+ require 'bing_ads_api/report_header_handler'
8
+
9
+ module BingAdsApi
10
+ class ReportUtils
11
+ # Default constructor.
12
+ #
13
+ # Args:
14
+ # - api: BingAdsApi object
15
+ # - version: API version to use
16
+ #
17
+ def initialize(api, version)
18
+ @api, @version = api, version
19
+ end
20
+
21
+ # Downloads and returns a report.
22
+ #
23
+ # Args:
24
+ # - report_definition: definition of the report in XML text or hash
25
+ # - cid: optional customer ID to run against
26
+ #
27
+ # Returns:
28
+ # - report body
29
+ #
30
+ # Raises:
31
+ # - BingAdsApi::Errors::InvalidReportDefinitionError if the report
32
+ # definition is invalid
33
+ # - BingAdsApi::Errors::ReportError if server-side error occurred
34
+ #
35
+ def download_report(report_definition, cid = nil)
36
+ return get_report_response(report_definition, cid).body
37
+ end
38
+
39
+ # Downloads a report and saves it to a file.
40
+ #
41
+ # Args:
42
+ # - report_definition: definition of the report in XML text or hash
43
+ # - path: path to save report to
44
+ # - cid: optional customer ID to run against
45
+ #
46
+ # Returns:
47
+ # - nil
48
+ #
49
+ # Raises:
50
+ # - BingAdsApi::Errors::InvalidReportDefinitionError if the report
51
+ # definition is invalid
52
+ # - BingAdsApi::Errors::ReportError if server-side error occurred
53
+ #
54
+ def download_report_as_file(report_definition, path, cid = nil)
55
+ report_body = download_report(report_definition, cid)
56
+ save_to_file(report_body, path)
57
+ return nil
58
+ end
59
+
60
+ private
61
+
62
+ # Minimal set of required fields for report definition.
63
+ REQUIRED_FIELDS = [:selector, :report_name, :report_type, :date_range_type]
64
+
65
+ # Definition fields have to be in particular order in the XML. Here is its
66
+ # specification.
67
+ REPORT_DEFINITION_ORDER = {
68
+ :root => [:selector, :report_name, :report_type, :date_range_type,
69
+ :download_format, :include_zero_impressions],
70
+ :selector => [:fields, :predicates, :date_range, :ordering, :paging],
71
+ :predicates => [:field, :operator, :values],
72
+ :ordering => [:field, :sort_order],
73
+ :paging => [:start_index, :number_results],
74
+ :date_range => [:min, :max]
75
+ }
76
+
77
+ # Send POST request for a report and returns Response object.
78
+ def get_report_response(report_definition, cid)
79
+ definition_text = get_report_definition_text(report_definition)
80
+ data = '__rdxml=%s' % CGI.escape(definition_text)
81
+ url = @api.api_config.adhoc_report_download_url(
82
+ @api.config.read('service.environment'), @version)
83
+ headers = get_report_request_headers(url, cid)
84
+ log_request(url, headers, definition_text)
85
+ response = AdsCommonForBingAds::Http.post_response(url, data, @api.config, headers)
86
+ check_for_errors(response)
87
+ return response
88
+ end
89
+
90
+ # Converts passed object to XML text. Currently support String (no changes)
91
+ # and Hash (renders XML).
92
+ def get_report_definition_text(report_definition)
93
+ return case report_definition
94
+ when String then report_definition
95
+ when Hash then report_definition_to_xml(report_definition)
96
+ else
97
+ raise BingAdsApi::Errors::InvalidReportDefinitionError,
98
+ 'Unknown object for report definition: %s' %
99
+ report_definition.class
100
+ end
101
+ end
102
+
103
+ # Prepares headers for report request.
104
+ def get_report_request_headers(url, cid)
105
+ @header_handler ||= BingAdsApi::ReportHeaderHandler.new(
106
+ @api.credential_handler, @api.get_auth_handler(), @api.config)
107
+ return @header_handler.headers(url, cid)
108
+ end
109
+
110
+ # Saves raw data to a file.
111
+ def save_to_file(data, path)
112
+ open(path, 'wb') { |file| file.write(data) } if path
113
+ end
114
+
115
+ # Logs the request on debug level.
116
+ def log_request(url, headers, body)
117
+ logger = @api.logger
118
+ logger.debug("Report request to: '%s'" % url)
119
+ logger.debug('HTTP headers: [%s]' %
120
+ (headers.map { |k, v| [k, v].join(': ') }.join(', ')))
121
+ logger.debug(body)
122
+ end
123
+
124
+ # Checks downloaded data for error signature. Raises ReportError if it
125
+ # detects an error.
126
+ def check_for_errors(response)
127
+ # Check for error in body.
128
+ report_body = response.body
129
+ if report_body and
130
+ ((RUBY_VERSION < '1.9.1') or report_body.valid_encoding?)
131
+ error_message_regex = '^!!!(-?\d+)\|\|\|(-?\d+)\|\|\|(.*)\?\?\?'
132
+ data = report_body.slice(0, 1024)
133
+ matches = data.match(error_message_regex)
134
+ if matches
135
+ message = (matches[3].nil?) ? data : matches[3]
136
+ raise BingAdsApi::Errors::ReportError.new(response.code,
137
+ 'Report download error occured: %s' % message)
138
+ end
139
+ end
140
+ # Check for error code.
141
+ unless response.code == 200
142
+ raise BingAdsApi::Errors::ReportError.new(response.code,
143
+ 'Report download error occured, http code: %d, body: %s' %
144
+ [response.code, response.body])
145
+ end
146
+ return nil
147
+ end
148
+
149
+ # Renders a report definition hash into XML text.
150
+ def report_definition_to_xml(report_definition)
151
+ check_report_definition_hash(report_definition)
152
+ add_report_definition_hash_order(report_definition)
153
+ return Gyoku.xml({:report_definition => report_definition})
154
+ end
155
+
156
+ # Checks if the report definition looks correct.
157
+ def check_report_definition_hash(report_definition)
158
+ # Minimal set of fields required.
159
+ REQUIRED_FIELDS.each do |field|
160
+ unless report_definition.include?(field)
161
+ raise BingAdsApi::Errors::InvalidReportDefinitionError,
162
+ "Required field '%s' is missing in the definition" % field
163
+ end
164
+ end
165
+ # Fields list is also required.
166
+ unless report_definition[:selector].include?(:fields)
167
+ raise BingAdsApi::Errors::InvalidReportDefinitionError,
168
+ 'Fields list is required'
169
+ end
170
+ # 'Fields' must be an Array.
171
+ unless report_definition[:selector][:fields].kind_of?(Array)
172
+ raise BingAdsApi::Errors::InvalidReportDefinitionError,
173
+ 'Fields list must be an array'
174
+ end
175
+ # We should request at least one field.
176
+ if report_definition[:selector][:fields].empty?
177
+ raise BingAdsApi::Errors::InvalidReportDefinitionError,
178
+ 'At least one field needs to be requested'
179
+ end
180
+ end
181
+
182
+ # Adds fields order hint to generator based on specification.
183
+ def add_report_definition_hash_order(node, name = :root)
184
+ def_order = REPORT_DEFINITION_ORDER[name]
185
+ var_order = def_order.reject { |field| !node.include?(field) }
186
+ node.keys.each do |key|
187
+ if REPORT_DEFINITION_ORDER.include?(key)
188
+ case node[key]
189
+ when Hash
190
+ add_report_definition_hash_order(node[key], key)
191
+ when Array
192
+ node[key].each do |item|
193
+ add_report_definition_hash_order(item, key)
194
+ end
195
+ end
196
+ end
197
+ end
198
+ node[:order!] = var_order
199
+ return nil
200
+ end
201
+ end
202
+ end
@@ -0,0 +1,37 @@
1
+ # Encoding: utf-8
2
+ #
3
+ # This is auto-generated code, changes will be overwritten.
4
+ #
5
+ # Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
6
+ # License:: Licensed under the Apache License, Version 2.0.
7
+ #
8
+ # Code generated by AdsCommon library 0.7.3 on 2012-07-04 16:49:14.
9
+
10
+ require 'bing_ads_api/v7/administration_service_registry'
11
+
12
+ module BingAdsApi; module V7; module AdministrationService
13
+ class AdministrationService < AdsCommonForBingAds::SavonService
14
+ def initialize(config, endpoint)
15
+ namespace = 'https://adcenter.microsoft.com/v7'
16
+ super(config, endpoint, namespace, :v7)
17
+ end
18
+
19
+ def get_assigned_quota(*args, &block)
20
+ return execute_action('get_assigned_quota', args, &block)
21
+ end
22
+
23
+ def get_remaining_quota(*args, &block)
24
+ return execute_action('get_remaining_quota', args, &block)
25
+ end
26
+
27
+ private
28
+
29
+ def get_service_registry()
30
+ return AdministrationServiceRegistry
31
+ end
32
+
33
+ def get_module()
34
+ return BingAdsApi::V7::AdministrationService
35
+ end
36
+ end
37
+ end; end; end
@@ -0,0 +1,30 @@
1
+ # Encoding: utf-8
2
+ #
3
+ # This is auto-generated code, changes will be overwritten.
4
+ #
5
+ # Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
6
+ # License:: Licensed under the Apache License, Version 2.0.
7
+ #
8
+ # Code generated by AdsCommon library 0.7.3 on 2012-07-04 16:49:14.
9
+
10
+ require 'bing_ads_api/errors'
11
+
12
+ module BingAdsApi; module V7; module AdministrationService
13
+ class AdministrationServiceRegistry
14
+ ADMINISTRATIONSERVICE_METHODS = {:get_assigned_quota=>{:input=>{:name=>"get_assigned_quota_request", :fields=>[]}, :output=>{:name=>"get_assigned_quota_response", :fields=>[]}, :original_name=>"GetAssignedQuota"}, :get_remaining_quota=>{:input=>{:name=>"get_remaining_quota_request", :fields=>[]}, :output=>{:name=>"get_remaining_quota_response", :fields=>[]}, :original_name=>"GetRemainingQuota"}}
15
+ ADMINISTRATIONSERVICE_TYPES = {}
16
+ ADMINISTRATIONSERVICE_NAMESPACES = []
17
+
18
+ def self.get_method_signature(method_name)
19
+ return ADMINISTRATIONSERVICE_METHODS[method_name.to_sym]
20
+ end
21
+
22
+ def self.get_type_signature(type_name)
23
+ return ADMINISTRATIONSERVICE_TYPES[type_name.to_sym]
24
+ end
25
+
26
+ def self.get_namespace(index)
27
+ return ADMINISTRATIONSERVICE_NAMESPACES[index]
28
+ end
29
+ end
30
+ end; end; end
@@ -0,0 +1,398 @@
1
+ # Encoding: utf-8
2
+ #
3
+ # This is auto-generated code, changes will be overwritten.
4
+ #
5
+ # Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
6
+ # License:: Licensed under the Apache License, Version 2.0.
7
+ #
8
+ # Code generated by AdsCommon library 0.7.3 on 2012-07-04 16:49:16.
9
+
10
+ require 'ads_common_for_bing_ads/savon_service'
11
+ require 'bing_ads_api/v7/campaign_management_service_registry'
12
+
13
+ module BingAdsApi; module V7; module CampaignManagementService
14
+ class CampaignManagementService < AdsCommonForBingAds::SavonService
15
+ def initialize(config, endpoint)
16
+ namespace = 'https://adcenter.microsoft.com/v7'
17
+ super(config, endpoint, namespace, :v7)
18
+ end
19
+
20
+ def set_networks_to_ad_groups(*args, &block)
21
+ return execute_action('set_networks_to_ad_groups', args, &block)
22
+ end
23
+
24
+ def add_goals(*args, &block)
25
+ return execute_action('add_goals', args, &block)
26
+ end
27
+
28
+ def update_goals(*args, &block)
29
+ return execute_action('update_goals', args, &block)
30
+ end
31
+
32
+ def get_goals(*args, &block)
33
+ return execute_action('get_goals', args, &block)
34
+ end
35
+
36
+ def delete_goals(*args, &block)
37
+ return execute_action('delete_goals', args, &block)
38
+ end
39
+
40
+ def set_analytics_type(*args, &block)
41
+ return execute_action('set_analytics_type', args, &block)
42
+ end
43
+
44
+ def get_analytics_type(*args, &block)
45
+ return execute_action('get_analytics_type', args, &block)
46
+ end
47
+
48
+ def get_account_migration_statuses(*args, &block)
49
+ return execute_action('get_account_migration_statuses', args, &block)
50
+ end
51
+
52
+ def pause_ads(*args, &block)
53
+ return execute_action('pause_ads', args, &block)
54
+ end
55
+
56
+ def resume_ads(*args, &block)
57
+ return execute_action('resume_ads', args, &block)
58
+ end
59
+
60
+ def add_keywords(*args, &block)
61
+ return execute_action('add_keywords', args, &block)
62
+ end
63
+
64
+ def delete_keywords(*args, &block)
65
+ return execute_action('delete_keywords', args, &block)
66
+ end
67
+
68
+ def get_keywords_by_editorial_status(*args, &block)
69
+ return execute_action('get_keywords_by_editorial_status', args, &block)
70
+ end
71
+
72
+ def get_keywords_by_ids(*args, &block)
73
+ return execute_action('get_keywords_by_ids', args, &block)
74
+ end
75
+
76
+ def get_keywords_by_ad_group_id(*args, &block)
77
+ return execute_action('get_keywords_by_ad_group_id', args, &block)
78
+ end
79
+
80
+ def pause_keywords(*args, &block)
81
+ return execute_action('pause_keywords', args, &block)
82
+ end
83
+
84
+ def resume_keywords(*args, &block)
85
+ return execute_action('resume_keywords', args, &block)
86
+ end
87
+
88
+ def update_keywords(*args, &block)
89
+ return execute_action('update_keywords', args, &block)
90
+ end
91
+
92
+ def get_keyword_estimates_by_bids(*args, &block)
93
+ return execute_action('get_keyword_estimates_by_bids', args, &block)
94
+ end
95
+
96
+ def add_businesses(*args, &block)
97
+ return execute_action('add_businesses', args, &block)
98
+ end
99
+
100
+ def update_businesses(*args, &block)
101
+ return execute_action('update_businesses', args, &block)
102
+ end
103
+
104
+ def delete_businesses(*args, &block)
105
+ return execute_action('delete_businesses', args, &block)
106
+ end
107
+
108
+ def get_businesses_info(*args, &block)
109
+ return execute_action('get_businesses_info', args, &block)
110
+ end
111
+
112
+ def get_businesses_by_ids(*args, &block)
113
+ return execute_action('get_businesses_by_ids', args, &block)
114
+ end
115
+
116
+ def add_site_placements(*args, &block)
117
+ return execute_action('add_site_placements', args, &block)
118
+ end
119
+
120
+ def delete_site_placements(*args, &block)
121
+ return execute_action('delete_site_placements', args, &block)
122
+ end
123
+
124
+ def get_site_placements_by_ids(*args, &block)
125
+ return execute_action('get_site_placements_by_ids', args, &block)
126
+ end
127
+
128
+ def get_site_placements_by_ad_group_id(*args, &block)
129
+ return execute_action('get_site_placements_by_ad_group_id', args, &block)
130
+ end
131
+
132
+ def pause_site_placements(*args, &block)
133
+ return execute_action('pause_site_placements', args, &block)
134
+ end
135
+
136
+ def resume_site_placements(*args, &block)
137
+ return execute_action('resume_site_placements', args, &block)
138
+ end
139
+
140
+ def update_site_placements(*args, &block)
141
+ return execute_action('update_site_placements', args, &block)
142
+ end
143
+
144
+ def get_placement_details_for_urls(*args, &block)
145
+ return execute_action('get_placement_details_for_urls', args, &block)
146
+ end
147
+
148
+ def add_behavioral_bids(*args, &block)
149
+ return execute_action('add_behavioral_bids', args, &block)
150
+ end
151
+
152
+ def delete_behavioral_bids(*args, &block)
153
+ return execute_action('delete_behavioral_bids', args, &block)
154
+ end
155
+
156
+ def get_behavioral_bids_by_ids(*args, &block)
157
+ return execute_action('get_behavioral_bids_by_ids', args, &block)
158
+ end
159
+
160
+ def get_behavioral_bids_by_ad_group_id(*args, &block)
161
+ return execute_action('get_behavioral_bids_by_ad_group_id', args, &block)
162
+ end
163
+
164
+ def pause_behavioral_bids(*args, &block)
165
+ return execute_action('pause_behavioral_bids', args, &block)
166
+ end
167
+
168
+ def resume_behavioral_bids(*args, &block)
169
+ return execute_action('resume_behavioral_bids', args, &block)
170
+ end
171
+
172
+ def update_behavioral_bids(*args, &block)
173
+ return execute_action('update_behavioral_bids', args, &block)
174
+ end
175
+
176
+ def get_custom_segments(*args, &block)
177
+ return execute_action('get_custom_segments', args, &block)
178
+ end
179
+
180
+ def add_segments(*args, &block)
181
+ return execute_action('add_segments', args, &block)
182
+ end
183
+
184
+ def delete_segments(*args, &block)
185
+ return execute_action('delete_segments', args, &block)
186
+ end
187
+
188
+ def get_segments_by_ids(*args, &block)
189
+ return execute_action('get_segments_by_ids', args, &block)
190
+ end
191
+
192
+ def get_segments(*args, &block)
193
+ return execute_action('get_segments', args, &block)
194
+ end
195
+
196
+ def set_users_to_segments(*args, &block)
197
+ return execute_action('set_users_to_segments', args, &block)
198
+ end
199
+
200
+ def delete_users_from_segment(*args, &block)
201
+ return execute_action('delete_users_from_segment', args, &block)
202
+ end
203
+
204
+ def get_normalized_strings(*args, &block)
205
+ return execute_action('get_normalized_strings', args, &block)
206
+ end
207
+
208
+ def get_keyword_editorial_reasons_by_ids(*args, &block)
209
+ return execute_action('get_keyword_editorial_reasons_by_ids', args, &block)
210
+ end
211
+
212
+ def get_ad_editorial_reasons_by_ids(*args, &block)
213
+ return execute_action('get_ad_editorial_reasons_by_ids', args, &block)
214
+ end
215
+
216
+ def get_networks_by_ad_group_ids(*args, &block)
217
+ return execute_action('get_networks_by_ad_group_ids', args, &block)
218
+ end
219
+
220
+ def add_campaigns(*args, &block)
221
+ return execute_action('add_campaigns', args, &block)
222
+ end
223
+
224
+ def get_campaigns_by_account_id(*args, &block)
225
+ return execute_action('get_campaigns_by_account_id', args, &block)
226
+ end
227
+
228
+ def get_campaigns_by_ids(*args, &block)
229
+ return execute_action('get_campaigns_by_ids', args, &block)
230
+ end
231
+
232
+ def pause_campaigns(*args, &block)
233
+ return execute_action('pause_campaigns', args, &block)
234
+ end
235
+
236
+ def resume_campaigns(*args, &block)
237
+ return execute_action('resume_campaigns', args, &block)
238
+ end
239
+
240
+ def delete_campaigns(*args, &block)
241
+ return execute_action('delete_campaigns', args, &block)
242
+ end
243
+
244
+ def update_campaigns(*args, &block)
245
+ return execute_action('update_campaigns', args, &block)
246
+ end
247
+
248
+ def get_campaigns_info_by_account_id(*args, &block)
249
+ return execute_action('get_campaigns_info_by_account_id', args, &block)
250
+ end
251
+
252
+ def get_negative_keywords_by_campaign_ids(*args, &block)
253
+ return execute_action('get_negative_keywords_by_campaign_ids', args, &block)
254
+ end
255
+
256
+ def set_negative_keywords_to_campaigns(*args, &block)
257
+ return execute_action('set_negative_keywords_to_campaigns', args, &block)
258
+ end
259
+
260
+ def add_ad_groups(*args, &block)
261
+ return execute_action('add_ad_groups', args, &block)
262
+ end
263
+
264
+ def delete_ad_groups(*args, &block)
265
+ return execute_action('delete_ad_groups', args, &block)
266
+ end
267
+
268
+ def get_ad_groups_by_ids(*args, &block)
269
+ return execute_action('get_ad_groups_by_ids', args, &block)
270
+ end
271
+
272
+ def get_ad_groups_by_campaign_id(*args, &block)
273
+ return execute_action('get_ad_groups_by_campaign_id', args, &block)
274
+ end
275
+
276
+ def pause_ad_groups(*args, &block)
277
+ return execute_action('pause_ad_groups', args, &block)
278
+ end
279
+
280
+ def resume_ad_groups(*args, &block)
281
+ return execute_action('resume_ad_groups', args, &block)
282
+ end
283
+
284
+ def submit_ad_group_for_approval(*args, &block)
285
+ return execute_action('submit_ad_group_for_approval', args, &block)
286
+ end
287
+
288
+ def update_ad_groups(*args, &block)
289
+ return execute_action('update_ad_groups', args, &block)
290
+ end
291
+
292
+ def get_ad_groups_info_by_campaign_id(*args, &block)
293
+ return execute_action('get_ad_groups_info_by_campaign_id', args, &block)
294
+ end
295
+
296
+ def get_negative_keywords_by_ad_group_ids(*args, &block)
297
+ return execute_action('get_negative_keywords_by_ad_group_ids', args, &block)
298
+ end
299
+
300
+ def set_negative_keywords_to_ad_groups(*args, &block)
301
+ return execute_action('set_negative_keywords_to_ad_groups', args, &block)
302
+ end
303
+
304
+ def add_target(*args, &block)
305
+ return execute_action('add_target', args, &block)
306
+ end
307
+
308
+ def delete_target(*args, &block)
309
+ return execute_action('delete_target', args, &block)
310
+ end
311
+
312
+ def get_target_by_ad_group_id(*args, &block)
313
+ return execute_action('get_target_by_ad_group_id', args, &block)
314
+ end
315
+
316
+ def update_target(*args, &block)
317
+ return execute_action('update_target', args, &block)
318
+ end
319
+
320
+ def add_targets_to_library(*args, &block)
321
+ return execute_action('add_targets_to_library', args, &block)
322
+ end
323
+
324
+ def update_targets_in_library(*args, &block)
325
+ return execute_action('update_targets_in_library', args, &block)
326
+ end
327
+
328
+ def delete_targets_from_library(*args, &block)
329
+ return execute_action('delete_targets_from_library', args, &block)
330
+ end
331
+
332
+ def get_targets_info_from_library(*args, &block)
333
+ return execute_action('get_targets_info_from_library', args, &block)
334
+ end
335
+
336
+ def get_targets_by_ids(*args, &block)
337
+ return execute_action('get_targets_by_ids', args, &block)
338
+ end
339
+
340
+ def set_target_to_ad_group(*args, &block)
341
+ return execute_action('set_target_to_ad_group', args, &block)
342
+ end
343
+
344
+ def delete_target_from_ad_group(*args, &block)
345
+ return execute_action('delete_target_from_ad_group', args, &block)
346
+ end
347
+
348
+ def get_targets_by_ad_group_ids(*args, &block)
349
+ return execute_action('get_targets_by_ad_group_ids', args, &block)
350
+ end
351
+
352
+ def set_target_to_campaign(*args, &block)
353
+ return execute_action('set_target_to_campaign', args, &block)
354
+ end
355
+
356
+ def delete_target_from_campaign(*args, &block)
357
+ return execute_action('delete_target_from_campaign', args, &block)
358
+ end
359
+
360
+ def get_targets_by_campaign_ids(*args, &block)
361
+ return execute_action('get_targets_by_campaign_ids', args, &block)
362
+ end
363
+
364
+ def add_ads(*args, &block)
365
+ return execute_action('add_ads', args, &block)
366
+ end
367
+
368
+ def delete_ads(*args, &block)
369
+ return execute_action('delete_ads', args, &block)
370
+ end
371
+
372
+ def get_ads_by_editorial_status(*args, &block)
373
+ return execute_action('get_ads_by_editorial_status', args, &block)
374
+ end
375
+
376
+ def get_ads_by_ids(*args, &block)
377
+ return execute_action('get_ads_by_ids', args, &block)
378
+ end
379
+
380
+ def get_ads_by_ad_group_id(*args, &block)
381
+ return execute_action('get_ads_by_ad_group_id', args, &block)
382
+ end
383
+
384
+ def update_ads(*args, &block)
385
+ return execute_action('update_ads', args, &block)
386
+ end
387
+
388
+ private
389
+
390
+ def get_service_registry()
391
+ return CampaignManagementServiceRegistry
392
+ end
393
+
394
+ def get_module()
395
+ return BingAdsApi::V7::CampaignManagementService
396
+ end
397
+ end
398
+ end; end; end