freeclimb 4.3.0 → 4.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +20 -4
  5. data/docs/DefaultApi.md +433 -0
  6. data/docs/IncomingNumberRequest.md +3 -1
  7. data/docs/SMSTenDLCBrand.md +78 -0
  8. data/docs/SMSTenDLCBrandsListResult.md +32 -0
  9. data/docs/SMSTenDLCBrandsListResultAllOf.md +18 -0
  10. data/docs/SMSTenDLCCampaign.md +78 -0
  11. data/docs/SMSTenDLCCampaignsListResult.md +32 -0
  12. data/docs/SMSTenDLCCampaignsListResultAllOf.md +18 -0
  13. data/docs/SMSTenDLCPartnerCampaign.md +74 -0
  14. data/docs/SMSTenDLCPartnerCampaignBrand.md +38 -0
  15. data/docs/SMSTenDLCPartnerCampaignsListResult.md +32 -0
  16. data/docs/SMSTenDLCPartnerCampaignsListResultAllOf.md +18 -0
  17. data/lib/freeclimb/api/default_api.rb +360 -0
  18. data/lib/freeclimb/models/incoming_number_request.rb +15 -4
  19. data/lib/freeclimb/models/sms_ten_dlc_brand.rb +960 -0
  20. data/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb +306 -0
  21. data/lib/freeclimb/models/sms_ten_dlc_brands_list_result_all_of.rb +221 -0
  22. data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +814 -0
  23. data/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb +306 -0
  24. data/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result_all_of.rb +221 -0
  25. data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +807 -0
  26. data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +445 -0
  27. data/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb +306 -0
  28. data/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result_all_of.rb +221 -0
  29. data/lib/freeclimb/version.rb +1 -1
  30. data/lib/freeclimb.rb +10 -0
  31. data/openapi.json +1277 -12
  32. data/spec/api/default_api_spec.rb +151 -1
  33. data/spec/models/account_request_spec.rb +143 -2
  34. data/spec/models/account_result_spec.rb +377 -13
  35. data/spec/models/account_status_spec.rb +39 -6
  36. data/spec/models/account_type_spec.rb +26 -4
  37. data/spec/models/add_to_conference_spec.rb +343 -10
  38. data/spec/models/answered_by_spec.rb +26 -4
  39. data/spec/models/application_list_spec.rb +293 -8
  40. data/spec/models/application_request_spec.rb +268 -7
  41. data/spec/models/application_result_spec.rb +418 -13
  42. data/spec/models/available_number_list_spec.rb +293 -8
  43. data/spec/models/available_number_spec.rb +263 -7
  44. data/spec/models/buy_incoming_number_request_spec.rb +168 -3
  45. data/spec/models/call_direction_spec.rb +39 -6
  46. data/spec/models/call_list_spec.rb +293 -8
  47. data/spec/models/call_result_spec.rb +603 -22
  48. data/spec/models/call_status_spec.rb +104 -16
  49. data/spec/models/capabilities_spec.rb +218 -5
  50. data/spec/models/conference_list_spec.rb +293 -8
  51. data/spec/models/conference_participant_list_spec.rb +293 -8
  52. data/spec/models/conference_participant_result_spec.rb +343 -10
  53. data/spec/models/conference_result_spec.rb +464 -16
  54. data/spec/models/conference_status_spec.rb +52 -8
  55. data/spec/models/create_conference_request_spec.rb +228 -6
  56. data/spec/models/create_conference_spec.rb +253 -7
  57. data/spec/models/enqueue_spec.rb +193 -4
  58. data/spec/models/filter_logs_request_spec.rb +118 -1
  59. data/spec/models/get_digits_spec.rb +318 -9
  60. data/spec/models/get_speech_reason_spec.rb +78 -12
  61. data/spec/models/get_speech_spec.rb +388 -14
  62. data/spec/models/grammar_file_built_in_spec.rb +195 -30
  63. data/spec/models/grammar_type_spec.rb +26 -4
  64. data/spec/models/hangup_spec.rb +118 -1
  65. data/spec/models/if_machine_spec.rb +26 -4
  66. data/spec/models/incoming_number_list_spec.rb +293 -8
  67. data/spec/models/incoming_number_request_spec.rb +173 -2
  68. data/spec/models/incoming_number_result_spec.rb +488 -16
  69. data/spec/models/language_spec.rb +338 -52
  70. data/spec/models/log_level_spec.rb +39 -6
  71. data/spec/models/log_list_spec.rb +293 -8
  72. data/spec/models/log_result_spec.rb +275 -8
  73. data/spec/models/machine_type_spec.rb +26 -4
  74. data/spec/models/make_call_request_spec.rb +343 -10
  75. data/spec/models/message_direction_spec.rb +26 -4
  76. data/spec/models/message_request_spec.rb +318 -9
  77. data/spec/models/message_result_spec.rb +431 -13
  78. data/spec/models/message_status_spec.rb +143 -22
  79. data/spec/models/messages_list_spec.rb +293 -8
  80. data/spec/models/mutable_resource_model_spec.rb +193 -4
  81. data/spec/models/out_dial_spec.rb +345 -11
  82. data/spec/models/pagination_model_spec.rb +268 -7
  83. data/spec/models/park_spec.rb +168 -3
  84. data/spec/models/pause_spec.rb +118 -1
  85. data/spec/models/percl_command_spec.rb +132 -3
  86. data/spec/models/percl_script_spec.rb +118 -1
  87. data/spec/models/play_beep_spec.rb +52 -8
  88. data/spec/models/play_early_media_spec.rb +118 -1
  89. data/spec/models/play_spec.rb +193 -4
  90. data/spec/models/queue_list_spec.rb +293 -8
  91. data/spec/models/queue_member_list_spec.rb +293 -8
  92. data/spec/models/queue_member_spec.rb +218 -5
  93. data/spec/models/queue_request_spec.rb +143 -2
  94. data/spec/models/queue_result_spec.rb +369 -11
  95. data/spec/models/queue_result_status_spec.rb +52 -8
  96. data/spec/models/record_utterance_spec.rb +268 -7
  97. data/spec/models/record_utterance_term_reason_spec.rb +52 -8
  98. data/spec/models/recording_list_spec.rb +293 -8
  99. data/spec/models/recording_result_spec.rb +318 -9
  100. data/spec/models/redirect_spec.rb +118 -1
  101. data/spec/models/reject_spec.rb +118 -1
  102. data/spec/models/remove_from_conference_spec.rb +118 -1
  103. data/spec/models/request_type_spec.rb +299 -46
  104. data/spec/models/say_spec.rb +218 -5
  105. data/spec/models/send_digits_spec.rb +168 -3
  106. data/spec/models/set_listen_spec.rb +143 -2
  107. data/spec/models/set_talk_spec.rb +143 -2
  108. data/spec/models/sms_spec.rb +193 -4
  109. data/spec/models/sms_ten_dlc_brand_spec.rb +1240 -0
  110. data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +361 -0
  111. data/spec/models/sms_ten_dlc_campaign_spec.rb +1055 -0
  112. data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +361 -0
  113. data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +448 -0
  114. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +994 -0
  115. data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +361 -0
  116. data/spec/models/terminate_conference_spec.rb +118 -1
  117. data/spec/models/update_call_request_spec.rb +120 -2
  118. data/spec/models/update_call_request_status_spec.rb +26 -4
  119. data/spec/models/update_conference_participant_request_spec.rb +143 -2
  120. data/spec/models/update_conference_request_spec.rb +180 -5
  121. data/spec/models/update_conference_request_status_spec.rb +26 -4
  122. metadata +102 -68
