freeclimb 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +21 -15
- data/README.md +5 -4
- data/docs/MessageResult.md +7 -1
- data/docs/TFNCampaign.md +34 -0
- data/lib/freeclimb/configuration.rb +1 -2
- data/lib/freeclimb/models/dequeue.rb +2 -4
- data/lib/freeclimb/models/message_result.rb +36 -5
- data/lib/freeclimb/models/remove_from_conference.rb +2 -4
- data/lib/freeclimb/models/start_record_call.rb +2 -4
- data/lib/freeclimb/models/terminate_conference.rb +2 -4
- data/lib/freeclimb/models/tfn_campaign.rb +370 -0
- data/lib/freeclimb/models/unpark.rb +2 -4
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +1 -0
- data/openapi.json +93 -38
- data/spec/api/default_api_spec.rb +39 -117
- data/spec/models/account_request_spec.rb +113 -2
- data/spec/models/account_result_spec.rb +591 -28
- data/spec/models/account_status_spec.rb +1 -0
- data/spec/models/account_type_spec.rb +1 -0
- data/spec/models/add_to_conference_notification_webhook_spec.rb +654 -5
- data/spec/models/add_to_conference_spec.rb +471 -2
- data/spec/models/add_to_queue_notification_webhook_spec.rb +465 -2
- data/spec/models/answered_by_spec.rb +1 -0
- data/spec/models/application_list_spec.rb +323 -2
- data/spec/models/application_request_spec.rb +393 -2
- data/spec/models/application_result_spec.rb +723 -14
- data/spec/models/available_number_list_spec.rb +323 -2
- data/spec/models/available_number_spec.rb +380 -21
- data/spec/models/barge_in_reason_spec.rb +1 -0
- data/spec/models/buy_incoming_number_request_spec.rb +169 -2
- data/spec/models/call_control_webhook_spec.rb +281 -2
- data/spec/models/call_direction_spec.rb +1 -0
- data/spec/models/call_ended_reason_spec.rb +1 -0
- data/spec/models/call_list_spec.rb +323 -2
- data/spec/models/call_result_spec.rb +1020 -9
- data/spec/models/call_status_spec.rb +1 -0
- data/spec/models/call_status_webhook_spec.rb +501 -2
- data/spec/models/capabilities_spec.rb +191 -2
- data/spec/models/completion_request_spec.rb +54 -2
- data/spec/models/completion_result_spec.rb +93 -2
- data/spec/models/completion_result_status_spec.rb +1 -0
- data/spec/models/conference_list_spec.rb +323 -2
- data/spec/models/conference_participant_list_spec.rb +323 -2
- data/spec/models/conference_participant_result_spec.rb +532 -7
- data/spec/models/conference_recording_status_webhook_spec.rb +654 -5
- data/spec/models/conference_result_spec.rb +768 -55
- data/spec/models/conference_status_spec.rb +1 -0
- data/spec/models/conference_status_webhook_spec.rb +654 -5
- data/spec/models/create_conference_request_spec.rb +243 -2
- data/spec/models/create_conference_spec.rb +281 -2
- data/spec/models/create_conference_webhook_spec.rb +654 -5
- data/spec/models/create_web_rtc_token_spec.rb +151 -2
- data/spec/models/dequeue_spec.rb +1 -0
- data/spec/models/dequeue_webhook_spec.rb +565 -8
- data/spec/models/enqueue_spec.rb +225 -2
- data/spec/models/filter_logs_request_spec.rb +57 -2
- data/spec/models/get_digits_reason_spec.rb +1 -0
- data/spec/models/get_digits_spec.rb +379 -2
- data/spec/models/get_digits_webhook_spec.rb +623 -12
- data/spec/models/get_speech_reason_spec.rb +1 -0
- data/spec/models/get_speech_spec.rb +556 -11
- data/spec/models/get_speech_webhook_spec.rb +870 -15
- data/spec/models/grammar_file_built_in_spec.rb +1 -0
- data/spec/models/grammar_type_spec.rb +1 -0
- data/spec/models/hangup_spec.rb +57 -2
- data/spec/models/if_machine_spec.rb +1 -0
- data/spec/models/inbound_call_webhook_spec.rb +521 -2
- data/spec/models/incoming_number_list_spec.rb +323 -2
- data/spec/models/incoming_number_request_spec.rb +169 -2
- data/spec/models/incoming_number_result_spec.rb +930 -43
- data/spec/models/language_spec.rb +1 -0
- data/spec/models/leave_conference_webhook_spec.rb +465 -2
- data/spec/models/log_level_spec.rb +1 -0
- data/spec/models/log_list_spec.rb +323 -2
- data/spec/models/log_result_spec.rb +368 -9
- data/spec/models/machine_detected_webhook_spec.rb +565 -10
- data/spec/models/machine_type_spec.rb +1 -0
- data/spec/models/make_call_request_spec.rb +529 -6
- data/spec/models/message_delivery_webhook_spec.rb +565 -6
- data/spec/models/message_direction_spec.rb +1 -0
- data/spec/models/message_request_spec.rb +469 -2
- data/spec/models/message_result_spec.rb +1364 -225
- data/spec/models/message_status_spec.rb +1 -0
- data/spec/models/message_status_webhook_spec.rb +615 -20
- data/spec/models/messages_list_spec.rb +323 -2
- data/spec/models/mutable_resource_model_spec.rb +207 -2
- data/spec/models/out_dial_api_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_spec.rb +505 -2
- data/spec/models/out_dial_start_webhook_spec.rb +599 -24
- data/spec/models/pagination_model_spec.rb +285 -2
- data/spec/models/park_spec.rb +169 -2
- data/spec/models/pause_spec.rb +39 -2
- data/spec/models/percl_command_spec.rb +54 -2
- data/spec/models/percl_script_spec.rb +39 -2
- data/spec/models/play_beep_spec.rb +1 -0
- data/spec/models/play_early_media_spec.rb +57 -2
- data/spec/models/play_spec.rb +133 -2
- data/spec/models/queue_list_spec.rb +323 -2
- data/spec/models/queue_member_list_spec.rb +323 -2
- data/spec/models/queue_member_spec.rb +245 -2
- data/spec/models/queue_request_spec.rb +95 -2
- data/spec/models/queue_result_spec.rb +564 -15
- data/spec/models/queue_result_status_spec.rb +1 -0
- data/spec/models/queue_wait_webhook_spec.rb +616 -21
- data/spec/models/record_utterance_spec.rb +303 -2
- data/spec/models/record_utterance_term_reason_spec.rb +1 -0
- data/spec/models/record_webhook_spec.rb +868 -13
- data/spec/models/recording_list_spec.rb +323 -2
- data/spec/models/recording_result_spec.rb +469 -2
- data/spec/models/redirect_spec.rb +57 -2
- data/spec/models/redirect_webhook_spec.rb +521 -2
- data/spec/models/reject_spec.rb +57 -2
- data/spec/models/remove_from_conference_spec.rb +1 -0
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +546 -9
- data/spec/models/request_type_spec.rb +1 -0
- data/spec/models/say_spec.rb +189 -2
- data/spec/models/send_digits_spec.rb +133 -2
- data/spec/models/set_dtmf_pass_through_spec.rb +39 -2
- data/spec/models/set_listen_spec.rb +39 -2
- data/spec/models/set_talk_spec.rb +39 -2
- data/spec/models/sms_spec.rb +225 -2
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_spec.rb +1969 -423
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_campaign_spec.rb +2224 -550
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +597 -17
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +1537 -155
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +1 -0
- data/spec/models/sms_toll_free_campaign_spec.rb +355 -2
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +323 -2
- data/spec/models/start_record_call_spec.rb +1 -0
- data/spec/models/terminate_conference_spec.rb +1 -0
- data/spec/models/tfn_campaign_spec.rb +1089 -0
- data/spec/models/tfn_spec.rb +57 -2
- data/spec/models/transcribe_reason_spec.rb +1 -0
- data/spec/models/transcribe_term_reason_spec.rb +1 -0
- data/spec/models/transcribe_utterance_record_spec.rb +115 -2
- data/spec/models/transcribe_utterance_spec.rb +288 -21
- data/spec/models/transcribe_webhook_spec.rb +1049 -4
- data/spec/models/unpark_spec.rb +1 -0
- data/spec/models/update_call_request_spec.rb +37 -2
- data/spec/models/update_call_request_status_spec.rb +1 -0
- data/spec/models/update_conference_participant_request_spec.rb +115 -2
- data/spec/models/update_conference_request_spec.rb +129 -2
- data/spec/models/update_conference_request_status_spec.rb +1 -0
- data/spec/models/webhook_spec.rb +54 -2
- metadata +129 -125
@@ -13,6 +13,7 @@ OpenAPI Generator version: 7.9.0
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
|
+
include Freeclimb
|
16
17
|
|
17
18
|
# Unit tests for Freeclimb::AvailableNumber
|
18
19
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -29,24 +30,33 @@ describe Freeclimb::AvailableNumber do
|
|
29
30
|
describe 'test attribute "capabilities"' do
|
30
31
|
it 'should work' do
|
31
32
|
|
32
|
-
|
33
|
-
|
33
|
+
|
34
|
+
|
35
|
+
instance.capabilities = Capabilities.new
|
36
|
+
expect(instance.capabilities).to be_instance_of(Capabilities)
|
37
|
+
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
37
41
|
describe 'test attribute "campaign_id"' do
|
38
42
|
it 'should work' do
|
43
|
+
|
39
44
|
instance.campaign_id = "TEST_STRING"
|
40
45
|
expect(instance.campaign_id).to eq("TEST_STRING")
|
41
46
|
|
47
|
+
|
48
|
+
|
42
49
|
end
|
43
50
|
end
|
44
51
|
|
45
52
|
describe 'test attribute "phone_number"' do
|
46
53
|
it 'should work' do
|
54
|
+
|
47
55
|
instance.phone_number = "TEST_STRING"
|
48
56
|
expect(instance.phone_number).to eq("TEST_STRING")
|
49
57
|
|
58
|
+
|
59
|
+
|
50
60
|
end
|
51
61
|
end
|
52
62
|
|
@@ -55,6 +65,8 @@ describe Freeclimb::AvailableNumber do
|
|
55
65
|
instance.voice_enabled = false
|
56
66
|
expect(instance.voice_enabled).to eq(false)
|
57
67
|
|
68
|
+
|
69
|
+
|
58
70
|
end
|
59
71
|
end
|
60
72
|
|
@@ -63,22 +75,30 @@ describe Freeclimb::AvailableNumber do
|
|
63
75
|
instance.sms_enabled = false
|
64
76
|
expect(instance.sms_enabled).to eq(false)
|
65
77
|
|
78
|
+
|
79
|
+
|
66
80
|
end
|
67
81
|
end
|
68
82
|
|
69
83
|
describe 'test attribute "region"' do
|
70
84
|
it 'should work' do
|
85
|
+
|
71
86
|
instance.region = "TEST_STRING"
|
72
87
|
expect(instance.region).to eq("TEST_STRING")
|
73
88
|
|
89
|
+
|
90
|
+
|
74
91
|
end
|
75
92
|
end
|
76
93
|
|
77
94
|
describe 'test attribute "country"' do
|
78
95
|
it 'should work' do
|
96
|
+
|
79
97
|
instance.country = "TEST_STRING"
|
80
98
|
expect(instance.country).to eq("TEST_STRING")
|
81
99
|
|
100
|
+
|
101
|
+
|
82
102
|
end
|
83
103
|
end
|
84
104
|
|
@@ -86,56 +106,113 @@ describe Freeclimb::AvailableNumber do
|
|
86
106
|
it 'properly initializes with values' do
|
87
107
|
expect { instance = Freeclimb::AvailableNumber.new(
|
88
108
|
|
89
|
-
|
109
|
+
|
110
|
+
|
111
|
+
capabilities: Capabilities.new(),
|
112
|
+
|
113
|
+
|
90
114
|
campaign_id: "TS",
|
91
115
|
|
116
|
+
|
117
|
+
|
118
|
+
|
92
119
|
phone_number: "TS",
|
93
120
|
|
121
|
+
|
122
|
+
|
94
123
|
voice_enabled: true,
|
95
124
|
|
125
|
+
|
126
|
+
|
96
127
|
sms_enabled: true,
|
97
128
|
|
129
|
+
|
130
|
+
|
131
|
+
|
98
132
|
region: "TS",
|
99
133
|
|
134
|
+
|
135
|
+
|
136
|
+
|
100
137
|
country: "TS",
|
101
138
|
|
139
|
+
|
140
|
+
|
102
141
|
)}.not_to raise_error()
|
103
142
|
end
|
104
143
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumber' do
|
105
144
|
expect { instance = Freeclimb::AvailableNumber.new(
|
106
145
|
|
107
|
-
|
146
|
+
|
147
|
+
|
148
|
+
capabilities: Capabilities.new,
|
149
|
+
|
150
|
+
|
108
151
|
campaign_id: "TS",
|
109
152
|
|
153
|
+
|
154
|
+
|
155
|
+
|
110
156
|
phone_number: "TS",
|
111
157
|
|
158
|
+
|
159
|
+
|
112
160
|
voice_enabled: true,
|
113
161
|
|
162
|
+
|
163
|
+
|
114
164
|
sms_enabled: true,
|
115
165
|
|
166
|
+
|
167
|
+
|
168
|
+
|
116
169
|
region: "TS",
|
117
170
|
|
171
|
+
|
172
|
+
|
173
|
+
|
118
174
|
country: "TS",
|
119
175
|
|
176
|
+
|
177
|
+
|
120
178
|
invalid_attribute: true
|
121
179
|
)}.to raise_error(ArgumentError)
|
122
180
|
end
|
123
181
|
it 'fails to initialize with invalid attribute' do
|
124
182
|
expect { instance = Freeclimb::AvailableNumber.new(
|
125
183
|
|
126
|
-
|
184
|
+
|
185
|
+
|
186
|
+
capabilities: Capabilities.new,
|
187
|
+
|
188
|
+
|
127
189
|
campaign_id: "TS",
|
128
190
|
|
191
|
+
|
192
|
+
|
193
|
+
|
129
194
|
phone_number: "TS",
|
130
195
|
|
196
|
+
|
197
|
+
|
131
198
|
voice_enabled: true,
|
132
199
|
|
200
|
+
|
201
|
+
|
133
202
|
sms_enabled: true,
|
134
203
|
|
204
|
+
|
205
|
+
|
206
|
+
|
135
207
|
region: "TS",
|
136
208
|
|
209
|
+
|
210
|
+
|
211
|
+
|
137
212
|
country: "TS",
|
138
213
|
|
214
|
+
|
215
|
+
|
139
216
|
invalid_attribute: true
|
140
217
|
)}.to raise_error(ArgumentError)
|
141
218
|
end
|
@@ -145,19 +222,38 @@ describe Freeclimb::AvailableNumber do
|
|
145
222
|
it 'checks if properties are valid' do
|
146
223
|
instance = Freeclimb::AvailableNumber.new(
|
147
224
|
|
148
|
-
|
225
|
+
|
226
|
+
|
227
|
+
capabilities: Capabilities.new(),
|
228
|
+
|
229
|
+
|
149
230
|
campaign_id: "TS",
|
150
231
|
|
232
|
+
|
233
|
+
|
234
|
+
|
151
235
|
phone_number: "TS",
|
152
236
|
|
237
|
+
|
238
|
+
|
153
239
|
voice_enabled: true,
|
154
240
|
|
241
|
+
|
242
|
+
|
155
243
|
sms_enabled: true,
|
156
244
|
|
245
|
+
|
246
|
+
|
247
|
+
|
157
248
|
region: "TS",
|
158
249
|
|
250
|
+
|
251
|
+
|
252
|
+
|
159
253
|
country: "TS",
|
160
254
|
|
255
|
+
|
256
|
+
|
161
257
|
)
|
162
258
|
expect(instance.valid?).to eq(true)
|
163
259
|
end
|
@@ -174,74 +270,158 @@ describe Freeclimb::AvailableNumber do
|
|
174
270
|
|
175
271
|
describe 'test method "eql?"' do
|
176
272
|
it 'checks if objects are equal' do
|
177
|
-
|
273
|
+
|
274
|
+
obj_Capabilities = Capabilities.new()
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
178
282
|
instance_1 = Freeclimb::AvailableNumber.new(
|
179
|
-
|
283
|
+
|
284
|
+
|
285
|
+
capabilities: obj_Capabilities,
|
286
|
+
|
287
|
+
|
180
288
|
|
181
289
|
campaign_id: "TS",
|
182
290
|
|
291
|
+
|
292
|
+
|
293
|
+
|
183
294
|
phone_number: "TS",
|
184
295
|
|
296
|
+
|
297
|
+
|
185
298
|
voice_enabled: true,
|
186
299
|
|
300
|
+
|
301
|
+
|
187
302
|
sms_enabled: true,
|
188
303
|
|
304
|
+
|
305
|
+
|
306
|
+
|
189
307
|
region: "TS",
|
190
308
|
|
309
|
+
|
310
|
+
|
311
|
+
|
191
312
|
country: "TS",
|
192
313
|
|
314
|
+
|
315
|
+
|
193
316
|
)
|
194
317
|
instance_2 = Freeclimb::AvailableNumber.new(
|
195
|
-
|
318
|
+
|
319
|
+
|
320
|
+
capabilities: obj_Capabilities,
|
321
|
+
|
322
|
+
|
196
323
|
|
197
324
|
campaign_id: "TS",
|
198
325
|
|
326
|
+
|
327
|
+
|
328
|
+
|
199
329
|
phone_number: "TS",
|
200
330
|
|
331
|
+
|
332
|
+
|
201
333
|
voice_enabled: true,
|
202
334
|
|
335
|
+
|
336
|
+
|
203
337
|
sms_enabled: true,
|
204
338
|
|
339
|
+
|
340
|
+
|
341
|
+
|
205
342
|
region: "TS",
|
206
343
|
|
344
|
+
|
345
|
+
|
346
|
+
|
207
347
|
country: "TS",
|
208
348
|
|
349
|
+
|
350
|
+
|
209
351
|
)
|
210
352
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
211
353
|
end
|
212
354
|
|
213
355
|
it 'checks if objects are not equal' do
|
214
356
|
instance_1 = Freeclimb::AvailableNumber.new(
|
215
|
-
|
357
|
+
|
358
|
+
|
359
|
+
capabilities: Capabilities.new(),
|
360
|
+
|
361
|
+
|
216
362
|
|
217
363
|
campaign_id: "TS",
|
218
364
|
|
365
|
+
|
366
|
+
|
367
|
+
|
219
368
|
phone_number: "TS",
|
220
369
|
|
370
|
+
|
371
|
+
|
221
372
|
voice_enabled: true,
|
222
373
|
|
374
|
+
|
375
|
+
|
223
376
|
sms_enabled: true,
|
224
377
|
|
378
|
+
|
379
|
+
|
380
|
+
|
225
381
|
region: "TS",
|
226
382
|
|
383
|
+
|
384
|
+
|
385
|
+
|
227
386
|
country: "TS",
|
228
387
|
|
388
|
+
|
389
|
+
|
229
390
|
)
|
230
391
|
instance_2 = Freeclimb::AvailableNumber.new(
|
231
|
-
|
392
|
+
|
393
|
+
|
394
|
+
capabilities: Capabilities.new(),
|
395
|
+
|
396
|
+
|
232
397
|
|
233
398
|
campaign_id: "ST",
|
234
399
|
|
400
|
+
|
401
|
+
|
402
|
+
|
235
403
|
phone_number: "ST",
|
236
404
|
|
405
|
+
|
406
|
+
|
237
407
|
voice_enabled: false,
|
238
408
|
|
409
|
+
|
410
|
+
|
239
411
|
sms_enabled: false,
|
240
412
|
|
413
|
+
|
414
|
+
|
415
|
+
|
241
416
|
region: "ST",
|
242
417
|
|
418
|
+
|
419
|
+
|
420
|
+
|
243
421
|
country: "ST",
|
244
422
|
|
423
|
+
|
424
|
+
|
245
425
|
)
|
246
426
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
247
427
|
end
|
@@ -251,19 +431,38 @@ describe Freeclimb::AvailableNumber do
|
|
251
431
|
it 'calculates hash code' do
|
252
432
|
instance = Freeclimb::AvailableNumber.new(
|
253
433
|
|
254
|
-
|
434
|
+
|
435
|
+
|
436
|
+
capabilities: Capabilities.new(),
|
437
|
+
|
438
|
+
|
255
439
|
campaign_id: "TS",
|
256
440
|
|
441
|
+
|
442
|
+
|
443
|
+
|
257
444
|
phone_number: "TS",
|
258
445
|
|
446
|
+
|
447
|
+
|
259
448
|
voice_enabled: true,
|
260
449
|
|
450
|
+
|
451
|
+
|
261
452
|
sms_enabled: true,
|
262
453
|
|
454
|
+
|
455
|
+
|
456
|
+
|
263
457
|
region: "TS",
|
264
458
|
|
459
|
+
|
460
|
+
|
461
|
+
|
265
462
|
country: "TS",
|
266
463
|
|
464
|
+
|
465
|
+
|
267
466
|
)
|
268
467
|
expect(instance.hash).to be_a_kind_of(Integer)
|
269
468
|
end
|
@@ -273,35 +472,73 @@ describe Freeclimb::AvailableNumber do
|
|
273
472
|
it 'builds equivalent model from hash code' do
|
274
473
|
instance_1 = Freeclimb::AvailableNumber.new(
|
275
474
|
|
276
|
-
|
475
|
+
|
476
|
+
|
477
|
+
capabilities: Capabilities.new(),
|
478
|
+
|
479
|
+
|
277
480
|
campaign_id: "TS",
|
278
481
|
|
482
|
+
|
483
|
+
|
484
|
+
|
279
485
|
phone_number: "TS",
|
280
486
|
|
487
|
+
|
488
|
+
|
281
489
|
voice_enabled: true,
|
282
490
|
|
491
|
+
|
492
|
+
|
283
493
|
sms_enabled: true,
|
284
494
|
|
495
|
+
|
496
|
+
|
497
|
+
|
285
498
|
region: "TS",
|
286
499
|
|
500
|
+
|
501
|
+
|
502
|
+
|
287
503
|
country: "TS",
|
288
504
|
|
505
|
+
|
506
|
+
|
289
507
|
)
|
290
508
|
instance_2 = Freeclimb::AvailableNumber.new(
|
291
509
|
|
292
|
-
|
510
|
+
|
511
|
+
|
512
|
+
capabilities: Capabilities.new(),
|
513
|
+
|
514
|
+
|
293
515
|
campaign_id: "TS",
|
294
516
|
|
517
|
+
|
518
|
+
|
519
|
+
|
295
520
|
phone_number: "TS",
|
296
521
|
|
522
|
+
|
523
|
+
|
297
524
|
voice_enabled: true,
|
298
525
|
|
526
|
+
|
527
|
+
|
299
528
|
sms_enabled: true,
|
300
529
|
|
530
|
+
|
531
|
+
|
532
|
+
|
301
533
|
region: "TS",
|
302
534
|
|
535
|
+
|
536
|
+
|
537
|
+
|
303
538
|
country: "TS",
|
304
539
|
|
540
|
+
|
541
|
+
|
305
542
|
)
|
306
543
|
|
307
544
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -311,60 +548,113 @@ describe Freeclimb::AvailableNumber do
|
|
311
548
|
describe 'test method "_deserialize"' do
|
312
549
|
instance = Freeclimb::AvailableNumber.new(
|
313
550
|
|
314
|
-
|
551
|
+
|
552
|
+
|
553
|
+
capabilities: Capabilities.new(),
|
554
|
+
|
555
|
+
|
315
556
|
campaign_id: "TS",
|
316
557
|
|
558
|
+
|
559
|
+
|
560
|
+
|
317
561
|
phone_number: "TS",
|
318
562
|
|
563
|
+
|
564
|
+
|
319
565
|
voice_enabled: true,
|
320
566
|
|
567
|
+
|
568
|
+
|
321
569
|
sms_enabled: true,
|
322
570
|
|
571
|
+
|
572
|
+
|
573
|
+
|
323
574
|
region: "TS",
|
324
575
|
|
576
|
+
|
577
|
+
|
578
|
+
|
325
579
|
country: "TS",
|
326
580
|
|
581
|
+
|
582
|
+
|
327
583
|
)
|
584
|
+
|
585
|
+
|
328
586
|
it 'deserializes the data of capabilities' do
|
329
|
-
expect(instance._deserialize("Object", instance.capabilities)).to be_a_kind_of(
|
587
|
+
expect(instance._deserialize("Object", instance.capabilities)).to be_a_kind_of(Capabilities)
|
330
588
|
end
|
589
|
+
|
331
590
|
it 'deserializes the data of campaign_id' do
|
332
591
|
expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String)
|
333
592
|
end
|
593
|
+
|
594
|
+
|
334
595
|
it 'deserializes the data of phone_number' do
|
335
596
|
expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String)
|
336
597
|
end
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
337
602
|
it 'deserializes the data of voice_enabled' do
|
338
603
|
expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass)
|
339
604
|
end
|
605
|
+
|
606
|
+
|
340
607
|
it 'deserializes the data of sms_enabled' do
|
341
608
|
expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass)
|
342
609
|
end
|
343
610
|
it 'deserializes the data of region' do
|
344
611
|
expect(instance._deserialize("String", instance.region)).to be_a_kind_of(String)
|
345
612
|
end
|
613
|
+
|
614
|
+
|
346
615
|
it 'deserializes the data of country' do
|
347
616
|
expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String)
|
348
617
|
end
|
618
|
+
|
619
|
+
|
349
620
|
end
|
350
621
|
|
351
622
|
describe 'test method "to_s"' do
|
352
623
|
it 'returns the string representation of the object' do
|
353
624
|
instance = Freeclimb::AvailableNumber.new(
|
354
625
|
|
355
|
-
|
626
|
+
|
627
|
+
|
628
|
+
capabilities: Capabilities.new,
|
629
|
+
|
630
|
+
|
356
631
|
campaign_id: "TS",
|
357
632
|
|
633
|
+
|
634
|
+
|
635
|
+
|
358
636
|
phone_number: "TS",
|
359
637
|
|
638
|
+
|
639
|
+
|
360
640
|
voice_enabled: true,
|
361
641
|
|
642
|
+
|
643
|
+
|
362
644
|
sms_enabled: true,
|
363
645
|
|
646
|
+
|
647
|
+
|
648
|
+
|
364
649
|
region: "TS",
|
365
650
|
|
651
|
+
|
652
|
+
|
653
|
+
|
366
654
|
country: "TS",
|
367
655
|
|
656
|
+
|
657
|
+
|
368
658
|
)
|
369
659
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
370
660
|
end
|
@@ -374,55 +664,120 @@ describe Freeclimb::AvailableNumber do
|
|
374
664
|
it 'returns the object in the form of hash' do
|
375
665
|
instance = Freeclimb::AvailableNumber.new(
|
376
666
|
|
377
|
-
|
667
|
+
|
668
|
+
|
669
|
+
capabilities: Capabilities.new,
|
670
|
+
|
671
|
+
|
378
672
|
campaign_id: "TS",
|
379
673
|
|
674
|
+
|
675
|
+
|
676
|
+
|
380
677
|
phone_number: "TS",
|
381
678
|
|
679
|
+
|
680
|
+
|
382
681
|
voice_enabled: true,
|
383
682
|
|
683
|
+
|
684
|
+
|
384
685
|
sms_enabled: true,
|
385
686
|
|
687
|
+
|
688
|
+
|
689
|
+
|
386
690
|
region: "TS",
|
387
691
|
|
692
|
+
|
693
|
+
|
694
|
+
|
388
695
|
country: "TS",
|
389
696
|
|
697
|
+
|
698
|
+
|
390
699
|
)
|
391
700
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
392
701
|
end
|
393
702
|
it 'creates equal hash for two equal objects' do
|
394
|
-
|
703
|
+
|
704
|
+
obj = Capabilities.new()
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
395
712
|
instance_1 = Freeclimb::AvailableNumber.new(
|
396
713
|
|
397
|
-
|
714
|
+
|
715
|
+
|
716
|
+
capabilities: obj,
|
717
|
+
|
718
|
+
|
398
719
|
campaign_id: "TS",
|
399
720
|
|
721
|
+
|
722
|
+
|
723
|
+
|
400
724
|
phone_number: "TS",
|
401
725
|
|
726
|
+
|
727
|
+
|
402
728
|
voice_enabled: true,
|
403
729
|
|
730
|
+
|
731
|
+
|
404
732
|
sms_enabled: true,
|
405
733
|
|
734
|
+
|
735
|
+
|
736
|
+
|
406
737
|
region: "TS",
|
407
738
|
|
739
|
+
|
740
|
+
|
741
|
+
|
408
742
|
country: "TS",
|
409
743
|
|
744
|
+
|
745
|
+
|
410
746
|
)
|
411
747
|
instance_2 = Freeclimb::AvailableNumber.new(
|
412
748
|
|
413
|
-
|
749
|
+
|
750
|
+
|
751
|
+
capabilities: obj,
|
752
|
+
|
753
|
+
|
414
754
|
campaign_id: "TS",
|
415
755
|
|
756
|
+
|
757
|
+
|
758
|
+
|
416
759
|
phone_number: "TS",
|
417
760
|
|
761
|
+
|
762
|
+
|
418
763
|
voice_enabled: true,
|
419
764
|
|
765
|
+
|
766
|
+
|
420
767
|
sms_enabled: true,
|
421
768
|
|
769
|
+
|
770
|
+
|
771
|
+
|
422
772
|
region: "TS",
|
423
773
|
|
774
|
+
|
775
|
+
|
776
|
+
|
424
777
|
country: "TS",
|
425
778
|
|
779
|
+
|
780
|
+
|
426
781
|
)
|
427
782
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
428
783
|
end
|
@@ -432,9 +787,11 @@ describe Freeclimb::AvailableNumber do
|
|
432
787
|
instance = Freeclimb::AvailableNumber.new(
|
433
788
|
|
434
789
|
|
790
|
+
|
435
791
|
campaign_id: "TS",
|
436
792
|
|
437
793
|
|
794
|
+
|
438
795
|
phone_number: "TS",
|
439
796
|
|
440
797
|
|
@@ -444,9 +801,11 @@ describe Freeclimb::AvailableNumber do
|
|
444
801
|
sms_enabled: true,
|
445
802
|
|
446
803
|
|
804
|
+
|
447
805
|
region: "TS",
|
448
806
|
|
449
807
|
|
808
|
+
|
450
809
|
country: "TS",
|
451
810
|
|
452
811
|
)
|