freeclimb 4.4.0 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -2
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/docs/SMSTenDLCCampaign.md +1 -1
- data/lib/freeclimb/version.rb +1 -1
- data/openapi.json +123 -18
- data/spec/models/account_request_spec.rb +143 -2
- data/spec/models/account_result_spec.rb +377 -13
- data/spec/models/account_status_spec.rb +39 -6
- data/spec/models/account_type_spec.rb +26 -4
- data/spec/models/add_to_conference_spec.rb +343 -10
- data/spec/models/answered_by_spec.rb +26 -4
- data/spec/models/application_list_spec.rb +293 -8
- data/spec/models/application_request_spec.rb +268 -7
- data/spec/models/application_result_spec.rb +418 -13
- data/spec/models/available_number_list_spec.rb +293 -8
- data/spec/models/available_number_spec.rb +263 -7
- data/spec/models/buy_incoming_number_request_spec.rb +168 -3
- data/spec/models/call_direction_spec.rb +39 -6
- data/spec/models/call_list_spec.rb +293 -8
- data/spec/models/call_result_spec.rb +603 -22
- data/spec/models/call_status_spec.rb +104 -16
- data/spec/models/capabilities_spec.rb +218 -5
- data/spec/models/conference_list_spec.rb +293 -8
- data/spec/models/conference_participant_list_spec.rb +293 -8
- data/spec/models/conference_participant_result_spec.rb +343 -10
- data/spec/models/conference_result_spec.rb +464 -16
- data/spec/models/conference_status_spec.rb +52 -8
- data/spec/models/create_conference_request_spec.rb +228 -6
- data/spec/models/create_conference_spec.rb +253 -7
- data/spec/models/enqueue_spec.rb +193 -4
- data/spec/models/filter_logs_request_spec.rb +118 -1
- data/spec/models/get_digits_spec.rb +318 -9
- data/spec/models/get_speech_reason_spec.rb +78 -12
- data/spec/models/get_speech_spec.rb +388 -14
- data/spec/models/grammar_file_built_in_spec.rb +195 -30
- data/spec/models/grammar_type_spec.rb +26 -4
- data/spec/models/hangup_spec.rb +118 -1
- data/spec/models/if_machine_spec.rb +26 -4
- data/spec/models/incoming_number_list_spec.rb +293 -8
- data/spec/models/incoming_number_request_spec.rb +173 -2
- data/spec/models/incoming_number_result_spec.rb +488 -16
- data/spec/models/language_spec.rb +338 -52
- data/spec/models/log_level_spec.rb +39 -6
- data/spec/models/log_list_spec.rb +293 -8
- data/spec/models/log_result_spec.rb +275 -8
- data/spec/models/machine_type_spec.rb +26 -4
- data/spec/models/make_call_request_spec.rb +343 -10
- data/spec/models/message_direction_spec.rb +26 -4
- data/spec/models/message_request_spec.rb +318 -9
- data/spec/models/message_result_spec.rb +431 -13
- data/spec/models/message_status_spec.rb +143 -22
- data/spec/models/messages_list_spec.rb +293 -8
- data/spec/models/mutable_resource_model_spec.rb +193 -4
- data/spec/models/out_dial_spec.rb +345 -11
- data/spec/models/pagination_model_spec.rb +268 -7
- data/spec/models/park_spec.rb +168 -3
- data/spec/models/pause_spec.rb +118 -1
- data/spec/models/percl_command_spec.rb +132 -3
- data/spec/models/percl_script_spec.rb +118 -1
- data/spec/models/play_beep_spec.rb +52 -8
- data/spec/models/play_early_media_spec.rb +118 -1
- data/spec/models/play_spec.rb +193 -4
- data/spec/models/queue_list_spec.rb +293 -8
- data/spec/models/queue_member_list_spec.rb +293 -8
- data/spec/models/queue_member_spec.rb +218 -5
- data/spec/models/queue_request_spec.rb +143 -2
- data/spec/models/queue_result_spec.rb +369 -11
- data/spec/models/queue_result_status_spec.rb +52 -8
- data/spec/models/record_utterance_spec.rb +268 -7
- data/spec/models/record_utterance_term_reason_spec.rb +52 -8
- data/spec/models/recording_list_spec.rb +293 -8
- data/spec/models/recording_result_spec.rb +318 -9
- data/spec/models/redirect_spec.rb +118 -1
- data/spec/models/reject_spec.rb +118 -1
- data/spec/models/remove_from_conference_spec.rb +118 -1
- data/spec/models/request_type_spec.rb +299 -46
- data/spec/models/say_spec.rb +218 -5
- data/spec/models/send_digits_spec.rb +168 -3
- data/spec/models/set_listen_spec.rb +143 -2
- data/spec/models/set_talk_spec.rb +143 -2
- data/spec/models/sms_spec.rb +193 -4
- data/spec/models/sms_ten_dlc_brand_spec.rb +1070 -64
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +294 -9
- data/spec/models/sms_ten_dlc_campaign_spec.rb +875 -38
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +294 -9
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +365 -11
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +823 -35
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +294 -9
- data/spec/models/terminate_conference_spec.rb +118 -1
- data/spec/models/update_call_request_spec.rb +120 -2
- data/spec/models/update_call_request_status_spec.rb +26 -4
- data/spec/models/update_conference_participant_request_spec.rb +143 -2
- data/spec/models/update_conference_request_spec.rb +180 -5
- data/spec/models/update_conference_request_status_spec.rb +26 -4
- metadata +77 -77
@@ -27,85 +27,533 @@ describe Freeclimb::ConferenceResult do
|
|
27
27
|
end
|
28
28
|
describe 'test attribute "uri"' do
|
29
29
|
it 'should work' do
|
30
|
-
|
30
|
+
instance.uri = "TEST_STRING"
|
31
|
+
expect(instance.uri).to eq("TEST_STRING")
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
34
35
|
describe 'test attribute "date_created"' do
|
35
36
|
it 'should work' do
|
36
|
-
|
37
|
+
instance.date_created = "TEST_STRING"
|
38
|
+
expect(instance.date_created).to eq("TEST_STRING")
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
40
42
|
describe 'test attribute "date_updated"' do
|
41
43
|
it 'should work' do
|
42
|
-
|
44
|
+
instance.date_updated = "TEST_STRING"
|
45
|
+
expect(instance.date_updated).to eq("TEST_STRING")
|
43
46
|
end
|
44
47
|
end
|
45
48
|
|
46
49
|
describe 'test attribute "revision"' do
|
47
50
|
it 'should work' do
|
48
|
-
|
51
|
+
instance.revision = 1
|
52
|
+
expect(instance.revision).to eq(1)
|
49
53
|
end
|
50
54
|
end
|
51
55
|
|
52
56
|
describe 'test attribute "conference_id"' do
|
53
57
|
it 'should work' do
|
54
|
-
|
58
|
+
instance.conference_id = "TEST_STRING"
|
59
|
+
expect(instance.conference_id).to eq("TEST_STRING")
|
55
60
|
end
|
56
61
|
end
|
57
62
|
|
58
63
|
describe 'test attribute "account_id"' do
|
59
64
|
it 'should work' do
|
60
|
-
|
65
|
+
instance.account_id = "TEST_STRING"
|
66
|
+
expect(instance.account_id).to eq("TEST_STRING")
|
61
67
|
end
|
62
68
|
end
|
63
69
|
|
64
70
|
describe 'test attribute "_alias"' do
|
65
71
|
it 'should work' do
|
66
|
-
|
72
|
+
instance._alias = "TEST_STRING"
|
73
|
+
expect(instance._alias).to eq("TEST_STRING")
|
67
74
|
end
|
68
75
|
end
|
69
76
|
|
70
77
|
describe 'test attribute "play_beep"' do
|
71
|
-
it '
|
72
|
-
|
78
|
+
it 'assigns value ALWAYS' do
|
79
|
+
instance.play_beep = Freeclimb::PlayBeep::ALWAYS
|
80
|
+
expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ALWAYS)
|
81
|
+
end
|
82
|
+
it 'assigns value NEVER' do
|
83
|
+
instance.play_beep = Freeclimb::PlayBeep::NEVER
|
84
|
+
expect(instance.play_beep).to eq(Freeclimb::PlayBeep::NEVER)
|
85
|
+
end
|
86
|
+
it 'assigns value ENTRY_ONLY' do
|
87
|
+
instance.play_beep = Freeclimb::PlayBeep::ENTRY_ONLY
|
88
|
+
expect(instance.play_beep).to eq(Freeclimb::PlayBeep::ENTRY_ONLY)
|
89
|
+
end
|
90
|
+
it 'assigns value EXIT_ONLY' do
|
91
|
+
instance.play_beep = Freeclimb::PlayBeep::EXIT_ONLY
|
92
|
+
expect(instance.play_beep).to eq(Freeclimb::PlayBeep::EXIT_ONLY)
|
73
93
|
end
|
74
94
|
end
|
75
95
|
|
76
96
|
describe 'test attribute "record"' do
|
77
97
|
it 'should work' do
|
78
|
-
|
98
|
+
instance.record = false
|
99
|
+
expect(instance.record).to eq(false)
|
79
100
|
end
|
80
101
|
end
|
81
102
|
|
82
103
|
describe 'test attribute "status"' do
|
83
|
-
it '
|
84
|
-
|
104
|
+
it 'assigns value EMPTY' do
|
105
|
+
instance.status = Freeclimb::ConferenceStatus::EMPTY
|
106
|
+
expect(instance.status).to eq(Freeclimb::ConferenceStatus::EMPTY)
|
107
|
+
end
|
108
|
+
it 'assigns value POPULATED' do
|
109
|
+
instance.status = Freeclimb::ConferenceStatus::POPULATED
|
110
|
+
expect(instance.status).to eq(Freeclimb::ConferenceStatus::POPULATED)
|
111
|
+
end
|
112
|
+
it 'assigns value IN_PROGRESS' do
|
113
|
+
instance.status = Freeclimb::ConferenceStatus::IN_PROGRESS
|
114
|
+
expect(instance.status).to eq(Freeclimb::ConferenceStatus::IN_PROGRESS)
|
115
|
+
end
|
116
|
+
it 'assigns value TERMINATED' do
|
117
|
+
instance.status = Freeclimb::ConferenceStatus::TERMINATED
|
118
|
+
expect(instance.status).to eq(Freeclimb::ConferenceStatus::TERMINATED)
|
85
119
|
end
|
86
120
|
end
|
87
121
|
|
88
122
|
describe 'test attribute "wait_url"' do
|
89
123
|
it 'should work' do
|
90
|
-
|
124
|
+
instance.wait_url = "TEST_STRING"
|
125
|
+
expect(instance.wait_url).to eq("TEST_STRING")
|
91
126
|
end
|
92
127
|
end
|
93
128
|
|
94
129
|
describe 'test attribute "action_url"' do
|
95
130
|
it 'should work' do
|
96
|
-
|
131
|
+
instance.action_url = "TEST_STRING"
|
132
|
+
expect(instance.action_url).to eq("TEST_STRING")
|
97
133
|
end
|
98
134
|
end
|
99
135
|
|
100
136
|
describe 'test attribute "status_callback_url"' do
|
101
137
|
it 'should work' do
|
102
|
-
|
138
|
+
instance.status_callback_url = "TEST_STRING"
|
139
|
+
expect(instance.status_callback_url).to eq("TEST_STRING")
|
103
140
|
end
|
104
141
|
end
|
105
142
|
|
106
143
|
describe 'test attribute "subresource_uris"' do
|
107
144
|
it 'should work' do
|
108
|
-
|
145
|
+
testObject = Object.new()
|
146
|
+
instance.subresource_uris = testObject
|
147
|
+
expect(instance.subresource_uris).to eq(testObject)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe 'test method "initialize"' do
|
152
|
+
it 'properly initializes with values' do
|
153
|
+
expect{instance = Freeclimb::ConferenceResult.new(
|
154
|
+
uri: "TS",
|
155
|
+
date_created: "TS",
|
156
|
+
date_updated: "TS",
|
157
|
+
revision: 1,
|
158
|
+
conference_id: "TS",
|
159
|
+
account_id: "TS",
|
160
|
+
_alias: "TS",
|
161
|
+
play_beep: "ALWAYS",
|
162
|
+
record: true,
|
163
|
+
status: "EMPTY",
|
164
|
+
wait_url: "TS",
|
165
|
+
action_url: "TS",
|
166
|
+
status_callback_url: "TS",
|
167
|
+
subresource_uris: Object.new(),
|
168
|
+
)}.not_to raise_error()
|
169
|
+
end
|
170
|
+
it 'fails to initialize with input argument that is not a hash in Freeclimb::ConferenceResult' do
|
171
|
+
expect{instance = Freeclimb::ConferenceResult.new(
|
172
|
+
uri: "TS",
|
173
|
+
date_created: "TS",
|
174
|
+
date_updated: "TS",
|
175
|
+
revision: 1,
|
176
|
+
conference_id: "TS",
|
177
|
+
account_id: "TS",
|
178
|
+
_alias: "TS",
|
179
|
+
play_beep: "ALWAYS",
|
180
|
+
record: true,
|
181
|
+
status: "EMPTY",
|
182
|
+
wait_url: "TS",
|
183
|
+
action_url: "TS",
|
184
|
+
status_callback_url: "TS",
|
185
|
+
subresource_uris: Object.new(),
|
186
|
+
invalid_attribute: true
|
187
|
+
)}.to raise_error(ArgumentError)
|
188
|
+
end
|
189
|
+
it 'fails to initialize with invalid attribute' do
|
190
|
+
expect{instance = Freeclimb::ConferenceResult.new(
|
191
|
+
uri: "TS",
|
192
|
+
date_created: "TS",
|
193
|
+
date_updated: "TS",
|
194
|
+
revision: 1,
|
195
|
+
conference_id: "TS",
|
196
|
+
account_id: "TS",
|
197
|
+
_alias: "TS",
|
198
|
+
play_beep: "ALWAYS",
|
199
|
+
record: true,
|
200
|
+
status: "EMPTY",
|
201
|
+
wait_url: "TS",
|
202
|
+
action_url: "TS",
|
203
|
+
status_callback_url: "TS",
|
204
|
+
subresource_uris: Object.new(),
|
205
|
+
invalid_attribute: true
|
206
|
+
)}.to raise_error(ArgumentError)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
describe 'test method "valid"' do
|
211
|
+
it 'checks if properties are valid' do
|
212
|
+
instance = Freeclimb::ConferenceResult.new(
|
213
|
+
uri: "TS",
|
214
|
+
date_created: "TS",
|
215
|
+
date_updated: "TS",
|
216
|
+
revision: 1,
|
217
|
+
conference_id: "TS",
|
218
|
+
account_id: "TS",
|
219
|
+
_alias: "TS",
|
220
|
+
play_beep: "ALWAYS",
|
221
|
+
record: true,
|
222
|
+
status: "EMPTY",
|
223
|
+
wait_url: "TS",
|
224
|
+
action_url: "TS",
|
225
|
+
status_callback_url: "TS",
|
226
|
+
subresource_uris: Object.new(),
|
227
|
+
)
|
228
|
+
expect(instance.valid?).to eq(true)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
describe 'test method "eql?"' do
|
233
|
+
it 'checks if objects are equal' do
|
234
|
+
obj = Object.new()
|
235
|
+
instance_1 = Freeclimb::ConferenceResult.new(
|
236
|
+
uri: "TS",
|
237
|
+
date_created: "TS",
|
238
|
+
date_updated: "TS",
|
239
|
+
revision: 1,
|
240
|
+
conference_id: "TS",
|
241
|
+
account_id: "TS",
|
242
|
+
_alias: "TS",
|
243
|
+
play_beep: "ALWAYS",
|
244
|
+
record: true,
|
245
|
+
status: "EMPTY",
|
246
|
+
wait_url: "TS",
|
247
|
+
action_url: "TS",
|
248
|
+
status_callback_url: "TS",
|
249
|
+
subresource_uris: obj,
|
250
|
+
)
|
251
|
+
instance_2 = Freeclimb::ConferenceResult.new(
|
252
|
+
uri: "TS",
|
253
|
+
date_created: "TS",
|
254
|
+
date_updated: "TS",
|
255
|
+
revision: 1,
|
256
|
+
conference_id: "TS",
|
257
|
+
account_id: "TS",
|
258
|
+
_alias: "TS",
|
259
|
+
play_beep: "ALWAYS",
|
260
|
+
record: true,
|
261
|
+
status: "EMPTY",
|
262
|
+
wait_url: "TS",
|
263
|
+
action_url: "TS",
|
264
|
+
status_callback_url: "TS",
|
265
|
+
subresource_uris: obj,
|
266
|
+
)
|
267
|
+
expect(instance_1.eql?(instance_2)).to eq(true)
|
268
|
+
end
|
269
|
+
it 'checks if objects are not equal' do
|
270
|
+
instance_1 = Freeclimb::ConferenceResult.new(
|
271
|
+
uri: "TS",
|
272
|
+
date_created: "TS",
|
273
|
+
date_updated: "TS",
|
274
|
+
revision: 1,
|
275
|
+
conference_id: "TS",
|
276
|
+
account_id: "TS",
|
277
|
+
_alias: "TS",
|
278
|
+
play_beep: "ALWAYS",
|
279
|
+
record: true,
|
280
|
+
status: "EMPTY",
|
281
|
+
wait_url: "TS",
|
282
|
+
action_url: "TS",
|
283
|
+
status_callback_url: "TS",
|
284
|
+
subresource_uris: Object.new(),
|
285
|
+
)
|
286
|
+
instance_2 = Freeclimb::ConferenceResult.new(
|
287
|
+
uri: "ST",
|
288
|
+
date_created: "ST",
|
289
|
+
date_updated: "ST",
|
290
|
+
revision: 0,
|
291
|
+
conference_id: "ST",
|
292
|
+
account_id: "ST",
|
293
|
+
_alias: "ST",
|
294
|
+
play_beep: "NEVER",
|
295
|
+
record: false,
|
296
|
+
status: "POPULATED",
|
297
|
+
wait_url: "ST",
|
298
|
+
action_url: "ST",
|
299
|
+
status_callback_url: "ST",
|
300
|
+
subresource_uris: nil,
|
301
|
+
)
|
302
|
+
expect(instance_1.eql?(instance_2)).to eq(false)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
describe 'test method "hash"' do
|
307
|
+
it 'calculates hash code' do
|
308
|
+
instance = Freeclimb::ConferenceResult.new(
|
309
|
+
uri: "TS",
|
310
|
+
date_created: "TS",
|
311
|
+
date_updated: "TS",
|
312
|
+
revision: 1,
|
313
|
+
conference_id: "TS",
|
314
|
+
account_id: "TS",
|
315
|
+
_alias: "TS",
|
316
|
+
play_beep: "ALWAYS",
|
317
|
+
record: true,
|
318
|
+
status: "EMPTY",
|
319
|
+
wait_url: "TS",
|
320
|
+
action_url: "TS",
|
321
|
+
status_callback_url: "TS",
|
322
|
+
subresource_uris: Object.new(),
|
323
|
+
)
|
324
|
+
expect(instance.hash).to be_a_kind_of(Integer)
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
describe 'test method "build_from_hash"' do
|
329
|
+
it 'builds equivalent model from hash code' do
|
330
|
+
instance_1 = Freeclimb::ConferenceResult.new(
|
331
|
+
uri: "TS",
|
332
|
+
date_created: "TS",
|
333
|
+
date_updated: "TS",
|
334
|
+
revision: 1,
|
335
|
+
conference_id: "TS",
|
336
|
+
account_id: "TS",
|
337
|
+
_alias: "TS",
|
338
|
+
play_beep: "ALWAYS",
|
339
|
+
record: true,
|
340
|
+
status: "EMPTY",
|
341
|
+
wait_url: "TS",
|
342
|
+
action_url: "TS",
|
343
|
+
status_callback_url: "TS",
|
344
|
+
subresource_uris: Object.new(),
|
345
|
+
)
|
346
|
+
instance_2 = Freeclimb::ConferenceResult.new
|
347
|
+
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
describe 'test method "_deserialize"' do
|
352
|
+
instance = Freeclimb::ConferenceResult.new(
|
353
|
+
uri: "TS",
|
354
|
+
date_created: "TS",
|
355
|
+
date_updated: "TS",
|
356
|
+
revision: 1,
|
357
|
+
conference_id: "TS",
|
358
|
+
account_id: "TS",
|
359
|
+
_alias: "TS",
|
360
|
+
play_beep: "ALWAYS",
|
361
|
+
record: true,
|
362
|
+
status: "EMPTY",
|
363
|
+
wait_url: "TS",
|
364
|
+
action_url: "TS",
|
365
|
+
status_callback_url: "TS",
|
366
|
+
subresource_uris: Object.new(),
|
367
|
+
)
|
368
|
+
it 'deserializes the data of uri' do
|
369
|
+
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
370
|
+
end
|
371
|
+
it 'deserializes the data of date_created' do
|
372
|
+
expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
|
373
|
+
end
|
374
|
+
it 'deserializes the data of date_updated' do
|
375
|
+
expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
|
376
|
+
end
|
377
|
+
it 'deserializes the data of revision' do
|
378
|
+
expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
|
379
|
+
end
|
380
|
+
it 'deserializes the data of conference_id' do
|
381
|
+
expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String)
|
382
|
+
end
|
383
|
+
it 'deserializes the data of account_id' do
|
384
|
+
expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
|
385
|
+
end
|
386
|
+
it 'deserializes the data of _alias' do
|
387
|
+
expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String)
|
388
|
+
end
|
389
|
+
it 'deserializes the data of record' do
|
390
|
+
expect(instance._deserialize("Boolean", instance.record)).to be_a_kind_of(TrueClass)
|
391
|
+
end
|
392
|
+
it 'deserializes the data of wait_url' do
|
393
|
+
expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String)
|
394
|
+
end
|
395
|
+
it 'deserializes the data of action_url' do
|
396
|
+
expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
|
397
|
+
end
|
398
|
+
it 'deserializes the data of status_callback_url' do
|
399
|
+
expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String)
|
400
|
+
end
|
401
|
+
it 'deserializes the data of subresource_uris' do
|
402
|
+
expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object)
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
406
|
+
describe 'test method "to_s"' do
|
407
|
+
it 'returns the string representation of the object' do
|
408
|
+
instance = Freeclimb::ConferenceResult.new(
|
409
|
+
uri: "TS",
|
410
|
+
date_created: "TS",
|
411
|
+
date_updated: "TS",
|
412
|
+
revision: 1,
|
413
|
+
conference_id: "TS",
|
414
|
+
account_id: "TS",
|
415
|
+
_alias: "TS",
|
416
|
+
play_beep: "ALWAYS",
|
417
|
+
record: true,
|
418
|
+
status: "EMPTY",
|
419
|
+
wait_url: "TS",
|
420
|
+
action_url: "TS",
|
421
|
+
status_callback_url: "TS",
|
422
|
+
subresource_uris: Object.new(),
|
423
|
+
)
|
424
|
+
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
425
|
+
end
|
426
|
+
end
|
427
|
+
|
428
|
+
describe 'test method "to_hash"' do
|
429
|
+
it 'returns the object in the form of hash' do
|
430
|
+
instance = Freeclimb::ConferenceResult.new(
|
431
|
+
uri: "TS",
|
432
|
+
date_created: "TS",
|
433
|
+
date_updated: "TS",
|
434
|
+
revision: 1,
|
435
|
+
conference_id: "TS",
|
436
|
+
account_id: "TS",
|
437
|
+
_alias: "TS",
|
438
|
+
play_beep: "ALWAYS",
|
439
|
+
record: true,
|
440
|
+
status: "EMPTY",
|
441
|
+
wait_url: "TS",
|
442
|
+
action_url: "TS",
|
443
|
+
status_callback_url: "TS",
|
444
|
+
subresource_uris: Object.new(),
|
445
|
+
)
|
446
|
+
expect(instance.to_hash).to be_a_kind_of(Hash)
|
447
|
+
end
|
448
|
+
it 'creates equal hash for two equal objects' do
|
449
|
+
obj = Object.new()
|
450
|
+
instance_1 = Freeclimb::ConferenceResult.new(
|
451
|
+
uri: "TS",
|
452
|
+
date_created: "TS",
|
453
|
+
date_updated: "TS",
|
454
|
+
revision: 1,
|
455
|
+
conference_id: "TS",
|
456
|
+
account_id: "TS",
|
457
|
+
_alias: "TS",
|
458
|
+
play_beep: "ALWAYS",
|
459
|
+
record: true,
|
460
|
+
status: "EMPTY",
|
461
|
+
wait_url: "TS",
|
462
|
+
action_url: "TS",
|
463
|
+
status_callback_url: "TS",
|
464
|
+
subresource_uris: obj,
|
465
|
+
)
|
466
|
+
instance_2 = Freeclimb::ConferenceResult.new(
|
467
|
+
uri: "TS",
|
468
|
+
date_created: "TS",
|
469
|
+
date_updated: "TS",
|
470
|
+
revision: 1,
|
471
|
+
conference_id: "TS",
|
472
|
+
account_id: "TS",
|
473
|
+
_alias: "TS",
|
474
|
+
play_beep: "ALWAYS",
|
475
|
+
record: true,
|
476
|
+
status: "EMPTY",
|
477
|
+
wait_url: "TS",
|
478
|
+
action_url: "TS",
|
479
|
+
status_callback_url: "TS",
|
480
|
+
subresource_uris: obj,
|
481
|
+
)
|
482
|
+
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
describe 'test method "_to_hash"' do
|
487
|
+
instance = Freeclimb::ConferenceResult.new(
|
488
|
+
uri: "TS",
|
489
|
+
|
490
|
+
date_created: "TS",
|
491
|
+
|
492
|
+
date_updated: "TS",
|
493
|
+
|
494
|
+
revision: 1,
|
495
|
+
|
496
|
+
conference_id: "TS",
|
497
|
+
|
498
|
+
account_id: "TS",
|
499
|
+
|
500
|
+
_alias: "TS",
|
501
|
+
|
502
|
+
play_beep: "ALWAYS",
|
503
|
+
|
504
|
+
record: true,
|
505
|
+
|
506
|
+
status: "EMPTY",
|
507
|
+
|
508
|
+
wait_url: "TS",
|
509
|
+
|
510
|
+
action_url: "TS",
|
511
|
+
|
512
|
+
status_callback_url: "TS",
|
513
|
+
|
514
|
+
subresource_uris: Object.new(),
|
515
|
+
)
|
516
|
+
it 'returns uri in the form of hash' do
|
517
|
+
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
518
|
+
end
|
519
|
+
it 'returns date_created in the form of hash' do
|
520
|
+
expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
|
521
|
+
end
|
522
|
+
it 'returns date_updated in the form of hash' do
|
523
|
+
expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
|
524
|
+
end
|
525
|
+
it 'returns revision in the form of hash' do
|
526
|
+
expect(instance._to_hash(instance.revision)).to eq(instance.revision)
|
527
|
+
end
|
528
|
+
it 'returns conference_id in the form of hash' do
|
529
|
+
expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id)
|
530
|
+
end
|
531
|
+
it 'returns account_id in the form of hash' do
|
532
|
+
expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
|
533
|
+
end
|
534
|
+
it 'returns _alias in the form of hash' do
|
535
|
+
expect(instance._to_hash(instance._alias)).to eq(instance._alias)
|
536
|
+
end
|
537
|
+
it 'returns play_beep in the form of hash' do
|
538
|
+
expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep)
|
539
|
+
end
|
540
|
+
it 'returns record in the form of hash' do
|
541
|
+
expect(instance._to_hash(instance.record)).to eq(instance.record)
|
542
|
+
end
|
543
|
+
it 'returns status in the form of hash' do
|
544
|
+
expect(instance._to_hash(instance.status)).to eq(instance.status)
|
545
|
+
end
|
546
|
+
it 'returns wait_url in the form of hash' do
|
547
|
+
expect(instance._to_hash(instance.wait_url)).to eq(instance.wait_url)
|
548
|
+
end
|
549
|
+
it 'returns action_url in the form of hash' do
|
550
|
+
expect(instance._to_hash(instance.action_url)).to eq(instance.action_url)
|
551
|
+
end
|
552
|
+
it 'returns status_callback_url in the form of hash' do
|
553
|
+
expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url)
|
554
|
+
end
|
555
|
+
it 'returns subresource_uris in the form of hash' do
|
556
|
+
expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris)
|
109
557
|
end
|
110
558
|
end
|
111
559
|
|
@@ -27,22 +27,66 @@ describe Freeclimb::ConferenceStatus do
|
|
27
27
|
end
|
28
28
|
describe 'test attribute "EMPTY"' do
|
29
29
|
it 'should work' do
|
30
|
-
|
31
|
-
end
|
30
|
+
expect { Freeclimb::ConferenceStatus::EMPTY = "empty" }.not_to raise_error
|
32
31
|
end
|
32
|
+
it 'should serialize to enum' do
|
33
|
+
expectedValue = Freeclimb::ConferenceStatus::EMPTY
|
34
|
+
calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("empty")
|
35
|
+
expect(expectedValue).to eq(calculatedValue)
|
36
|
+
end
|
37
|
+
it 'should deserialize to string' do
|
38
|
+
expectedValue = "empty"
|
39
|
+
calculatedValue = Freeclimb::ConferenceStatus::EMPTY
|
40
|
+
expect(expectedValue).to eq(calculatedValue)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
33
44
|
describe 'test attribute "POPULATED"' do
|
34
45
|
it 'should work' do
|
35
|
-
|
36
|
-
end
|
46
|
+
expect { Freeclimb::ConferenceStatus::POPULATED = "populated" }.not_to raise_error
|
37
47
|
end
|
48
|
+
it 'should serialize to enum' do
|
49
|
+
expectedValue = Freeclimb::ConferenceStatus::POPULATED
|
50
|
+
calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("populated")
|
51
|
+
expect(expectedValue).to eq(calculatedValue)
|
52
|
+
end
|
53
|
+
it 'should deserialize to string' do
|
54
|
+
expectedValue = "populated"
|
55
|
+
calculatedValue = Freeclimb::ConferenceStatus::POPULATED
|
56
|
+
expect(expectedValue).to eq(calculatedValue)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
38
60
|
describe 'test attribute "IN_PROGRESS"' do
|
39
61
|
it 'should work' do
|
40
|
-
|
41
|
-
end
|
62
|
+
expect { Freeclimb::ConferenceStatus::IN_PROGRESS = "inProgress" }.not_to raise_error
|
42
63
|
end
|
64
|
+
it 'should serialize to enum' do
|
65
|
+
expectedValue = Freeclimb::ConferenceStatus::IN_PROGRESS
|
66
|
+
calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("inProgress")
|
67
|
+
expect(expectedValue).to eq(calculatedValue)
|
68
|
+
end
|
69
|
+
it 'should deserialize to string' do
|
70
|
+
expectedValue = "inProgress"
|
71
|
+
calculatedValue = Freeclimb::ConferenceStatus::IN_PROGRESS
|
72
|
+
expect(expectedValue).to eq(calculatedValue)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
43
76
|
describe 'test attribute "TERMINATED"' do
|
44
77
|
it 'should work' do
|
45
|
-
|
46
|
-
end
|
78
|
+
expect { Freeclimb::ConferenceStatus::TERMINATED = "terminated" }.not_to raise_error
|
47
79
|
end
|
80
|
+
it 'should serialize to enum' do
|
81
|
+
expectedValue = Freeclimb::ConferenceStatus::TERMINATED
|
82
|
+
calculatedValue = Freeclimb::ConferenceStatus::build_from_hash("terminated")
|
83
|
+
expect(expectedValue).to eq(calculatedValue)
|
84
|
+
end
|
85
|
+
it 'should deserialize to string' do
|
86
|
+
expectedValue = "terminated"
|
87
|
+
calculatedValue = Freeclimb::ConferenceStatus::TERMINATED
|
88
|
+
expect(expectedValue).to eq(calculatedValue)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
48
92
|
end
|