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.



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

def api_client
  @api_client
end

Instance Method Details

#create_prompt_bot(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:

  • 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):

  • :list_id (String)

    The list id to attach the bot to.

  • :video_id (String)

    The video used in the email.

  • :end_date (String)

    The time frame to complete sending to the list.

Returns:



37
38
39
40
# File 'lib/bombbomb/api/prompts_api.rb', line 37

def create_prompt_bot(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(email_id, name, subject, content, contact_field_value_column, bot_type_id, template_id, opts)
  return data
end

#create_prompt_bot_with_http_info(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:

  • 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):

  • :list_id (String)

    The list id to attach the bot to.

  • :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



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

def create_prompt_bot_with_http_info(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 'email_id' is set
  if @api_client.config.client_side_validation && email_id.nil?
    fail ArgumentError, "Missing the required parameter 'email_id' when calling PromptsApi.create_prompt_bot"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PromptsApi.create_prompt_bot"
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling PromptsApi.create_prompt_bot"
  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 PromptsApi.create_prompt_bot"
  end
  # verify the required parameter 'contact_field_value_column' is set
  if @api_client.config.client_side_validation && contact_field_value_column.nil?
    fail ArgumentError, "Missing the required parameter 'contact_field_value_column' when calling PromptsApi.create_prompt_bot"
  end
  # verify the required parameter 'bot_type_id' is set
  if @api_client.config.client_side_validation && bot_type_id.nil?
    fail ArgumentError, "Missing the required parameter 'bot_type_id' when calling PromptsApi.create_prompt_bot"
  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 PromptsApi.create_prompt_bot"
  end
  # resource path
  local_var_path = "/prompts/bots"

  # 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["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["listId"] = opts[:'list_id'] if !opts[:'list_id'].nil?
  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:



135
136
137
138
# File 'lib/bombbomb/api/prompts_api.rb', line 135

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



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

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
  if @api_client.config.client_side_validation && prompt.nil?
    fail ArgumentError, "Missing the required parameter 'prompt' when calling PromptsApi.create_video_email_prompt"
  end
  # resource path
  local_var_path = "/prompt"

  # 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/json'])

  # 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_alternate_campaign_content(client_group_id, opts = {}) ⇒ nil

List alternate campaign content Returns a list of alternate campaign content by campaign id

Parameters:

  • client_group_id

    Id for the campaign

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

    the optional parameters

Returns:

  • (nil)


190
191
192
193
# File 'lib/bombbomb/api/prompts_api.rb', line 190

def get_alternate_campaign_content(client_group_id, opts = {})
  get_alternate_campaign_content_with_http_info(client_group_id, opts)
  return nil
end

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

List alternate campaign content Returns a list of alternate campaign content by campaign id

Parameters:

  • client_group_id

    Id for the campaign

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def get_alternate_campaign_content_with_http_info(client_group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.get_alternate_campaign_content ..."
  end
  # verify the required parameter 'client_group_id' is set
  if @api_client.config.client_side_validation && client_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_group_id' when calling PromptsApi.get_alternate_campaign_content"
  end
  # resource path
  local_var_path = "/campaign/{campaignId}/content/alternate"

  # query parameters
  query_params = {}
  query_params[:'clientGroupId'] = client_group_id

  # 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: PromptsApi#get_alternate_campaign_content\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:



244
245
246
247
# File 'lib/bombbomb/api/prompts_api.rb', line 244

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



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

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"

  # 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,
    :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:



293
294
295
296
# File 'lib/bombbomb/api/prompts_api.rb', line 293

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



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/bombbomb/api/prompts_api.rb', line 302

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"

  # 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,
    :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)


342
343
344
345
# File 'lib/bombbomb/api/prompts_api.rb', line 342

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



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/bombbomb/api/prompts_api.rb', line 351

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/{userId}/campaigns"

  # 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: 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:



391
392
393
394
# File 'lib/bombbomb/api/prompts_api.rb', line 391

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



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
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/bombbomb/api/prompts_api.rb', line 401

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
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.get_video_email_prompt"
  end
  # resource path
  local_var_path = "/prompt/{id}".sub('{' + 'id' + '}', id.to_s)

  # 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,
    :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:



445
446
447
448
# File 'lib/bombbomb/api/prompts_api.rb', line 445

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



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

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/"

  # 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,
    :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:



499
500
501
502
# File 'lib/bombbomb/api/prompts_api.rb', line 499

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



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
554
555
556
557
558
559
560
561
562
563
# File 'lib/bombbomb/api/prompts_api.rb', line 513

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
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.respond_to_video_email_prompt"
  end
  # verify the required parameter 'choice' is set
  if @api_client.config.client_side_validation && choice.nil?
    fail ArgumentError, "Missing the required parameter 'choice' when calling PromptsApi.respond_to_video_email_prompt"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['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('{' + 'id' + '}', id.to_s)

  # 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["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

#send_prompt_immediately(id, opts = {}) ⇒ nil

Ignore send date and send the prompt now.

Parameters:

  • id

    The Id of the prompt

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

    the optional parameters

Returns:

  • (nil)


570
571
572
573
# File 'lib/bombbomb/api/prompts_api.rb', line 570

def send_prompt_immediately(id, opts = {})
  send_prompt_immediately_with_http_info(id, opts)
  return nil
end

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

Ignore send date and send the prompt now.

Parameters:

  • id

    The Id of the prompt

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

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

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

#sync_prompt_subscriptions(opts = {}) ⇒ nil

Syncs Campaigns and One to Ones Subscriptions for User Syncs Campaigns and One to Ones Subscriptions for User based on their profile information. The user must be a Prompt Subscriber.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :migrate (BOOLEAN)

    After syncing, migrate away from old campaigns.

Returns:

  • (nil)


624
625
626
627
# File 'lib/bombbomb/api/prompts_api.rb', line 624

def sync_prompt_subscriptions(opts = {})
  sync_prompt_subscriptions_with_http_info(opts)
  return nil
end

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

Syncs Campaigns and One to Ones Subscriptions for User Syncs Campaigns and One to Ones Subscriptions for User based on their profile information. The user must be a Prompt Subscriber.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :migrate (BOOLEAN)

    After syncing, migrate away from old campaigns.

Returns:

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

    nil, response status code and response headers



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

def sync_prompt_subscriptions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.sync_prompt_subscriptions ..."
  end
  # resource path
  local_var_path = "/prompts/campaigns/sync"

  # 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["migrate"] = opts[:'migrate'] if !opts[:'migrate'].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: PromptsApi#sync_prompt_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_prompt(id, opts = {}) ⇒ nil

Update Prompt Updates a Prompt

Parameters:

  • id

    The prompt&#39;s id

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

    the optional parameters

Options Hash (opts):

  • :send_mechanism (String)

    The mechanism for the prompt to be sent

  • :facebook_message (String)

    The facebook message assigned to the prompt

  • :twitter_message (String)

    The twitter message assigned to the prompt

  • :video_id (String)

    The id of the video.

  • :email_id (String)

    The id of the email.

  • :subject (String)

    The subject of the email

  • :reset_cache (String)

    The subject of the email

  • :reset_email_content (String)

    The subject of the email

  • :status (String)

    The status of the prompt

Returns:

  • (nil)


684
685
686
687
# File 'lib/bombbomb/api/prompts_api.rb', line 684

def update_prompt(id, opts = {})
  update_prompt_with_http_info(id, opts)
  return nil
end

#update_prompt_bot(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.

  • 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):

  • :list_id (String)

    The list id to attach the bot to.

  • :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:



766
767
768
769
# File 'lib/bombbomb/api/prompts_api.rb', line 766

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

#update_prompt_bot_with_http_info(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.

  • 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):

  • :list_id (String)

    The list id to attach the bot to.

  • :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



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
# File 'lib/bombbomb/api/prompts_api.rb', line 786

