Class: BombBomb::PromptsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PromptsApi

Returns a new instance of PromptsApi.



30
31
32
# File 'lib/bombbomb/api/prompts_api.rb', line 30

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



28
29
30
# File 'lib/bombbomb/api/prompts_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#create_prompt_bot(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, opts = {}) ⇒ PromptBot

Create a running Prompt Bot for a list Creates a Prompt Bot that sends emails to contacts on a list over the span of time defined.

Parameters:

  • list_id

    The list id to attach the bot to.

  • email_id

    The default email to use.

  • name

    The name of the bot.

  • subject

    The subject of the default email.

  • content

    The content used in the email.

  • contact_field_value_column

    The custom field value column with dates for this bot.

  • bot_type_id

    The type of bot to create.

  • template_id

    The template used to create the email id.

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    The video used in the email.

  • :end_date (String)

    The time frame to complete sending to the list.

Returns:



48
49
50
51
# File 'lib/bombbomb/api/prompts_api.rb', line 48

def create_prompt_bot(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, opts = {})
  data, _status_code, _headers = create_prompt_bot_with_http_info(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, opts)
  return data
end

#create_prompt_bot_with_http_info(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, opts = {}) ⇒ Array<(PromptBot, Fixnum, Hash)>

Create a running Prompt Bot for a list Creates a Prompt Bot that sends emails to contacts on a list over the span of time defined.

Parameters:

  • list_id

    The list id to attach the bot to.

  • email_id

    The default email to use.

  • name

    The name of the bot.

  • subject

    The subject of the default email.

  • content

    The content used in the email.

  • contact_field_value_column

    The custom field value column with dates for this bot.

  • bot_type_id

    The type of bot to create.

  • template_id

    The template used to create the email id.

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    The video used in the email.

  • :end_date (String)

    The time frame to complete sending to the list.

Returns:

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

    PromptBot data, response status code and response headers



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
93
94
95
96
97
98
99
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
# File 'lib/bombbomb/api/prompts_api.rb', line 67

def create_prompt_bot_with_http_info(list_id, email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.create_prompt_bot ..."
  end
  # verify the required parameter 'list_id' is set
  fail ArgumentError, "Missing the required parameter 'list_id' when calling PromptsApi.create_prompt_bot" if list_id.nil?
  # verify the required parameter 'email_id' is set
  fail ArgumentError, "Missing the required parameter 'email_id' when calling PromptsApi.create_prompt_bot" if email_id.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling PromptsApi.create_prompt_bot" if name.nil?
  # verify the required parameter 'subject' is set
  fail ArgumentError, "Missing the required parameter 'subject' when calling PromptsApi.create_prompt_bot" if subject.nil?
  # verify the required parameter 'content' is set
  fail ArgumentError, "Missing the required parameter 'content' when calling PromptsApi.create_prompt_bot" if content.nil?
  # verify the required parameter 'contact_field_value_column' is set
  fail ArgumentError, "Missing the required parameter 'contact_field_value_column' when calling PromptsApi.create_prompt_bot" if contact_field_value_column.nil?
  # verify the required parameter 'bot_type_id' is set
  fail ArgumentError, "Missing the required parameter 'bot_type_id' when calling PromptsApi.create_prompt_bot" if bot_type_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling PromptsApi.create_prompt_bot" if template_id.nil?
  # resource path
  local_var_path = "/prompts/bots".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["listId"] = list_id
  form_params["emailId"] = email_id
  form_params["name"] = name
  form_params["subject"] = subject
  form_params["content"] = content
  form_params["contactFieldValueColumn"] = contact_field_value_column
  form_params["botTypeId"] = bot_type_id
  form_params["templateId"] = template_id
  form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil?
  form_params["endDate"] = opts[:'end_date'] if !opts[:'end_date'].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,
    :return_type => 'PromptBot')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#create_prompt_bot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_video_email_prompt(prompt, opts = {}) ⇒ VideoEmailPrompt

Prompts user to send a video Sends the account holder an email prompting them to add a video to a scheduled outgoing message. Recipients, content and timing is all preset for the user.

Parameters:

  • prompt

    The Video Email Prompt to be created

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

    the optional parameters

Returns:



138
139
140
141
# File 'lib/bombbomb/api/prompts_api.rb', line 138

def create_video_email_prompt(prompt, opts = {})
  data, _status_code, _headers = create_video_email_prompt_with_http_info(prompt, opts)
  return data
end

#create_video_email_prompt_with_http_info(prompt, opts = {}) ⇒ Array<(VideoEmailPrompt, Fixnum, Hash)>

