Class: ClickSendClient::VoiceApi

Inherits:
Object
  • Object
show all
Defined in:
lib/clicksend_client/api/voice_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VoiceApi

Returns a new instance of VoiceApi.



19
20
21
# File 'lib/clicksend_client/api/voice_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/clicksend_client/api/voice_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#voice_cancel_all_put(opts = {}) ⇒ String

Update all voice messages as cancelled Update all voice messages as cancelled

Parameters:

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

    the optional parameters

Returns:

  • (String)


26
27
28
29
# File 'lib/clicksend_client/api/voice_api.rb', line 26

def voice_cancel_all_put(opts = {})
  data, _status_code, _headers = voice_cancel_all_put_with_http_info(opts)
  data
end

#voice_cancel_all_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Update all voice messages as cancelled Update all voice messages as cancelled

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/clicksend_client/api/voice_api.rb', line 35

def voice_cancel_all_put_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_cancel_all_put ...'
  end
  # resource path
  local_var_path = '/voice/cancel-all'

  # 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 = nil
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_cancel_all_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#voice_cancel_by_message_id_put(message_id, opts = {}) ⇒ String

Update voice message status as cancelled Update voice message status as cancelled

Parameters:

  • message_id

    Your voice message id

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

    the optional parameters

Returns:

  • (String)


75
76
77
78
# File 'lib/clicksend_client/api/voice_api.rb', line 75

def voice_cancel_by_message_id_put(message_id, opts = {})
  data, _status_code, _headers = voice_cancel_by_message_id_put_with_http_info(message_id, opts)
  data
end

#voice_cancel_by_message_id_put_with_http_info(message_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Update voice message status as cancelled Update voice message status as cancelled

Parameters:

  • message_id

    Your voice message id

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
# File 'lib/clicksend_client/api/voice_api.rb', line 85

