freeclimb 4.4.4 → 4.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,380 @@
1
+ =begin
2
+ #FreeClimb API
3
+
4
+ #FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@freeclimb.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Freeclimb::TranscribeUtterance
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Freeclimb::TranscribeUtterance do
21
+ let(:instance) { Freeclimb::TranscribeUtterance.new }
22
+
23
+ describe 'test an instance of TranscribeUtterance' do
24
+ it 'should create an instance of TranscribeUtterance' do
25
+ expect(instance).to be_instance_of(Freeclimb::TranscribeUtterance)
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "action_url"' do
30
+ it 'should work' do
31
+ instance.action_url = "TEST_STRING"
32
+ expect(instance.action_url).to eq("TEST_STRING")
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "play_beep"' do
37
+ it 'should work' do
38
+ instance.play_beep = false
39
+ expect(instance.play_beep).to eq(false)
40
+ end
41
+ end
42
+
43
+ describe 'test attribute "record"' do
44
+ it 'should work' do
45
+ instance.record = Freeclimb::TranscribeUtteranceRecord.new(
46
+ save_recording: true,
47
+ max_length_sec: 1,
48
+ rcrd_termination_silence_time_ms: 1,
49
+ )
50
+ expect(instance.record).to be_instance_of(Freeclimb::TranscribeUtteranceRecord)
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "privacy_for_logging"' do
55
+ it 'should work' do
56
+ instance.privacy_for_logging = false
57
+ expect(instance.privacy_for_logging).to eq(false)
58
+ end
59
+ end
60
+
61
+ describe 'test attribute "privacy_for_recording"' do
62
+ it 'should work' do
63
+ instance.privacy_for_recording = false
64
+ expect(instance.privacy_for_recording).to eq(false)
65
+ end
66
+ end
67
+
68
+ describe 'test attribute "prompts"' do
69
+ it 'should work' do
70
+ instance.prompts = ["ELEMENT_1", "ELEMENT_2"]
71
+ expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"])
72
+ end
73
+ end
74
+
75
+ describe 'test method "initialize"' do
76
+ it 'properly initializes with values' do
77
+ expect{instance = Freeclimb::TranscribeUtterance.new(
78
+ action_url: "TS",
79
+ play_beep: true,
80
+ record: Freeclimb::TranscribeUtteranceRecord.new(
81
+ save_recording: true,
82
+ max_length_sec: 1,
83
+ rcrd_termination_silence_time_ms: 1,
84
+ ),
85
+ privacy_for_logging: true,
86
+ privacy_for_recording: true,
87
+ prompts: Array.new(),
88
+ )}.not_to raise_error()
89
+ end
90
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::TranscribeUtterance' do
91
+ expect{instance = Freeclimb::TranscribeUtterance.new(
92
+ action_url: "TS",
93
+ play_beep: true,
94
+ record: Freeclimb::TranscribeUtteranceRecord.new(
95
+ save_recording: true,
96
+ max_length_sec: 1,
97
+ rcrd_termination_silence_time_ms: 1,
98
+ ),
99
+ privacy_for_logging: true,
100
+ privacy_for_recording: true,
101
+ prompts: Array.new(),
102
+ invalid_attribute: true
103
+ )}.to raise_error(ArgumentError)
104
+ end
105
+ it 'fails to initialize with invalid attribute' do
106
+ expect{instance = Freeclimb::TranscribeUtterance.new(
107
+ action_url: "TS",
108
+ play_beep: true,
109
+ record: Freeclimb::TranscribeUtteranceRecord.new(
110
+ save_recording: true,
111
+ max_length_sec: 1,
112
+ rcrd_termination_silence_time_ms: 1,
113
+ ),
114
+ privacy_for_logging: true,
115
+ privacy_for_recording: true,
116
+ prompts: Array.new(),
117
+ invalid_attribute: true
118
+ )}.to raise_error(ArgumentError)
119
+ end
120
+ end
121
+
122
+ describe 'test method "valid"' do
123
+ it 'checks if properties are valid' do
124
+ instance = Freeclimb::TranscribeUtterance.new(
125
+ action_url: "TS",
126
+ play_beep: true,
127
+ record: Freeclimb::TranscribeUtteranceRecord.new(
128
+ save_recording: true,
129
+ max_length_sec: 1,
130
+ rcrd_termination_silence_time_ms: 1,
131
+ ),
132
+ privacy_for_logging: true,
133
+ privacy_for_recording: true,
134
+ prompts: Array.new(),
135
+ )
136
+ expect(instance.valid?).to eq(true)
137
+ end
138
+ it 'checks if properties are invalid' do
139
+ instance = Freeclimb::TranscribeUtterance.new(
140
+ action_url: nil,
141
+ )
142
+ expect(instance.valid?).to eq(false)
143
+ end
144
+ it 'checks if model is empty' do
145
+ instance = Freeclimb::TranscribeUtterance.new()
146
+ expect(instance.valid?).to eq(false)
147
+ end
148
+ end
149
+
150
+ describe 'test method "eql?"' do
151
+ it 'checks if objects are equal' do
152
+ obj = Object.new()
153
+ instance_1 = Freeclimb::TranscribeUtterance.new(
154
+ action_url: "TS",
155
+ play_beep: true,
156
+ record: Freeclimb::TranscribeUtteranceRecord.new(
157
+ save_recording: true,
158
+ max_length_sec: 1,
159
+ rcrd_termination_silence_time_ms: 1,
160
+ ),
161
+ privacy_for_logging: true,
162
+ privacy_for_recording: true,
163
+ prompts: [],
164
+ )
165
+ instance_2 = Freeclimb::TranscribeUtterance.new(
166
+ action_url: "TS",
167
+ play_beep: true,
168
+ record: Freeclimb::TranscribeUtteranceRecord.new(
169
+ save_recording: true,
170
+ max_length_sec: 1,
171
+ rcrd_termination_silence_time_ms: 1,
172
+ ),
173
+ privacy_for_logging: true,
174
+ privacy_for_recording: true,
175
+ prompts: [],
176
+ )
177
+ expect(instance_1.eql?(instance_2)).to eq(true)
178
+ end
179
+ it 'checks if objects are not equal' do
180
+ instance_1 = Freeclimb::TranscribeUtterance.new(
181
+ action_url: "TS",
182
+ play_beep: true,
183
+ record: Freeclimb::TranscribeUtteranceRecord.new(
184
+ save_recording: true,
185
+ max_length_sec: 2,
186
+ rcrd_termination_silence_time_ms: 2,
187
+ ),
188
+ privacy_for_logging: true,
189
+ privacy_for_recording: true,
190
+ prompts: [],
191
+ )
192
+ instance_2 = Freeclimb::TranscribeUtterance.new(
193
+ action_url: "ST",
194
+ play_beep: false,
195
+ record: Freeclimb::TranscribeUtteranceRecord.new(
196
+ save_recording: true,
197
+ max_length_sec: 1,
198
+ rcrd_termination_silence_time_ms: 1,
199
+ ),
200
+ privacy_for_logging: false,
201
+ privacy_for_recording: false,
202
+ prompts: nil,
203
+ )
204
+ expect(instance_1.eql?(instance_2)).to eq(false)
205
+ end
206
+ end
207
+
208
+ describe 'test method "hash"' do
209
+ it 'calculates hash code' do
210
+ instance = Freeclimb::TranscribeUtterance.new(
211
+ action_url: "TS",
212
+ play_beep: true,
213
+ record: Freeclimb::TranscribeUtteranceRecord.new(
214
+ save_recording: true,
215
+ max_length_sec: 1,
216
+ rcrd_termination_silence_time_ms: 1,
217
+ ),
218
+ privacy_for_logging: true,
219
+ privacy_for_recording: true,
220
+ prompts: Array.new(),
221
+ )
222
+ expect(instance.hash).to be_a_kind_of(Integer)
223
+ end
224
+ end
225
+
226
+ describe 'test method "build_from_hash"' do
227
+ it 'builds equivalent model from hash code' do
228
+ instance_1 = Freeclimb::TranscribeUtterance.new(
229
+ action_url: "TS",
230
+ play_beep: true,
231
+ record: Freeclimb::TranscribeUtteranceRecord.new(
232
+ save_recording: true,
233
+ max_length_sec: 1,
234
+ rcrd_termination_silence_time_ms: 1,
235
+ ),
236
+ privacy_for_logging: true,
237
+ privacy_for_recording: true,
238
+ prompts: Array.new(),
239
+ )
240
+ instance_2 = Freeclimb::TranscribeUtterance.new
241
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
242
+ end
243
+ end
244
+
245
+ describe 'test method "_deserialize"' do
246
+ instance = Freeclimb::TranscribeUtterance.new(
247
+ action_url: "TS",
248
+ play_beep: true,
249
+ record: Freeclimb::TranscribeUtteranceRecord.new(
250
+ save_recording: true,
251
+ max_length_sec: 1,
252
+ rcrd_termination_silence_time_ms: 1,
253
+ ),
254
+ privacy_for_logging: true,
255
+ privacy_for_recording: true,
256
+ prompts: Array.new(),
257
+ )
258
+ it 'deserializes the data of action_url' do
259
+ expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
260
+ end
261
+ it 'deserializes the data of play_beep' do
262
+ expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass)
263
+ end
264
+ it 'deserializes the data of record' do
265
+ expect(instance._deserialize("Object", instance.record)).to be_a_kind_of(Freeclimb::TranscribeUtteranceRecord)
266
+ end
267
+ it 'deserializes the data of privacy_for_logging' do
268
+ expect(instance._deserialize("Boolean", instance.privacy_for_logging)).to be_a_kind_of(TrueClass)
269
+ end
270
+ it 'deserializes the data of privacy_for_recording' do
271
+ expect(instance._deserialize("Boolean", instance.privacy_for_recording)).to be_a_kind_of(TrueClass)
272
+ end
273
+ it 'deserializes the data of prompts' do
274
+ expect(instance._deserialize("Array<Object>", instance.prompts)).to be_a_kind_of(Array)
275
+ end
276
+ end
277
+
278
+ describe 'test method "to_s"' do
279
+ it 'returns the string representation of the object' do
280
+ instance = Freeclimb::TranscribeUtterance.new(
281
+ action_url: "TS",
282
+ play_beep: true,
283
+ record: Freeclimb::TranscribeUtteranceRecord.new(
284
+ save_recording: true,
285
+ max_length_sec: 1,
286
+ rcrd_termination_silence_time_ms: 1,
287
+ ),
288
+ privacy_for_logging: true,
289
+ privacy_for_recording: true,
290
+ prompts: Array.new(),
291
+ )
292
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
293
+ end
294
+ end
295
+
296
+ describe 'test method "to_hash"' do
297
+ it 'returns the object in the form of hash' do
298
+ instance = Freeclimb::TranscribeUtterance.new(
299
+ action_url: "TS",
300
+ play_beep: true,
301
+ record: Freeclimb::TranscribeUtteranceRecord.new(
302
+ save_recording: true,
303
+ max_length_sec: 1,
304
+ rcrd_termination_silence_time_ms: 1,
305
+ ),
306
+ privacy_for_logging: true,
307
+ privacy_for_recording: true,
308
+ prompts: Array.new(),
309
+ )
310
+ expect(instance.to_hash).to be_a_kind_of(Hash)
311
+ end
312
+ it 'creates equal hash for two equal objects' do
313
+ obj = Object.new()
314
+ instance_1 = Freeclimb::TranscribeUtterance.new(
315
+ action_url: "TS",
316
+ play_beep: true,
317
+ record: Freeclimb::TranscribeUtteranceRecord.new(
318
+ save_recording: true,
319
+ max_length_sec: 1,
320
+ rcrd_termination_silence_time_ms: 1,
321
+ ),
322
+ privacy_for_logging: true,
323
+ privacy_for_recording: true,
324
+ prompts: Array.new(),
325
+ )
326
+ instance_2 = Freeclimb::TranscribeUtterance.new(
327
+ action_url: "TS",
328
+ play_beep: true,
329
+ record: Freeclimb::TranscribeUtteranceRecord.new(
330
+ save_recording: true,
331
+ max_length_sec: 1,
332
+ rcrd_termination_silence_time_ms: 1,
333
+ ),
334
+ privacy_for_logging: true,
335
+ privacy_for_recording: true,
336
+ prompts: Array.new(),
337
+ )
338
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
339
+ end
340
+ end
341
+
342
+ describe 'test method "_to_hash"' do
343
+ instance = Freeclimb::TranscribeUtterance.new(
344
+ action_url: "TS",
345
+
346
+ play_beep: true,
347
+
348
+ record: Freeclimb::TranscribeUtteranceRecord.new(
349
+ save_recording: true,
350
+ max_length_sec: 1,
351
+ rcrd_termination_silence_time_ms: 1,
352
+ ),
353
+
354
+ privacy_for_logging: true,
355
+
356
+ privacy_for_recording: true,
357
+
358
+ prompts: Array.new(),
359
+ )
360
+ it 'returns action_url in the form of hash' do
361
+ expect(instance._to_hash(instance.action_url)).to eq(instance.action_url)
362
+ end
363
+ it 'returns play_beep in the form of hash' do
364
+ expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep)
365
+ end
366
+ it 'returns record in the form of hash' do
367
+ expect(instance._to_hash(instance.record)).to eq({:maxLengthSec=>1, :rcrdTerminationSilenceTimeMs=>1, :saveRecording=>true})
368
+ end
369
+ it 'returns privacy_for_logging in the form of hash' do
370
+ expect(instance._to_hash(instance.privacy_for_logging)).to eq(instance.privacy_for_logging)
371
+ end
372
+ it 'returns privacy_for_recording in the form of hash' do
373
+ expect(instance._to_hash(instance.privacy_for_recording)).to eq(instance.privacy_for_recording)
374
+ end
375
+ it 'returns prompts in the form of hash' do
376
+ expect(instance._to_hash(instance.prompts)).to eq(instance.prompts)
377
+ end
378
+ end
379
+
380
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freeclimb
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.4
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-29 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -67,6 +67,7 @@ files:
67
67
  - CHANGELOG.md
68
68
  - Gemfile
69
69
  - Gemfile.lock
70
+ - LICENSE.txt
70
71
  - README.md
71
72
  - Rakefile
72
73
  - docs/AccountRequest.md
@@ -201,6 +202,8 @@ files:
201
202
  - docs/StartRecordCall.md
202
203
  - docs/TerminateConference.md
203
204
  - docs/TerminateConferenceAllOf.md
205
+ - docs/TranscribeUtterance.md
206
+ - docs/TranscribeUtteranceRecord.md
204
207
  - docs/Unpark.md
205
208
  - docs/UpdateCallRequest.md
206
209
  - docs/UpdateCallRequestStatus.md
@@ -344,6 +347,8 @@ files:
344
347
  - lib/freeclimb/models/start_record_call.rb
345
348
  - lib/freeclimb/models/terminate_conference.rb
346
349
  - lib/freeclimb/models/terminate_conference_all_of.rb
350
+ - lib/freeclimb/models/transcribe_utterance.rb
351
+ - lib/freeclimb/models/transcribe_utterance_record.rb
347
352
  - lib/freeclimb/models/unpark.rb
348
353
  - lib/freeclimb/models/update_call_request.rb
349
354
  - lib/freeclimb/models/update_call_request_status.rb
@@ -444,6 +449,8 @@ files:
444
449
  - spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb
445
450
  - spec/models/start_record_call_spec.rb
446
451
  - spec/models/terminate_conference_spec.rb
452
+ - spec/models/transcribe_utterance_record_spec.rb
453
+ - spec/models/transcribe_utterance_spec.rb
447
454
  - spec/models/unpark_spec.rb
448
455
  - spec/models/update_call_request_spec.rb
449
456
  - spec/models/update_call_request_status_spec.rb
@@ -485,6 +492,7 @@ test_files:
485
492
  - spec/models/remove_from_conference_spec.rb
486
493
  - spec/models/queue_list_spec.rb
487
494
  - spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb
495
+ - spec/models/transcribe_utterance_record_spec.rb
488
496
  - spec/models/percl_command_spec.rb
489
497
  - spec/models/log_result_spec.rb
490
498
  - spec/models/set_talk_spec.rb
@@ -549,6 +557,7 @@ test_files:
549
557
  - spec/models/get_digits_spec.rb
550
558
  - spec/models/account_request_spec.rb
551
559
  - spec/models/out_dial_spec.rb
560
+ - spec/models/transcribe_utterance_spec.rb
552
561
  - spec/models/log_level_spec.rb
553
562
  - spec/models/reject_spec.rb
554
563
  - spec/models/sms_spec.rb