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,25 +27,214 @@ describe Freeclimb::MutableResourceModel 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)
53
+ end
54
+ end
55
+
56
+ describe 'test method "initialize"' do
57
+ it 'properly initializes with values' do
58
+ expect{instance = Freeclimb::MutableResourceModel.new(
59
+ uri: "TS",
60
+ date_created: "TS",
61
+ date_updated: "TS",
62
+ revision: 1,
63
+ )}.not_to raise_error()
64
+ end
65
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::MutableResourceModel' do
66
+ expect{instance = Freeclimb::MutableResourceModel.new(
67
+ uri: "TS",
68
+ date_created: "TS",
69
+ date_updated: "TS",
70
+ revision: 1,
71
+ invalid_attribute: true
72
+ )}.to raise_error(ArgumentError)
73
+ end
74
+ it 'fails to initialize with invalid attribute' do
75
+ expect{instance = Freeclimb::MutableResourceModel.new(
76
+ uri: "TS",
77
+ date_created: "TS",
78
+ date_updated: "TS",
79
+ revision: 1,
80
+ invalid_attribute: true
81
+ )}.to raise_error(ArgumentError)
82
+ end
83
+ end
84
+
85
+ describe 'test method "valid"' do
86
+ it 'checks if properties are valid' do
87
+ instance = Freeclimb::MutableResourceModel.new(
88
+ uri: "TS",
89
+ date_created: "TS",
90
+ date_updated: "TS",
91
+ revision: 1,
92
+ )
93
+ expect(instance.valid?).to eq(true)
94
+ end
95
+ end
96
+
97
+ describe 'test method "eql?"' do
98
+ it 'checks if objects are equal' do
99
+ obj = Object.new()
100
+ instance_1 = Freeclimb::MutableResourceModel.new(
101
+ uri: "TS",
102
+ date_created: "TS",
103
+ date_updated: "TS",
104
+ revision: 1,
105
+ )
106
+ instance_2 = Freeclimb::MutableResourceModel.new(
107
+ uri: "TS",
108
+ date_created: "TS",
109
+ date_updated: "TS",
110
+ revision: 1,
111
+ )
112
+ expect(instance_1.eql?(instance_2)).to eq(true)
113
+ end
114
+ it 'checks if objects are not equal' do
115
+ instance_1 = Freeclimb::MutableResourceModel.new(
116
+ uri: "TS",
117
+ date_created: "TS",
118
+ date_updated: "TS",
119
+ revision: 1,
120
+ )
121
+ instance_2 = Freeclimb::MutableResourceModel.new(
122
+ uri: "ST",
123
+ date_created: "ST",
124
+ date_updated: "ST",
125
+ revision: 0,
126
+ )
127
+ expect(instance_1.eql?(instance_2)).to eq(false)
128
+ end
129
+ end
130
+
131
+ describe 'test method "hash"' do
132
+ it 'calculates hash code' do
133
+ instance = Freeclimb::MutableResourceModel.new(
134
+ uri: "TS",
135
+ date_created: "TS",
136
+ date_updated: "TS",
137
+ revision: 1,
138
+ )
139
+ expect(instance.hash).to be_a_kind_of(Integer)
140
+ end
141
+ end
142
+
143
+ describe 'test method "build_from_hash"' do
144
+ it 'builds equivalent model from hash code' do
145
+ instance_1 = Freeclimb::MutableResourceModel.new(
146
+ uri: "TS",
147
+ date_created: "TS",
148
+ date_updated: "TS",
149
+ revision: 1,
150
+ )
151
+ instance_2 = Freeclimb::MutableResourceModel.new
152
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
153
+ end
154
+ end
155
+
156
+ describe 'test method "_deserialize"' do
157
+ instance = Freeclimb::MutableResourceModel.new(
158
+ uri: "TS",
159
+ date_created: "TS",
160
+ date_updated: "TS",
161
+ revision: 1,
162
+ )
163
+ it 'deserializes the data of uri' do
164
+ expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
165
+ end
166
+ it 'deserializes the data of date_created' do
167
+ expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
168
+ end
169
+ it 'deserializes the data of date_updated' do
170
+ expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
171
+ end
172
+ it 'deserializes the data of revision' do
173
+ expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
174
+ end
175
+ end
176
+
177
+ describe 'test method "to_s"' do
178
+ it 'returns the string representation of the object' do
179
+ instance = Freeclimb::MutableResourceModel.new(
180
+ uri: "TS",
181
+ date_created: "TS",
182
+ date_updated: "TS",
183
+ revision: 1,
184
+ )
185
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
186
+ end
187
+ end
188
+
189
+ describe 'test method "to_hash"' do
190
+ it 'returns the object in the form of hash' do
191
+ instance = Freeclimb::MutableResourceModel.new(
192
+ uri: "TS",
193
+ date_created: "TS",
194
+ date_updated: "TS",
195
+ revision: 1,
196
+ )
197
+ expect(instance.to_hash).to be_a_kind_of(Hash)
198
+ end
199
+ it 'creates equal hash for two equal objects' do
200
+ obj = Object.new()
201
+ instance_1 = Freeclimb::MutableResourceModel.new(
202
+ uri: "TS",
203
+ date_created: "TS",
204
+ date_updated: "TS",
205
+ revision: 1,
206
+ )
207
+ instance_2 = Freeclimb::MutableResourceModel.new(
208
+ uri: "TS",
209
+ date_created: "TS",
210
+ date_updated: "TS",
211
+ revision: 1,
212
+ )
213
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
214
+ end
215
+ end
216
+
217
+ describe 'test method "_to_hash"' do
218
+ instance = Freeclimb::MutableResourceModel.new(
219
+ uri: "TS",
220
+
221
+ date_created: "TS",
222
+
223
+ date_updated: "TS",
224
+
225
+ revision: 1,
226
+ )
227
+ it 'returns uri in the form of hash' do
228
+ expect(instance._to_hash(instance.uri)).to eq(instance.uri)
229
+ end
230
+ it 'returns date_created in the form of hash' do
231
+ expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
232
+ end
233
+ it 'returns date_updated in the form of hash' do
234
+ expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
235
+ end
236
+ it 'returns revision in the form of hash' do
237
+ expect(instance._to_hash(instance.revision)).to eq(instance.revision)
49
238
  end
50
239
  end
51
240
 
@@ -27,61 +27,395 @@ describe Freeclimb::OutDial do
27
27
  end
28
28
  describe 'test attribute "action_url"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ instance.action_url = "TEST_STRING"
31
+ expect(instance.action_url).to eq("TEST_STRING")
31
32
  end
32
33
  end
33
34
 
34
35
  describe 'test attribute "call_connect_url"' do
35
36
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ instance.call_connect_url = "TEST_STRING"
38
+ expect(instance.call_connect_url).to eq("TEST_STRING")
37
39
  end
38
40
  end
39
41
 
40
42
  describe 'test attribute "calling_number"' do
41
43
  it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ instance.calling_number = "TEST_STRING"
45
+ expect(instance.calling_number).to eq("TEST_STRING")
43
46
  end
44
47
  end
45
48
 
46
49
  describe 'test attribute "destination"' do
47
50
  it 'should work' do
48
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ instance.destination = "TEST_STRING"
52
+ expect(instance.destination).to eq("TEST_STRING")
49
53
  end
50
54
  end
51
55
 
52
56
  describe 'test attribute "if_machine"' do
53
- it 'should work' do
54
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ it 'assigns value REDIRECT' do
58
+ instance.if_machine = Freeclimb::IfMachine::REDIRECT
59
+ expect(instance.if_machine).to eq(Freeclimb::IfMachine::REDIRECT)
60
+ end
61
+ it 'assigns value HANGUP' do
62
+ instance.if_machine = Freeclimb::IfMachine::HANGUP
63
+ expect(instance.if_machine).to eq(Freeclimb::IfMachine::HANGUP)
55
64
  end
56
65
  end
57
66
 
58
67
  describe 'test attribute "if_machine_url"' do
59
68
  it 'should work' do
60
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ instance.if_machine_url = "TEST_STRING"
70
+ expect(instance.if_machine_url).to eq("TEST_STRING")
61
71
  end
62
72
  end
63
73
 
64
74
  describe 'test attribute "send_digits"' do
65
75
  it 'should work' do
66
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ instance.send_digits = "TEST_STRING"
77
+ expect(instance.send_digits).to eq("TEST_STRING")
67
78
  end
68
79
  end
