Class: BombBomb::EmailsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bombbomb/api/emails_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EmailsApi

Returns a new instance of EmailsApi.



19
20
21
# File 'lib/bombbomb/api/emails_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/bombbomb/api/emails_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_printing_press_email(template_id, content, opts = {}) ⇒ nil

Create an Email with Printing Press Prints an email using the template id and content to the users account.If a video id is included, it will replace any video placeholders with that video.

Parameters:

  • template_id

    The template id to be printed.

  • content

    The content of the email.

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

    the optional parameters

Options Hash (opts):

  • :email_id (String)

    The email id to be printed to.

  • :video_id (String)

    A video to replace video place holders with.

  • :subject_line (String)

    The subject line to be printed.

Returns:

  • (nil)


32
33
34
35
# File 'lib/bombbomb/api/emails_api.rb', line 32

def create_printing_press_email(template_id, content, opts = {})
  create_printing_press_email_with_http_info(template_id, content, opts)
  return nil
end

#create_printing_press_email_with_http_info(template_id, content, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create an Email with Printing Press Prints an email using the template id and content to the users account.If a video id is included, it will replace any video placeholders with that video.

Parameters:

  • template_id

    The template id to be printed.

  • content

    The content of the email.

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

    the optional parameters

Options Hash (opts):

  • :email_id (String)

    The email id to be printed to.

  • :video_id (String)

    A video to replace video place holders with.

  • :subject_line (String)

    The subject line to be printed.

