Class: ConstantContactClient::EmailCampaignsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/constant_contact_client/api/email_campaigns_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EmailCampaignsApi

Returns a new instance of EmailCampaignsApi.



19
20
21
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_email_campaign(create_email_campaign_request, opts = {}) ⇒ CreateEmailCampaign200Response

POST (Create) a New Email Campaign Use this method to create a new email campaign. This method also creates new ‘primary_email` and `permalink` email campaign activities and associates them with the new email campaign. The request body must contain the `name` property and the `email_campaign_activities` array. The `name` must be unique. The `email_campaign_activities` array contains the main content of your email campaign and must include `format_type`, `from_name`, `from_email`, `reply_to_email`, `subject`, and `html_content` properties. The `from_email` address you use must use a verified email address for your account. NOTE: If you create an email campaign using a legacy (V7) format, Constant Contact automatically converts it to the newer custom code format.

Parameters:

  • create_email_campaign_request (CreateEmailCampaignRequest)

    A JSON request body that contains the email content.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 27

def create_email_campaign(create_email_campaign_request, opts = {})
  data, _status_code, _headers = create_email_campaign_with_http_info(create_email_campaign_request, opts)
  data
end

#create_email_campaign_with_http_info(create_email_campaign_request, opts = {}) ⇒ Array<(CreateEmailCampaign200Response, Integer, Hash)>

POST (Create) a New Email Campaign Use this method to create a new email campaign. This method also creates new &#x60;primary_email&#x60; and &#x60;permalink&#x60; email campaign activities and associates them with the new email campaign. The request body must contain the &#x60;name&#x60; property and the &#x60;email_campaign_activities&#x60; array. The &#x60;name&#x60; must be unique. The &#x60;email_campaign_activities&#x60; array contains the main content of your email campaign and must include &#x60;format_type&#x60;, &#x60;from_name&#x60;, &#x60;from_email&#x60;, &#x60;reply_to_email&#x60;, &#x60;subject&#x60;, and &#x60;html_content&#x60; properties. The &#x60;from_email&#x60; address you use must use a verified email address for your account. NOTE: If you create an email campaign using a legacy (V7) format, Constant Contact automatically converts it to the newer custom code format.

Parameters:

  • create_email_campaign_request (CreateEmailCampaignRequest)

    A JSON request body that contains the email content.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
84
85
86
87
88
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 37

def create_email_campaign_with_http_info(create_email_campaign_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.create_email_campaign ...'
  end
  # verify the required parameter 'create_email_campaign_request' is set
  if @api_client.config.client_side_validation && create_email_campaign_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_email_campaign_request' when calling EmailCampaignsApi.create_email_campaign"
  end
  # resource path
  local_var_path = '/emails'

  # 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(create_email_campaign_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateEmailCampaign200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.create_email_campaign",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#create_email_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_resend_email_campaign(campaign_activity_id, create_resend_email_campaign_request, opts = {}) ⇒ CreateResendEmailCampaign201Response

POST a Resend to Non-openers Campaign Activity Use this POST method to resend a primary campaign activity to contacts that did not open a campaign activity that has a current ‘status` of `Draft`, `Scheduled`, or `Done`. You can only create one resend activity per email campaign. After an email campaign activity is sent to contacts, Constant Contact waits the specified number of `delay_days` or `delay_minutes` (properties are mutually exclusive) before resending to non-openers. If you set both `delay_days` or `delay_minutes`, `delay_minutes` is ignored in the request. You can resend to non-openers a minimum of twelve hours (720 minutes) and a maximum of up to 10 days (or 10 x 1440 minutes) after the initial send date.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the primary email campaign activity.

  • create_resend_email_campaign_request (CreateResendEmailCampaignRequest)

    A JSON request body that specifies when to resend the campaign activity to non-openers.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



96
97
98
99
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 96

def create_resend_email_campaign(campaign_activity_id, create_resend_email_campaign_request, opts = {})
  data, _status_code, _headers = create_resend_email_campaign_with_http_info(campaign_activity_id, create_resend_email_campaign_request, opts)
  data
end

#create_resend_email_campaign_with_http_info(campaign_activity_id, create_resend_email_campaign_request, opts = {}) ⇒ Array<(CreateResendEmailCampaign201Response, Integer, Hash)>