Prompts user to send a video Sends the account holder an email prompting them to add a video to a scheduled outgoing message. Recipients, content and timing is all preset for the user.

Parameters:

  • prompt

    The Video Email Prompt to be created

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

    the optional parameters

Returns:

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

    VideoEmailPrompt data, response status code and response headers



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

def create_video_email_prompt_with_http_info(prompt, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.create_video_email_prompt ..."
  end
  # verify the required parameter 'prompt' is set
  fail ArgumentError, "Missing the required parameter 'prompt' when calling PromptsApi.create_video_email_prompt" if prompt.nil?
  # resource path
  local_var_path = "/prompt".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(prompt)
  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,
    :return_type => 'VideoEmailPrompt')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#create_video_email_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pending_video_email_prompts(opts = {}) ⇒ Array<VideoEmailPrompt>

List pending prompts Returns a list of prompts that have not been sent yet, and can still be customized.

Parameters:

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

    the optional parameters

Returns:



194
195
196
197
# File 'lib/bombbomb/api/prompts_api.rb', line 194

def get_pending_video_email_prompts(opts = {})
  data, _status_code, _headers = get_pending_video_email_prompts_with_http_info(opts)
  return data
end

#get_pending_video_email_prompts_with_http_info(opts = {}) ⇒ Array<(Array<VideoEmailPrompt>, Fixnum, Hash)>

List pending prompts Returns a list of prompts that have not been sent yet, and can still be customized.

Parameters:

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

    the optional parameters

Returns:

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

    Array<VideoEmailPrompt> data, response status code and response headers



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/bombbomb/api/prompts_api.rb', line 203

def get_pending_video_email_prompts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.get_pending_video_email_prompts ..."
  end
  # resource path
  local_var_path = "/prompt/pending".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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,
    :return_type => 'Array<VideoEmailPrompt>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#get_pending_video_email_prompts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_prompt_bots(opts = {}) ⇒ Array<PromptBot>

List Prompt Bots Returns a list of all Prompt Bots for the user.

Parameters:

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

    the optional parameters

Returns:



247
248
249
250
# File 'lib/bombbomb/api/prompts_api.rb', line 247

def get_prompt_bots(opts = {})
  data, _status_code, _headers = get_prompt_bots_with_http_info(opts)
  return data
end

#get_prompt_bots_with_http_info(opts = {}) ⇒ Array<(Array<PromptBot>, Fixnum, Hash)>

List Prompt Bots Returns a list of all Prompt Bots for the user.

Parameters:

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

    the optional parameters

Returns:

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

    Array<PromptBot> data, response status code and response headers



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
291
292
293
294
# File 'lib/bombbomb/api/prompts_api.rb', line 256

def get_prompt_bots_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.get_prompt_bots ..."
  end
  # resource path
  local_var_path = "/prompts/bots".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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,
    :return_type => 'Array<PromptBot>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#get_prompt_bots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_prompt_campaigns(opts = {}) ⇒ nil

List Prompt Campaigns Returns a list of all Prompt Campaigns for the user.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


300
301
302
303
# File 'lib/bombbomb/api/prompts_api.rb', line 300

def get_prompt_campaigns(opts = {})
  get_prompt_campaigns_with_http_info(opts)
  return nil
end

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

List Prompt Campaigns Returns a list of all Prompt Campaigns for the user.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def get_prompt_campaigns_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.get_prompt_campaigns ..."
  end
  # resource path
  local_var_path = "/prompts/campaigns".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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: PromptsApi#get_prompt_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_video_email_prompt(id, opts = {}) ⇒ VideoEmailPrompt

Gets a prompt Gets a prompt

Parameters:

  • id

    The Id of the prompt

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

    the optional parameters

Returns:



353
354
355
356
# File 'lib/bombbomb/api/prompts_api.rb', line 353

def get_video_email_prompt(id, opts = {})
  data, _status_code, _headers = get_video_email_prompt_with_http_info(id, opts)
  return data
end

#get_video_email_prompt_with_http_info(id, opts = {}) ⇒ Array<(VideoEmailPrompt, Fixnum, Hash)>

Gets a prompt Gets a prompt

Parameters:

  • id

    The Id of the prompt

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

    the optional parameters

Returns:

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

    VideoEmailPrompt data, response status code and response headers



363
364
365
366
367
368
369
370
371
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
# File 'lib/bombbomb/api/prompts_api.rb', line 363

def get_video_email_prompt_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.get_video_email_prompt ..."
  end
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.get_video_email_prompt" if id.nil?
  # resource path
  local_var_path = "/prompt/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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,
    :return_type => 'VideoEmailPrompt')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#get_video_email_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_video_email_prompts(opts = {}) ⇒ Array<VideoEmailPrompt>

