freeclimb 4.4.0 → 4.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -2
  3. data/Gemfile.lock +1 -1
  4. data/README.md +4 -4
  5. data/docs/SMSTenDLCCampaign.md +1 -1
  6. data/lib/freeclimb/version.rb +1 -1
  7. data/openapi.json +123 -18
  8. data/spec/models/account_request_spec.rb +143 -2
  9. data/spec/models/account_result_spec.rb +377 -13
  10. data/spec/models/account_status_spec.rb +39 -6
  11. data/spec/models/account_type_spec.rb +26 -4
  12. data/spec/models/add_to_conference_spec.rb +343 -10
  13. data/spec/models/answered_by_spec.rb +26 -4
  14. data/spec/models/application_list_spec.rb +293 -8
  15. data/spec/models/application_request_spec.rb +268 -7
  16. data/spec/models/application_result_spec.rb +418 -13
  17. data/spec/models/available_number_list_spec.rb +293 -8
  18. data/spec/models/available_number_spec.rb +263 -7
  19. data/spec/models/buy_incoming_number_request_spec.rb +168 -3
  20. data/spec/models/call_direction_spec.rb +39 -6
  21. data/spec/models/call_list_spec.rb +293 -8
  22. data/spec/models/call_result_spec.rb +603 -22
  23. data/spec/models/call_status_spec.rb +104 -16
  24. data/spec/models/capabilities_spec.rb +218 -5
  25. data/spec/models/conference_list_spec.rb +293 -8
  26. data/spec/models/conference_participant_list_spec.rb +293 -8
  27. data/spec/models/conference_participant_result_spec.rb +343 -10
  28. data/spec/models/conference_result_spec.rb +464 -16
  29. data/spec/models/conference_status_spec.rb +52 -8
  30. data/spec/models/create_conference_request_spec.rb +228 -6
  31. data/spec/models/create_conference_spec.rb +253 -7
  32. data/spec/models/enqueue_spec.rb +193 -4
  33. data/spec/models/filter_logs_request_spec.rb +118 -1
  34. data/spec/models/get_digits_spec.rb +318 -9
  35. data/spec/models/get_speech_reason_spec.rb +78 -12
  36. data/spec/models/get_speech_spec.rb +388 -14
  37. data/spec/models/grammar_file_built_in_spec.rb +195 -30
  38. data/spec/models/grammar_type_spec.rb +26 -4
  39. data/spec/models/hangup_spec.rb +118 -1
  40. data/spec/models/if_machine_spec.rb +26 -4
  41. data/spec/models/incoming_number_list_spec.rb +293 -8
  42. data/spec/models/incoming_number_request_spec.rb +173 -2
  43. data/spec/models/incoming_number_result_spec.rb +488 -16
  44. data/spec/models/language_spec.rb +338 -52
  45. data/spec/models/log_level_spec.rb +39 -6
  46. data/spec/models/log_list_spec.rb +293 -8
  47. data/spec/models/log_result_spec.rb +275 -8
  48. data/spec/models/machine_type_spec.rb +26 -4
  49. data/spec/models/make_call_request_spec.rb +343 -10
  50. data/spec/models/message_direction_spec.rb +26 -4
  51. data/spec/models/message_request_spec.rb +318 -9
  52. data/spec/models/message_result_spec.rb +431 -13
  53. data/spec/models/message_status_spec.rb +143 -22
  54. data/spec/models/messages_list_spec.rb +293 -8
  55. data/spec/models/mutable_resource_model_spec.rb +193 -4
  56. data/spec/models/out_dial_spec.rb +345 -11
  57. data/spec/models/pagination_model_spec.rb +268 -7
  58. data/spec/models/park_spec.rb +168 -3
  59. data/spec/models/pause_spec.rb +118 -1
  60. data/spec/models/percl_command_spec.rb +132 -3
  61. data/spec/models/percl_script_spec.rb +118 -1
  62. data/spec/models/play_beep_spec.rb +52 -8
  63. data/spec/models/play_early_media_spec.rb +118 -1
  64. data/spec/models/play_spec.rb +193 -4
  65. data/spec/models/queue_list_spec.rb +293 -8
  66. data/spec/models/queue_member_list_spec.rb +293 -8
  67. data/spec/models/queue_member_spec.rb +218 -5
  68. data/spec/models/queue_request_spec.rb +143 -2
  69. data/spec/models/queue_result_spec.rb +369 -11
  70. data/spec/models/queue_result_status_spec.rb +52 -8
  71. data/spec/models/record_utterance_spec.rb +268 -7
  72. data/spec/models/record_utterance_term_reason_spec.rb +52 -8
  73. data/spec/models/recording_list_spec.rb +293 -8
  74. data/spec/models/recording_result_spec.rb +318 -9
  75. data/spec/models/redirect_spec.rb +118 -1
  76. data/spec/models/reject_spec.rb +118 -1
  77. data/spec/models/remove_from_conference_spec.rb +118 -1
  78. data/spec/models/request_type_spec.rb +299 -46
  79. data/spec/models/say_spec.rb +218 -5
  80. data/spec/models/send_digits_spec.rb +168 -3
  81. data/spec/models/set_listen_spec.rb +143 -2
  82. data/spec/models/set_talk_spec.rb +143 -2
  83. data/spec/models/sms_spec.rb +193 -4
  84. data/spec/models/sms_ten_dlc_brand_spec.rb +1070 -64
  85. data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +294 -9
  86. data/spec/models/sms_ten_dlc_campaign_spec.rb +875 -38
  87. data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +294 -9
  88. data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +365 -11
  89. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +823 -35
  90. data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +294 -9
  91. data/spec/models/terminate_conference_spec.rb +118 -1
  92. data/spec/models/update_call_request_spec.rb +120 -2
  93. data/spec/models/update_call_request_status_spec.rb +26 -4
  94. data/spec/models/update_conference_participant_request_spec.rb +143 -2
  95. data/spec/models/update_conference_request_spec.rb +180 -5
  96. data/spec/models/update_conference_request_status_spec.rb +26 -4
  97. metadata +77 -77
