freeclimb 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +18 -4
  5. data/docs/AvailableNumber.md +0 -4
  6. data/docs/BlobListResponse.md +32 -0
  7. data/docs/BlobResult.md +32 -0
  8. data/docs/CreateBlobRequest.md +22 -0
  9. data/docs/DefaultApi.md +449 -6
  10. data/docs/IncomingNumberResult.md +0 -4
  11. data/docs/ModifyBlobRequest.md +20 -0
  12. data/docs/PlatformError.md +24 -0
  13. data/docs/ReplaceBlobRequest.md +18 -0
  14. data/docs/Say.md +2 -0
  15. data/docs/TTSEngine.md +20 -0
  16. data/docs/TTSEngineName.md +18 -0
  17. data/lib/freeclimb/api/default_api.rb +715 -8
  18. data/lib/freeclimb/models/available_number.rb +1 -23
  19. data/lib/freeclimb/models/blob_list_response.rb +303 -0
  20. data/lib/freeclimb/models/blob_result.rb +332 -0
  21. data/lib/freeclimb/models/create_blob_request.rb +255 -0
  22. data/lib/freeclimb/models/incoming_number_result.rb +1 -23
  23. data/lib/freeclimb/models/modify_blob_request.rb +245 -0
  24. data/lib/freeclimb/models/platform_error.rb +244 -0
  25. data/lib/freeclimb/models/replace_blob_request.rb +221 -0
  26. data/lib/freeclimb/models/say.rb +10 -1
  27. data/lib/freeclimb/models/tts_engine.rb +250 -0
  28. data/lib/freeclimb/models/tts_engine_name.rb +36 -0
  29. data/lib/freeclimb/version.rb +1 -1
  30. data/lib/freeclimb.rb +8 -0
  31. data/openapi.json +894 -97
  32. data/spec/api/default_api_spec.rb +188 -32
  33. data/spec/models/account_result_spec.rb +3 -3
  34. data/spec/models/available_number_spec.rb +3 -98
  35. data/spec/models/blob_list_response_spec.rb +502 -0
  36. data/spec/models/blob_result_spec.rb +489 -0
  37. data/spec/models/call_result_spec.rb +3 -3
  38. data/spec/models/conference_result_spec.rb +3 -3
  39. data/spec/models/create_blob_request_spec.rb +273 -0
  40. data/spec/models/export_request_spec.rb +6 -6
  41. data/spec/models/export_result_spec.rb +6 -6
  42. data/spec/models/incoming_number_result_spec.rb +6 -102
  43. data/spec/models/log_result_spec.rb +3 -3
  44. data/spec/models/message_result_spec.rb +3 -3
  45. data/spec/models/modify_blob_request_spec.rb +226 -0
  46. data/spec/models/platform_error_spec.rb +318 -0
  47. data/spec/models/queue_result_spec.rb +3 -3
  48. data/spec/models/replace_blob_request_spec.rb +176 -0
  49. data/spec/models/say_spec.rb +50 -0
  50. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +3 -3
  51. data/spec/models/transcribe_utterance_spec.rb +3 -3
  52. data/spec/models/tts_engine_name_spec.rb +75 -0
  53. data/spec/models/tts_engine_spec.rb +183 -0
  54. data/spec/spec_helper.rb +1 -1
  55. metadata +26 -2
