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,97 +27,569 @@ describe Freeclimb::IncomingNumberResult do
27
27
  end
28
28
  describe 'test attribute "uri"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ instance.revision = 1
52
+ expect(instance.revision).to eq(1)
49
53
  end
50
54
  end
51
55
 
52
56
  describe 'test attribute "capabilities"' do
53
57
  it 'should work' do
54
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ instance.capabilities = Freeclimb::Capabilities.new
59
+ expect(instance.capabilities).to be_instance_of(Freeclimb::Capabilities)
55
60
  end
56
61
  end
57
62
 
58
63
  describe 'test attribute "campaign_id"' do
59
64
  it 'should work' do
60
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ instance.campaign_id = "TEST_STRING"
66
+ expect(instance.campaign_id).to eq("TEST_STRING")
61
67
  end
62
68
  end
63
69
 
64
70
  describe 'test attribute "phone_number_id"' do
65
71
  it 'should work' do
66
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ instance.phone_number_id = "TEST_STRING"
73
+ expect(instance.phone_number_id).to eq("TEST_STRING")
67
74
  end
68
75
  end
69
76
 
70
77
  describe 'test attribute "account_id"' do
71
78
  it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ instance.account_id = "TEST_STRING"
80
+ expect(instance.account_id).to eq("TEST_STRING")
73
81
  end
74
82
  end
75
83
 
76
84
  describe 'test attribute "application_id"' do
77
85
  it 'should work' do
78
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ instance.application_id = "TEST_STRING"
87
+ expect(instance.application_id).to eq("TEST_STRING")
79
88
  end
80
89
  end
81
90
 
82
91
  describe 'test attribute "phone_number"' do
83
92
  it 'should work' do
84
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
93
+ instance.phone_number = "TEST_STRING"
94
+ expect(instance.phone_number).to eq("TEST_STRING")
85
95
  end
86
96
  end
87
97
 
88
98
  describe 'test attribute "_alias"' do
89
99
  it 'should work' do
90
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
100
+ instance._alias = "TEST_STRING"
101
+ expect(instance._alias).to eq("TEST_STRING")
91
102
  end
92
103
  end
93
104
 
94
105
  describe 'test attribute "region"' do
95
106
  it 'should work' do
96
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
107
+ instance.region = "TEST_STRING"
108
+ expect(instance.region).to eq("TEST_STRING")
97
109
  end
98
110
  end
99
111
 
100
112
  describe 'test attribute "country"' do
101
113
  it 'should work' do
102
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
114
+ instance.country = "TEST_STRING"
115
+ expect(instance.country).to eq("TEST_STRING")
103
116
  end
104
117
  end
105
118
 
106
119
  describe 'test attribute "voice_enabled"' do
107
120
  it 'should work' do
108
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
121
+ instance.voice_enabled = false
122
+ expect(instance.voice_enabled).to eq(false)
109
123
  end
110
124
  end
111
125
 
112
126
  describe 'test attribute "sms_enabled"' do
113
127
  it 'should work' do
114
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
+ instance.sms_enabled = false
129
+ expect(instance.sms_enabled).to eq(false)
115
130
  end
116
131
  end
117
132
 
118
133
  describe 'test attribute "offnet"' do
119
134
  it 'should work' do