def voice_cancel_by_message_id_put_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_cancel_by_message_id_put ...'
  end
  # verify the required parameter 'message_id' is set
  if @api_client.config.client_side_validation && message_id.nil?
    fail ArgumentError, "Missing the required parameter 'message_id' when calling VoiceApi.voice_cancel_by_message_id_put"
  end
  # resource path
  local_var_path = '/voice/{message_id}/cancel'.sub('{' + 'message_id' + '}', message_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/json'])

  # form parameters
  form_params = {}

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

#voice_history_export_get(filename, opts = {}) ⇒ String

Export voice history Export voice history

Parameters:

  • filename

    Filename to export to

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

    the optional parameters

Returns:

  • (String)


129
130
131
132
# File 'lib/clicksend_client/api/voice_api.rb', line 129

def voice_history_export_get(filename, opts = {})
  data, _status_code, _headers = voice_history_export_get_with_http_info(filename, opts)
  data
end

#voice_history_export_get_with_http_info(filename, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Export voice history Export voice history

Parameters:

  • filename

    Filename to export to

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



139
140
141
142
143
144
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
# File 'lib/clicksend_client/api/voice_api.rb', line 139

def voice_history_export_get_with_http_info(filename, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_history_export_get ...'
  end
  # verify the required parameter 'filename' is set
  if @api_client.config.client_side_validation && filename.nil?
    fail ArgumentError, "Missing the required parameter 'filename' when calling VoiceApi.voice_history_export_get"
  end
  # resource path
  local_var_path = '/voice/history/export'

  # query parameters
  query_params = {}
  query_params[:'filename'] = filename

  # 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 = nil
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_history_export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#voice_history_get(opts = {}) ⇒ String

Get all voice history Get all voice history

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :date_from (Integer)

    Timestamp (from) used to show records by date.

  • :date_to (Integer)

    Timestamp (to) used to show records by date

  • :page (Integer)

    Page number (default to 1)

  • :limit (Integer)

    Number of records per page (default to 10)

Returns:

  • (String)


187
188
189
190
# File 'lib/clicksend_client/api/voice_api.rb', line 187

def voice_history_get(opts = {})
  data, _status_code, _headers = voice_history_get_with_http_info(opts)
  data
end

#voice_history_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get all voice history Get all voice history

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :date_from (Integer)

    Timestamp (from) used to show records by date.

  • :date_to (Integer)

    Timestamp (to) used to show records by date

  • :page (Integer)

    Page number

  • :limit (Integer)

    Number of records per page

Returns:

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

    String data, 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
239
240
241
242
243
244
245
246
# File 'lib/clicksend_client/api/voice_api.rb', line 200

def voice_history_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_history_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VoiceApi.voice_history_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VoiceApi.voice_history_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/voice/history'

  # query parameters
  query_params = {}
  query_params[:'date_from'] = opts[:'date_from'] if !opts[:'date_from'].nil?
  query_params[:'date_to'] = opts[:'date_to'] if !opts[:'date_to'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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/json'])

  # form parameters
  form_params = {}

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

#voice_lang_get(opts = {}) ⇒ String

Get all voice languages Get all voice languages

Parameters:

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

    the optional parameters

Returns:

  • (String)


251
252
253
254
# File 'lib/clicksend_client/api/voice_api.rb', line 251

def voice_lang_get(opts = {})
  data, _status_code, _headers = voice_lang_get_with_http_info(opts)
  data
end

#voice_lang_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get all voice languages Get all voice languages

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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/clicksend_client/api/voice_api.rb', line 260

def voice_lang_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_lang_get ...'
  end
  # resource path
  local_var_path = '/voice/lang'

  # 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 = nil
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_lang_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#voice_price_post(voice_messages, opts = {}) ⇒ String

Calculate voice price Calculate voice price

Parameters:

  • voice_messages

    VoiceMessageCollection model

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

    the optional parameters

Returns:

  • (String)


300
301
302
303
# File 'lib/clicksend_client/api/voice_api.rb', line 300

def voice_price_post(voice_messages, opts = {})
  data, _status_code, _headers = voice_price_post_with_http_info(voice_messages, opts)
  data
end

#voice_price_post_with_http_info(voice_messages, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Calculate voice price Calculate voice price

Parameters:

  • voice_messages

    VoiceMessageCollection model

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/clicksend_client/api/voice_api.rb', line 310

def voice_price_post_with_http_info(voice_messages, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_price_post ...'
  end
  # verify the required parameter 'voice_messages' is set
  if @api_client.config.client_side_validation && voice_messages.nil?
    fail ArgumentError, "Missing the required parameter 'voice_messages' when calling VoiceApi.voice_price_post"
  end
  # resource path
  local_var_path = '/voice/price'

  # 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(voice_messages)
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_price_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#voice_receipts_get(opts = {}) ⇒ String

Get all delivery receipts Get all delivery receipts

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number (default to 1)

  • :limit (Integer)

    Number of records per page (default to 10)

Returns:

  • (String)


355
356
357
358
# File 'lib/clicksend_client/api/voice_api.rb', line 355

def voice_receipts_get(opts = {})
  data, _status_code, _headers = voice_receipts_get_with_http_info(opts)
  data
end

#voice_receipts_get_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get all delivery receipts Get all delivery receipts

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number

  • :limit (Integer)

    Number of records per page

Returns:

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

    String data, response status code and response headers



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
404
405
406
407
408
409
410
# File 'lib/clicksend_client/api/voice_api.rb', line 366

def voice_receipts_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_receipts_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VoiceApi.voice_receipts_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VoiceApi.voice_receipts_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/voice/receipts'

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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/json'])

  # form parameters
  form_params = {}

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

#voice_receipts_post(url, opts = {}) ⇒ String

Add a delivery receipt Add a delivery receipt

Parameters:

  • url

    Url model

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

    the optional parameters

Returns:

  • (String)


416
417
418
419
# File 'lib/clicksend_client/api/voice_api.rb', line 416

def voice_receipts_post(url, opts = {})
  data, _status_code, _headers = voice_receipts_post_with_http_info(url, opts)
  data
end

#voice_receipts_post_with_http_info(url, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Add a delivery receipt Add a delivery receipt

Parameters:

  • url

    Url model

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
457
458
459
460
461
462
463
464
# File 'lib/clicksend_client/api/voice_api.rb', line 426

def voice_receipts_post_with_http_info(url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_receipts_post ...'
  end
  # verify the required parameter 'url' is set
  if @api_client.config.client_side_validation && url.nil?
    fail ArgumentError, "Missing the required parameter 'url' when calling VoiceApi.voice_receipts_post"
  end
  # resource path
  local_var_path = '/voice/receipts'

  # 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(url)
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_receipts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#voice_receipts_read_put(opts = {}) ⇒ String

Mark delivery receipts as read Mark delivery receipts as read

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (String)


470
471
472
473
# File 'lib/clicksend_client/api/voice_api.rb', line 470

def voice_receipts_read_put(opts = {})
  data, _status_code, _headers = voice_receipts_read_put_with_http_info(opts)
  data
end

#voice_receipts_read_put_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Mark delivery receipts as read Mark delivery receipts as read

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    String data, response status code and response headers



480
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
# File 'lib/clicksend_client/api/voice_api.rb', line 480

def voice_receipts_read_put_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_receipts_read_put ...'
  end
  # resource path
  local_var_path = '/voice/receipts-read'

  # 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(opts[:'date_before'])
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_receipts_read_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#voice_send_post(voice_messages, opts = {}) ⇒ String

Send voice message(s) Send a voice call

Parameters:

  • voice_messages

    VoiceMessageCollection model

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

    the optional parameters

Returns:

  • (String)


520
521
522
523
# File 'lib/clicksend_client/api/voice_api.rb', line 520

def voice_send_post(voice_messages, opts = {})
  data, _status_code, _headers = voice_send_post_with_http_info(voice_messages, opts)
  data
end

#voice_send_post_with_http_info(voice_messages, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Send voice message(s) Send a voice call

Parameters:

  • voice_messages

    VoiceMessageCollection model

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
564
565
566
567
568
# File 'lib/clicksend_client/api/voice_api.rb', line 530

def voice_send_post_with_http_info(voice_messages, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VoiceApi.voice_send_post ...'
  end
  # verify the required parameter 'voice_messages' is set
  if @api_client.config.client_side_validation && voice_messages.nil?
    fail ArgumentError, "Missing the required parameter 'voice_messages' when calling VoiceApi.voice_send_post"
  end
  # resource path
  local_var_path = '/voice/send'

  # 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(voice_messages)
  auth_names = ['BasicAuth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VoiceApi#voice_send_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end