@@ -27,115 +27,696 @@ describe Freeclimb::CallResult 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 "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 = "TEST_STRING"
59
+ expect(instance.call_id).to eq("TEST_STRING")
55
60
  end
56
61
  end
57
62
 
58
63
  describe 'test attribute "parent_call_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.parent_call_id = "TEST_STRING"
66
+ expect(instance.parent_call_id).to eq("TEST_STRING")
61
67
  end
62
68
  end
63
69
 
64
70
  describe 'test attribute "account_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.account_id = "TEST_STRING"
73
+ expect(instance.account_id).to eq("TEST_STRING")
67
74
  end
68
75
  end
69
76
 
70
77
  describe 'test attribute "from"' do
71
78
  it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ instance.from = "TEST_STRING"
80
+ expect(instance.from).to eq("TEST_STRING")
73
81
  end
74
82
  end
75
83
 
76
84
  describe 'test attribute "to"' do
77
85
  it 'should work' do
78
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ instance.to = "TEST_STRING"
87
+ expect(instance.to).to eq("TEST_STRING")
79
88
  end
80
89
  end
81
90
 
82
91
  describe 'test attribute "phone_number_id"' 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_id = "TEST_STRING"
94
+ expect(instance.phone_number_id).to eq("TEST_STRING")
85
95
  end