Returns:

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

    nil, response status code and response headers



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
89
90
91
92
# File 'lib/bombbomb/api/emails_api.rb', line 46

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params["templateId"] = template_id
  form_params["content"] = content
  form_params["emailId"] = opts[:'email_id'] if !opts[:'email_id'].nil?
  form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil?
  form_params["subjectLine"] = opts[:'subject_line'] if !opts[:'subject_line'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#create_printing_press_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_templates_for_current_user(opts = {}) ⇒ nil

Get all user templates Get all templates accessible to the current user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :quick_send_only (BOOLEAN)

    Whether to return only quick send templates.

Returns:

  • (nil)


99
100
101
102
# File 'lib/bombbomb/api/emails_api.rb', line 99

def get_all_templates_for_current_user(opts = {})
  get_all_templates_for_current_user_with_http_info(opts)
  return nil
end

#get_all_templates_for_current_user_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get all user templates Get all templates accessible to the current user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :quick_send_only (BOOLEAN)

    Whether to return only quick send templates.

Returns:

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

    nil, response status code and response headers



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
# File 'lib/bombbomb/api/emails_api.rb', line 109

def get_all_templates_for_current_user_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_all_templates_for_current_user ..."
  end
  # resource path
  local_var_path = "/emails/templates"

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_all_templates_for_current_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_email_tracking(email_id, opts = {}) ⇒ nil

Get Email Tracking Get Tracking data for all sends of an Email

Parameters:

  • email_id

    ID of the email

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

    the optional parameters

Options Hash (opts):

  • :job_id (String)

    ID of the Job (or null for all jobs)

Returns:

  • (nil)


151
152
153
154
# File 'lib/bombbomb/api/emails_api.rb', line 151

def get_email_tracking(email_id, opts = {})
  get_email_tracking_with_http_info(email_id, opts)
  return nil
end

#get_email_tracking_interactions(email_id, opts = {}) ⇒ nil

Get Email Tracking Interactions Get Contact detail interactions for an Email

Parameters:

  • email_id

    ID of the email

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

    the optional parameters

Options Hash (opts):

  • :job_id (String)

    ID of the Job (or null for all jobs)

  • :interaction_type (String)

    Interaction type to order and filter by

  • :search_term (String)

    Search term to filer by

Returns:

  • (nil)


210
211
212
213
# File 'lib/bombbomb/api/emails_api.rb', line 210

def get_email_tracking_interactions(email_id, opts = {})
  get_email_tracking_interactions_with_http_info(email_id, opts)
  return nil
end

#get_email_tracking_interactions_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get Email Tracking Interactions Get Contact detail interactions for an Email

Parameters:

  • email_id

    ID of the email

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

    the optional parameters

Options Hash (opts):

  • :job_id (String)

    ID of the Job (or null for all jobs)

  • :interaction_type (String)

    Interaction type to order and filter by

  • :search_term (String)

    Search term to filer by

Returns:

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

    nil, response status code and response headers



223
224
225
226
227
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
# File 'lib/bombbomb/api/emails_api.rb', line 223

def get_email_tracking_interactions_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_email_tracking_interactions ..."
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_tracking_interactions"
  end
  # resource path
  local_var_path = "/emails/{emailId}/tracking/interactions".sub('{' + 'emailId' + '}', email_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil?
  query_params[:'interactionType'] = opts[:'interaction_type'] if !opts[:'interaction_type'].nil?
  query_params[:'searchTerm'] = opts[:'search_term'] if !opts[:'search_term'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_email_tracking_interactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_email_tracking_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get Email Tracking Get Tracking data for all sends of an Email

Parameters:

  • email_id

    ID of the email

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

    the optional parameters

Options Hash (opts):

  • :job_id (String)

    ID of the Job (or null for all jobs)

Returns:

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

    nil, response status code and response headers



162
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
# File 'lib/bombbomb/api/emails_api.rb', line 162

def get_email_tracking_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_email_tracking ..."
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_tracking"
  end
  # resource path
  local_var_path = "/emails/{emailId}/tracking".sub('{' + 'emailId' + '}', email_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_email_tracking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_hourly_email_tracking(email_id, opts = {}) ⇒ nil

Get Hourly Email Tracking Get Tracking data for an Email, broken down by the hour and filterable by an Interaction type

Parameters:

  • email_id

    ID of the email

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

    the optional parameters

Options Hash (opts):

  • :job_id (String)

    ID of the Job (or null for all jobs)

  • :interaction_type (String)

    Interaction type to filter by

Returns:

  • (nil)


272
273
274
275
# File 'lib/bombbomb/api/emails_api.rb', line 272

def get_hourly_email_tracking(email_id, opts = {})
  get_hourly_email_tracking_with_http_info(email_id, opts)
  return nil
end

#get_hourly_email_tracking_with_http_info(email_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get Hourly Email Tracking Get Tracking data for an Email, broken down by the hour and filterable by an Interaction type

Parameters:

  • email_id

    ID of the email

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

    the optional parameters

Options Hash (opts):

  • :job_id (String)

    ID of the Job (or null for all jobs)

  • :interaction_type (String)

    Interaction type to filter by

Returns:

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

    nil, response status code and response headers



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/bombbomb/api/emails_api.rb', line 284

def get_hourly_email_tracking_with_http_info(email_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_hourly_email_tracking ..."
  end
  # verify the required parameter 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_hourly_email_tracking"
  end
  # resource path
  local_var_path = "/emails/{emailId}/tracking/hourly".sub('{' + 'emailId' + '}', email_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil?
  query_params[:'interactionType'] = opts[:'interaction_type'] if !opts[:'interaction_type'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_hourly_email_tracking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_live_fire_data(opts = {}) ⇒ nil

Get livefire feed data Get the user data for the live fire feed emails

Parameters:

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

    the optional parameters

Returns:

  • (nil)


329
330
331
332
# File 'lib/bombbomb/api/emails_api.rb', line 329

def get_live_fire_data(opts = {})
  get_live_fire_data_with_http_info(opts)
  return nil
end

#get_live_fire_data_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get livefire feed data Get the user data for the live fire feed emails

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/bombbomb/api/emails_api.rb', line 338

def get_live_fire_data_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_live_fire_data ..."
  end
  # resource path
  local_var_path = "/emails/livefire"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_live_fire_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_quick_send_templates(opts = {}) ⇒ nil

Get all quicksend templates Get all quicksend templates accessible to the user.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


377
378
379
380
# File 'lib/bombbomb/api/emails_api.rb', line 377

def get_quick_send_templates(opts = {})
  get_quick_send_templates_with_http_info(opts)
  return nil
end

#get_quick_send_templates_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get all quicksend templates Get all quicksend templates accessible to the user.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/bombbomb/api/emails_api.rb', line 386

def get_quick_send_templates_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_quick_send_templates ..."
  end
  # resource path
  local_var_path = "/emails/quicksend/templates"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_quick_send_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_template_html_for_template_id(template_id, opts = {}) ⇒ nil

Get the HTML for a given template Get the HTML for a given template, with or without rendered variables

Parameters:

  • template_id

    The id of the template.

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

    the optional parameters

Options Hash (opts):

  • :render_variables (String)

    Whether to render profile variables in the returned HTML.

Returns:

  • (nil)


427
428
429
430
# File 'lib/bombbomb/api/emails_api.rb', line 427

def get_template_html_for_template_id(template_id, opts = {})
  get_template_html_for_template_id_with_http_info(template_id, opts)
  return nil
end

#get_template_html_for_template_id_with_http_info(template_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get the HTML for a given template Get the HTML for a given template, with or without rendered variables

Parameters:

  • template_id

    The id of the template.

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

    the optional parameters

Options Hash (opts):

  • :render_variables (String)

    Whether to render profile variables in the returned HTML.

Returns:

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

    nil, response status code and response headers



438
439
440
441
442
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
# File 'lib/bombbomb/api/emails_api.rb', line 438

def get_template_html_for_template_id_with_http_info(template_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_template_html_for_template_id ..."
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling EmailsApi.get_template_html_for_template_id"
  end
  # resource path
  local_var_path = "/emails/templates/{templateId}/html".sub('{' + 'templateId' + '}', template_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_template_html_for_template_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_video_quick_sender_data(opts = {}) ⇒ nil

Get quicksend data Get the user data for quicksender, including templates and lists.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :message (String)

    A message for the video content.

  • :subject (String)

    A subject for the video content.

  • :video_id (String)

    A video ID.

  • :template_id (String)

    A template ID.

  • :comma_delim_emails (String)

    Comma delimited emails

Returns:

  • (nil)


487
488
489
490
# File 'lib/bombbomb/api/emails_api.rb', line 487

def get_video_quick_sender_data(opts = {})
  get_video_quick_sender_data_with_http_info(opts)
  return nil
end

#get_video_quick_sender_data_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get quicksend data Get the user data for quicksender, including templates and lists.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :message (String)

    A message for the video content.

  • :subject (String)

    A subject for the video content.

  • :video_id (String)

    A video ID.

  • :template_id (String)

    A template ID.

  • :comma_delim_emails (String)

    Comma delimited emails

Returns:

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

    nil, response status code and response headers



501
502
503
504
505
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
# File 'lib/bombbomb/api/emails_api.rb', line 501

def get_video_quick_sender_data_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.get_video_quick_sender_data ..."
  end
  # resource path
  local_var_path = "/emails/quicksend"

  # query parameters
  query_params = {}
  query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?
  query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
  query_params[:'videoId'] = opts[:'video_id'] if !opts[:'video_id'].nil?
  query_params[:'templateId'] = opts[:'template_id'] if !opts[:'template_id'].nil?
  query_params[:'commaDelimEmails'] = opts[:'comma_delim_emails'] if !opts[:'comma_delim_emails'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_video_quick_sender_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#save_quick_sender_settings(opts = {}) ⇒ nil

Save quicksender settings Save the quicksender notification and default template settings

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :alert_on_play (String)

    A preference setting for whether or not to notify user on quicksend email video plays.

  • :alert_on_open (String)

    A preference setting for whether or not to notify user on quicksend email opens.

  • :template_id (String)

    Id of a template to use for this send. A null value means use the default for this user.

Returns:

  • (nil)


548
549
550
551
# File 'lib/bombbomb/api/emails_api.rb', line 548

def save_quick_sender_settings(opts = {})
  save_quick_sender_settings_with_http_info(opts)
  return nil
end

#save_quick_sender_settings_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Save quicksender settings Save the quicksender notification and default template settings

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :alert_on_play (String)

    A preference setting for whether or not to notify user on quicksend email video plays.

  • :alert_on_open (String)

    A preference setting for whether or not to notify user on quicksend email opens.

  • :template_id (String)

    Id of a template to use for this send. A null value means use the default for this user.

Returns:

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

    nil, response status code and response headers



560
561
562
563
564
565
566
567
568
569
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
# File 'lib/bombbomb/api/emails_api.rb', line 560

def save_quick_sender_settings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.save_quick_sender_settings ..."
  end
  # resource path
  local_var_path = "/emails/quicksend/settings"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params["alertOnPlay"] = opts[:'alert_on_play'] if !opts[:'alert_on_play'].nil?
  form_params["alertOnOpen"] = opts[:'alert_on_open'] if !opts[:'alert_on_open'].nil?
  form_params["templateId"] = opts[:'template_id'] if !opts[:'template_id'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#save_quick_sender_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#video_quick_sender(opts = {}) ⇒ nil

Send a quicksend email Send a quicksend video email to the list or users provided.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    A guid id for the video.

  • :email_addresses (String)

    A semi-colon separated list of email addresses to send to.

  • :subject (String)

    Subject line for the email.

  • :message (String)

    Message for the body of the email.

  • :list_ids (String)

    An array of list ids

  • :scheduled_send_timestamp (Integer)

    When to schedule the send (seconds since epoch). null value means send immediately.

  • :extended_properties (String)

    Bool value that when checked will send back both emailId as well as extra properties

  • :template_id (String)

    Id of a template to use for this send. A null value means use the default for this user.

  • :strip_html (String)

    remove HTML elements

Returns:

  • (nil)


611
612
613
614
# File 'lib/bombbomb/api/emails_api.rb', line 611

def video_quick_sender(opts = {})
  video_quick_sender_with_http_info(opts)
  return nil
end

#video_quick_sender_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Send a quicksend email Send a quicksend video email to the list or users provided.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    A guid id for the video.

  • :email_addresses (String)

    A semi-colon separated list of email addresses to send to.

  • :subject (String)

    Subject line for the email.

  • :message (String)

    Message for the body of the email.

  • :list_ids (String)

    An array of list ids

  • :scheduled_send_timestamp (Integer)

    When to schedule the send (seconds since epoch). null value means send immediately.

  • :extended_properties (String)

    Bool value that when checked will send back both emailId as well as extra properties

  • :template_id (String)

    Id of a template to use for this send. A null value means use the default for this user.

  • :strip_html (String)

    remove HTML elements

Returns:

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

    nil, response status code and response headers



629
630
631
632
633
634
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
# File 'lib/bombbomb/api/emails_api.rb', line 629

def video_quick_sender_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi.video_quick_sender ..."
  end
  # resource path
  local_var_path = "/emails/quicksend"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}
  form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil?
  form_params["emailAddresses"] = opts[:'email_addresses'] if !opts[:'email_addresses'].nil?
  form_params["subject"] = opts[:'subject'] if !opts[:'subject'].nil?
  form_params["message"] = opts[:'message'] if !opts[:'message'].nil?
  form_params["listIds"] = opts[:'list_ids'] if !opts[:'list_ids'].nil?
  form_params["scheduledSendTimestamp"] = opts[:'scheduled_send_timestamp'] if !opts[:'scheduled_send_timestamp'].nil?
  form_params["extendedProperties"] = opts[:'extended_properties'] if !opts[:'extended_properties'].nil?
  form_params["templateId"] = opts[:'template_id'] if !opts[:'template_id'].nil?
  form_params["stripHTML"] = opts[:'strip_html'] if !opts[:'strip_html'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#video_quick_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end