69
80
 
70
81
  describe 'test attribute "status_callback_url"' do
71
82
  it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
83
+ instance.status_callback_url = "TEST_STRING"
84
+ expect(instance.status_callback_url).to eq("TEST_STRING")
73
85
  end
74
86
  end
75
87
 
76
88
  describe 'test attribute "timeout"' do
77
89
  it 'should work' do
78
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
90
+ instance.timeout = 1
91
+ expect(instance.timeout).to eq(1)
79
92
  end
80
93
  end
81
94
 
82
95
  describe 'test attribute "privacy_mode"' do
83
96
  it 'should work' do
84
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
97
+ instance.privacy_mode = false
98
+ expect(instance.privacy_mode).to eq(false)
99
+ end
100
+ end
101
+
102
+ describe 'test method "initialize"' do
103
+ it 'properly initializes with values' do
104
+ expect{instance = Freeclimb::OutDial.new(
105
+ action_url: "TS",
106
+ call_connect_url: "TS",
107
+ calling_number: "TS",
108
+ destination: "TS",
109
+ if_machine: "REDIRECT",
110
+ if_machine_url: "TS",
111
+ send_digits: "TS",
112
+ status_callback_url: "TS",
113
+ timeout: 1,
114
+ privacy_mode: true,
115
+ )}.not_to raise_error()
116
+ end
117
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::OutDial' do
118
+ expect{instance = Freeclimb::OutDial.new(
119
+ action_url: "TS",
120
+ call_connect_url: "TS",
121
+ calling_number: "TS",
122
+ destination: "TS",
123
+ if_machine: "REDIRECT",
124
+ if_machine_url: "TS",
125
+ send_digits: "TS",
126
+ status_callback_url: "TS",
127
+ timeout: 1,
128
+ privacy_mode: true,
129
+ invalid_attribute: true
130
+ )}.to raise_error(ArgumentError)
131
+ end
132
+ it 'fails to initialize with invalid attribute' do
133
+ expect{instance = Freeclimb::OutDial.new(
134
+ action_url: "TS",
135
+ call_connect_url: "TS",
136
+ calling_number: "TS",
137
+ destination: "TS",
138
+ if_machine: "REDIRECT",
139
+ if_machine_url: "TS",
140
+ send_digits: "TS",
141
+ status_callback_url: "TS",
142
+ timeout: 1,
143
+ privacy_mode: true,
144
+ invalid_attribute: true
145
+ )}.to raise_error(ArgumentError)
146
+ end
147
+ end
148
+
149
+ describe 'test method "valid"' do
150
+ it 'checks if properties are valid' do
151
+ instance = Freeclimb::OutDial.new(
152
+ action_url: "TS",
153
+ call_connect_url: "TS",
154
+ calling_number: "TS",
155
+ destination: "TS",
156
+ if_machine: "REDIRECT",
157
+ if_machine_url: "TS",
158
+ send_digits: "TS",
159
+ status_callback_url: "TS",
160
+ timeout: 1,
161
+ privacy_mode: true,
162
+ )
163
+ expect(instance.valid?).to eq(true)
164
+ end
165
+ end
166
+
167
+ describe 'test method "eql?"' do
168
+ it 'checks if objects are equal' do
169
+ obj = Object.new()
170
+ instance_1 = Freeclimb::OutDial.new(
171
+ action_url: "TS",
172
+ call_connect_url: "TS",
173
+ calling_number: "TS",
174
+ destination: "TS",
175
+ if_machine: "REDIRECT",
176
+ if_machine_url: "TS",
177
+ send_digits: "TS",
178
+ status_callback_url: "TS",
179
+ timeout: 1,
180
+ privacy_mode: true,
181
+ )
182
+ instance_2 = Freeclimb::OutDial.new(
183
+ action_url: "TS",
184
+ call_connect_url: "TS",
185
+ calling_number: "TS",
186
+ destination: "TS",
187
+ if_machine: "REDIRECT",
188
+ if_machine_url: "TS",
189
+ send_digits: "TS",
190
+ status_callback_url: "TS",
191
+ timeout: 1,
192
+ privacy_mode: true,
193
+ )
194
+ expect(instance_1.eql?(instance_2)).to eq(true)
195
+ end
196
+ it 'checks if objects are not equal' do
197
+ instance_1 = Freeclimb::OutDial.new(
198
+ action_url: "TS",
199
+ call_connect_url: "TS",
200
+ calling_number: "TS",
201
+ destination: "TS",
202
+ if_machine: "REDIRECT",
203
+ if_machine_url: "TS",
204
+ send_digits: "TS",
205
+ status_callback_url: "TS",
206
+ timeout: 1,
207
+ privacy_mode: true,
208
+ )
209
+ instance_2 = Freeclimb::OutDial.new(
210
+ action_url: "ST",
211
+ call_connect_url: "ST",
212
+ calling_number: "ST",
213
+ destination: "ST",
214
+ if_machine: "HANGUP",
215
+ if_machine_url: "ST",
216
+ send_digits: "ST",
217
+ status_callback_url: "ST",
218
+ timeout: 0,
219
+ privacy_mode: false,
220
+ )
221
+ expect(instance_1.eql?(instance_2)).to eq(false)
222
+ end
223
+ end
224
+
225
+ describe 'test method "hash"' do
226
+ it 'calculates hash code' do
227
+ instance = Freeclimb::OutDial.new(
228
+ action_url: "TS",
229
+ call_connect_url: "TS",
230
+ calling_number: "TS",
231
+ destination: "TS",
232
+ if_machine: "REDIRECT",
233
+ if_machine_url: "TS",
234
+ send_digits: "TS",
235
+ status_callback_url: "TS",
236
+ timeout: 1,
237
+ privacy_mode: true,
238
+ )
239
+ expect(instance.hash).to be_a_kind_of(Integer)
240
+ end
241
+ end
242
+
243
+ describe 'test method "build_from_hash"' do
244
+ it 'builds equivalent model from hash code' do
245
+ instance_1 = Freeclimb::OutDial.new(
246
+ action_url: "TS",
247
+ call_connect_url: "TS",
248
+ calling_number: "TS",
249
+ destination: "TS",
250
+ if_machine: "REDIRECT",
251
+ if_machine_url: "TS",
252
+ send_digits: "TS",
253
+ status_callback_url: "TS",
254
+ timeout: 1,
255
+ privacy_mode: true,
256
+ )
257
+ instance_2 = Freeclimb::OutDial.new
258
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
259
+ end
260
+ end
261
+
262
+ describe 'test method "_deserialize"' do
263
+ instance = Freeclimb::OutDial.new(
264
+ action_url: "TS",
265
+ call_connect_url: "TS",
266
+ calling_number: "TS",
267
+ destination: "TS",
268
+ if_machine: "REDIRECT",
269
+ if_machine_url: "TS",
270
+ send_digits: "TS",
271
+ status_callback_url: "TS",
272
+ timeout: 1,
273
+ privacy_mode: true,
274
+ )
275
+ it 'deserializes the data of action_url' do
276
+ expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
277
+ end
278
+ it 'deserializes the data of call_connect_url' do
279
+ expect(instance._deserialize("String", instance.call_connect_url)).to be_a_kind_of(String)
280
+ end
281
+ it 'deserializes the data of calling_number' do
282
+ expect(instance._deserialize("String", instance.calling_number)).to be_a_kind_of(String)
283
+ end
284
+ it 'deserializes the data of destination' do
285
+ expect(instance._deserialize("String", instance.destination)).to be_a_kind_of(String)
286
+ end
287
+ it 'deserializes the data of if_machine_url' do
288
+ expect(instance._deserialize("String", instance.if_machine_url)).to be_a_kind_of(String)
289
+ end
290
+ it 'deserializes the data of send_digits' do
291
+ expect(instance._deserialize("String", instance.send_digits)).to be_a_kind_of(String)
292
+ end
293
+ it 'deserializes the data of status_callback_url' do
294
+ expect(instance._deserialize("String", instance.status_callback_url)).to be_a_kind_of(String)
295
+ end
296
+ it 'deserializes the data of timeout' do
297
+ expect(instance._deserialize("Integer", instance.timeout)).to be_a_kind_of(Integer)
298
+ end
299
+ it 'deserializes the data of privacy_mode' do
300
+ expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass)
301
+ end
302
+ end
303
+
304
+ describe 'test method "to_s"' do
305
+ it 'returns the string representation of the object' do
306
+ instance = Freeclimb::OutDial.new(
307
+ action_url: "TS",
308
+ call_connect_url: "TS",
309
+ calling_number: "TS",
310
+ destination: "TS",
311
+ if_machine: "REDIRECT",
312
+ if_machine_url: "TS",
313
+ send_digits: "TS",
314
+ status_callback_url: "TS",
315
+ timeout: 1,
316
+ privacy_mode: true,
317
+ )
318
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
319
+ end
320
+ end
321
+
322
+ describe 'test method "to_hash"' do
323
+ it 'returns the object in the form of hash' do
324
+ instance = Freeclimb::OutDial.new(
325
+ action_url: "TS",
326
+ call_connect_url: "TS",
327
+ calling_number: "TS",
328
+ destination: "TS",
329
+ if_machine: "REDIRECT",
330
+ if_machine_url: "TS",
331
+ send_digits: "TS",
332
+ status_callback_url: "TS",
333
+ timeout: 1,
334
+ privacy_mode: true,
335
+ )
336
+ expect(instance.to_hash).to be_a_kind_of(Hash)
337
+ end
338
+ it 'creates equal hash for two equal objects' do
339
+ obj = Object.new()
340
+ instance_1 = Freeclimb::OutDial.new(
341
+ action_url: "TS",
342
+ call_connect_url: "TS",
343
+ calling_number: "TS",
344
+ destination: "TS",
345
+ if_machine: "REDIRECT",
346
+ if_machine_url: "TS",
347
+ send_digits: "TS",
348
+ status_callback_url: "TS",
349
+ timeout: 1,
350
+ privacy_mode: true,
351
+ )
352
+ instance_2 = Freeclimb::OutDial.new(
353
+ action_url: "TS",
354
+ call_connect_url: "TS",
355
+ calling_number: "TS",
356
+ destination: "TS",
357
+ if_machine: "REDIRECT",
358
+ if_machine_url: "TS",
359
+ send_digits: "TS",
360
+ status_callback_url: "TS",
361
+ timeout: 1,
362
+ privacy_mode: true,
363
+ )
364
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
365
+ end
366
+ end
367
+
368
+ describe 'test method "_to_hash"' do
369
+ instance = Freeclimb::OutDial.new(
370
+ action_url: "TS",
371
+
372
+ call_connect_url: "TS",
373
+
374
+ calling_number: "TS",
375
+
376
+ destination: "TS",
377
+
378
+ if_machine: "REDIRECT",
379
+
380
+ if_machine_url: "TS",
381
+
382
+ send_digits: "TS",
383
+
384
+ status_callback_url: "TS",
385
+
386
+ timeout: 1,
387
+
388
+ privacy_mode: true,
389
+ )
390
+ it 'returns action_url in the form of hash' do
391
+ expect(instance._to_hash(instance.action_url)).to eq(instance.action_url)
392
+ end
393
+ it 'returns call_connect_url in the form of hash' do
394
+ expect(instance._to_hash(instance.call_connect_url)).to eq(instance.call_connect_url)
395
+ end
396
+ it 'returns calling_number in the form of hash' do
397
+ expect(instance._to_hash(instance.calling_number)).to eq(instance.calling_number)
398
+ end
399
+ it 'returns destination in the form of hash' do
400
+ expect(instance._to_hash(instance.destination)).to eq(instance.destination)
401
+ end
402
+ it 'returns if_machine in the form of hash' do
403
+ expect(instance._to_hash(instance.if_machine)).to eq(instance.if_machine)
404
+ end
405
+ it 'returns if_machine_url in the form of hash' do
406
+ expect(instance._to_hash(instance.if_machine_url)).to eq(instance.if_machine_url)
407
+ end
408
+ it 'returns send_digits in the form of hash' do
409
+ expect(instance._to_hash(instance.send_digits)).to eq(instance.send_digits)
410
+ end
411
+ it 'returns status_callback_url in the form of hash' do
412
+ expect(instance._to_hash(instance.status_callback_url)).to eq(instance.status_callback_url)
413
+ end
414
+ it 'returns timeout in the form of hash' do
415
+ expect(instance._to_hash(instance.timeout)).to eq(instance.timeout)
416
+ end
417
+ it 'returns privacy_mode in the form of hash' do
418
+ expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode)
85
419
  end
86
420
  end
87
421