List prompts Returns a list of all prompts.

Parameters:

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

    the optional parameters

Returns:



409
410
411
412
# File 'lib/bombbomb/api/prompts_api.rb', line 409

def get_video_email_prompts(opts = {})
  data, _status_code, _headers = get_video_email_prompts_with_http_info(opts)
  return data
end

#get_video_email_prompts_with_http_info(opts = {}) ⇒ Array<(Array<VideoEmailPrompt>, Fixnum, Hash)>

List prompts Returns a list of all prompts.

Parameters:

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

    the optional parameters

Returns:

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

    Array<VideoEmailPrompt> data, response status code and response headers



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/bombbomb/api/prompts_api.rb', line 418

def get_video_email_prompts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.get_video_email_prompts ..."
  end
  # resource path
  local_var_path = "/prompt/".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # 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,
    :return_type => 'Array<VideoEmailPrompt>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#get_video_email_prompts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#respond_to_video_email_prompt(id, choice, opts = {}) ⇒ VideoEmailPrompt

Respond to a prompt Respond to a prompt by either adding a video, sending without a video or cancelling the prompt.

Parameters:

  • id

    The id of the prompt.

  • choice

    The users&#39; selection. Can be: WithVideo, WithEmail, Cancel, Restore, Reset, Manual

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    The id of the video.

  • :email_id (String)

    The id of the email.

  • :subject (String)

    The subject of the email

Returns:



467
468
469
470
# File 'lib/bombbomb/api/prompts_api.rb', line 467

def respond_to_video_email_prompt(id, choice, opts = {})
  data, _status_code, _headers = respond_to_video_email_prompt_with_http_info(id, choice, opts)
  return data
end

#respond_to_video_email_prompt_with_http_info(id, choice, opts = {}) ⇒ Array<(VideoEmailPrompt, Fixnum, Hash)>

Respond to a prompt Respond to a prompt by either adding a video, sending without a video or cancelling the prompt.

Parameters:

  • id

    The id of the prompt.

  • choice

    The users&#39; selection. Can be: WithVideo, WithEmail, Cancel, Restore, Reset, Manual

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    The id of the video.

  • :email_id (String)

    The id of the email.

  • :subject (String)

    The subject of the email

Returns:

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

    VideoEmailPrompt data, response status code and response headers



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
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
# File 'lib/bombbomb/api/prompts_api.rb', line 481