@@ -27,61 +27,394 @@ describe Freeclimb::AddToConference do
27
27
  end
28
28
  describe 'test attribute "allow_call_control"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ instance.allow_call_control = false
31
+ expect(instance.allow_call_control).to eq(false)
31
32
  end
32
33
  end
33
34
 
34
35
  describe 'test attribute "call_control_sequence"' do
35
36
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ instance.call_control_sequence = "TEST_STRING"
38
+ expect(instance.call_control_sequence).to eq("TEST_STRING")
37
39
  end
38
40
  end
39
41
 
40
42
  describe 'test attribute "call_control_url"' do
41
43
  it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ instance.call_control_url = "TEST_STRING"
45
+ expect(instance.call_control_url).to eq("TEST_STRING")
43
46
  end
44
47
  end
45
48
 
46
49
  describe 'test attribute "conference_id"' do
47
50
  it 'should work' do
48
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ instance.conference_id = "TEST_STRING"
52
+ expect(instance.conference_id).to eq("TEST_STRING")
49
53
  end
50
54
  end
51
55
 
52
56
  describe 'test attribute "call_id"' do
53
57
  it 'should work' do
54
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ instance.call_id = false
59
+ expect(instance.call_id).to eq(false)
55
60
  end
56
61
  end
57
62
 
58
63
  describe 'test attribute "leave_conference_url"' do
59
64
  it 'should work' do
60
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ instance.leave_conference_url = "TEST_STRING"
66
+ expect(instance.leave_conference_url).to eq("TEST_STRING")
61
67
  end
62
68
  end
63
69
 
64
70
  describe 'test attribute "listen"' do
65
71
  it 'should work' do
66
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ instance.listen = false
73
+ expect(instance.listen).to eq(false)
67
74
  end
68
75
  end
69
76
 
70
77
  describe 'test attribute "notification_url"' do
71
78
  it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ instance.notification_url = "TEST_STRING"
80
+ expect(instance.notification_url).to eq("TEST_STRING")
73
81
  end
74
82
  end
75
83
 
76
84
  describe 'test attribute "start_conf_on_enter"' do
77
85
  it 'should work' do
78
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ instance.start_conf_on_enter = false
87
+ expect(instance.start_conf_on_enter).to eq(false)
79
88
  end
80
89
  end
81
90
 
82
91
  describe 'test attribute "talk"' do
83
92
  it 'should work' do