@@ -0,0 +1,176 @@
1
+ # #FreeClimb API
2
+ #
3
+ # 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.
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0
6
+ # Contact: support@freeclimb.com
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 7.9.0
9
+ #
10
+
11
+ require "spec_helper"
12
+ require "json"
13
+ require "date"
14
+ include Freeclimb
15
+
16
+ # Unit tests for Freeclimb::ReplaceBlobRequest
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe Freeclimb::ReplaceBlobRequest do
20
+ let(:instance) { Freeclimb::ReplaceBlobRequest.new }
21
+
22
+ describe "test an instance of ReplaceBlobRequest" do
23
+ it "should create an instance of ReplaceBlobRequest" do
24
+ expect(instance).to be_instance_of(Freeclimb::ReplaceBlobRequest)
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "blob"' do
29
+ it "should work" do
30
+ testObject = Object.new
31
+ instance.blob = testObject
32
+ expect(instance.blob).to eq(testObject)
33
+
34
+ instance.blob = Object.new
35
+ expect(instance.blob).to be_instance_of(Object)
36
+ end
37
+ end
38
+
39
+ describe 'test method "initialize"' do
40
+ it "properly initializes with values" do
41
+ expect {
42
+ Freeclimb::ReplaceBlobRequest.new(
43
+ blob: Object.new
44
+ )
45
+ }.not_to raise_error
46
+ end
47
+ it "fails to initialize with input argument that is not a hash in Freeclimb::ReplaceBlobRequest" do
48
+ expect {
49
+ Freeclimb::ReplaceBlobRequest.new(
50
+ blob: Object.new,
51
+
52
+ invalid_attribute: true
53
+ )
54
+ }.to raise_error(ArgumentError)
55
+ end
56
+ it "fails to initialize with invalid attribute" do
57
+ expect {
58
+ Freeclimb::ReplaceBlobRequest.new(
59
+ blob: Object.new,
60
+
61
+ invalid_attribute: true
62
+ )
63
+ }.to raise_error(ArgumentError)
64
+ end
65
+ end
66
+
67
+ describe 'test method "valid"' do
68
+ it "checks if properties are valid" do
69
+ instance = Freeclimb::ReplaceBlobRequest.new(
70
+ blob: Object.new
71
+ )
72
+ expect(instance.valid?).to eq(true)
73
+ end
74
+
75
+ skip "checks if properties are invalid" do
76
+ instance = Freeclimb::ReplaceBlobRequest.new
77
+
78
+ expect(instance.valid?).to eq(false)
79
+ end
80
+ end
81
+
82
+ describe 'test method "eql?"' do
83
+ it "checks if objects are equal" do
84
+ obj_blob = Object.new
85
+
86
+ instance_1 = Freeclimb::ReplaceBlobRequest.new(
87
+ blob: obj_blob
88
+ )
89
+ instance_2 = Freeclimb::ReplaceBlobRequest.new(
90
+ blob: obj_blob
91
+ )
92
+ expect(instance_1.eql?(instance_2)).to eq(true)
93
+ end
94
+
95
+ it "checks if objects are not equal" do
96
+ instance_1 = Freeclimb::ReplaceBlobRequest.new(
97
+ blob: Object.new,
98
+
99
+ blob: Object.new
100
+ )
101
+ instance_2 = Freeclimb::ReplaceBlobRequest.new(
102
+ blob: Object.new
103
+ )
104
+ expect(instance_1.eql?(instance_2)).to eq(false)
105
+ end
106
+ end
107
+
108
+ describe 'test method "hash"' do
109
+ it "calculates hash code" do
110
+ instance = Freeclimb::ReplaceBlobRequest.new(
111
+ blob: Object.new
112
+ )
113
+ expect(instance.hash).to be_a_kind_of(Integer)
114
+ end
115
+ end
116
+
117
+ describe 'test method "build_from_hash"' do
118
+ it "builds equivalent model from hash code" do
119
+ instance_1 = Freeclimb::ReplaceBlobRequest.new(
120
+ blob: Object.new
121
+ )
122
+ instance_2 = Freeclimb::ReplaceBlobRequest.new(
123
+ blob: Object.new
124
+ )
125
+
126
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
127
+ end
128
+ end
129
+
130
+ describe 'test method "_deserialize"' do
131
+ instance = Freeclimb::ReplaceBlobRequest.new(
132
+ blob: Object.new
133
+ )
134
+
135
+ it "deserializes the data of blob" do
136
+ expect(instance._deserialize("Object", instance.blob)).to be_a_kind_of(Object)
137
+ end
138
+ end
139
+
140
+ describe 'test method "to_s"' do
141
+ it "returns the string representation of the object" do
142
+ instance = Freeclimb::ReplaceBlobRequest.new(
143
+ blob: Object.new
144
+ )
145
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
146
+ end
147
+ end
148
+
149
+ describe 'test method "to_hash"' do
150
+ it "returns the object in the form of hash" do
151
+ instance = Freeclimb::ReplaceBlobRequest.new(
152
+ blob: Object.new
153
+ )
154
+ expect(instance.to_hash).to be_a_kind_of(Hash)
155
+ end
156
+ it "creates equal hash for two equal objects" do
157
+ obj = Object.new
158
+
159
+ instance_1 = Freeclimb::ReplaceBlobRequest.new(
160
+ blob: obj
161
+ )
162
+ instance_2 = Freeclimb::ReplaceBlobRequest.new(
163
+ blob: obj
164
+ )
165
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
166
+ end
167
+ end
168
+
169
+ describe 'test method "_to_hash"' do
170
+ instance = Freeclimb::ReplaceBlobRequest.new
171
+
172
+ it "returns blob in the form of hash" do
173
+ expect(instance._to_hash(instance.blob)).to eq(instance.blob)
174
+ end
175
+ end
176
+ end
@@ -39,6 +39,13 @@ describe Freeclimb::Say do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "engine"' do
43
+ it "should work" do
44
+ instance.engine = TTSEngine.new
45
+ expect(instance.engine).to be_instance_of(TTSEngine)
46
+ end
47
+ end
48
+
42
49
  describe 'test attribute "loop"' do
43
50
  it "should work" do
44
51
  instance.loop = 1
@@ -61,6 +68,8 @@ describe Freeclimb::Say do
61
68
 
62
69
  language: "TS",
63
70
 
71
+ engine: TTSEngine.new,
72
+
64
73
  loop: 1,
65
74
 
66
75
  privacy_mode: true
@@ -74,6 +83,8 @@ describe Freeclimb::Say do
74
83
 
75
84
  language: "TS",
76
85
 
86
+ engine: TTSEngine.new,
87
+
77
88
  loop: 1,
78
89
 
79
90
  privacy_mode: true,
@@ -89,6 +100,8 @@ describe Freeclimb::Say do
89
100
 
90
101
  language: "TS",
91
102
 
103
+ engine: TTSEngine.new,
104
+
92
105
  loop: 1,
93
106
 
94
107
  privacy_mode: true,
@@ -106,6 +119,8 @@ describe Freeclimb::Say do
106
119
 
107
120
  language: "TS",
108
121
 
122
+ engine: TTSEngine.new,
123
+
109
124
  loop: 1,
110
125
 
111
126
  privacy_mode: true
@@ -122,11 +137,15 @@ describe Freeclimb::Say do
122
137
 
123
138
  describe 'test method "eql?"' do
124
139
  it "checks if objects are equal" do
140
+ obj_engine = Object.new
141
+
125
142
  instance_1 = Freeclimb::Say.new(
126
143
  text: "TS",
127
144
 
128
145
  language: "TS",
129
146
 
147
+ engine: obj_engine,
148
+
130
149
  loop: 1,
131
150
 
132
151
  privacy_mode: true
@@ -136,6 +155,8 @@ describe Freeclimb::Say do
136
155
 
137
156
  language: "TS",
138
157
 
158
+ engine: obj_engine,
159
+
139
160
  loop: 1,
140
161
 
141
162
  privacy_mode: true
@@ -149,6 +170,8 @@ describe Freeclimb::Say do
149
170
 
150
171
  language: "TS",
151
172
 
173
+ engine: TTSEngine.new,
174
+
152
175
  loop: 2,
153
176
 
154
177
  privacy_mode: true
@@ -158,6 +181,8 @@ describe Freeclimb::Say do
158
181
 
159
182
  language: "ST",
160
183
 
184
+ engine: TTSEngine.new,
185
+
161
186
  loop: 1,
162
187
 
163
188
  privacy_mode: false
@@ -173,6 +198,8 @@ describe Freeclimb::Say do
173
198
 
174
199
  language: "TS",
175
200
 
201
+ engine: TTSEngine.new,
202
+
176
203
  loop: 1,
177
204
 
178
205
  privacy_mode: true
@@ -188,6 +215,8 @@ describe Freeclimb::Say do
188
215
 
189
216
  language: "TS",
190
217
 
218
+ engine: TTSEngine.new,
219
+
191
220
  loop: 1,
192
221
 
193
222
  privacy_mode: true
@@ -197,6 +226,8 @@ describe Freeclimb::Say do
197
226
 
198
227
  language: "TS",
199
228
 
229
+ engine: TTSEngine.new,
230
+
200
231
  loop: 1,
201
232
 
202
233
  privacy_mode: true
@@ -212,6 +243,8 @@ describe Freeclimb::Say do
212
243
 
213
244
  language: "TS",
214
245
 
246
+ engine: TTSEngine.new,
247
+
215
248
  loop: 1,
216
249
 
217
250
  privacy_mode: true
@@ -224,6 +257,10 @@ describe Freeclimb::Say do
224
257
  expect(instance._deserialize("String", instance.language)).to be_a_kind_of(String)
225
258
  end
226
259
 
260
+ it "deserializes the data of engine" do
261
+ expect(instance._deserialize("Object", instance.engine)).to be_a_kind_of(TTSEngine)
262
+ end
263
+
227
264
  it "deserializes the data of loop" do
228
265
  expect(instance._deserialize("Integer", instance.loop)).to be_a_kind_of(Integer)
229
266
  end
@@ -240,6 +277,8 @@ describe Freeclimb::Say do
240
277
 
241
278
  language: "TS",
242
279
 
280
+ engine: TTSEngine.new,
281
+
243
282
  loop: 1,
244
283
 
245
284
  privacy_mode: true
@@ -255,6 +294,8 @@ describe Freeclimb::Say do
255
294
 
256
295
  language: "TS",
257
296
 
297
+ engine: TTSEngine.new,
298
+
258
299
  loop: 1,
259
300
 
260
301
  privacy_mode: true
@@ -262,11 +303,15 @@ describe Freeclimb::Say do
262
303
  expect(instance.to_hash).to be_a_kind_of(Hash)
263
304
  end
264
305
  it "creates equal hash for two equal objects" do
306
+ obj = TTSEngine.new
307
+
265
308
  instance_1 = Freeclimb::Say.new(
266
309
  text: "TS",
267
310
 
268
311
  language: "TS",
269
312
 
313
+ engine: obj,
314
+
270
315
  loop: 1,
271
316
 
272
317
  privacy_mode: true
@@ -276,6 +321,8 @@ describe Freeclimb::Say do
276
321
 
277
322
  language: "TS",
278
323
 
324
+ engine: obj,
325
+
279
326
  loop: 1,
280
327
 
281
328
  privacy_mode: true
@@ -300,6 +347,9 @@ describe Freeclimb::Say do
300
347
  it "returns language in the form of hash" do
301
348
  expect(instance._to_hash(instance.language)).to eq(instance.language)
302
349
  end
350
+ it "returns engine in the form of hash" do
351
+ expect(instance._to_hash(instance.engine)).to eq(instance.engine)
352
+ end
303
353
  it "returns loop in the form of hash" do
304
354
  expect(instance._to_hash(instance.loop)).to eq(instance.loop)
305
355
  end
@@ -545,7 +545,7 @@ describe Freeclimb::SMSTenDLCPartnerCampaign do
545
545
 
546
546
  describe 'test method "eql?"' do
547
547
  it "checks if objects are equal" do
548
- obj_SMSTenDLCPartnerCampaignBrand = SMSTenDLCPartnerCampaignBrand.new
548
+ obj_brand = Object.new
549
549
 
550
550
  instance_1 = Freeclimb::SMSTenDLCPartnerCampaign.new(
551
551
  account_id: "TS",
@@ -602,7 +602,7 @@ describe Freeclimb::SMSTenDLCPartnerCampaign do
602
602
 
603
603
  optout_message: "TS",
604
604
 
605
- brand: obj_SMSTenDLCPartnerCampaignBrand
605
+ brand: obj_brand
606
606
  )
607
607
  instance_2 = Freeclimb::SMSTenDLCPartnerCampaign.new(
608
608
  account_id: "TS",
@@ -659,7 +659,7 @@ describe Freeclimb::SMSTenDLCPartnerCampaign do
659
659
 
660
660
  optout_message: "TS",
661
661
 
662
- brand: obj_SMSTenDLCPartnerCampaignBrand
662
+ brand: obj_brand
663
663
  )
664
664
  expect(instance_1.eql?(instance_2)).to eq(true)
665
665
  end
@@ -152,14 +152,14 @@ describe Freeclimb::TranscribeUtterance do
152
152
 
153
153
  describe 'test method "eql?"' do
154
154
  it "checks if objects are equal" do
155
- obj_TranscribeUtteranceRecord = TranscribeUtteranceRecord.new
155
+ obj_record = Object.new
156
156
 
157
157
  instance_1 = Freeclimb::TranscribeUtterance.new(
158
158
  action_url: "TS",
159
159
 
160
160
  play_beep: true,
161
161
 
162
- record: obj_TranscribeUtteranceRecord,
162
+ record: obj_record,
163
163
 
164
164
  privacy_for_logging: true,
165
165
 
@@ -172,7 +172,7 @@ describe Freeclimb::TranscribeUtterance do
172
172
 
173
173
  play_beep: true,
174
174
 
175
- record: obj_TranscribeUtteranceRecord,
175
+ record: obj_record,
176
176
 
177
177
  privacy_for_logging: true,
178
178
 
@@ -0,0 +1,75 @@
1
+ # #FreeClimb API
2
+ #
3
+ # 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.
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0
6
+ # Contact: support@freeclimb.com
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 7.9.0
9
+ #
10
+
11
+ require "spec_helper"
12
+ require "json"
13
+ require "date"
14
+ include Freeclimb
15
+
16
+ # Unit tests for Freeclimb::TTSEngineName
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe Freeclimb::TTSEngineName do
20
+ let(:instance) { Freeclimb::TTSEngineName.new }
21
+
22
+ describe "test an instance of TTSEngineName" do
23
+ it "should create an instance of TTSEngineName" do
24
+ expect(instance).to be_instance_of(Freeclimb::TTSEngineName)
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "FREECLIMB_STANDARD"' do
29
+ it "should work" do
30
+ expect { Freeclimb::TTSEngineName::FREECLIMB_STANDARD = "freeclimb.standard" }.not_to raise_error
31
+ end
32
+ it "should serialize to enum" do
33
+ expectedValue = Freeclimb::TTSEngineName::FREECLIMB_STANDARD
34
+ calculatedValue = Freeclimb::TTSEngineName.build_from_hash("freeclimb.standard")
35
+ expect(expectedValue).to eq(calculatedValue)
36
+ end
37
+ it "should deserialize to string" do
38
+ expectedValue = "freeclimb.standard"
39
+ calculatedValue = Freeclimb::TTSEngineName::FREECLIMB_STANDARD
40
+ expect(expectedValue).to eq(calculatedValue)
41
+ end
42
+ end
43
+
44
+ describe 'test attribute "FREECLIMB_NEURAL"' do
45
+ it "should work" do
46
+ expect { Freeclimb::TTSEngineName::FREECLIMB_NEURAL = "freeclimb.neural" }.not_to raise_error
47
+ end
48
+ it "should serialize to enum" do
49
+ expectedValue = Freeclimb::TTSEngineName::FREECLIMB_NEURAL
50
+ calculatedValue = Freeclimb::TTSEngineName.build_from_hash("freeclimb.neural")
51
+ expect(expectedValue).to eq(calculatedValue)
52
+ end
53
+ it "should deserialize to string" do
54
+ expectedValue = "freeclimb.neural"
55
+ calculatedValue = Freeclimb::TTSEngineName::FREECLIMB_NEURAL
56
+ expect(expectedValue).to eq(calculatedValue)
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "ELEVEN_LABS"' do
61
+ it "should work" do
62
+ expect { Freeclimb::TTSEngineName::ELEVEN_LABS = "ElevenLabs" }.not_to raise_error
63
+ end
64
+ it "should serialize to enum" do
65
+ expectedValue = Freeclimb::TTSEngineName::ELEVEN_LABS
66
+ calculatedValue = Freeclimb::TTSEngineName.build_from_hash("ElevenLabs")
67
+ expect(expectedValue).to eq(calculatedValue)
68
+ end
69
+ it "should deserialize to string" do
70
+ expectedValue = "ElevenLabs"
71
+ calculatedValue = Freeclimb::TTSEngineName::ELEVEN_LABS
72
+ expect(expectedValue).to eq(calculatedValue)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,183 @@
1
+ # #FreeClimb API
2
+ #
3
+ # 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.
4
+ #
5
+ # The version of the OpenAPI document: 1.0.0
6
+ # Contact: support@freeclimb.com
7
+ # Generated by: https://openapi-generator.tech
8
+ # OpenAPI Generator version: 7.9.0
9
+ #
10
+
11
+ require "spec_helper"
12
+ require "json"
13
+ require "date"
14
+ include Freeclimb
15
+
16
+ # Unit tests for Freeclimb::TTSEngine
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe Freeclimb::TTSEngine do
20
+ let(:instance) { Freeclimb::TTSEngine.new }
21
+
22
+ describe "test an instance of TTSEngine" do
23
+ it "should create an instance of TTSEngine" do
24
+ expect(instance).to be_instance_of(Freeclimb::TTSEngine)
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "name"' do
29
+ it "assigns value FREECLIMB_STANDARD" do
30
+ instance.name = Freeclimb::TTSEngineName::FREECLIMB_STANDARD
31
+ expect(instance.name).to eq(Freeclimb::TTSEngineName::FREECLIMB_STANDARD)
32
+ end
33
+ it "assigns value FREECLIMB_NEURAL" do
34
+ instance.name = Freeclimb::TTSEngineName::FREECLIMB_NEURAL
35
+ expect(instance.name).to eq(Freeclimb::TTSEngineName::FREECLIMB_NEURAL)
36
+ end
37
+ it "assigns value ELEVEN_LABS" do
38
+ instance.name = Freeclimb::TTSEngineName::ELEVEN_LABS
39
+ expect(instance.name).to eq(Freeclimb::TTSEngineName::ELEVEN_LABS)
40
+ end
41
+ end
42
+ describe 'test attribute "parameters"' do
43
+ it "should work" do
44
+ testObject = Object.new
45
+ instance.parameters = testObject
46
+ expect(instance.parameters).to eq(testObject)
47
+ end
48
+ end
49
+
50
+ describe 'test method "initialize"' do
51
+ it "properly initializes with values" do
52
+ expect {
53
+ Freeclimb::TTSEngine.new(
54
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
55
+ )
56
+ }.not_to raise_error
57
+ end
58
+ it "fails to initialize with input argument that is not a hash in Freeclimb::TTSEngine" do
59
+ expect {
60
+ Freeclimb::TTSEngine.new(
61
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD,
62
+
63
+ invalid_attribute: true
64
+ )
65
+ }.to raise_error(ArgumentError)
66
+ end
67
+ it "fails to initialize with invalid attribute" do
68
+ expect {
69
+ Freeclimb::TTSEngine.new(
70
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD,
71
+
72
+ invalid_attribute: true
73
+ )
74
+ }.to raise_error(ArgumentError)
75
+ end
76
+ end
77
+
78
+ describe 'test method "valid"' do
79
+ it "checks if properties are valid" do
80
+ instance = Freeclimb::TTSEngine.new(
81
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
82
+ )
83
+ expect(instance.valid?).to eq(true)
84
+ end
85
+
86
+ skip "checks if properties are invalid" do
87
+ instance = Freeclimb::TTSEngine.new
88
+
89
+ expect(instance.valid?).to eq(false)
90
+ end
91
+ end
92
+
93
+ describe 'test method "eql?"' do
94
+ it "checks if objects are equal" do
95
+ instance_1 = Freeclimb::TTSEngine.new(
96
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
97
+ )
98
+ instance_2 = Freeclimb::TTSEngine.new(
99
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
100
+ )
101
+ expect(instance_1.eql?(instance_2)).to eq(true)
102
+ end
103
+
104
+ it "checks if objects are not equal" do
105
+ instance_1 = Freeclimb::TTSEngine.new(
106
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD,
107
+
108
+ parameters: Object.new
109
+ )
110
+ instance_2 = Freeclimb::TTSEngine.new(
111
+ name: nil
112
+ )
113
+ expect(instance_1.eql?(instance_2)).to eq(false)
114
+ end
115
+ end
116
+
117
+ describe 'test method "hash"' do
118
+ it "calculates hash code" do
119
+ instance = Freeclimb::TTSEngine.new(
120
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
121
+ )
122
+ expect(instance.hash).to be_a_kind_of(Integer)
123
+ end
124
+ end
125
+
126
+ describe 'test method "build_from_hash"' do
127
+ it "builds equivalent model from hash code" do
128
+ instance_1 = Freeclimb::TTSEngine.new(
129
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
130
+ )
131
+ instance_2 = Freeclimb::TTSEngine.new(
132
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
133
+ )
134
+
135
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
136
+ end
137
+ end
138
+
139
+ describe 'test method "_deserialize"' do
140
+ Freeclimb::TTSEngine.new(
141
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
142
+ )
143
+ end
144
+
145
+ describe 'test method "to_s"' do
146
+ it "returns the string representation of the object" do
147
+ instance = Freeclimb::TTSEngine.new(
148
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
149
+ )
150
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
151
+ end
152
+ end
153
+
154
+ describe 'test method "to_hash"' do
155
+ it "returns the object in the form of hash" do
156
+ instance = Freeclimb::TTSEngine.new(
157
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
158
+ )
159
+ expect(instance.to_hash).to be_a_kind_of(Hash)
160
+ end
161
+ it "creates equal hash for two equal objects" do
162
+ instance_1 = Freeclimb::TTSEngine.new(
163
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
164
+ )
165
+ instance_2 = Freeclimb::TTSEngine.new(
166
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
167
+ )
168
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
169
+ end
170
+ end
171
+
172
+ describe 'test method "_to_hash"' do
173
+ instance = Freeclimb::TTSEngine.new(
174
+ name: Freeclimb::TTSEngineName::FREECLIMB_STANDARD
175
+ )
176
+ it "returns name in the form of hash" do
177
+ expect(instance._to_hash(instance.name)).to eq(instance.name)
178
+ end
179
+ it "returns parameters in the form of hash" do
180
+ expect(instance._to_hash(instance.parameters)).to eq(instance.parameters)
181
+ end
182
+ end
183
+ end
data/spec/spec_helper.rb CHANGED
@@ -119,7 +119,7 @@ end
119
119
 
120
120
  Freeclimb.configure do |config|
121
121
  # Configure HTTP basic authorization: fc
122
- config.username = "TEST_ACCOUNT_ID"
122
+ config.username = "AC0123456789abcdefABCDEF0123456789abcdef00"
123
123
  config.password = "TEST_API_KEY"
124
124
  end
125
125