def respond_to_video_email_prompt_with_http_info(id, choice, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.respond_to_video_email_prompt ..."
  end
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.respond_to_video_email_prompt" if id.nil?
  # verify the required parameter 'choice' is set
  fail ArgumentError, "Missing the required parameter 'choice' when calling PromptsApi.respond_to_video_email_prompt" if choice.nil?
  # verify enum value
  unless ['WithVideo', 'WithEmail', 'Cancel', 'Restore', 'Reset', 'Manual'].include?(choice)
    fail ArgumentError, "invalid value for 'choice', must be one of WithVideo, WithEmail, Cancel, Restore, Reset, Manual"
  end
  # resource path
  local_var_path = "/prompt/{id}/response".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["choice"] = choice
  form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil?
  form_params["emailId"] = opts[:'email_id'] if !opts[:'email_id'].nil?
  form_params["subject"] = opts[:'subject'] if !opts[:'subject'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  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,
    :return_type => 'VideoEmailPrompt')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#respond_to_video_email_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_prompt_bot(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, opts = {}) ⇒ PromptBot

Update Prompt Bot Updates a Prompt Bot’s settings.

Parameters:

  • id

    The bot id.

  • list_id

    The list id to attach the bot to.

  • email_id

    The default email to use.

  • name

    The name of the bot.

  • subject

    The subject of the default email.

  • content

    The content used in the default email.

  • contact_field_value_column

    The custom field value column with dates for this bot.

  • template_id

    The template used to create the email id.

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    The video used in the default email.

  • :end_date (String)

    The time frame to complete sending to the list.

  • :status (String)

    The status of the bot.

Returns:



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

def update_prompt_bot(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, opts = {})
  data, _status_code, _headers = update_prompt_bot_with_http_info(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, opts)
  return data
end

#update_prompt_bot_with_http_info(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, opts = {}) ⇒ Array<(PromptBot, Fixnum, Hash)>

Update Prompt Bot Updates a Prompt Bot&#39;s settings.

Parameters:

  • id

    The bot id.

  • list_id

    The list id to attach the bot to.

  • email_id

    The default email to use.

  • name

    The name of the bot.

  • subject

    The subject of the default email.

  • content

    The content used in the default email.

  • contact_field_value_column

    The custom field value column with dates for this bot.

  • template_id

    The template used to create the email id.

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

    the optional parameters

Options Hash (opts):

  • :video_id (String)

    The video used in the default email.

  • :end_date (String)

    The time frame to complete sending to the list.

  • :status (String)

    The status of the bot.

Returns:

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

    PromptBot data, response status code and response headers



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
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
# File 'lib/bombbomb/api/prompts_api.rb', line 568

def update_prompt_bot_with_http_info(id, list_id, email_id, name, subject, content, contact_field_value_column, template_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.update_prompt_bot ..."
  end
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.update_prompt_bot" if id.nil?
  # verify the required parameter 'list_id' is set
  fail ArgumentError, "Missing the required parameter 'list_id' when calling PromptsApi.update_prompt_bot" if list_id.nil?
  # verify the required parameter 'email_id' is set
  fail ArgumentError, "Missing the required parameter 'email_id' when calling PromptsApi.update_prompt_bot" if email_id.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling PromptsApi.update_prompt_bot" if name.nil?
  # verify the required parameter 'subject' is set
  fail ArgumentError, "Missing the required parameter 'subject' when calling PromptsApi.update_prompt_bot" if subject.nil?
  # verify the required parameter 'content' is set
  fail ArgumentError, "Missing the required parameter 'content' when calling PromptsApi.update_prompt_bot" if content.nil?
  # verify the required parameter 'contact_field_value_column' is set
  fail ArgumentError, "Missing the required parameter 'contact_field_value_column' when calling PromptsApi.update_prompt_bot" if contact_field_value_column.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling PromptsApi.update_prompt_bot" if template_id.nil?
  # resource path
  local_var_path = "/prompts/bots/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["listId"] = list_id
  form_params["emailId"] = email_id
  form_params["name"] = name
  form_params["subject"] = subject
  form_params["content"] = content
  form_params["contactFieldValueColumn"] = contact_field_value_column
  form_params["templateId"] = template_id
  form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil?
  form_params["endDate"] = opts[:'end_date'] if !opts[:'end_date'].nil?
  form_params["status"] = opts[:'status'] if !opts[:'status'].nil?

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

#update_prompt_campaign(client_group_id, opts = {}) ⇒ nil

Update Prompt Campaign Updates a Prompt Campaign’s Settings

Parameters:

  • client_group_id

    The client group of the campaign.

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

    the optional parameters

Options Hash (opts):

  • :branded_template_id (String)

    The template to use for branded feel emails.

  • :personal_template_id (String)

    The template to use for personal feel emails.

  • :enabled (BOOLEAN)

    Set whether the user is able to start receiving prompts.

  • :auto_shares (String)

    These are what we are autosharing to

Returns:

  • (nil)


643
644
645
646
# File 'lib/bombbomb/api/prompts_api.rb', line 643

def update_prompt_campaign(client_group_id, opts = {})
  update_prompt_campaign_with_http_info(client_group_id, opts)
  return nil
end

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

Update Prompt Campaign Updates a Prompt Campaign&#39;s Settings

Parameters:

  • client_group_id

    The client group of the campaign.

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

    the optional parameters

Options Hash (opts):

  • :branded_template_id (String)

    The template to use for branded feel emails.

  • :personal_template_id (String)

    The template to use for personal feel emails.

  • :enabled (BOOLEAN)

    Set whether the user is able to start receiving prompts.

  • :auto_shares (String)

    These are what we are autosharing to

Returns:

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

    nil, response status code and response headers



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
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/bombbomb/api/prompts_api.rb', line 657

def update_prompt_campaign_with_http_info(client_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.update_prompt_campaign ..."
  end
  # verify the required parameter 'client_group_id' is set
  fail ArgumentError, "Missing the required parameter 'client_group_id' when calling PromptsApi.update_prompt_campaign" if client_group_id.nil?
  # resource path
  local_var_path = "/prompts/campaigns/{id}".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["clientGroupId"] = client_group_id
  form_params["brandedTemplateId"] = opts[:'branded_template_id'] if !opts[:'branded_template_id'].nil?
  form_params["personalTemplateId"] = opts[:'personal_template_id'] if !opts[:'personal_template_id'].nil?
  form_params["enabled"] = opts[:'enabled'] if !opts[:'enabled'].nil?
  form_params["autoShares"] = opts[:'auto_shares'] if !opts[:'auto_shares'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['BBOAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, 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: PromptsApi#update_prompt_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end