84
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
93
+ instance.talk = false
94
+ expect(instance.talk).to eq(false)
95
+ end
96
+ end
97
+
98
+ describe 'test method "initialize"' do
99
+ it 'properly initializes with values' do
100
+ expect{instance = Freeclimb::AddToConference.new(
101
+ allow_call_control: true,
102
+ call_control_sequence: "TS",
103
+ call_control_url: "TS",
104
+ conference_id: "TS",
105
+ call_id: true,
106
+ leave_conference_url: "TS",
107
+ listen: true,
108
+ notification_url: "TS",
109
+ start_conf_on_enter: true,
110
+ talk: true,
111
+ )}.not_to raise_error()
112
+ end
113
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::AddToConference' do
114
+ expect{instance = Freeclimb::AddToConference.new(
115
+ allow_call_control: true,
116
+ call_control_sequence: "TS",
117
+ call_control_url: "TS",
118
+ conference_id: "TS",
119
+ call_id: true,
120
+ leave_conference_url: "TS",
121
+ listen: true,
122
+ notification_url: "TS",
123
+ start_conf_on_enter: true,
124
+ talk: true,
125
+ invalid_attribute: true
126
+ )}.to raise_error(ArgumentError)
127
+ end
128
+ it 'fails to initialize with invalid attribute' do
129
+ expect{instance = Freeclimb::AddToConference.new(
130
+ allow_call_control: true,
131
+ call_control_sequence: "TS",
132
+ call_control_url: "TS",
133
+ conference_id: "TS",
134
+ call_id: true,
135
+ leave_conference_url: "TS",
136
+ listen: true,
137
+ notification_url: "TS",
138
+ start_conf_on_enter: true,
139
+ talk: true,
140
+ invalid_attribute: true
141
+ )}.to raise_error(ArgumentError)
142
+ end
143
+ end
144
+
145
+ describe 'test method "valid"' do
146
+ it 'checks if properties are valid' do
147
+ instance = Freeclimb::AddToConference.new(
148
+ allow_call_control: true,
149
+ call_control_sequence: "TS",
150
+ call_control_url: "TS",
151
+ conference_id: "TS",
152
+ call_id: true,
153
+ leave_conference_url: "TS",
154
+ listen: true,
155
+ notification_url: "TS",
156
+ start_conf_on_enter: true,
157
+ talk: true,
158
+ )
159
+ expect(instance.valid?).to eq(true)
160
+ end
161
+ end
162
+
163
+ describe 'test method "eql?"' do
164
+ it 'checks if objects are equal' do
165
+ obj = Object.new()
166
+ instance_1 = Freeclimb::AddToConference.new(
167
+ allow_call_control: true,
168
+ call_control_sequence: "TS",
169
+ call_control_url: "TS",
170
+ conference_id: "TS",
171
+ call_id: true,
172
+ leave_conference_url: "TS",
173
+ listen: true,
174
+ notification_url: "TS",
175
+ start_conf_on_enter: true,
176
+ talk: true,
177
+ )
178
+ instance_2 = Freeclimb::AddToConference.new(
179
+ allow_call_control: true,
180
+ call_control_sequence: "TS",
181
+ call_control_url: "TS",
182
+ conference_id: "TS",
183
+ call_id: true,
184
+ leave_conference_url: "TS",
185
+ listen: true,
186
+ notification_url: "TS",
187
+ start_conf_on_enter: true,
188
+ talk: true,
189
+ )
190
+ expect(instance_1.eql?(instance_2)).to eq(true)
191
+ end
192
+ it 'checks if objects are not equal' do
193
+ instance_1 = Freeclimb::AddToConference.new(
194
+ allow_call_control: true,
195
+ call_control_sequence: "TS",
196
+ call_control_url: "TS",
197
+ conference_id: "TS",
198
+ call_id: true,
199
+ leave_conference_url: "TS",
200
+ listen: true,
201
+ notification_url: "TS",
202
+ start_conf_on_enter: true,
203
+ talk: true,
204
+ )
205
+ instance_2 = Freeclimb::AddToConference.new(
206
+ allow_call_control: false,
207
+ call_control_sequence: "ST",
208
+ call_control_url: "ST",
209
+ conference_id: "ST",
210
+ call_id: false,
211
+ leave_conference_url: "ST",
212
+ listen: false,
213
+ notification_url: "ST",
214
+ start_conf_on_enter: false,
215
+ talk: false,
216
+ )
217
+ expect(instance_1.eql?(instance_2)).to eq(false)
218
+ end
219
+ end
220
+
221
+ describe 'test method "hash"' do
222
+ it 'calculates hash code' do
223
+ instance = Freeclimb::AddToConference.new(
224
+ allow_call_control: true,
225
+ call_control_sequence: "TS",
226
+ call_control_url: "TS",
227
+ conference_id: "TS",
228
+ call_id: true,
229
+ leave_conference_url: "TS",
230
+ listen: true,
231
+ notification_url: "TS",
232
+ start_conf_on_enter: true,
233
+ talk: true,
234
+ )
235
+ expect(instance.hash).to be_a_kind_of(Integer)
236
+ end
237
+ end
238
+
239
+ describe 'test method "build_from_hash"' do
240
+ it 'builds equivalent model from hash code' do
241
+ instance_1 = Freeclimb::AddToConference.new(
242
+ allow_call_control: true,
243
+ call_control_sequence: "TS",
244
+ call_control_url: "TS",
245
+ conference_id: "TS",
246
+ call_id: true,
247
+ leave_conference_url: "TS",
248
+ listen: true,
249
+ notification_url: "TS",
250
+ start_conf_on_enter: true,
251
+ talk: true,
252
+ )
253
+ instance_2 = Freeclimb::AddToConference.new
254
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
255
+ end
256
+ end
257
+
258
+ describe 'test method "_deserialize"' do
259
+ instance = Freeclimb::AddToConference.new(
260
+ allow_call_control: true,
261
+ call_control_sequence: "TS",
262
+ call_control_url: "TS",
263
+ conference_id: "TS",
264
+ call_id: true,
265
+ leave_conference_url: "TS",
266
+ listen: true,
267
+ notification_url: "TS",
268
+ start_conf_on_enter: true,
269
+ talk: true,
270
+ )
271
+ it 'deserializes the data of allow_call_control' do
272
+ expect(instance._deserialize("Boolean", instance.allow_call_control)).to be_a_kind_of(TrueClass)
273
+ end
274
+ it 'deserializes the data of call_control_sequence' do
275
+ expect(instance._deserialize("String", instance.call_control_sequence)).to be_a_kind_of(String)
276
+ end
277
+ it 'deserializes the data of call_control_url' do
278
+ expect(instance._deserialize("String", instance.call_control_url)).to be_a_kind_of(String)
279
+ end
280
+ it 'deserializes the data of conference_id' do
281
+ expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String)
282
+ end
283
+ it 'deserializes the data of call_id' do
284
+ expect(instance._deserialize("Boolean", instance.call_id)).to be_a_kind_of(TrueClass)
285
+ end
286
+ it 'deserializes the data of leave_conference_url' do
287
+ expect(instance._deserialize("String", instance.leave_conference_url)).to be_a_kind_of(String)
288
+ end
289
+ it 'deserializes the data of listen' do
290
+ expect(instance._deserialize("Boolean", instance.listen)).to be_a_kind_of(TrueClass)
291
+ end
292
+ it 'deserializes the data of notification_url' do
293
+ expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String)
294
+ end
295
+ it 'deserializes the data of start_conf_on_enter' do
296
+ expect(instance._deserialize("Boolean", instance.start_conf_on_enter)).to be_a_kind_of(TrueClass)
297
+ end
298
+ it 'deserializes the data of talk' do
299
+ expect(instance._deserialize("Boolean", instance.talk)).to be_a_kind_of(TrueClass)
300
+ end
301
+ end
302
+
303
+ describe 'test method "to_s"' do
304
+ it 'returns the string representation of the object' do
305
+ instance = Freeclimb::AddToConference.new(
306
+ allow_call_control: true,
307
+ call_control_sequence: "TS",
308
+ call_control_url: "TS",
309
+ conference_id: "TS",
310
+ call_id: true,
311
+ leave_conference_url: "TS",
312
+ listen: true,
313
+ notification_url: "TS",
314
+ start_conf_on_enter: true,
315
+ talk: true,
316
+ )
317
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
318
+ end
319
+ end
320
+
321
+ describe 'test method "to_hash"' do
322
+ it 'returns the object in the form of hash' do
323
+ instance = Freeclimb::AddToConference.new(
324
+ allow_call_control: true,
325
+ call_control_sequence: "TS",
326
+ call_control_url: "TS",
327
+ conference_id: "TS",
328
+ call_id: true,
329
+ leave_conference_url: "TS",
330
+ listen: true,
331
+ notification_url: "TS",
332
+ start_conf_on_enter: true,
333
+ talk: true,
334
+ )
335
+ expect(instance.to_hash).to be_a_kind_of(Hash)
336
+ end
337
+ it 'creates equal hash for two equal objects' do
338
+ obj = Object.new()
339
+ instance_1 = Freeclimb::AddToConference.new(
340
+ allow_call_control: true,
341
+ call_control_sequence: "TS",
342
+ call_control_url: "TS",
343
+ conference_id: "TS",
344
+ call_id: true,
345
+ leave_conference_url: "TS",
346
+ listen: true,
347
+ notification_url: "TS",
348
+ start_conf_on_enter: true,
349
+ talk: true,
350
+ )
351
+ instance_2 = Freeclimb::AddToConference.new(
352
+ allow_call_control: true,
353
+ call_control_sequence: "TS",
354
+ call_control_url: "TS",
355
+ conference_id: "TS",
356
+ call_id: true,
357
+ leave_conference_url: "TS",
358
+ listen: true,
359
+ notification_url: "TS",
360
+ start_conf_on_enter: true,
361
+ talk: true,
362
+ )
363
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
364
+ end
365
+ end
366
+
367
+ describe 'test method "_to_hash"' do
368
+ instance = Freeclimb::AddToConference.new(
369
+ allow_call_control: true,
370
+
371
+ call_control_sequence: "TS",
372
+
373
+ call_control_url: "TS",
374
+
375
+ conference_id: "TS",
376
+
377
+ call_id: true,
378
+
379
+ leave_conference_url: "TS",
380
+
381
+ listen: true,
382
+
383
+ notification_url: "TS",
384
+
385
+ start_conf_on_enter: true,
386
+
387
+ talk: true,
388
+ )
389
+ it 'returns allow_call_control in the form of hash' do
390
+ expect(instance._to_hash(instance.allow_call_control)).to eq(instance.allow_call_control)
391
+ end
392
+ it 'returns call_control_sequence in the form of hash' do
393
+ expect(instance._to_hash(instance.call_control_sequence)).to eq(instance.call_control_sequence)
394
+ end
395
+ it 'returns call_control_url in the form of hash' do
396
+ expect(instance._to_hash(instance.call_control_url)).to eq(instance.call_control_url)
397
+ end
398
+ it 'returns conference_id in the form of hash' do
399
+ expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id)
400
+ end
401
+ it 'returns call_id in the form of hash' do
402
+ expect(instance._to_hash(instance.call_id)).to eq(instance.call_id)
403
+ end
404
+ it 'returns leave_conference_url in the form of hash' do
405
+ expect(instance._to_hash(instance.leave_conference_url)).to eq(instance.leave_conference_url)
406
+ end
407
+ it 'returns listen in the form of hash' do
408
+ expect(instance._to_hash(instance.listen)).to eq(instance.listen)
409
+ end
410
+ it 'returns notification_url in the form of hash' do
411
+ expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url)
412
+ end
413
+ it 'returns start_conf_on_enter in the form of hash' do
414
+ expect(instance._to_hash(instance.start_conf_on_enter)).to eq(instance.start_conf_on_enter)
415
+ end
416
+ it 'returns talk in the form of hash' do
417
+ expect(instance._to_hash(instance.talk)).to eq(instance.talk)
85
418
  end
