Class: ConstantContactClient::EmailSchedulingApi
- Inherits:
-
Object
- Object
- ConstantContactClient::EmailSchedulingApi
- Defined in:
- lib/constant_contact_client/api/email_scheduling_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_email_campaign_activity_preview(campaign_activity_id, opts = {}) ⇒ GetEmailCampaignActivityPreview200Response
GET the HTML Preview of an Email Campaign Activity Use this method to get the HTML preview of an email campaign activity.
-
#get_email_campaign_activity_preview_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailCampaignActivityPreview200Response, Integer, Hash)>
GET the HTML Preview of an Email Campaign Activity Use this method to get the HTML preview of an email campaign activity.
-
#get_email_campaign_activity_schedule(campaign_activity_id, opts = {}) ⇒ Array<GetEmailCampaignActivitySchedule200ResponseInner>
GET an Email Campaign Activity Schedule Use this method to return the current schedule for an email campaign activity.
-
#get_email_campaign_activity_schedule_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(Array<GetEmailCampaignActivitySchedule200ResponseInner>, Integer, Hash)>
GET an Email Campaign Activity Schedule Use this method to return the current schedule for an email campaign activity.
-
#get_email_campaign_activity_send_history(campaign_activity_id, opts = {}) ⇒ Array<GetEmailCampaignActivitySendHistory200ResponseInner>
GET the Send History of an Email Campaign Activity Use this method to return the send history of an email campaign activity.
-
#get_email_campaign_activity_send_history_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(Array<GetEmailCampaignActivitySendHistory200ResponseInner>, Integer, Hash)>
GET the Send History of an Email Campaign Activity Use this method to return the send history of an email campaign activity.
-
#initialize(api_client = ApiClient.default) ⇒ EmailSchedulingApi
constructor
A new instance of EmailSchedulingApi.
-
#schedule_email_campaign_activity(campaign_activity_id, schedule_email_campaign_activity_request, opts = {}) ⇒ Array<GetEmailCampaignActivitySchedule200ResponseInner>
POST (Create) an Email Campaign Activity Schedule Use this method to schedule when Constant Contact will send an email campaign activity to contacts.
-
#schedule_email_campaign_activity_with_http_info(campaign_activity_id, schedule_email_campaign_activity_request, opts = {}) ⇒ Array<(Array<GetEmailCampaignActivitySchedule200ResponseInner>, Integer, Hash)>
POST (Create) an Email Campaign Activity Schedule Use this method to schedule when Constant Contact will send an email campaign activity to contacts.
-
#test_send_email_campaign_activity(campaign_activity_id, test_send_email_campaign_activity_request, opts = {}) ⇒ nil
POST Test Send an Email Campaign Activity Use this method to send a test email to specific email addresses.
-
#test_send_email_campaign_activity_with_http_info(campaign_activity_id, test_send_email_campaign_activity_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
POST Test Send an Email Campaign Activity Use this method to send a test email to specific email addresses.
-
#unschedule_email_campaign_activity(campaign_activity_id, opts = {}) ⇒ nil
DELETE an Email Campaign Activity Schedule Use this method to unschedule an email campaign activity by deleting the schedule.
-
#unschedule_email_campaign_activity_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
DELETE an Email Campaign Activity Schedule Use this method to unschedule an email campaign activity by deleting the schedule.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EmailSchedulingApi
Returns a new instance of EmailSchedulingApi.
19 20 21 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_email_campaign_activity_preview(campaign_activity_id, opts = {}) ⇒ GetEmailCampaignActivityPreview200Response
GET the HTML Preview of an Email Campaign Activity Use this method to get the HTML preview of an email campaign activity. The HTML preview allows you to verify how the email campaign activity will look before you send it to contacts. Custom code emails (‘format_type` 5) use the Constant Contact account owner’s contact information to process contact, custom field, and account variables in the preview. This method returns the HTML preview encoded as a JSON string. You will need to decode the string before you can use it as valid HTML.
27 28 29 30 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 27 def get_email_campaign_activity_preview(campaign_activity_id, opts = {}) data, _status_code, _headers = get_email_campaign_activity_preview_with_http_info(campaign_activity_id, opts) data end |
#get_email_campaign_activity_preview_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailCampaignActivityPreview200Response, Integer, Hash)>
GET the HTML Preview of an Email Campaign Activity Use this method to get the HTML preview of an email campaign activity. The HTML preview allows you to verify how the email campaign activity will look before you send it to contacts. Custom code emails (`format_type` 5) use the Constant Contact account owner's contact information to process contact, custom field, and account variables in the preview. This method returns the HTML preview encoded as a JSON string. You will need to decode the string before you can use it as valid HTML.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 37 def get_email_campaign_activity_preview_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailSchedulingApi.get_email_campaign_activity_preview ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailSchedulingApi.get_email_campaign_activity_preview" end # resource path local_var_path = '/emails/activities/{campaign_activity_id}/previews'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailCampaignActivityPreview200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailSchedulingApi.get_email_campaign_activity_preview", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailSchedulingApi#get_email_campaign_activity_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_campaign_activity_schedule(campaign_activity_id, opts = {}) ⇒ Array<GetEmailCampaignActivitySchedule200ResponseInner>
GET an Email Campaign Activity Schedule Use this method to return the current schedule for an email campaign activity. This schedule contains the date that Constant Contact will send the email campaign activity to contacts. If the email campaign activity is not in ‘SCHEDULED` status, this method returns an empty array and a 200 response code.
90 91 92 93 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 90 def get_email_campaign_activity_schedule(campaign_activity_id, opts = {}) data, _status_code, _headers = get_email_campaign_activity_schedule_with_http_info(campaign_activity_id, opts) data end |
#get_email_campaign_activity_schedule_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(Array<GetEmailCampaignActivitySchedule200ResponseInner>, Integer, Hash)>
GET an Email Campaign Activity Schedule Use this method to return the current schedule for an email campaign activity. This schedule contains the date that Constant Contact will send the email campaign activity to contacts. If the email campaign activity is not in `SCHEDULED` status, this method returns an empty array and a 200 response code.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 100 def get_email_campaign_activity_schedule_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailSchedulingApi.get_email_campaign_activity_schedule ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailSchedulingApi.get_email_campaign_activity_schedule" end # resource path local_var_path = '/emails/activities/{campaign_activity_id}/schedules'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<GetEmailCampaignActivitySchedule200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailSchedulingApi.get_email_campaign_activity_schedule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailSchedulingApi#get_email_campaign_activity_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_campaign_activity_send_history(campaign_activity_id, opts = {}) ⇒ Array<GetEmailCampaignActivitySendHistory200ResponseInner>
GET the Send History of an Email Campaign Activity Use this method to return the send history of an email campaign activity. This method returns the send history as an array containing an object for each time you sent a specific email campaign activity to contacts. Each send history object contains the email campaign activity send date, the number of contacts it was sent to, and the contact lists or segments used to send it. Each send history object also includes if the send attempt completed or encountered an error, and the reason why each error occurred. This method returns results in ascending order starting with the first send attempt. If the email campaign activity has not been sent to contacts, this method returns a 200 response and an empty array.
153 154 155 156 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 153 def get_email_campaign_activity_send_history(campaign_activity_id, opts = {}) data, _status_code, _headers = get_email_campaign_activity_send_history_with_http_info(campaign_activity_id, opts) data end |
#get_email_campaign_activity_send_history_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(Array<GetEmailCampaignActivitySendHistory200ResponseInner>, Integer, Hash)>
GET the Send History of an Email Campaign Activity Use this method to return the send history of an email campaign activity. This method returns the send history as an array containing an object for each time you sent a specific email campaign activity to contacts. Each send history object contains the email campaign activity send date, the number of contacts it was sent to, and the contact lists or segments used to send it. Each send history object also includes if the send attempt completed or encountered an error, and the reason why each error occurred. This method returns results in ascending order starting with the first send attempt. If the email campaign activity has not been sent to contacts, this method returns a 200 response and an empty array.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 163 def get_email_campaign_activity_send_history_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailSchedulingApi.get_email_campaign_activity_send_history ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailSchedulingApi.get_email_campaign_activity_send_history" end # resource path local_var_path = '/emails/activities/{campaign_activity_id}/send_history'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<GetEmailCampaignActivitySendHistory200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailSchedulingApi.get_email_campaign_activity_send_history", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailSchedulingApi#get_email_campaign_activity_send_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#schedule_email_campaign_activity(campaign_activity_id, schedule_email_campaign_activity_request, opts = {}) ⇒ Array<GetEmailCampaignActivitySchedule200ResponseInner>
POST (Create) an Email Campaign Activity Schedule Use this method to schedule when Constant Contact will send an email campaign activity to contacts. Use the ‘scheduled_date` request body property to enter the ISO-8601 format date that you want Constant Contact to send the email campaign activity on. Before you schedule an email campaign activity, you must update the email campaign activity and specify which contacts you want Constant Contact to send the email to. When you make a PUT call to update an email campaign activity, use the `contact_list_ids` or `segment_ids` array to add contacts. You can only schedule email campaign activities that have the `primary_email` role and are in `DRAFT`, `DONE`, or `ERROR` status. When you schedule an email campaign activity in `DONE` status, Constant Contact does not send the email campaign activity to contacts that already received it. Constant Contact only sends the email campaign activity to any new contacts in the contact lists or segment you use.
217 218 219 220 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 217 def schedule_email_campaign_activity(campaign_activity_id, schedule_email_campaign_activity_request, opts = {}) data, _status_code, _headers = schedule_email_campaign_activity_with_http_info(campaign_activity_id, schedule_email_campaign_activity_request, opts) data end |
#schedule_email_campaign_activity_with_http_info(campaign_activity_id, schedule_email_campaign_activity_request, opts = {}) ⇒ Array<(Array<GetEmailCampaignActivitySchedule200ResponseInner>, Integer, Hash)>
POST (Create) an Email Campaign Activity Schedule Use this method to schedule when Constant Contact will send an email campaign activity to contacts. Use the `scheduled_date` request body property to enter the ISO-8601 format date that you want Constant Contact to send the email campaign activity on. Before you schedule an email campaign activity, you must update the email campaign activity and specify which contacts you want Constant Contact to send the email to. When you make a PUT call to update an email campaign activity, use the `contact_list_ids` or `segment_ids` array to add contacts. You can only schedule email campaign activities that have the `primary_email` role and are in `DRAFT`, `DONE`, or `ERROR` status. When you schedule an email campaign activity in `DONE` status, Constant Contact does not send the email campaign activity to contacts that already received it. Constant Contact only sends the email campaign activity to any new contacts in the contact lists or segment you use.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 228 def schedule_email_campaign_activity_with_http_info(campaign_activity_id, schedule_email_campaign_activity_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailSchedulingApi.schedule_email_campaign_activity ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailSchedulingApi.schedule_email_campaign_activity" end # verify the required parameter 'schedule_email_campaign_activity_request' is set if @api_client.config.client_side_validation && schedule_email_campaign_activity_request.nil? fail ArgumentError, "Missing the required parameter 'schedule_email_campaign_activity_request' when calling EmailSchedulingApi.schedule_email_campaign_activity" end # resource path local_var_path = '/emails/activities/{campaign_activity_id}/schedules'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(schedule_email_campaign_activity_request) # return_type return_type = opts[:debug_return_type] || 'Array<GetEmailCampaignActivitySchedule200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailSchedulingApi.schedule_email_campaign_activity", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailSchedulingApi#schedule_email_campaign_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_send_email_campaign_activity(campaign_activity_id, test_send_email_campaign_activity_request, opts = {}) ⇒ nil
POST Test Send an Email Campaign Activity Use this method to send a test email to specific email addresses. Test emails allow you to verify how the email campaign activity will look before you send it to contacts. This method uses the ‘email_addresses` array in the request body to determine the recipients of the test email. The test email does not process any dynamic content in the email campaign activity. Dynamic content includes contact and custom field variables. You can send up to 50 test emails each day. Each recipient you add to the `email_addresses` array in the request body counts towards this limit. Successfully sending a test email returns a 204 response code without a response body.
291 292 293 294 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 291 def test_send_email_campaign_activity(campaign_activity_id, test_send_email_campaign_activity_request, opts = {}) test_send_email_campaign_activity_with_http_info(campaign_activity_id, test_send_email_campaign_activity_request, opts) nil end |
#test_send_email_campaign_activity_with_http_info(campaign_activity_id, test_send_email_campaign_activity_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
POST Test Send an Email Campaign Activity Use this method to send a test email to specific email addresses. Test emails allow you to verify how the email campaign activity will look before you send it to contacts. This method uses the `email_addresses` array in the request body to determine the recipients of the test email. The test email does not process any dynamic content in the email campaign activity. Dynamic content includes contact and custom field variables. You can send up to 50 test emails each day. Each recipient you add to the `email_addresses` array in the request body counts towards this limit. Successfully sending a test email returns a 204 response code without a response body.
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 302 def test_send_email_campaign_activity_with_http_info(campaign_activity_id, test_send_email_campaign_activity_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailSchedulingApi.test_send_email_campaign_activity ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailSchedulingApi.test_send_email_campaign_activity" end # verify the required parameter 'test_send_email_campaign_activity_request' is set if @api_client.config.client_side_validation && test_send_email_campaign_activity_request.nil? fail ArgumentError, "Missing the required parameter 'test_send_email_campaign_activity_request' when calling EmailSchedulingApi.test_send_email_campaign_activity" end # resource path local_var_path = '/emails/activities/{campaign_activity_id}/tests'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(test_send_email_campaign_activity_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailSchedulingApi.test_send_email_campaign_activity", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailSchedulingApi#test_send_email_campaign_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unschedule_email_campaign_activity(campaign_activity_id, opts = {}) ⇒ nil
DELETE an Email Campaign Activity Schedule Use this method to unschedule an email campaign activity by deleting the schedule. You can only unschedule email campaign activities that are in ‘SCHEDULED` status. Unscheduling reverts the email campaign activity to the status prior to `SCHEDULED`.
362 363 364 365 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 362 def unschedule_email_campaign_activity(campaign_activity_id, opts = {}) unschedule_email_campaign_activity_with_http_info(campaign_activity_id, opts) nil end |
#unschedule_email_campaign_activity_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
DELETE an Email Campaign Activity Schedule Use this method to unschedule an email campaign activity by deleting the schedule. You can only unschedule email campaign activities that are in `SCHEDULED` status. Unscheduling reverts the email campaign activity to the status prior to `SCHEDULED`.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/constant_contact_client/api/email_scheduling_api.rb', line 372 def unschedule_email_campaign_activity_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailSchedulingApi.unschedule_email_campaign_activity ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailSchedulingApi.unschedule_email_campaign_activity" end # resource path local_var_path = '/emails/activities/{campaign_activity_id}/schedules'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailSchedulingApi.unschedule_email_campaign_activity", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailSchedulingApi#unschedule_email_campaign_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |