freeclimb 4.5.1 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/Gemfile.lock +58 -43
  4. data/README.md +13 -6
  5. data/docs/AddToConference.md +0 -2
  6. data/docs/AddToConferenceAllOf.md +0 -2
  7. data/docs/CreateWebRTCToken.md +22 -0
  8. data/docs/DefaultApi.md +302 -7
  9. data/docs/GetDigits.md +1 -1
  10. data/docs/GetDigitsAllOf.md +1 -1
  11. data/docs/IncomingNumberResult.md +3 -1
  12. data/docs/IncomingNumberResultAllOf.md +3 -1
  13. data/docs/MessageRequest.md +2 -2
  14. data/docs/MessageRequestAllOf.md +2 -2
  15. data/docs/MessageResult.md +3 -1
  16. data/docs/MessageResultAllOf.md +3 -1
  17. data/docs/Play.md +0 -2
  18. data/docs/PlayAllOf.md +0 -2
  19. data/docs/RemoveFromConference.md +1 -4
  20. data/docs/SMSTenDLCCampaign.md +10 -0
  21. data/docs/SMSTollFreeCampaign.md +30 -0
  22. data/docs/SMSTollFreeCampaignsListResult.md +32 -0
  23. data/docs/SMSTollFreeCampaignsListResultAllOf.md +18 -0
  24. data/docs/Say.md +0 -2
  25. data/docs/SayAllOf.md +0 -2
  26. data/docs/SetListen.md +0 -2
  27. data/docs/SetListenAllOf.md +0 -2
  28. data/docs/SetTalk.md +0 -2
  29. data/docs/SetTalkAllOf.md +0 -2
  30. data/docs/TFN.md +18 -0
  31. data/docs/TerminateConference.md +1 -4
  32. data/lib/freeclimb/api/default_api.rb +258 -7
  33. data/lib/freeclimb/models/add_to_conference.rb +1 -13
  34. data/lib/freeclimb/models/add_to_conference_all_of.rb +1 -13
  35. data/lib/freeclimb/models/create_web_rtc_token.rb +278 -0
  36. data/lib/freeclimb/models/get_digits.rb +1 -1
  37. data/lib/freeclimb/models/get_digits_all_of.rb +1 -1
  38. data/lib/freeclimb/models/incoming_number_result.rb +16 -5
  39. data/lib/freeclimb/models/incoming_number_result_all_of.rb +16 -5
  40. data/lib/freeclimb/models/message_request.rb +11 -9
  41. data/lib/freeclimb/models/message_request_all_of.rb +11 -9
  42. data/lib/freeclimb/models/message_result.rb +19 -5
  43. data/lib/freeclimb/models/message_result_all_of.rb +19 -5
  44. data/lib/freeclimb/models/play.rb +1 -13
  45. data/lib/freeclimb/models/play_all_of.rb +1 -13
  46. data/lib/freeclimb/models/remove_from_conference.rb +3 -23
  47. data/lib/freeclimb/models/say.rb +1 -13
  48. data/lib/freeclimb/models/say_all_of.rb +1 -13
  49. data/lib/freeclimb/models/set_listen.rb +2 -18
  50. data/lib/freeclimb/models/set_listen_all_of.rb +2 -18
  51. data/lib/freeclimb/models/set_talk.rb +2 -18
  52. data/lib/freeclimb/models/set_talk_all_of.rb +2 -18
  53. data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +131 -1
  54. data/lib/freeclimb/models/sms_toll_free_campaign.rb +349 -0
  55. data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +311 -0
  56. data/lib/freeclimb/models/sms_toll_free_campaigns_list_result_all_of.rb +226 -0
  57. data/lib/freeclimb/models/terminate_conference.rb +3 -23
  58. data/lib/freeclimb/models/tfn.rb +229 -0
  59. data/lib/freeclimb/utils/signature_information.rb +1 -1
  60. data/lib/freeclimb/version.rb +1 -1
  61. data/lib/freeclimb.rb +5 -2
  62. data/openapi.json +605 -110
  63. data/package.json +8 -0
  64. data/spec/api/default_api_spec.rb +104 -3
  65. data/spec/models/add_to_conference_spec.rb +0 -30
  66. data/spec/models/create_web_rtc_token_spec.rb +225 -0
  67. data/spec/models/get_digits_spec.rb +19 -19
  68. data/spec/models/incoming_number_result_spec.rb +25 -0
  69. data/spec/models/message_request_spec.rb +23 -23
  70. data/spec/models/message_result_spec.rb +30 -0
  71. data/spec/models/play_spec.rb +0 -30
  72. data/spec/models/remove_from_conference_spec.rb +1 -67
  73. data/spec/models/say_spec.rb +0 -30
  74. data/spec/models/set_listen_spec.rb +0 -31
  75. data/spec/models/set_talk_spec.rb +0 -31
  76. data/spec/models/sms_ten_dlc_campaign_spec.rb +165 -0
  77. data/spec/models/sms_toll_free_campaign_spec.rb +368 -0
  78. data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +371 -0
  79. data/spec/models/terminate_conference_spec.rb +1 -67
  80. data/spec/models/tfn_spec.rb +162 -0
  81. data/spec/utils/request_verifier_spec.rb +5 -4
  82. data/spec/utils/signature_information_spec.rb +7 -1
  83. data/yarn.lock +1292 -0
  84. metadata +102 -82
@@ -0,0 +1,368 @@
1
+ =begin
2
+ #FreeClimb API
3
+
4
+ #FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@freeclimb.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Freeclimb::SMSTollFreeCampaign
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Freeclimb::SMSTollFreeCampaign do
21
+ let(:instance) { Freeclimb::SMSTollFreeCampaign.new }
22
+
23
+ describe 'test an instance of SMSTollFreeCampaign' do
24
+ it 'should create an instance of SMSTollFreeCampaign' do
25
+ expect(instance).to be_instance_of(Freeclimb::SMSTollFreeCampaign)
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "account_id"' do
30
+ it 'should work' do
31
+ instance.account_id = "TEST_STRING"
32
+ expect(instance.account_id).to eq("TEST_STRING")
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "campaign_id"' do
37
+ it 'should work' do
38
+ instance.campaign_id = "TEST_STRING"
39
+ expect(instance.campaign_id).to eq("TEST_STRING")
40
+ end
41
+ end
42
+
43
+ describe 'test attribute "use_case"' do
44
+ it 'should work' do
45
+ instance.use_case = "TEST_STRING"
46
+ expect(instance.use_case).to eq("TEST_STRING")
47
+ end
48
+ end
49
+
50
+
51
+ describe 'test attribute "registration_status"' do
52
+ it 'assigns value UNREGISTERED' do
53
+ instance.registration_status = "UNREGISTERED"
54
+ expect(instance.registration_status).to eq("UNREGISTERED")
55
+ end
56
+ it 'assigns value INITIATED' do
57
+ instance.registration_status = "INITIATED"
58
+ expect(instance.registration_status).to eq("INITIATED")
59
+ end
60
+ it 'assigns value PENDING' do
61
+ instance.registration_status = "PENDING"
62
+ expect(instance.registration_status).to eq("PENDING")
63
+ end
64
+ it 'assigns value DECLINED' do
65
+ instance.registration_status = "DECLINED"
66
+ expect(instance.registration_status).to eq("DECLINED")
67
+ end
68
+ it 'assigns value REGISTERED' do
69
+ instance.registration_status = "REGISTERED"
70
+ expect(instance.registration_status).to eq("REGISTERED")
71
+ end
72
+ it 'throws error on invalid enum' do
73
+ instance = Freeclimb::SMSTollFreeCampaign.new
74
+ expect{instance.registration_status = "INVALID_ENUM"}.to raise_error(ArgumentError)
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "date_created"' do
79
+ it 'should work' do
80
+ instance.date_created = "TEST_STRING"
81
+ expect(instance.date_created).to eq("TEST_STRING")
82
+ end
83
+ end
84
+
85
+ describe 'test attribute "date_updated"' do
86
+ it 'should work' do
87
+ instance.date_updated = "TEST_STRING"
88
+ expect(instance.date_updated).to eq("TEST_STRING")
89
+ end
90
+ end
91
+
92
+ describe 'test attribute "revision"' do
93
+ it 'should work' do
94
+ instance.revision = 1
95
+ expect(instance.revision).to eq(1)
96
+ end
97
+ end
98
+
99
+ describe 'test method "initialize"' do
100
+ it 'properly initializes with values' do
101
+ expect{instance = Freeclimb::SMSTollFreeCampaign.new(
102
+ account_id: "TS",
103
+ campaign_id: "TS",
104
+ use_case: "TS",
105
+ registration_status: "UNREGISTERED",
106
+ date_created: "TS",
107
+ date_updated: "TS",
108
+ revision: 1,
109
+ )}.not_to raise_error()
110
+ end
111
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaign' do
112
+ expect{instance = Freeclimb::SMSTollFreeCampaign.new(
113
+ account_id: "TS",
114
+ campaign_id: "TS",
115
+ use_case: "TS",
116
+ registration_status: "UNREGISTERED",
117
+ date_created: "TS",
118
+ date_updated: "TS",
119
+ revision: 1,
120
+ invalid_attribute: true
121
+ )}.to raise_error(ArgumentError)
122
+ end
123
+ it 'fails to initialize with invalid attribute' do
124
+ expect{instance = Freeclimb::SMSTollFreeCampaign.new(
125
+ account_id: "TS",
126
+ campaign_id: "TS",
127
+ use_case: "TS",
128
+ registration_status: "UNREGISTERED",
129
+ date_created: "TS",
130
+ date_updated: "TS",
131
+ revision: 1,
132
+ invalid_attribute: true
133
+ )}.to raise_error(ArgumentError)
134
+ end
135
+ end
136
+
137
+ describe 'test method "valid"' do
138
+ it 'checks if properties are valid' do
139
+ instance = Freeclimb::SMSTollFreeCampaign.new(
140
+ account_id: "TS",
141
+ campaign_id: "TS",
142
+ use_case: "TS",
143
+ registration_status: "UNREGISTERED",
144
+ date_created: "TS",
145
+ date_updated: "TS",
146
+ revision: 1,
147
+ )
148
+ expect(instance.valid?).to eq(true)
149
+ end
150
+ it 'checks if properties are invalid' do
151
+ instance = Freeclimb::SMSTollFreeCampaign.new(
152
+ account_id: nil,
153
+ campaign_id: nil,
154
+ use_case: nil,
155
+ date_created: nil,
156
+ date_updated: nil,
157
+ revision: nil,
158
+ )
159
+ expect(instance.valid?).to eq(false)
160
+ end
161
+ it 'checks if model is empty' do
162
+ instance = Freeclimb::SMSTollFreeCampaign.new()
163
+ expect(instance.valid?).to eq(false)
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::SMSTollFreeCampaign.new(
171
+ account_id: "TS",
172
+ campaign_id: "TS",
173
+ use_case: "TS",
174
+ registration_status: "UNREGISTERED",
175
+ date_created: "TS",
176
+ date_updated: "TS",
177
+ revision: 1,
178
+ )
179
+ instance_2 = Freeclimb::SMSTollFreeCampaign.new(
180
+ account_id: "TS",
181
+ campaign_id: "TS",
182
+ use_case: "TS",
183
+ registration_status: "UNREGISTERED",
184
+ date_created: "TS",
185
+ date_updated: "TS",
186
+ revision: 1,
187
+ )
188
+ expect(instance_1.eql?(instance_2)).to eq(true)
189
+ end
190
+ it 'checks if objects are not equal' do
191
+ instance_1 = Freeclimb::SMSTollFreeCampaign.new(
192
+ account_id: "TS",
193
+ campaign_id: "TS",
194
+ use_case: "TS",
195
+ registration_status: "UNREGISTERED",
196
+ date_created: "TS",
197
+ date_updated: "TS",
198
+ revision: 1,
199
+ )
200
+ instance_2 = Freeclimb::SMSTollFreeCampaign.new(
201
+ account_id: "ST",
202
+ campaign_id: "ST",
203
+ use_case: "ST",
204
+ registration_status: "INITIATED",
205
+ date_created: "ST",
206
+ date_updated: "ST",
207
+ revision: 0,
208
+ )
209
+ expect(instance_1.eql?(instance_2)).to eq(false)
210
+ end
211
+ end
212
+
213
+ describe 'test method "hash"' do
214
+ it 'calculates hash code' do
215
+ instance = Freeclimb::SMSTollFreeCampaign.new(
216
+ account_id: "TS",
217
+ campaign_id: "TS",
218
+ use_case: "TS",
219
+ registration_status: "UNREGISTERED",
220
+ date_created: "TS",
221
+ date_updated: "TS",
222
+ revision: 1,
223
+ )
224
+ expect(instance.hash).to be_a_kind_of(Integer)
225
+ end
226
+ end
227
+
228
+ describe 'test method "build_from_hash"' do
229
+ it 'builds equivalent model from hash code' do
230
+ instance_1 = Freeclimb::SMSTollFreeCampaign.new(
231
+ account_id: "TS",
232
+ campaign_id: "TS",
233
+ use_case: "TS",
234
+ registration_status: "UNREGISTERED",
235
+ date_created: "TS",
236
+ date_updated: "TS",
237
+ revision: 1,
238
+ )
239
+ instance_2 = Freeclimb::SMSTollFreeCampaign.new
240
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
241
+ end
242
+ end
243
+
244
+ describe 'test method "_deserialize"' do
245
+ instance = Freeclimb::SMSTollFreeCampaign.new(
246
+ account_id: "TS",
247
+ campaign_id: "TS",
248
+ use_case: "TS",
249
+ registration_status: "UNREGISTERED",
250
+ date_created: "TS",
251
+ date_updated: "TS",
252
+ revision: 1,
253
+ )
254
+ it 'deserializes the data of account_id' do
255
+ expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
256
+ end
257
+ it 'deserializes the data of campaign_id' do
258
+ expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String)
259
+ end
260
+ it 'deserializes the data of use_case' do
261
+ expect(instance._deserialize("String", instance.use_case)).to be_a_kind_of(String)
262
+ end
263
+ it 'deserializes the data of registration_status' do
264
+ expect(instance._deserialize("String", instance.registration_status)).to be_a_kind_of(String)
265
+ end
266
+ it 'deserializes the data of date_created' do
267
+ expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
268
+ end
269
+ it 'deserializes the data of date_updated' do
270
+ expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
271
+ end
272
+ it 'deserializes the data of revision' do
273
+ expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
274
+ end
275
+ end
276
+
277
+ describe 'test method "to_s"' do
278
+ it 'returns the string representation of the object' do
279
+ instance = Freeclimb::SMSTollFreeCampaign.new(
280
+ account_id: "TS",
281
+ campaign_id: "TS",
282
+ use_case: "TS",
283
+ registration_status: "UNREGISTERED",
284
+ date_created: "TS",
285
+ date_updated: "TS",
286
+ revision: 1,
287
+ )
288
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
289
+ end
290
+ end
291
+
292
+ describe 'test method "to_hash"' do
293
+ it 'returns the object in the form of hash' do
294
+ instance = Freeclimb::SMSTollFreeCampaign.new(
295
+ account_id: "TS",
296
+ campaign_id: "TS",
297
+ use_case: "TS",
298
+ registration_status: "UNREGISTERED",
299
+ date_created: "TS",
300
+ date_updated: "TS",
301
+ revision: 1,
302
+ )
303
+ expect(instance.to_hash).to be_a_kind_of(Hash)
304
+ end
305
+ it 'creates equal hash for two equal objects' do
306
+ obj = Object.new()
307
+ instance_1 = Freeclimb::SMSTollFreeCampaign.new(
308
+ account_id: "TS",
309
+ campaign_id: "TS",
310
+ use_case: "TS",
311
+ registration_status: "UNREGISTERED",
312
+ date_created: "TS",
313
+ date_updated: "TS",
314
+ revision: 1,
315
+ )
316
+ instance_2 = Freeclimb::SMSTollFreeCampaign.new(
317
+ account_id: "TS",
318
+ campaign_id: "TS",
319
+ use_case: "TS",
320
+ registration_status: "UNREGISTERED",
321
+ date_created: "TS",
322
+ date_updated: "TS",
323
+ revision: 1,
324
+ )
325
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
326
+ end
327
+ end
328
+
329
+ describe 'test method "_to_hash"' do
330
+ instance = Freeclimb::SMSTollFreeCampaign.new(
331
+ account_id: "TS",
332
+
333
+ campaign_id: "TS",
334
+
335
+ use_case: "TS",
336
+
337
+ registration_status: "UNREGISTERED",
338
+
339
+ date_created: "TS",
340
+
341
+ date_updated: "TS",
342
+
343
+ revision: 1,
344
+ )
345
+ it 'returns account_id in the form of hash' do
346
+ expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
347
+ end
348
+ it 'returns campaign_id in the form of hash' do
349
+ expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id)
350
+ end
351
+ it 'returns use_case in the form of hash' do
352
+ expect(instance._to_hash(instance.use_case)).to eq(instance.use_case)
353
+ end
354
+ it 'returns registration_status in the form of hash' do
355
+ expect(instance._to_hash(instance.registration_status)).to eq(instance.registration_status)
356
+ end
357
+ it 'returns date_created in the form of hash' do
358
+ expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
359
+ end
360
+ it 'returns date_updated in the form of hash' do
361
+ expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
362
+ end
363
+ it 'returns revision in the form of hash' do
364
+ expect(instance._to_hash(instance.revision)).to eq(instance.revision)
365
+ end
366
+ end
367
+
368
+ end