86
96
  end
87
97
 
88
98
  describe 'test attribute "call_status"' do
89
- it 'should work' do
90
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
99
+ it 'assigns value QUEUED' do
100
+ instance.call_status = Freeclimb::CallStatus::QUEUED
101
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED)
102
+ end
103
+ it 'assigns value RINGING' do
104
+ instance.call_status = Freeclimb::CallStatus::RINGING
105
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING)
106
+ end
107
+ it 'assigns value IN_PROGRESS' do
108
+ instance.call_status = Freeclimb::CallStatus::IN_PROGRESS
109
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS)
110
+ end
111
+ it 'assigns value CANCELED' do
112
+ instance.call_status = Freeclimb::CallStatus::CANCELED
113
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED)
114
+ end
115
+ it 'assigns value COMPLETED' do
116
+ instance.call_status = Freeclimb::CallStatus::COMPLETED
117
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED)
118
+ end
119
+ it 'assigns value FAILED' do
120
+ instance.call_status = Freeclimb::CallStatus::FAILED
121
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED)
122
+ end
123
+ it 'assigns value BUSY' do
124
+ instance.call_status = Freeclimb::CallStatus::BUSY
125
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY)
126
+ end
127
+ it 'assigns value NO_ANSWER' do
128
+ instance.call_status = Freeclimb::CallStatus::NO_ANSWER
129
+ expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER)
91
130
  end
92
131
  end
93
132
 
94
133
  describe 'test attribute "start_time"' do
95
134
  it 'should work' do
96
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
135
+ instance.start_time = "TEST_STRING"
136
+ expect(instance.start_time).to eq("TEST_STRING")
97
137
  end
98
138
  end
99
139
 
100
140
  describe 'test attribute "connect_time"' do
101
141
  it 'should work' do
102
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
142
+ instance.connect_time = "TEST_STRING"
143
+ expect(instance.connect_time).to eq("TEST_STRING")
103
144
  end
104
145
  end
105
146
 
106
147
  describe 'test attribute "end_time"' do
107
148
  it 'should work' do
108
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
149
+ instance.end_time = "TEST_STRING"
150
+ expect(instance.end_time).to eq("TEST_STRING")
109
151
  end
110
152
  end
111
153
 
112
154
  describe 'test attribute "duration"' do
113
155
  it 'should work' do
114
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
156
+ instance.duration = 1
157
+ expect(instance.duration).to eq(1)
115
158
  end
116
159
  end
117
160
 
118
161
  describe 'test attribute "connect_duration"' do
119
162
  it 'should work' do
120
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
163
+ instance.connect_duration = 1
164
+ expect(instance.connect_duration).to eq(1)
121
165
  end
122
166
  end
123
167
 
124
168
  describe 'test attribute "direction"' do
125
- it 'should work' do
126
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
169
+ it 'assigns value INBOUND' do
170
+ instance.direction = Freeclimb::CallDirection::INBOUND
171
+ expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND)
172
+ end
173
+ it 'assigns value OUTBOUND_API' do
174
+ instance.direction = Freeclimb::CallDirection::OUTBOUND_API
175
+ expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API)
176
+ end
177
+ it 'assigns value OUTBOUND_DIAL' do
178
+ instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL
179
+ expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL)
127
180
  end
128
181
  end
129
182
 
130
183
  describe 'test attribute "answered_by"' do
131
- it 'should work' do
132
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
184
+ it 'assigns value HUMAN' do
185
+ instance.answered_by = Freeclimb::AnsweredBy::HUMAN
186
+ expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::HUMAN)
187
+ end
188
+ it 'assigns value MACHINE' do
189
+ instance.answered_by = Freeclimb::AnsweredBy::MACHINE
190
+ expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::MACHINE)
133
191
  end
134
192
  end
135
193
 
136
194
  describe 'test attribute "subresource_uris"' do
137
195
  it 'should work' do
138
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
196
+ testObject = Object.new()
197
+ instance.subresource_uris = testObject
198
+ expect(instance.subresource_uris).to eq(testObject)
199
+ end
200
+ end
201
+
202
+ describe 'test method "initialize"' do
203
+ it 'properly initializes with values' do
204
+ expect{instance = Freeclimb::CallResult.new(
205
+ uri: "TS",
206
+ date_created: "TS",
207
+ date_updated: "TS",
208
+ revision: 1,
209
+ call_id: "TS",
210
+ parent_call_id: "TS",
211
+ account_id: "TS",
212
+ from: "TS",
213
+ to: "TS",
214
+ phone_number_id: "TS",
215
+ call_status: "QUEUED",
216
+ start_time: "TS",
217
+ connect_time: "TS",
218
+ end_time: "TS",
219
+ duration: 1,
220
+ connect_duration: 1,
221
+ direction: "INBOUND",
222
+ answered_by: "HUMAN",
223
+ subresource_uris: Object.new(),
224
+ )}.not_to raise_error()
225
+ end
226
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::CallResult' do
227
+ expect{instance = Freeclimb::CallResult.new(
228
+ uri: "TS",
229
+ date_created: "TS",
230
+ date_updated: "TS",
231
+ revision: 1,
232
+ call_id: "TS",
233
+ parent_call_id: "TS",
234
+ account_id: "TS",
235
+ from: "TS",
236
+ to: "TS",
237
+ phone_number_id: "TS",
238
+ call_status: "QUEUED",
239
+ start_time: "TS",
240
+ connect_time: "TS",
241
+ end_time: "TS",
242
+ duration: 1,
243
+ connect_duration: 1,
244
+ direction: "INBOUND",
245
+ answered_by: "HUMAN",
246
+ subresource_uris: Object.new(),
247
+ invalid_attribute: true
248
+ )}.to raise_error(ArgumentError)
249
+ end
250
+ it 'fails to initialize with invalid attribute' do
251
+ expect{instance = Freeclimb::CallResult.new(
252
+ uri: "TS",
253
+ date_created: "TS",
254
+ date_updated: "TS",
255
+ revision: 1,
256
+ call_id: "TS",
257
+ parent_call_id: "TS",
258
+ account_id: "TS",
259
+ from: "TS",
260
+ to: "TS",
261
+ phone_number_id: "TS",
262
+ call_status: "QUEUED",
263
+ start_time: "TS",
264
+ connect_time: "TS",
265
+ end_time: "TS",
266
+ duration: 1,
267
+ connect_duration: 1,
268
+ direction: "INBOUND",
269
+ answered_by: "HUMAN",
270
+ subresource_uris: Object.new(),
271
+ invalid_attribute: true
272
+ )}.to raise_error(ArgumentError)
273
+ end
274
+ end
275
+
276
+ describe 'test method "valid"' do
277
+ it 'checks if properties are valid' do
278
+ instance = Freeclimb::CallResult.new(
279
+ uri: "TS",
280
+ date_created: "TS",
281
+ date_updated: "TS",
282
+ revision: 1,
283
+ call_id: "TS",
284
+ parent_call_id: "TS",
285
+ account_id: "TS",
286
+ from: "TS",
287
+ to: "TS",
288
+ phone_number_id: "TS",
289
+ call_status: "QUEUED",
290
+ start_time: "TS",
291
+ connect_time: "TS",
292
+ end_time: "TS",
293
+ duration: 1,
294
+ connect_duration: 1,
295
+ direction: "INBOUND",
296
+ answered_by: "HUMAN",
297
+ subresource_uris: Object.new(),
298
+ )
299
+ expect(instance.valid?).to eq(true)
300
+ end
301
+ end
302
+
303
+ describe 'test method "eql?"' do
304
+ it 'checks if objects are equal' do
305
+ obj = Object.new()
306
+ instance_1 = Freeclimb::CallResult.new(
307
+ uri: "TS",
308
+ date_created: "TS",
309
+ date_updated: "TS",
310
+ revision: 1,
311
+ call_id: "TS",
312
+ parent_call_id: "TS",
313
+ account_id: "TS",
314
+ from: "TS",
315
+ to: "TS",
316
+ phone_number_id: "TS",
317
+ call_status: "QUEUED",
318
+ start_time: "TS",
319
+ connect_time: "TS",
320
+ end_time: "TS",
321
+ duration: 1,
322
+ connect_duration: 1,
323
+ direction: "INBOUND",
324
+ answered_by: "HUMAN",
325
+ subresource_uris: obj,
326
+ )
327
+ instance_2 = Freeclimb::CallResult.new(
328
+ uri: "TS",
329
+ date_created: "TS",
330
+ date_updated: "TS",
331
+ revision: 1,
332
+ call_id: "TS",
333
+ parent_call_id: "TS",
334
+ account_id: "TS",
335
+ from: "TS",
336
+ to: "TS",
337
+ phone_number_id: "TS",
338
+ call_status: "QUEUED",
339
+ start_time: "TS",
340
+ connect_time: "TS",
341
+ end_time: "TS",
342
+ duration: 1,
343
+ connect_duration: 1,
344
+ direction: "INBOUND",
345
+ answered_by: "HUMAN",
346
+ subresource_uris: obj,
347
+ )
348
+ expect(instance_1.eql?(instance_2)).to eq(true)
349
+ end
350
+ it 'checks if objects are not equal' do
351
+ instance_1 = Freeclimb::CallResult.new(
352
+ uri: "TS",
353
+ date_created: "TS",
354
+ date_updated: "TS",
355
+ revision: 1,
356
+ call_id: "TS",
357
+ parent_call_id: "TS",
358
+ account_id: "TS",
359
+ from: "TS",
360
+ to: "TS",
361
+ phone_number_id: "TS",
362
+ call_status: "QUEUED",
363
+ start_time: "TS",
364
+ connect_time: "TS",
365
+ end_time: "TS",
366
+ duration: 1,
367
+ connect_duration: 1,
368
+ direction: "INBOUND",
369
+ answered_by: "HUMAN",
370
+ subresource_uris: Object.new(),
371
+ )
372
+ instance_2 = Freeclimb::CallResult.new(
373
+ uri: "ST",
374
+ date_created: "ST",
375
+ date_updated: "ST",
376
+ revision: 0,
377
+ call_id: "ST",
378
+ parent_call_id: "ST",
379
+ account_id: "ST",
380
+ from: "ST",
381
+ to: "ST",
382
+ phone_number_id: "ST",
383
+ call_status: "RINGING",
384
+ start_time: "ST",
385
+ connect_time: "ST",
386
+ end_time: "ST",
387
+ duration: 0,
388
+ connect_duration: 0,
389
+ direction: "OUTBOUND_API",
390
+ answered_by: "MACHINE",
391
+ subresource_uris: nil,
392
+ )
393
+ expect(instance_1.eql?(instance_2)).to eq(false)
394
+ end
395
+ end
396
+
397
+ describe 'test method "hash"' do
398
+ it 'calculates hash code' do
399
+ instance = Freeclimb::CallResult.new(
400
+ uri: "TS",
401
+ date_created: "TS",
402
+ date_updated: "TS",
403
+ revision: 1,
404
+ call_id: "TS",
405
+ parent_call_id: "TS",
406
+ account_id: "TS",
407
+ from: "TS",
408
+ to: "TS",
409
+ phone_number_id: "TS",
410
+ call_status: "QUEUED",
411
+ start_time: "TS",
412
+ connect_time: "TS",
413
+ end_time: "TS",
414
+ duration: 1,
415
+ connect_duration: 1,
416
+ direction: "INBOUND",
417
+ answered_by: "HUMAN",
418
+ subresource_uris: Object.new(),
419
+ )
420
+ expect(instance.hash).to be_a_kind_of(Integer)
421
+ end
422
+ end
423
+
424
+ describe 'test method "build_from_hash"' do
425
+ it 'builds equivalent model from hash code' do
426
+ instance_1 = Freeclimb::CallResult.new(
427
+ uri: "TS",
428
+ date_created: "TS",
429
+ date_updated: "TS",
430
+ revision: 1,
431
+ call_id: "TS",
432
+ parent_call_id: "TS",
433
+ account_id: "TS",
434
+ from: "TS",
435
+ to: "TS",
436
+ phone_number_id: "TS",
437
+ call_status: "QUEUED",
438
+ start_time: "TS",
439
+ connect_time: "TS",
440
+ end_time: "TS",
441
+ duration: 1,
442
+ connect_duration: 1,
443
+ direction: "INBOUND",
444
+ answered_by: "HUMAN",
445
+ subresource_uris: Object.new(),
446
+ )
447
+ instance_2 = Freeclimb::CallResult.new
448
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
449
+ end
450
+ end
451
+
452
+ describe 'test method "_deserialize"' do
453
+ instance = Freeclimb::CallResult.new(
454
+ uri: "TS",
455
+ date_created: "TS",
456
+ date_updated: "TS",
457
+ revision: 1,
458
+ call_id: "TS",
459
+ parent_call_id: "TS",
460
+ account_id: "TS",
461
+ from: "TS",
462
+ to: "TS",
463
+ phone_number_id: "TS",
464
+ call_status: "QUEUED",
465
+ start_time: "TS",
466
+ connect_time: "TS",
467
+ end_time: "TS",
468
+ duration: 1,
469
+ connect_duration: 1,
470
+ direction: "INBOUND",
471
+ answered_by: "HUMAN",
472
+ subresource_uris: Object.new(),
473
+ )
474
+ it 'deserializes the data of uri' do
475
+ expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
476
+ end
477
+ it 'deserializes the data of date_created' do
478
+ expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
479
+ end
480
+ it 'deserializes the data of date_updated' do
481
+ expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
482
+ end
483
+ it 'deserializes the data of revision' do
484
+ expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
485
+ end
486
+ it 'deserializes the data of call_id' do
487
+ expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String)
488
+ end
489
+ it 'deserializes the data of parent_call_id' do
490
+ expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String)
491
+ end
492
+ it 'deserializes the data of account_id' do
493
+ expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
494
+ end
495
+ it 'deserializes the data of from' do
496
+ expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String)
497
+ end
498
+ it 'deserializes the data of to' do
499
+ expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String)
500
+ end
501
+ it 'deserializes the data of phone_number_id' do
502
+ expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String)
503
+ end
504
+ it 'deserializes the data of start_time' do
505
+ expect(instance._deserialize("String", instance.start_time)).to be_a_kind_of(String)
506
+ end
507
+ it 'deserializes the data of connect_time' do
508
+ expect(instance._deserialize("String", instance.connect_time)).to be_a_kind_of(String)
509
+ end
510
+ it 'deserializes the data of end_time' do
511
+ expect(instance._deserialize("String", instance.end_time)).to be_a_kind_of(String)
512
+ end
513
+ it 'deserializes the data of duration' do
514
+ expect(instance._deserialize("Integer", instance.duration)).to be_a_kind_of(Integer)
515
+ end
516
+ it 'deserializes the data of connect_duration' do
517
+ expect(instance._deserialize("Integer", instance.connect_duration)).to be_a_kind_of(Integer)
518
+ end
519
+ it 'deserializes the data of subresource_uris' do
520
+ expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object)
521
+ end
522
+ end
523
+
524
+ describe 'test method "to_s"' do
525
+ it 'returns the string representation of the object' do
526
+ instance = Freeclimb::CallResult.new(
527
+ uri: "TS",
528
+ date_created: "TS",
529
+ date_updated: "TS",
530
+ revision: 1,
531
+ call_id: "TS",
532
+ parent_call_id: "TS",
533
+ account_id: "TS",
534
+ from: "TS",
535
+ to: "TS",
536
+ phone_number_id: "TS",
537
+ call_status: "QUEUED",
538
+ start_time: "TS",
539
+ connect_time: "TS",
540
+ end_time: "TS",
541
+ duration: 1,
542
+ connect_duration: 1,
543
+ direction: "INBOUND",
544
+ answered_by: "HUMAN",
545
+ subresource_uris: Object.new(),
546
+ )
547
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
548
+ end
549
+ end
550
+
551
+ describe 'test method "to_hash"' do
552
+ it 'returns the object in the form of hash' do
553
+ instance = Freeclimb::CallResult.new(
554
+ uri: "TS",
555
+ date_created: "TS",
556
+ date_updated: "TS",
557
+ revision: 1,
558
+ call_id: "TS",
559
+ parent_call_id: "TS",
560
+ account_id: "TS",
561
+ from: "TS",
562
+ to: "TS",
563
+ phone_number_id: "TS",
564
+ call_status: "QUEUED",
565
+ start_time: "TS",
566
+ connect_time: "TS",
567
+ end_time: "TS",
568
+ duration: 1,
569
+ connect_duration: 1,
570
+ direction: "INBOUND",
571
+ answered_by: "HUMAN",
572
+ subresource_uris: Object.new(),
573
+ )
574
+ expect(instance.to_hash).to be_a_kind_of(Hash)
575
+ end
576
+ it 'creates equal hash for two equal objects' do
577
+ obj = Object.new()
578
+ instance_1 = Freeclimb::CallResult.new(
579
+ uri: "TS",
580
+ date_created: "TS",
581
+ date_updated: "TS",
582
+ revision: 1,
583
+ call_id: "TS",
584
+ parent_call_id: "TS",
585
+ account_id: "TS",
586
+ from: "TS",
587
+ to: "TS",
588
+ phone_number_id: "TS",
589
+ call_status: "QUEUED",
590
+ start_time: "TS",
591
+ connect_time: "TS",
592
+ end_time: "TS",
593
+ duration: 1,
594
+ connect_duration: 1,
595
+ direction: "INBOUND",
596
+ answered_by: "HUMAN",
597
+ subresource_uris: obj,
598
+ )
599
+ instance_2 = Freeclimb::CallResult.new(
600
+ uri: "TS",
601
+ date_created: "TS",
602
+ date_updated: "TS",
603
+ revision: 1,
604
+ call_id: "TS",
605
+ parent_call_id: "TS",
606
+ account_id: "TS",
607
+ from: "TS",
608
+ to: "TS",
609
+ phone_number_id: "TS",
610
+ call_status: "QUEUED",
611
+ start_time: "TS",
612
+ connect_time: "TS",
613
+ end_time: "TS",
614
+ duration: 1,
615
+ connect_duration: 1,
616
+ direction: "INBOUND",
617
+ answered_by: "HUMAN",
618
+ subresource_uris: obj,
619
+ )
620
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
621
+ end
622
+ end
623
+
624
+ describe 'test method "_to_hash"' do
625
+ instance = Freeclimb::CallResult.new(
626
+ uri: "TS",
627
+
628
+ date_created: "TS",
629
+
630
+ date_updated: "TS",
631
+
632
+ revision: 1,
633
+
634
+ call_id: "TS",
635
+
636
+ parent_call_id: "TS",
637
+
638
+ account_id: "TS",
639
+
640
+ from: "TS",
641
+
642
+ to: "TS",
643
+
644
+ phone_number_id: "TS",
645
+
646
+ call_status: "QUEUED",
647
+
648
+ start_time: "TS",
649
+
650
+ connect_time: "TS",
651
+
652
+ end_time: "TS",
653
+
654
+ duration: 1,
655
+
656
+ connect_duration: 1,
657
+
658
+ direction: "INBOUND",
659
+
660
+ answered_by: "HUMAN",
661
+
662
+ subresource_uris: Object.new(),
663
+ )
664
+ it 'returns uri in the form of hash' do
665
+ expect(instance._to_hash(instance.uri)).to eq(instance.uri)
666
+ end
667
+ it 'returns date_created in the form of hash' do
668
+ expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
669
+ end
670
+ it 'returns date_updated in the form of hash' do
671
+ expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
672
+ end
673
+ it 'returns revision in the form of hash' do
674
+ expect(instance._to_hash(instance.revision)).to eq(instance.revision)
675
+ end
676
+ it 'returns call_id in the form of hash' do
677
+ expect(instance._to_hash(instance.call_id)).to eq(instance.call_id)
678
+ end
679
+ it 'returns parent_call_id in the form of hash' do
680
+ expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id)
681
+ end
682
+ it 'returns account_id in the form of hash' do
683
+ expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
684
+ end
685
+ it 'returns from in the form of hash' do
686
+ expect(instance._to_hash(instance.from)).to eq(instance.from)
687
+ end
688
+ it 'returns to in the form of hash' do
689
+ expect(instance._to_hash(instance.to)).to eq(instance.to)
690
+ end
691
+ it 'returns phone_number_id in the form of hash' do
692
+ expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id)
693
+ end
694
+ it 'returns call_status in the form of hash' do
695
+ expect(instance._to_hash(instance.call_status)).to eq(instance.call_status)
696
+ end
697
+ it 'returns start_time in the form of hash' do
698
+ expect(instance._to_hash(instance.start_time)).to eq(instance.start_time)
699
+ end
700
+ it 'returns connect_time in the form of hash' do
701
+ expect(instance._to_hash(instance.connect_time)).to eq(instance.connect_time)
702
+ end
703
+ it 'returns end_time in the form of hash' do
704
+ expect(instance._to_hash(instance.end_time)).to eq(instance.end_time)
705
+ end
706
+ it 'returns duration in the form of hash' do
707
+ expect(instance._to_hash(instance.duration)).to eq(instance.duration)
708
+ end
709
+ it 'returns connect_duration in the form of hash' do
710
+ expect(instance._to_hash(instance.connect_duration)).to eq(instance.connect_duration)
711
+ end
712
+ it 'returns direction in the form of hash' do
713
+ expect(instance._to_hash(instance.direction)).to eq(instance.direction)
714
+ end
715
+ it 'returns answered_by in the form of hash' do
716
+ expect(instance._to_hash(instance.answered_by)).to eq(instance.answered_by)
717
+ end
718
+ it 'returns subresource_uris in the form of hash' do
719
+ expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris)
139
720
  end
140
721
  end
141
722