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