86
419
  end
87
420
 
@@ -27,12 +27,34 @@ describe Freeclimb::AnsweredBy do
27
27
  end
28
28
  describe 'test attribute "HUMAN"' do
29
29
  it 'should work' do
30
- expect { Freeclimb::AnsweredBy::HUMAN = "human" }.not_to raise_error
31
- end
30
+ expect { Freeclimb::AnsweredBy::HUMAN = "human" }.not_to raise_error
32
31
  end
32
+ it 'should serialize to enum' do
33
+ expectedValue = Freeclimb::AnsweredBy::HUMAN
34
+ calculatedValue = Freeclimb::AnsweredBy::build_from_hash("human")
35
+ expect(expectedValue).to eq(calculatedValue)
36
+ end
37
+ it 'should deserialize to string' do
38
+ expectedValue = "human"
39
+ calculatedValue = Freeclimb::AnsweredBy::HUMAN
40
+ expect(expectedValue).to eq(calculatedValue)
41
+ end
42
+ end
43
+
33
44
  describe 'test attribute "MACHINE"' do
34
45
  it 'should work' do
35
- expect { Freeclimb::AnsweredBy::MACHINE = "machine" }.not_to raise_error
36
- end
46
+ expect { Freeclimb::AnsweredBy::MACHINE = "machine" }.not_to raise_error
37
47
  end
48
+ it 'should serialize to enum' do
49
+ expectedValue = Freeclimb::AnsweredBy::MACHINE
50
+ calculatedValue = Freeclimb::AnsweredBy::build_from_hash("machine")
51
+ expect(expectedValue).to eq(calculatedValue)
52
+ end
53
+ it 'should deserialize to string' do
54
+ expectedValue = "machine"
55
+ calculatedValue = Freeclimb::AnsweredBy::MACHINE
56
+ expect(expectedValue).to eq(calculatedValue)
57
+ end
58
+ end
59
+
38
60
  end