120
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
135
+ instance.offnet = false
136
+ expect(instance.offnet).to eq(false)
137
+ end
138
+ end
139
+
140
+ describe 'test method "initialize"' do
141
+ it 'properly initializes with values' do
142
+ expect{instance = Freeclimb::IncomingNumberResult.new(
143
+ uri: "TS",
144
+ date_created: "TS",
145
+ date_updated: "TS",
146
+ revision: 1,
147
+ capabilities: Freeclimb::Capabilities.new,
148
+ campaign_id: "TS",
149
+ phone_number_id: "TS",
150
+ account_id: "TS",
151
+ application_id: "TS",
152
+ phone_number: "TS",
153
+ _alias: "TS",
154
+ region: "TS",
155
+ country: "TS",
156
+ voice_enabled: true,
157
+ sms_enabled: true,
158
+ offnet: true,
159
+ )}.not_to raise_error()
160
+ end
161
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberResult' do
162
+ expect{instance = Freeclimb::IncomingNumberResult.new(
163
+ uri: "TS",
164
+ date_created: "TS",
165
+ date_updated: "TS",
166
+ revision: 1,
167
+ capabilities: Freeclimb::Capabilities.new,
168
+ campaign_id: "TS",
169
+ phone_number_id: "TS",
170
+ account_id: "TS",
171
+ application_id: "TS",
172
+ phone_number: "TS",
173
+ _alias: "TS",
174
+ region: "TS",
175
+ country: "TS",
176
+ voice_enabled: true,
177
+ sms_enabled: true,
178
+ offnet: true,
179
+ invalid_attribute: true
180
+ )}.to raise_error(ArgumentError)
181
+ end
182
+ it 'fails to initialize with invalid attribute' do
183
+ expect{instance = Freeclimb::IncomingNumberResult.new(
184
+ uri: "TS",
185
+ date_created: "TS",
186
+ date_updated: "TS",
187
+ revision: 1,
188
+ capabilities: Freeclimb::Capabilities.new,
189
+ campaign_id: "TS",
190
+ phone_number_id: "TS",
191
+ account_id: "TS",
192
+ application_id: "TS",
193
+ phone_number: "TS",
194
+ _alias: "TS",
195
+ region: "TS",
196
+ country: "TS",
197
+ voice_enabled: true,
198
+ sms_enabled: true,
199
+ offnet: true,
200
+ invalid_attribute: true
201
+ )}.to raise_error(ArgumentError)
202
+ end
203
+ end
204
+
205
+ describe 'test method "valid"' do
206
+ it 'checks if properties are valid' do
207
+ instance = Freeclimb::IncomingNumberResult.new(
208
+ uri: "TS",
209
+ date_created: "TS",
210
+ date_updated: "TS",
211
+ revision: 1,
212
+ capabilities: Freeclimb::Capabilities.new,
213
+ campaign_id: "TS",
214
+ phone_number_id: "TS",
215
+ account_id: "TS",
216
+ application_id: "TS",
217
+ phone_number: "TS",
218
+ _alias: "TS",
219
+ region: "TS",
220
+ country: "TS",
221
+ voice_enabled: true,
222
+ sms_enabled: true,
223
+ offnet: true,
224
+ )
225
+ expect(instance.valid?).to eq(true)
226
+ end
227
+ end
228
+
229
+ describe 'test method "eql?"' do
230
+ it 'checks if objects are equal' do
231
+ obj = Object.new()
232
+ instance_1 = Freeclimb::IncomingNumberResult.new(
233
+ uri: "TS",
234
+ date_created: "TS",
235
+ date_updated: "TS",
236
+ revision: 1,
237
+ campaign_id: "TS",
238
+ phone_number_id: "TS",
239
+ account_id: "TS",
240
+ application_id: "TS",
241
+ phone_number: "TS",
242
+ _alias: "TS",
243
+ region: "TS",
244
+ country: "TS",
245
+ voice_enabled: true,
246
+ sms_enabled: true,
247
+ offnet: true,
248
+ )
249
+ instance_2 = Freeclimb::IncomingNumberResult.new(
250
+ uri: "TS",
251
+ date_created: "TS",
252
+ date_updated: "TS",
253
+ revision: 1,
254
+ campaign_id: "TS",
255
+ phone_number_id: "TS",
256
+ account_id: "TS",
257
+ application_id: "TS",
258
+ phone_number: "TS",
259
+ _alias: "TS",
260
+ region: "TS",
261
+ country: "TS",
262
+ voice_enabled: true,
263
+ sms_enabled: true,
264
+ offnet: true,
265
+ )
266
+ expect(instance_1.eql?(instance_2)).to eq(true)
267
+ end
268
+ it 'checks if objects are not equal' do
269
+ instance_1 = Freeclimb::IncomingNumberResult.new(
270
+ uri: "TS",
271
+ date_created: "TS",
272
+ date_updated: "TS",
273
+ revision: 1,
274
+ campaign_id: "TS",
275
+ phone_number_id: "TS",
276
+ account_id: "TS",
277
+ application_id: "TS",
278
+ phone_number: "TS",
279
+ _alias: "TS",
280
+ region: "TS",
281
+ country: "TS",
282
+ voice_enabled: true,
283
+ sms_enabled: true,
284
+ offnet: true,
285
+ )
286
+ instance_2 = Freeclimb::IncomingNumberResult.new(
287
+ uri: "ST",
288
+ date_created: "ST",
289
+ date_updated: "ST",
290
+ revision: 0,
291
+ campaign_id: "ST",
292
+ phone_number_id: "ST",
293
+ account_id: "ST",
294
+ application_id: "ST",
295
+ phone_number: "ST",
296
+ _alias: "ST",
297
+ region: "ST",
298
+ country: "ST",
299
+ voice_enabled: false,
300
+ sms_enabled: false,
301
+ offnet: false,
302
+ )
303
+ expect(instance_1.eql?(instance_2)).to eq(false)
304
+ end
305
+ end
306
+
307
+ describe 'test method "hash"' do
308
+ it 'calculates hash code' do
309
+ instance = Freeclimb::IncomingNumberResult.new(
310
+ uri: "TS",
311
+ date_created: "TS",
312
+ date_updated: "TS",
313
+ revision: 1,
314
+ capabilities: Freeclimb::Capabilities.new,
315
+ campaign_id: "TS",
316
+ phone_number_id: "TS",
317
+ account_id: "TS",
318
+ application_id: "TS",
319
+ phone_number: "TS",
320
+ _alias: "TS",
321
+ region: "TS",
322
+ country: "TS",
323
+ voice_enabled: true,
324
+ sms_enabled: true,
325
+ offnet: true,
326
+ )
327
+ expect(instance.hash).to be_a_kind_of(Integer)
328
+ end
329
+ end
330
+
331
+ describe 'test method "build_from_hash"' do
332
+ it 'builds equivalent model from hash code' do
333
+ instance_1 = Freeclimb::IncomingNumberResult.new(
334
+ uri: "TS",
335
+ date_created: "TS",
336
+ date_updated: "TS",
337
+ revision: 1,
338
+ capabilities: Freeclimb::Capabilities.new,
339
+ campaign_id: "TS",
340
+ phone_number_id: "TS",
341
+ account_id: "TS",
342
+ application_id: "TS",
343
+ phone_number: "TS",
344
+ _alias: "TS",
345
+ region: "TS",
346
+ country: "TS",
347
+ voice_enabled: true,
348
+ sms_enabled: true,
349
+ offnet: true,
350
+ )
351
+ instance_2 = Freeclimb::IncomingNumberResult.new
352
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
353
+ end
354
+ end
355
+
356
+ describe 'test method "_deserialize"' do
357
+ instance = Freeclimb::IncomingNumberResult.new(
358
+ uri: "TS",
359
+ date_created: "TS",
360
+ date_updated: "TS",
361
+ revision: 1,
362
+ capabilities: Freeclimb::Capabilities.new,
363
+ campaign_id: "TS",
364
+ phone_number_id: "TS",
365
+ account_id: "TS",
366
+ application_id: "TS",
367
+ phone_number: "TS",
368
+ _alias: "TS",
369
+ region: "TS",
370
+ country: "TS",
371
+ voice_enabled: true,
372
+ sms_enabled: true,
373
+ offnet: true,
374
+ )
375
+ it 'deserializes the data of uri' do
376
+ expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
377
+ end
378
+ it 'deserializes the data of date_created' do
379
+ expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
380
+ end
381
+ it 'deserializes the data of date_updated' do
382
+ expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
383
+ end
384
+ it 'deserializes the data of revision' do
385
+ expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
386
+ end
387
+ it 'deserializes the data of capabilities' do
388
+ expect(instance._deserialize("Object", instance.capabilities)).to be_a_kind_of(Freeclimb::Capabilities)
389
+ end
390
+ it 'deserializes the data of campaign_id' do
391
+ expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String)
392
+ end
393
+ it 'deserializes the data of phone_number_id' do
394
+ expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String)
395
+ end
396
+ it 'deserializes the data of account_id' do
397
+ expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
398
+ end
399
+ it 'deserializes the data of application_id' do
400
+ expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String)
401
+ end
402
+ it 'deserializes the data of phone_number' do
403
+ expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String)
404
+ end
405
+ it 'deserializes the data of _alias' do
406
+ expect(instance._deserialize("String", instance._alias)).to be_a_kind_of(String)
407
+ end
408
+ it 'deserializes the data of region' do
409
+ expect(instance._deserialize("String", instance.region)).to be_a_kind_of(String)
410
+ end
411
+ it 'deserializes the data of country' do
412
+ expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String)
413
+ end
414
+ it 'deserializes the data of voice_enabled' do
415
+ expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass)
416
+ end
417
+ it 'deserializes the data of sms_enabled' do
418
+ expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass)
419
+ end
420
+ it 'deserializes the data of offnet' do
421
+ expect(instance._deserialize("Boolean", instance.offnet)).to be_a_kind_of(TrueClass)
422
+ end
423
+ end
424
+
425
+ describe 'test method "to_s"' do
426
+ it 'returns the string representation of the object' do
427
+ instance = Freeclimb::IncomingNumberResult.new(
428
+ uri: "TS",
429
+ date_created: "TS",
430
+ date_updated: "TS",
431
+ revision: 1,
432
+ capabilities: Freeclimb::Capabilities.new,
433
+ campaign_id: "TS",
434
+ phone_number_id: "TS",
435
+ account_id: "TS",
436
+ application_id: "TS",
437
+ phone_number: "TS",
438
+ _alias: "TS",
439
+ region: "TS",
440
+ country: "TS",
441
+ voice_enabled: true,
442
+ sms_enabled: true,
443
+ offnet: true,
444
+ )
445
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
446
+ end
447
+ end
448
+
449
+ describe 'test method "to_hash"' do
450
+ it 'returns the object in the form of hash' do
451
+ instance = Freeclimb::IncomingNumberResult.new(
452
+ uri: "TS",
453
+ date_created: "TS",
454
+ date_updated: "TS",
455
+ revision: 1,
456
+ capabilities: Freeclimb::Capabilities.new,
457
+ campaign_id: "TS",
458
+ phone_number_id: "TS",
459
+ account_id: "TS",
460
+ application_id: "TS",
461
+ phone_number: "TS",
462
+ _alias: "TS",
463
+ region: "TS",
464
+ country: "TS",
465
+ voice_enabled: true,
466
+ sms_enabled: true,
467
+ offnet: true,
468
+ )
469
+ expect(instance.to_hash).to be_a_kind_of(Hash)
470
+ end
471
+ it 'creates equal hash for two equal objects' do
472
+ obj = Object.new()
473
+ instance_1 = Freeclimb::IncomingNumberResult.new(
474
+ uri: "TS",
475
+ date_created: "TS",
476
+ date_updated: "TS",
477
+ revision: 1,
478
+ capabilities: Freeclimb::Capabilities.new,
479
+ campaign_id: "TS",
480
+ phone_number_id: "TS",
481
+ account_id: "TS",
482
+ application_id: "TS",
483
+ phone_number: "TS",
484
+ _alias: "TS",
485
+ region: "TS",
486
+ country: "TS",
487
+ voice_enabled: true,
488
+ sms_enabled: true,
489
+ offnet: true,
490
+ )
491
+ instance_2 = Freeclimb::IncomingNumberResult.new(
492
+ uri: "TS",
493
+ date_created: "TS",
494
+ date_updated: "TS",
495
+ revision: 1,
496
+ capabilities: Freeclimb::Capabilities.new,
497
+ campaign_id: "TS",
498
+ phone_number_id: "TS",
499
+ account_id: "TS",
500
+ application_id: "TS",
501
+ phone_number: "TS",
502
+ _alias: "TS",
503
+ region: "TS",
504
+ country: "TS",
505
+ voice_enabled: true,
506
+ sms_enabled: true,
507
+ offnet: true,
508
+ )
509
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
510
+ end
511
+ end
512
+
513
+ describe 'test method "_to_hash"' do
514
+ instance = Freeclimb::IncomingNumberResult.new(
515
+ uri: "TS",
516
+
517
+ date_created: "TS",
518
+
519
+ date_updated: "TS",
520
+
521
+ revision: 1,
522
+
523
+
524
+ campaign_id: "TS",
525
+
526
+ phone_number_id: "TS",
527
+
528
+ account_id: "TS",
529
+
530
+ application_id: "TS",
531
+
532
+ phone_number: "TS",
533
+
534
+ _alias: "TS",
535
+
536
+ region: "TS",
537
+
538
+ country: "TS",
539
+
540
+ voice_enabled: true,
541
+
542
+ sms_enabled: true,
543
+
544
+ offnet: true,
545
+ )
546
+ it 'returns uri in the form of hash' do
547
+ expect(instance._to_hash(instance.uri)).to eq(instance.uri)
548
+ end
549
+ it 'returns date_created in the form of hash' do
550
+ expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
551
+ end
552
+ it 'returns date_updated in the form of hash' do
553
+ expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
554
+ end
555
+ it 'returns revision in the form of hash' do
556
+ expect(instance._to_hash(instance.revision)).to eq(instance.revision)
557
+ end
558
+ it 'returns capabilities in the form of hash' do
559
+ expect(instance._to_hash(instance.capabilities)).to eq(instance.capabilities)
560
+ end
561
+ it 'returns campaign_id in the form of hash' do
562
+ expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id)
563
+ end
564
+ it 'returns phone_number_id in the form of hash' do
565
+ expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id)
566
+ end
567
+ it 'returns account_id in the form of hash' do
568
+ expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
569
+ end
570
+ it 'returns application_id in the form of hash' do
571
+ expect(instance._to_hash(instance.application_id)).to eq(instance.application_id)
572
+ end
573
+ it 'returns phone_number in the form of hash' do
574
+ expect(instance._to_hash(instance.phone_number)).to eq(instance.phone_number)
575
+ end
576
+ it 'returns _alias in the form of hash' do
577
+ expect(instance._to_hash(instance._alias)).to eq(instance._alias)
578
+ end
579
+ it 'returns region in the form of hash' do
580
+ expect(instance._to_hash(instance.region)).to eq(instance.region)
581
+ end
582
+ it 'returns country in the form of hash' do
583
+ expect(instance._to_hash(instance.country)).to eq(instance.country)
584
+ end
585
+ it 'returns voice_enabled in the form of hash' do
586
+ expect(instance._to_hash(instance.voice_enabled)).to eq(instance.voice_enabled)
587
+ end
588
+ it 'returns sms_enabled in the form of hash' do
589
+ expect(instance._to_hash(instance.sms_enabled)).to eq(instance.sms_enabled)
590
+ end
591
+ it 'returns offnet in the form of hash' do
592
+ expect(instance._to_hash(instance.offnet)).to eq(instance.offnet)
121
593
  end
122
594
  end
123
595