POST a Resend to Non-openers Campaign Activity Use this POST method to resend a primary campaign activity to contacts that did not open a campaign activity that has a current &#x60;status&#x60; of &#x60;Draft&#x60;, &#x60;Scheduled&#x60;, or &#x60;Done&#x60;. You can only create one resend activity per email campaign. After an email campaign activity is sent to contacts, Constant Contact waits the specified number of &#x60;delay_days&#x60; or &#x60;delay_minutes&#x60; (properties are mutually exclusive) before resending to non-openers. If you set both &#x60;delay_days&#x60; or &#x60;delay_minutes&#x60;, &#x60;delay_minutes&#x60; is ignored in the request. You can resend to non-openers a minimum of twelve hours (720 minutes) and a maximum of up to 10 days (or 10 x 1440 minutes) after the initial send date.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the primary email campaign activity.

  • create_resend_email_campaign_request (CreateResendEmailCampaignRequest)

    A JSON request body that specifies when to resend the campaign activity to non-openers.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 107

def create_resend_email_campaign_with_http_info(campaign_activity_id, create_resend_email_campaign_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.create_resend_email_campaign ...'
  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 EmailCampaignsApi.create_resend_email_campaign"
  end
  # verify the required parameter 'create_resend_email_campaign_request' is set
  if @api_client.config.client_side_validation && create_resend_email_campaign_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_resend_email_campaign_request' when calling EmailCampaignsApi.create_resend_email_campaign"
  end
  # resource path
  local_var_path = '/emails/activities/{campaign_activity_id}/non_opener_resends'.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(create_resend_email_campaign_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateResendEmailCampaign201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.create_resend_email_campaign",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#create_resend_email_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_email_campaign(campaign_id, opts = {}) ⇒ nil

DELETE an Email Campaign Use this method to delete an email campaign and the email campaign activities associated with the email campaign. You cannot delete an email campaign when it has a ‘Scheduled` status. Constant Contact users can restore deleted email campaigns using the UI.

Parameters:

  • campaign_id (String)

    The unique ID for the email campaign you are deleting.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


169
170
171
172
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 169

def delete_email_campaign(campaign_id, opts = {})
  delete_email_campaign_with_http_info(campaign_id, opts)
  nil
end

#delete_email_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

DELETE an Email Campaign Use this method to delete an email campaign and the email campaign activities associated with the email campaign. You cannot delete an email campaign when it has a &#x60;Scheduled&#x60; status. Constant Contact users can restore deleted email campaigns using the UI.

Parameters:

  • campaign_id (String)

    The unique ID for the email campaign you are deleting.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 179

def delete_email_campaign_with_http_info(campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.delete_email_campaign ...'
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling EmailCampaignsApi.delete_email_campaign"
  end
  # resource path
  local_var_path = '/emails/{campaign_id}'.sub('{' + 'campaign_id' + '}', CGI.escape(campaign_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']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.delete_email_campaign",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#delete_email_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_resend_email_campaign(campaign_activity_id, resend_request_id, opts = {}) ⇒ nil

DELETE a Resend to Non Openers Activity Use this ‘DELETE` method to delete (unschedule) a resend to non openers activity.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the primary email campaign activity.

  • resend_request_id (String)

    The unique ID associated with the resend for the email campaign activity (for example: &#x60;389093&#x60;). If the email campaign activity is currently in draft status, specify &#x60;DRAFT&#x60; as the ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


231
232
233
234
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 231

def delete_resend_email_campaign(campaign_activity_id, resend_request_id, opts = {})
  delete_resend_email_campaign_with_http_info(campaign_activity_id, resend_request_id, opts)
  nil
end

#delete_resend_email_campaign_with_http_info(campaign_activity_id, resend_request_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

DELETE a Resend to Non Openers Activity Use this &#x60;DELETE&#x60; method to delete (unschedule) a resend to non openers activity.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the primary email campaign activity.

  • resend_request_id (String)

    The unique ID associated with the resend for the email campaign activity (for example: &#x60;389093&#x60;). If the email campaign activity is currently in draft status, specify &#x60;DRAFT&#x60; as the ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
284
285
286
287
288
289
290
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 242

def delete_resend_email_campaign_with_http_info(campaign_activity_id, resend_request_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.delete_resend_email_campaign ...'
  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 EmailCampaignsApi.delete_resend_email_campaign"
  end
  # verify the required parameter 'resend_request_id' is set
  if @api_client.config.client_side_validation && resend_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'resend_request_id' when calling EmailCampaignsApi.delete_resend_email_campaign"
  end
  # resource path
  local_var_path = '/emails/activities/{campaign_activity_id}/non_opener_resends/{resend_request_id}'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)).sub('{' + 'resend_request_id' + '}', CGI.escape(resend_request_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']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.delete_resend_email_campaign",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#delete_resend_email_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_email_campaigns(opts = {}) ⇒ GetAllEmailCampaigns200Response

GET a Collection of Email Campaigns Use this method to list and get details about your email campaigns. By default, this method returns all email campaigns for the user account including deleted email campaigns. To get email campaigns within a date-range, use the ‘after_date` and `before_date` query parameters. This endpoint does not return campaign activity details for each email campaign in the collection. To get email campaign activity details for a single email campaign, use the GET `/emails/campaign_id` endpoint." <div class="Msg"><p class="note-text">This method does not currently support filtering results using the email campaign creation date.</p></div>

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Specifies the number of campaigns to display on each page of output that is returned (from return 1 - 500). The default returns 50 campaigns per page. (default to 50)

  • :before_date (Time)

    Use to return email campaigns with &#x60;updated_at&#x60; timestamps that are before a specific date and time (in ISO-8601 format). Use with the &#x60;after_date&#x60; query parameter to get email campaigns sent within a specific date range.

  • :after_date (Time)

    Use to return email campaigns with last &#x60;updated_at&#x60; timestamps that are after a specific date and time (in ISO-8601 format). Use with the &#x60;before_date&#x60; query parameter to get email campaigns sent within a specific date range.

Returns:



299
300
301
302
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 299

def get_all_email_campaigns(opts = {})
  data, _status_code, _headers = get_all_email_campaigns_with_http_info(opts)
  data
end

#get_all_email_campaigns_with_http_info(opts = {}) ⇒ Array<(GetAllEmailCampaigns200Response, Integer, Hash)>

GET a Collection of Email Campaigns Use this method to list and get details about your email campaigns. By default, this method returns all email campaigns for the user account including deleted email campaigns. To get email campaigns within a date-range, use the &#x60;after_date&#x60; and &#x60;before_date&#x60; query parameters. This endpoint does not return campaign activity details for each email campaign in the collection. To get email campaign activity details for a single email campaign, use the GET &#x60;/emails/campaign_id&#x60; endpoint.&quot; &lt;div class&#x3D;&quot;Msg&quot;&gt;&lt;p class&#x3D;&quot;note-text&quot;&gt;This method does not currently support filtering results using the email campaign creation date.&lt;/p&gt;&lt;/div&gt;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Specifies the number of campaigns to display on each page of output that is returned (from return 1 - 500). The default returns 50 campaigns per page. (default to 50)

  • :before_date (Time)

    Use to return email campaigns with &#x60;updated_at&#x60; timestamps that are before a specific date and time (in ISO-8601 format). Use with the &#x60;after_date&#x60; query parameter to get email campaigns sent within a specific date range.

  • :after_date (Time)

    Use to return email campaigns with last &#x60;updated_at&#x60; timestamps that are after a specific date and time (in ISO-8601 format). Use with the &#x60;before_date&#x60; query parameter to get email campaigns sent within a specific date range.

Returns:



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
356
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 311

def get_all_email_campaigns_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.get_all_email_campaigns ...'
  end
  # resource path
  local_var_path = '/emails'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'before_date'] = opts[:'before_date'] if !opts[:'before_date'].nil?
  query_params[:'after_date'] = opts[:'after_date'] if !opts[:'after_date'].nil?

  # 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] || 'GetAllEmailCampaigns200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.get_all_email_campaigns",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#get_all_email_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_email_campaign_activity(campaign_activity_id, opts = {}) ⇒ GetEmailCampaignActivity200Response

GET a Single Email Campaign Activity Use this method to return a specific email campaign activity. Each email campaign activity contains the email content, metadata, and styling information of an email. Email campaign activities can also contain either contact lists or segments. Constant Contact uses this information to determine who to send the email campaign activity to when you schedule it. You cannot get email campaign activities that have a ‘REMOVED` status.

Parameters:

  • campaign_activity_id (String)

    The unique ID for an email campaign activity.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include (String)

    Use the &#x60;include&#x60; query parameter to enter a comma separated list of additional email campaign activity properties for the V3 API to return. Valid values are &#x60;physical_address_in_footer&#x60;, &#x60;permalink_url&#x60;, &#x60;html_content&#x60;, and &#x60;document_properties&#x60;.

Returns:



364
365
366
367
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 364

def get_email_campaign_activity(campaign_activity_id, opts = {})
  data, _status_code, _headers = get_email_campaign_activity_with_http_info(campaign_activity_id, opts)
  data
end

#get_email_campaign_activity_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailCampaignActivity200Response, Integer, Hash)>

GET a Single Email Campaign Activity Use this method to return a specific email campaign activity. Each email campaign activity contains the email content, metadata, and styling information of an email. Email campaign activities can also contain either contact lists or segments. Constant Contact uses this information to determine who to send the email campaign activity to when you schedule it. You cannot get email campaign activities that have a &#x60;REMOVED&#x60; status.

Parameters:

  • campaign_activity_id (String)

    The unique ID for an email campaign activity.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include (String)

    Use the &#x60;include&#x60; query parameter to enter a comma separated list of additional email campaign activity properties for the V3 API to return. Valid values are &#x60;physical_address_in_footer&#x60;, &#x60;permalink_url&#x60;, &#x60;html_content&#x60;, and &#x60;document_properties&#x60;.

Returns:



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
417
418
419
420
421
422
423
424
425
426
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 375

def get_email_campaign_activity_with_http_info(campaign_activity_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.get_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 EmailCampaignsApi.get_email_campaign_activity"
  end
  allowable_values = ["physical_address_in_footer", "permalink_url", "html_content", "document_properties"]
  if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include'])
    fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/emails/activities/{campaign_activity_id}'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?

  # 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] || 'GetEmailCampaignActivity200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.get_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#get_email_campaign_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_email_campaign_by_id(campaign_id, opts = {}) ⇒ CreateEmailCampaign200Response

GET Details About a Single Email Campaign Use this method to get details about a single email campaign and campaign related activities. Details include the email campaign name, current status, create date, last update date, and a list of campaign activities; including the ‘campaign_activity_id` and `role`.

Parameters:

  • campaign_id (String)

    The ID (UUID format) that uniquely identifies this email campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



433
434
435
436
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 433

def get_email_campaign_by_id(campaign_id, opts = {})
  data, _status_code, _headers = get_email_campaign_by_id_with_http_info(campaign_id, opts)
  data
end

#get_email_campaign_by_id_with_http_info(campaign_id, opts = {}) ⇒ Array<(CreateEmailCampaign200Response, Integer, Hash)>

GET Details About a Single Email Campaign Use this method to get details about a single email campaign and campaign related activities. Details include the email campaign name, current status, create date, last update date, and a list of campaign activities; including the &#x60;campaign_activity_id&#x60; and &#x60;role&#x60;.

Parameters:

  • campaign_id (String)

    The ID (UUID format) that uniquely identifies this email campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 443

def get_email_campaign_by_id_with_http_info(campaign_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.get_email_campaign_by_id ...'
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling EmailCampaignsApi.get_email_campaign_by_id"
  end
  # resource path
  local_var_path = '/emails/{campaign_id}'.sub('{' + 'campaign_id' + '}', CGI.escape(campaign_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] || 'CreateEmailCampaign200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.get_email_campaign_by_id",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#get_email_campaign_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_email_campaign_xrefs(v2_email_campaign_ids, opts = {}) ⇒ GetEmailCampaignXrefs200Response

GET a Collection of V2 and V3 API Email Campaign Identifiers <div class="Msg Msg–warning"><p class="note-text">Use this endpoint to migrate your locally stored V2 email campaign data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.</p></div> Use this method to migrate your local V2 API email data to the V3 API format. For each value that you provide in the ‘v2_email_campaign_ids` query parameter, this method returns the corresponding V3 `campaign_id` and V3 `campaign_activity_id` UUID value. For more information on the changes to the email campaign resource model, see [V3 Email Campaign Resource Changes](/api_guide/v3_v2_email_campaign_deltas.html) in the API guide.

Parameters:

  • v2_email_campaign_ids (String)

    Comma separated list of V2 API &#x60;campaignId&#x60; values. You can enter up to 50 V2 &#x60;campaignId&#x60; values in each request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



496
497
498
499
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 496

def get_email_campaign_xrefs(v2_email_campaign_ids, opts = {})
  data, _status_code, _headers = get_email_campaign_xrefs_with_http_info(v2_email_campaign_ids, opts)
  data
end

#get_email_campaign_xrefs_with_http_info(v2_email_campaign_ids, opts = {}) ⇒ Array<(GetEmailCampaignXrefs200Response, Integer, Hash)>

GET a Collection of V2 and V3 API Email Campaign Identifiers &lt;div class&#x3D;&quot;Msg Msg–warning&quot;&gt;&lt;p class&#x3D;&quot;note-text&quot;&gt;Use this endpoint to migrate your locally stored V2 email campaign data to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.&lt;/p&gt;&lt;/div&gt; Use this method to migrate your local V2 API email data to the V3 API format. For each value that you provide in the &#x60;v2_email_campaign_ids&#x60; query parameter, this method returns the corresponding V3 &#x60;campaign_id&#x60; and V3 &#x60;campaign_activity_id&#x60; UUID value. For more information on the changes to the email campaign resource model, see [V3 Email Campaign Resource Changes](/api_guide/v3_v2_email_campaign_deltas.html) in the API guide.

Parameters:

  • v2_email_campaign_ids (String)

    Comma separated list of V2 API &#x60;campaignId&#x60; values. You can enter up to 50 V2 &#x60;campaignId&#x60; values in each request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 506

def get_email_campaign_xrefs_with_http_info(v2_email_campaign_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.get_email_campaign_xrefs ...'
  end
  # verify the required parameter 'v2_email_campaign_ids' is set
  if @api_client.config.client_side_validation && v2_email_campaign_ids.nil?
    fail ArgumentError, "Missing the required parameter 'v2_email_campaign_ids' when calling EmailCampaignsApi.get_email_campaign_xrefs"
  end
  # resource path
  local_var_path = '/emails/campaign_id_xrefs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'v2_email_campaign_ids'] = v2_email_campaign_ids

  # 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] || 'GetEmailCampaignXrefs200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.get_email_campaign_xrefs",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#get_email_campaign_xrefs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_resend_email_campaign(campaign_activity_id, opts = {}) ⇒ Array<GetResendEmailCampaign200ResponseInner>

GET Details for a Resend to Non-openers Campaign Activity Get details about a resend to non-openers campaign activity. If resend activity does not exist for the specified ‘campaign_activity_id`, an empty list is returned in the results. You can only create one resend activity per email campaign.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the primary email campaign activity.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



560
561
562
563
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 560

def get_resend_email_campaign(campaign_activity_id, opts = {})
  data, _status_code, _headers = get_resend_email_campaign_with_http_info(campaign_activity_id, opts)
  data
end

#get_resend_email_campaign_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(Array<GetResendEmailCampaign200ResponseInner>, Integer, Hash)>

GET Details for a Resend to Non-openers Campaign Activity Get details about a resend to non-openers campaign activity. If resend activity does not exist for the specified &#x60;campaign_activity_id&#x60;, an empty list is returned in the results. You can only create one resend activity per email campaign.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the primary email campaign activity.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 570

def get_resend_email_campaign_with_http_info(campaign_activity_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.get_resend_email_campaign ...'
  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 EmailCampaignsApi.get_resend_email_campaign"
  end
  # resource path
  local_var_path = '/emails/activities/{campaign_activity_id}/non_opener_resends'.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<GetResendEmailCampaign200ResponseInner>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.get_resend_email_campaign",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#get_resend_email_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_email_campaign_name(campaign_id, patch_email_campaign_name_request, opts = {}) ⇒ CreateEmailCampaign200Response

PATCH (Update) an Email Campaign Name Use this method to rename an email campaign. The name is not visible to contacts. The name must be unique and cannot exceed 80 characters. You cannot rename email campaigns that have a ‘Removed` status.

Parameters:

  • campaign_id (String)

    The unique identifier for an email campaign.

  • patch_email_campaign_name_request (PatchEmailCampaignNameRequest)

    A JSON payload that contains the new email campaign name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



624
625
626
627
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 624

def patch_email_campaign_name(campaign_id, patch_email_campaign_name_request, opts = {})
  data, _status_code, _headers = patch_email_campaign_name_with_http_info(campaign_id, patch_email_campaign_name_request, opts)
  data
end

#patch_email_campaign_name_with_http_info(campaign_id, patch_email_campaign_name_request, opts = {}) ⇒ Array<(CreateEmailCampaign200Response, Integer, Hash)>

PATCH (Update) an Email Campaign Name Use this method to rename an email campaign. The name is not visible to contacts. The name must be unique and cannot exceed 80 characters. You cannot rename email campaigns that have a &#x60;Removed&#x60; status.

Parameters:

  • campaign_id (String)

    The unique identifier for an email campaign.

  • patch_email_campaign_name_request (PatchEmailCampaignNameRequest)

    A JSON payload that contains the new email campaign name.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 635

def patch_email_campaign_name_with_http_info(campaign_id, patch_email_campaign_name_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.patch_email_campaign_name ...'
  end
  # verify the required parameter 'campaign_id' is set
  if @api_client.config.client_side_validation && campaign_id.nil?
    fail ArgumentError, "Missing the required parameter 'campaign_id' when calling EmailCampaignsApi.patch_email_campaign_name"
  end
  # verify the required parameter 'patch_email_campaign_name_request' is set
  if @api_client.config.client_side_validation && patch_email_campaign_name_request.nil?
    fail ArgumentError, "Missing the required parameter 'patch_email_campaign_name_request' when calling EmailCampaignsApi.patch_email_campaign_name"
  end
  # resource path
  local_var_path = '/emails/{campaign_id}'.sub('{' + 'campaign_id' + '}', CGI.escape(campaign_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(patch_email_campaign_name_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateEmailCampaign200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.patch_email_campaign_name",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#patch_email_campaign_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_email_campaign_activity(campaign_activity_id, get_email_campaign_activity200_response, opts = {}) ⇒ GetEmailCampaignActivity200Response

PUT (Update) An Email Campaign Activity Use this method to update an email campaign activity by including the complete email campaign activity with your changes in the request body. The request body requires the ‘from_name`, `from_email`, `reply_to_email`, and `subject` properties. You can only update email campaign activities that have the `primary_email` role and that are in `DRAFT` or `Done` status. When you use a PUT method to update a resource, the V3 API overwrites any properties that are missing in the request body. However, the V3 API does not overwrite subresources that you omit in the request body or missing properties in subresources. This method considers `physical_address_in_footer`, `document_properties`, `html_content`, and `permalink_url` subresources of the email campaign activity.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the email campaign activity you are updating.

  • get_email_campaign_activity200_response (GetEmailCampaignActivity200Response)

    A request body payload that contains the complete email campaign activity with your changes.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



698
699
700
701
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 698

def update_email_campaign_activity(campaign_activity_id, get_email_campaign_activity200_response, opts = {})
  data, _status_code, _headers = update_email_campaign_activity_with_http_info(campaign_activity_id, get_email_campaign_activity200_response, opts)
  data
end

#update_email_campaign_activity_with_http_info(campaign_activity_id, get_email_campaign_activity200_response, opts = {}) ⇒ Array<(GetEmailCampaignActivity200Response, Integer, Hash)>

PUT (Update) An Email Campaign Activity Use this method to update an email campaign activity by including the complete email campaign activity with your changes in the request body. The request body requires the &#x60;from_name&#x60;, &#x60;from_email&#x60;, &#x60;reply_to_email&#x60;, and &#x60;subject&#x60; properties. You can only update email campaign activities that have the &#x60;primary_email&#x60; role and that are in &#x60;DRAFT&#x60; or &#x60;Done&#x60; status. When you use a PUT method to update a resource, the V3 API overwrites any properties that are missing in the request body. However, the V3 API does not overwrite subresources that you omit in the request body or missing properties in subresources. This method considers &#x60;physical_address_in_footer&#x60;, &#x60;document_properties&#x60;, &#x60;html_content&#x60;, and &#x60;permalink_url&#x60; subresources of the email campaign activity.

Parameters:

  • campaign_activity_id (String)

    The unique ID for the email campaign activity you are updating.

  • get_email_campaign_activity200_response (GetEmailCampaignActivity200Response)

    A request body payload that contains the complete email campaign activity with your changes.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/constant_contact_client/api/email_campaigns_api.rb', line 709

def update_email_campaign_activity_with_http_info(campaign_activity_id, get_email_campaign_activity200_response, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EmailCampaignsApi.update_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 EmailCampaignsApi.update_email_campaign_activity"
  end
  # verify the required parameter 'get_email_campaign_activity200_response' is set
  if @api_client.config.client_side_validation && get_email_campaign_activity200_response.nil?
    fail ArgumentError, "Missing the required parameter 'get_email_campaign_activity200_response' when calling EmailCampaignsApi.update_email_campaign_activity"
  end
  # resource path
  local_var_path = '/emails/activities/{campaign_activity_id}'.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(get_email_campaign_activity200_response)

  # return_type
  return_type = opts[:debug_return_type] || 'GetEmailCampaignActivity200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']

  new_options = opts.merge(
    :operation => :"EmailCampaignsApi.update_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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailCampaignsApi#update_email_campaign_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end