def update_prompt_bot_with_http_info(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
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.update_prompt_bot"
  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 PromptsApi.update_prompt_bot"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PromptsApi.update_prompt_bot"
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling PromptsApi.update_prompt_bot"
  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 PromptsApi.update_prompt_bot"
  end
  # verify the required parameter 'contact_field_value_column' is set
  if @api_client.config.client_side_validation && contact_field_value_column.nil?
    fail ArgumentError, "Missing the required parameter 'contact_field_value_column' when calling PromptsApi.update_prompt_bot"
  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 PromptsApi.update_prompt_bot"
  end
  # resource path
  local_var_path = "/prompts/bots/{id}".sub('{' + 'id' + '}', id.to_s)

  # 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["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["listId"] = opts[:'list_id'] if !opts[:'list_id'].nil?
  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.

  • :send_mechanism (String)

    The way to send the prompt

Returns:

  • (nil)


869
870
871
872
# File 'lib/bombbomb/api/prompts_api.rb', line 869

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.

  • :send_mechanism (String)

    The way to send the prompt

Returns:

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

    nil, response status code and response headers



883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'lib/bombbomb/api/prompts_api.rb', line 883

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
  if @api_client.config.client_side_validation && client_group_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_group_id' when calling PromptsApi.update_prompt_campaign"
  end
  # resource path
  local_var_path = "/prompts/campaigns/{clientGroupId}".sub('{' + 'clientGroupId' + '}', client_group_id.to_s)

  # 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["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["sendMechanism"] = opts[:'send_mechanism'] if !opts[:'send_mechanism'].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

#update_prompt_template(id, alternate_content_id, new_email_id, og_email_id, new_example_video_id, opts = {}) ⇒ nil

Update Prompt Content Updates a Prompt Content

Parameters:

  • id

    The prompt&#39;s id

  • alternate_content_id

    The alternate content id

  • new_email_id

    The prompt&#39;s new email id

  • og_email_id

    The prompt&#39;s original email id

  • new_example_video_id

    The prompt&#39;s new tutorial video id

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

    the optional parameters

Returns:

  • (nil)


935
936
937
938
# File 'lib/bombbomb/api/prompts_api.rb', line 935

def update_prompt_template(id, alternate_content_id, new_email_id, og_email_id, new_example_video_id, opts = {})
  update_prompt_template_with_http_info(id, alternate_content_id, new_email_id, og_email_id, new_example_video_id, opts)
  return nil
end

#update_prompt_template_with_http_info(id, alternate_content_id, new_email_id, og_email_id, new_example_video_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update Prompt Content Updates a Prompt Content

Parameters:

  • id

    The prompt&#39;s id

  • alternate_content_id

    The alternate content id

  • new_email_id

    The prompt&#39;s new email id

  • og_email_id

    The prompt&#39;s original email id

  • new_example_video_id

    The prompt&#39;s new tutorial video id

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
# File 'lib/bombbomb/api/prompts_api.rb', line 949

def update_prompt_template_with_http_info(id, alternate_content_id, new_email_id, og_email_id, new_example_video_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PromptsApi.update_prompt_template ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.update_prompt_template"
  end
  # verify the required parameter 'alternate_content_id' is set
  if @api_client.config.client_side_validation && alternate_content_id.nil?
    fail ArgumentError, "Missing the required parameter 'alternate_content_id' when calling PromptsApi.update_prompt_template"
  end
  # verify the required parameter 'new_email_id' is set
  if @api_client.config.client_side_validation && new_email_id.nil?
    fail ArgumentError, "Missing the required parameter 'new_email_id' when calling PromptsApi.update_prompt_template"
  end
  # verify the required parameter 'og_email_id' is set
  if @api_client.config.client_side_validation && og_email_id.nil?
    fail ArgumentError, "Missing the required parameter 'og_email_id' when calling PromptsApi.update_prompt_template"
  end
  # verify the required parameter 'new_example_video_id' is set
  if @api_client.config.client_side_validation && new_example_video_id.nil?
    fail ArgumentError, "Missing the required parameter 'new_example_video_id' when calling PromptsApi.update_prompt_template"
  end
  # resource path
  local_var_path = "/prompts/{id}/content".sub('{' + 'id' + '}', id.to_s)

  # 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["alternateContentId"] = alternate_content_id
  form_params["newEmailId"] = new_email_id
  form_params["ogEmailId"] = og_email_id
  form_params["newExampleVideoId"] = new_example_video_id

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

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

Update Prompt Updates a Prompt

Parameters:

  • id

    The prompt&#39;s id

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

    the optional parameters

Options Hash (opts):

  • :send_mechanism (String)

    The mechanism for the prompt to be sent

  • :facebook_message (String)

    The facebook message assigned to the prompt

  • :twitter_message (String)

    The twitter message assigned to the prompt

  • :video_id (String)

    The id of the video.

  • :email_id (String)

    The id of the email.

  • :subject (String)

    The subject of the email

  • :reset_cache (String)

    The subject of the email

  • :reset_email_content (String)

    The subject of the email

  • :status (String)

    The status of the prompt

Returns:

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

    nil, response status code and response headers



703
704
705
706
707
708
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
# File 'lib/bombbomb/api/prompts_api.rb', line 703

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

  # 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["sendMechanism"] = opts[:'send_mechanism'] if !opts[:'send_mechanism'].nil?
  form_params["facebookMessage"] = opts[:'facebook_message'] if !opts[:'facebook_message'].nil?
  form_params["twitterMessage"] = opts[:'twitter_message'] if !opts[:'twitter_message'].nil?
  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?
  form_params["resetCache"] = opts[:'reset_cache'] if !opts[:'reset_cache'].nil?
  form_params["resetEmailContent"] = opts[:'reset_email_content'] if !opts[:'reset_email_content'].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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PromptsApi#update_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end