freeclimb 4.5.1 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +58 -43
- data/README.md +13 -6
- data/docs/AddToConference.md +0 -2
- data/docs/AddToConferenceAllOf.md +0 -2
- data/docs/CreateWebRTCToken.md +22 -0
- data/docs/DefaultApi.md +302 -7
- data/docs/GetDigits.md +1 -1
- data/docs/GetDigitsAllOf.md +1 -1
- data/docs/IncomingNumberResult.md +3 -1
- data/docs/IncomingNumberResultAllOf.md +3 -1
- data/docs/MessageRequest.md +2 -2
- data/docs/MessageRequestAllOf.md +2 -2
- data/docs/MessageResult.md +3 -1
- data/docs/MessageResultAllOf.md +3 -1
- data/docs/Play.md +0 -2
- data/docs/PlayAllOf.md +0 -2
- data/docs/RemoveFromConference.md +1 -4
- data/docs/SMSTenDLCCampaign.md +10 -0
- data/docs/SMSTollFreeCampaign.md +30 -0
- data/docs/SMSTollFreeCampaignsListResult.md +32 -0
- data/docs/SMSTollFreeCampaignsListResultAllOf.md +18 -0
- data/docs/Say.md +0 -2
- data/docs/SayAllOf.md +0 -2
- data/docs/SetListen.md +0 -2
- data/docs/SetListenAllOf.md +0 -2
- data/docs/SetTalk.md +0 -2
- data/docs/SetTalkAllOf.md +0 -2
- data/docs/TFN.md +18 -0
- data/docs/TerminateConference.md +1 -4
- data/lib/freeclimb/api/default_api.rb +258 -7
- data/lib/freeclimb/models/add_to_conference.rb +1 -13
- data/lib/freeclimb/models/add_to_conference_all_of.rb +1 -13
- data/lib/freeclimb/models/create_web_rtc_token.rb +278 -0
- data/lib/freeclimb/models/get_digits.rb +1 -1
- data/lib/freeclimb/models/get_digits_all_of.rb +1 -1
- data/lib/freeclimb/models/incoming_number_result.rb +16 -5
- data/lib/freeclimb/models/incoming_number_result_all_of.rb +16 -5
- data/lib/freeclimb/models/message_request.rb +11 -9
- data/lib/freeclimb/models/message_request_all_of.rb +11 -9
- data/lib/freeclimb/models/message_result.rb +19 -5
- data/lib/freeclimb/models/message_result_all_of.rb +19 -5
- data/lib/freeclimb/models/play.rb +1 -13
- data/lib/freeclimb/models/play_all_of.rb +1 -13
- data/lib/freeclimb/models/remove_from_conference.rb +3 -23
- data/lib/freeclimb/models/say.rb +1 -13
- data/lib/freeclimb/models/say_all_of.rb +1 -13
- data/lib/freeclimb/models/set_listen.rb +2 -18
- data/lib/freeclimb/models/set_listen_all_of.rb +2 -18
- data/lib/freeclimb/models/set_talk.rb +2 -18
- data/lib/freeclimb/models/set_talk_all_of.rb +2 -18
- data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +131 -1
- data/lib/freeclimb/models/sms_toll_free_campaign.rb +349 -0
- data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +311 -0
- data/lib/freeclimb/models/sms_toll_free_campaigns_list_result_all_of.rb +226 -0
- data/lib/freeclimb/models/terminate_conference.rb +3 -23
- data/lib/freeclimb/models/tfn.rb +229 -0
- data/lib/freeclimb/utils/signature_information.rb +1 -1
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +5 -2
- data/openapi.json +605 -110
- data/package.json +8 -0
- data/spec/api/default_api_spec.rb +104 -3
- data/spec/models/add_to_conference_spec.rb +0 -30
- data/spec/models/create_web_rtc_token_spec.rb +225 -0
- data/spec/models/get_digits_spec.rb +19 -19
- data/spec/models/incoming_number_result_spec.rb +25 -0
- data/spec/models/message_request_spec.rb +23 -23
- data/spec/models/message_result_spec.rb +30 -0
- data/spec/models/play_spec.rb +0 -30
- data/spec/models/remove_from_conference_spec.rb +1 -67
- data/spec/models/say_spec.rb +0 -30
- data/spec/models/set_listen_spec.rb +0 -31
- data/spec/models/set_talk_spec.rb +0 -31
- data/spec/models/sms_ten_dlc_campaign_spec.rb +165 -0
- data/spec/models/sms_toll_free_campaign_spec.rb +368 -0
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +371 -0
- data/spec/models/terminate_conference_spec.rb +1 -67
- data/spec/models/tfn_spec.rb +162 -0
- data/spec/utils/request_verifier_spec.rb +5 -4
- data/spec/utils/signature_information_spec.rb +7 -1
- data/yarn.lock +1292 -0
- metadata +102 -82
@@ -56,8 +56,8 @@ describe Freeclimb::GetDigits do
|
|
56
56
|
|
57
57
|
describe 'test attribute "initial_timeout_ms"' do
|
58
58
|
it 'should work' do
|
59
|
-
instance.initial_timeout_ms =
|
60
|
-
expect(instance.initial_timeout_ms).to eq(
|
59
|
+
instance.initial_timeout_ms = 1
|
60
|
+
expect(instance.initial_timeout_ms).to eq(1)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -96,7 +96,7 @@ describe Freeclimb::GetDigits do
|
|
96
96
|
digit_timeout_ms: 1,
|
97
97
|
finish_on_key: "TS",
|
98
98
|
flush_buffer: true,
|
99
|
-
initial_timeout_ms:
|
99
|
+
initial_timeout_ms: 1,
|
100
100
|
max_digits: 1,
|
101
101
|
min_digits: 1,
|
102
102
|
prompts: Array.new(),
|
@@ -109,7 +109,7 @@ describe Freeclimb::GetDigits do
|
|
109
109
|
digit_timeout_ms: 1,
|
110
110
|
finish_on_key: "TS",
|
111
111
|
flush_buffer: true,
|
112
|
-
initial_timeout_ms:
|
112
|
+
initial_timeout_ms: 1,
|
113
113
|
max_digits: 1,
|
114
114
|
min_digits: 1,
|
115
115
|
prompts: Array.new(),
|
@@ -123,7 +123,7 @@ describe Freeclimb::GetDigits do
|
|
123
123
|
digit_timeout_ms: 1,
|
124
124
|
finish_on_key: "TS",
|
125
125
|
flush_buffer: true,
|
126
|
-
initial_timeout_ms:
|
126
|
+
initial_timeout_ms: 1,
|
127
127
|
max_digits: 1,
|
128
128
|
min_digits: 1,
|
129
129
|
prompts: Array.new(),
|
@@ -140,7 +140,7 @@ describe Freeclimb::GetDigits do
|
|
140
140
|
digit_timeout_ms: 1,
|
141
141
|
finish_on_key: "TS",
|
142
142
|
flush_buffer: true,
|
143
|
-
initial_timeout_ms:
|
143
|
+
initial_timeout_ms: 1,
|
144
144
|
max_digits: 1,
|
145
145
|
min_digits: 1,
|
146
146
|
prompts: Array.new(),
|
@@ -168,7 +168,7 @@ describe Freeclimb::GetDigits do
|
|
168
168
|
digit_timeout_ms: 1,
|
169
169
|
finish_on_key: "TS",
|
170
170
|
flush_buffer: true,
|
171
|
-
initial_timeout_ms:
|
171
|
+
initial_timeout_ms: 1,
|
172
172
|
max_digits: 1,
|
173
173
|
min_digits: 1,
|
174
174
|
prompts: [],
|
@@ -179,7 +179,7 @@ describe Freeclimb::GetDigits do
|
|
179
179
|
digit_timeout_ms: 1,
|
180
180
|
finish_on_key: "TS",
|
181
181
|
flush_buffer: true,
|
182
|
-
initial_timeout_ms:
|
182
|
+
initial_timeout_ms: 1,
|
183
183
|
max_digits: 1,
|
184
184
|
min_digits: 1,
|
185
185
|
prompts: [],
|
@@ -193,7 +193,7 @@ describe Freeclimb::GetDigits do
|
|
193
193
|
digit_timeout_ms: 1,
|
194
194
|
finish_on_key: "TS",
|
195
195
|
flush_buffer: true,
|
196
|
-
initial_timeout_ms:
|
196
|
+
initial_timeout_ms: 1,
|
197
197
|
max_digits: 1,
|
198
198
|
min_digits: 1,
|
199
199
|
prompts: [],
|
@@ -204,7 +204,7 @@ describe Freeclimb::GetDigits do
|
|
204
204
|
digit_timeout_ms: 0,
|
205
205
|
finish_on_key: "ST",
|
206
206
|
flush_buffer: false,
|
207
|
-
initial_timeout_ms:
|
207
|
+
initial_timeout_ms: 0,
|
208
208
|
max_digits: 0,
|
209
209
|
min_digits: 0,
|
210
210
|
prompts: nil,
|
@@ -221,7 +221,7 @@ describe Freeclimb::GetDigits do
|
|
221
221
|
digit_timeout_ms: 1,
|
222
222
|
finish_on_key: "TS",
|
223
223
|
flush_buffer: true,
|
224
|
-
initial_timeout_ms:
|
224
|
+
initial_timeout_ms: 1,
|
225
225
|
max_digits: 1,
|
226
226
|
min_digits: 1,
|
227
227
|
prompts: Array.new(),
|
@@ -238,7 +238,7 @@ describe Freeclimb::GetDigits do
|
|
238
238
|
digit_timeout_ms: 1,
|
239
239
|
finish_on_key: "TS",
|
240
240
|
flush_buffer: true,
|
241
|
-
initial_timeout_ms:
|
241
|
+
initial_timeout_ms: 1,
|
242
242
|
max_digits: 1,
|
243
243
|
min_digits: 1,
|
244
244
|
prompts: Array.new(),
|
@@ -255,7 +255,7 @@ describe Freeclimb::GetDigits do
|
|
255
255
|
digit_timeout_ms: 1,
|
256
256
|
finish_on_key: "TS",
|
257
257
|
flush_buffer: true,
|
258
|
-
initial_timeout_ms:
|
258
|
+
initial_timeout_ms: 1,
|
259
259
|
max_digits: 1,
|
260
260
|
min_digits: 1,
|
261
261
|
prompts: Array.new(),
|
@@ -274,7 +274,7 @@ describe Freeclimb::GetDigits do
|
|
274
274
|
expect(instance._deserialize("Boolean", instance.flush_buffer)).to be_a_kind_of(TrueClass)
|
275
275
|
end
|
276
276
|
it 'deserializes the data of initial_timeout_ms' do
|
277
|
-
expect(instance._deserialize("
|
277
|
+
expect(instance._deserialize("Integer", instance.initial_timeout_ms)).to be_a_kind_of(Integer)
|
278
278
|
end
|
279
279
|
it 'deserializes the data of max_digits' do
|
280
280
|
expect(instance._deserialize("Integer", instance.max_digits)).to be_a_kind_of(Integer)
|
@@ -297,7 +297,7 @@ describe Freeclimb::GetDigits do
|
|
297
297
|
digit_timeout_ms: 1,
|
298
298
|
finish_on_key: "TS",
|
299
299
|
flush_buffer: true,
|
300
|
-
initial_timeout_ms:
|
300
|
+
initial_timeout_ms: 1,
|
301
301
|
max_digits: 1,
|
302
302
|
min_digits: 1,
|
303
303
|
prompts: Array.new(),
|
@@ -314,7 +314,7 @@ describe Freeclimb::GetDigits do
|
|
314
314
|
digit_timeout_ms: 1,
|
315
315
|
finish_on_key: "TS",
|
316
316
|
flush_buffer: true,
|
317
|
-
initial_timeout_ms:
|
317
|
+
initial_timeout_ms: 1,
|
318
318
|
max_digits: 1,
|
319
319
|
min_digits: 1,
|
320
320
|
prompts: Array.new(),
|
@@ -329,7 +329,7 @@ describe Freeclimb::GetDigits do
|
|
329
329
|
digit_timeout_ms: 1,
|
330
330
|
finish_on_key: "TS",
|
331
331
|
flush_buffer: true,
|
332
|
-
initial_timeout_ms:
|
332
|
+
initial_timeout_ms: 1,
|
333
333
|
max_digits: 1,
|
334
334
|
min_digits: 1,
|
335
335
|
prompts: Array.new(),
|
@@ -340,7 +340,7 @@ describe Freeclimb::GetDigits do
|
|
340
340
|
digit_timeout_ms: 1,
|
341
341
|
finish_on_key: "TS",
|
342
342
|
flush_buffer: true,
|
343
|
-
initial_timeout_ms:
|
343
|
+
initial_timeout_ms: 1,
|
344
344
|
max_digits: 1,
|
345
345
|
min_digits: 1,
|
346
346
|
prompts: Array.new(),
|
@@ -360,7 +360,7 @@ describe Freeclimb::GetDigits do
|
|
360
360
|
|
361
361
|
flush_buffer: true,
|
362
362
|
|
363
|
-
initial_timeout_ms:
|
363
|
+
initial_timeout_ms: 1,
|
364
364
|
|
365
365
|
max_digits: 1,
|
366
366
|
|
@@ -138,6 +138,13 @@ describe Freeclimb::IncomingNumberResult do
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
|
141
|
+
describe 'test attribute "tfn"' do
|
142
|
+
it 'should work' do
|
143
|
+
instance.tfn = Freeclimb::TFN.new
|
144
|
+
expect(instance.tfn).to be_instance_of(Freeclimb::TFN)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
141
148
|
describe 'test method "initialize"' do
|
142
149
|
it 'properly initializes with values' do
|
143
150
|
expect{instance = Freeclimb::IncomingNumberResult.new(
|
@@ -157,6 +164,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
157
164
|
voice_enabled: true,
|
158
165
|
sms_enabled: true,
|
159
166
|
offnet: true,
|
167
|
+
tfn: Freeclimb::TFN.new,
|
160
168
|
)}.not_to raise_error()
|
161
169
|
end
|
162
170
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::IncomingNumberResult' do
|
@@ -177,6 +185,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
177
185
|
voice_enabled: true,
|
178
186
|
sms_enabled: true,
|
179
187
|
offnet: true,
|
188
|
+
tfn: Freeclimb::TFN.new,
|
180
189
|
invalid_attribute: true
|
181
190
|
)}.to raise_error(ArgumentError)
|
182
191
|
end
|
@@ -198,6 +207,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
198
207
|
voice_enabled: true,
|
199
208
|
sms_enabled: true,
|
200
209
|
offnet: true,
|
210
|
+
tfn: Freeclimb::TFN.new,
|
201
211
|
invalid_attribute: true
|
202
212
|
)}.to raise_error(ArgumentError)
|
203
213
|
end
|
@@ -222,6 +232,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
222
232
|
voice_enabled: true,
|
223
233
|
sms_enabled: true,
|
224
234
|
offnet: true,
|
235
|
+
tfn: Freeclimb::TFN.new,
|
225
236
|
)
|
226
237
|
expect(instance.valid?).to eq(true)
|
227
238
|
end
|
@@ -333,6 +344,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
333
344
|
voice_enabled: true,
|
334
345
|
sms_enabled: true,
|
335
346
|
offnet: true,
|
347
|
+
tfn: Freeclimb::TFN.new,
|
336
348
|
)
|
337
349
|
expect(instance.hash).to be_a_kind_of(Integer)
|
338
350
|
end
|
@@ -357,6 +369,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
357
369
|
voice_enabled: true,
|
358
370
|
sms_enabled: true,
|
359
371
|
offnet: true,
|
372
|
+
tfn: Freeclimb::TFN.new,
|
360
373
|
)
|
361
374
|
instance_2 = Freeclimb::IncomingNumberResult.new
|
362
375
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -381,6 +394,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
381
394
|
voice_enabled: true,
|
382
395
|
sms_enabled: true,
|
383
396
|
offnet: true,
|
397
|
+
tfn: Freeclimb::TFN.new,
|
384
398
|
)
|
385
399
|
it 'deserializes the data of uri' do
|
386
400
|
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
@@ -430,6 +444,9 @@ describe Freeclimb::IncomingNumberResult do
|
|
430
444
|
it 'deserializes the data of offnet' do
|
431
445
|
expect(instance._deserialize("Boolean", instance.offnet)).to be_a_kind_of(TrueClass)
|
432
446
|
end
|
447
|
+
it 'deserializes the data of tfn' do
|
448
|
+
expect(instance._deserialize("Object", instance.tfn)).to be_a_kind_of(Freeclimb::TFN)
|
449
|
+
end
|
433
450
|
end
|
434
451
|
|
435
452
|
describe 'test method "to_s"' do
|
@@ -451,6 +468,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
451
468
|
voice_enabled: true,
|
452
469
|
sms_enabled: true,
|
453
470
|
offnet: true,
|
471
|
+
tfn: Freeclimb::TFN.new,
|
454
472
|
)
|
455
473
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
456
474
|
end
|
@@ -475,6 +493,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
475
493
|
voice_enabled: true,
|
476
494
|
sms_enabled: true,
|
477
495
|
offnet: true,
|
496
|
+
tfn: Freeclimb::TFN.new,
|
478
497
|
)
|
479
498
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
480
499
|
end
|
@@ -497,6 +516,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
497
516
|
voice_enabled: true,
|
498
517
|
sms_enabled: true,
|
499
518
|
offnet: true,
|
519
|
+
tfn: Freeclimb::TFN.new,
|
500
520
|
)
|
501
521
|
instance_2 = Freeclimb::IncomingNumberResult.new(
|
502
522
|
uri: "TS",
|
@@ -515,6 +535,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
515
535
|
voice_enabled: true,
|
516
536
|
sms_enabled: true,
|
517
537
|
offnet: true,
|
538
|
+
tfn: Freeclimb::TFN.new,
|
518
539
|
)
|
519
540
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
520
541
|
end
|
@@ -552,6 +573,7 @@ describe Freeclimb::IncomingNumberResult do
|
|
552
573
|
sms_enabled: true,
|
553
574
|
|
554
575
|
offnet: true,
|
576
|
+
|
555
577
|
)
|
556
578
|
it 'returns uri in the form of hash' do
|
557
579
|
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
@@ -601,6 +623,9 @@ describe Freeclimb::IncomingNumberResult do
|
|
601
623
|
it 'returns offnet in the form of hash' do
|
602
624
|
expect(instance._to_hash(instance.offnet)).to eq(instance.offnet)
|
603
625
|
end
|
626
|
+
it 'returns tfn in the form of hash' do
|
627
|
+
expect(instance._to_hash(instance.tfn)).to eq(instance.tfn)
|
628
|
+
end
|
604
629
|
end
|
605
630
|
|
606
631
|
end
|
@@ -82,10 +82,10 @@ describe Freeclimb::MessageRequest do
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
-
describe 'test attribute "
|
85
|
+
describe 'test attribute "media_urls"' do
|
86
86
|
it 'should work' do
|
87
|
-
instance.
|
88
|
-
expect(instance.
|
87
|
+
instance.media_urls = ["ELEMENT_1", "ELEMENT_2"]
|
88
|
+
expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"])
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
@@ -100,7 +100,7 @@ describe Freeclimb::MessageRequest do
|
|
100
100
|
to: "TS",
|
101
101
|
text: "TS",
|
102
102
|
notification_url: "TS",
|
103
|
-
|
103
|
+
media_urls: Array.new(),
|
104
104
|
)}.not_to raise_error()
|
105
105
|
end
|
106
106
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageRequest' do
|
@@ -113,7 +113,7 @@ describe Freeclimb::MessageRequest do
|
|
113
113
|
to: "TS",
|
114
114
|
text: "TS",
|
115
115
|
notification_url: "TS",
|
116
|
-
|
116
|
+
media_urls: Array.new(),
|
117
117
|
invalid_attribute: true
|
118
118
|
)}.to raise_error(ArgumentError)
|
119
119
|
end
|
@@ -127,7 +127,7 @@ describe Freeclimb::MessageRequest do
|
|
127
127
|
to: "TS",
|
128
128
|
text: "TS",
|
129
129
|
notification_url: "TS",
|
130
|
-
|
130
|
+
media_urls: Array.new(),
|
131
131
|
invalid_attribute: true
|
132
132
|
)}.to raise_error(ArgumentError)
|
133
133
|
end
|
@@ -144,7 +144,7 @@ describe Freeclimb::MessageRequest do
|
|
144
144
|
to: "TS",
|
145
145
|
text: "TS",
|
146
146
|
notification_url: "TS",
|
147
|
-
|
147
|
+
media_urls: Array.new(),
|
148
148
|
)
|
149
149
|
expect(instance.valid?).to eq(true)
|
150
150
|
end
|
@@ -174,7 +174,7 @@ describe Freeclimb::MessageRequest do
|
|
174
174
|
to: "TS",
|
175
175
|
text: "TS",
|
176
176
|
notification_url: "TS",
|
177
|
-
|
177
|
+
media_urls: [],
|
178
178
|
)
|
179
179
|
instance_2 = Freeclimb::MessageRequest.new(
|
180
180
|
uri: "TS",
|
@@ -185,7 +185,7 @@ describe Freeclimb::MessageRequest do
|
|
185
185
|
to: "TS",
|
186
186
|
text: "TS",
|
187
187
|
notification_url: "TS",
|
188
|
-
|
188
|
+
media_urls: [],
|
189
189
|
)
|
190
190
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
191
191
|
end
|
@@ -199,7 +199,7 @@ describe Freeclimb::MessageRequest do
|
|
199
199
|
to: "TS",
|
200
200
|
text: "TS",
|
201
201
|
notification_url: "TS",
|
202
|
-
|
202
|
+
media_urls: [],
|
203
203
|
)
|
204
204
|
instance_2 = Freeclimb::MessageRequest.new(
|
205
205
|
uri: "ST",
|
@@ -210,7 +210,7 @@ describe Freeclimb::MessageRequest do
|
|
210
210
|
to: "ST",
|
211
211
|
text: "ST",
|
212
212
|
notification_url: "ST",
|
213
|
-
|
213
|
+
media_urls: nil,
|
214
214
|
)
|
215
215
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
216
216
|
end
|
@@ -227,7 +227,7 @@ describe Freeclimb::MessageRequest do
|
|
227
227
|
to: "TS",
|
228
228
|
text: "TS",
|
229
229
|
notification_url: "TS",
|
230
|
-
|
230
|
+
media_urls: Array.new(),
|
231
231
|
)
|
232
232
|
expect(instance.hash).to be_a_kind_of(Integer)
|
233
233
|
end
|
@@ -244,7 +244,7 @@ describe Freeclimb::MessageRequest do
|
|
244
244
|
to: "TS",
|
245
245
|
text: "TS",
|
246
246
|
notification_url: "TS",
|
247
|
-
|
247
|
+
media_urls: Array.new(),
|
248
248
|
)
|
249
249
|
instance_2 = Freeclimb::MessageRequest.new
|
250
250
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -261,7 +261,7 @@ describe Freeclimb::MessageRequest do
|
|
261
261
|
to: "TS",
|
262
262
|
text: "TS",
|
263
263
|
notification_url: "TS",
|
264
|
-
|
264
|
+
media_urls: Array.new(),
|
265
265
|
)
|
266
266
|
it 'deserializes the data of uri' do
|
267
267
|
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
@@ -287,8 +287,8 @@ describe Freeclimb::MessageRequest do
|
|
287
287
|
it 'deserializes the data of notification_url' do
|
288
288
|
expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String)
|
289
289
|
end
|
290
|
-
it 'deserializes the data of
|
291
|
-
expect(instance._deserialize("String", instance.
|
290
|
+
it 'deserializes the data of media_urls' do
|
291
|
+
expect(instance._deserialize("Array<String>", instance.media_urls)).to be_a_kind_of(Array)
|
292
292
|
end
|
293
293
|
end
|
294
294
|
|
@@ -303,7 +303,7 @@ describe Freeclimb::MessageRequest do
|
|
303
303
|
to: "TS",
|
304
304
|
text: "TS",
|
305
305
|
notification_url: "TS",
|
306
|
-
|
306
|
+
media_urls: Array.new(),
|
307
307
|
)
|
308
308
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
309
309
|
end
|
@@ -320,7 +320,7 @@ describe Freeclimb::MessageRequest do
|
|
320
320
|
to: "TS",
|
321
321
|
text: "TS",
|
322
322
|
notification_url: "TS",
|
323
|
-
|
323
|
+
media_urls: Array.new(),
|
324
324
|
)
|
325
325
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
326
326
|
end
|
@@ -335,7 +335,7 @@ describe Freeclimb::MessageRequest do
|
|
335
335
|
to: "TS",
|
336
336
|
text: "TS",
|
337
337
|
notification_url: "TS",
|
338
|
-
|
338
|
+
media_urls: Array.new(),
|
339
339
|
)
|
340
340
|
instance_2 = Freeclimb::MessageRequest.new(
|
341
341
|
uri: "TS",
|
@@ -346,7 +346,7 @@ describe Freeclimb::MessageRequest do
|
|
346
346
|
to: "TS",
|
347
347
|
text: "TS",
|
348
348
|
notification_url: "TS",
|
349
|
-
|
349
|
+
media_urls: Array.new(),
|
350
350
|
)
|
351
351
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
352
352
|
end
|
@@ -370,7 +370,7 @@ describe Freeclimb::MessageRequest do
|
|
370
370
|
|
371
371
|
notification_url: "TS",
|
372
372
|
|
373
|
-
|
373
|
+
media_urls: Array.new(),
|
374
374
|
)
|
375
375
|
it 'returns uri in the form of hash' do
|
376
376
|
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
@@ -396,8 +396,8 @@ describe Freeclimb::MessageRequest do
|
|
396
396
|
it 'returns notification_url in the form of hash' do
|
397
397
|
expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url)
|
398
398
|
end
|
399
|
-
it 'returns
|
400
|
-
expect(instance._to_hash(instance.
|
399
|
+
it 'returns media_urls in the form of hash' do
|
400
|
+
expect(instance._to_hash(instance.media_urls)).to eq(instance.media_urls)
|
401
401
|
end
|
402
402
|
end
|
403
403
|
|
@@ -172,6 +172,13 @@ describe Freeclimb::MessageResult do
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
+
describe 'test attribute "media_urls"' do
|
176
|
+
it 'should work' do
|
177
|
+
instance.media_urls = ["ELEMENT_1", "ELEMENT_2"]
|
178
|
+
expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"])
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
175
182
|
describe 'test method "initialize"' do
|
176
183
|
it 'properly initializes with values' do
|
177
184
|
expect{instance = Freeclimb::MessageResult.new(
|
@@ -189,6 +196,7 @@ describe Freeclimb::MessageResult do
|
|
189
196
|
notification_url: "TS",
|
190
197
|
brand_id: "TS",
|
191
198
|
campaign_id: "TS",
|
199
|
+
media_urls: Array.new(),
|
192
200
|
)}.not_to raise_error()
|
193
201
|
end
|
194
202
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageResult' do
|
@@ -207,6 +215,7 @@ describe Freeclimb::MessageResult do
|
|
207
215
|
notification_url: "TS",
|
208
216
|
brand_id: "TS",
|
209
217
|
campaign_id: "TS",
|
218
|
+
media_urls: Array.new(),
|
210
219
|
invalid_attribute: true
|
211
220
|
)}.to raise_error(ArgumentError)
|
212
221
|
end
|
@@ -226,6 +235,7 @@ describe Freeclimb::MessageResult do
|
|
226
235
|
notification_url: "TS",
|
227
236
|
brand_id: "TS",
|
228
237
|
campaign_id: "TS",
|
238
|
+
media_urls: Array.new(),
|
229
239
|
invalid_attribute: true
|
230
240
|
)}.to raise_error(ArgumentError)
|
231
241
|
end
|
@@ -249,6 +259,7 @@ describe Freeclimb::MessageResult do
|
|
249
259
|
brand_id: "TS",
|
250
260
|
campaign_id: "TS",
|
251
261
|
segment_count: 1,
|
262
|
+
media_urls: Array.new(),
|
252
263
|
)
|
253
264
|
expect(instance.valid?).to eq(true)
|
254
265
|
end
|
@@ -281,6 +292,7 @@ describe Freeclimb::MessageResult do
|
|
281
292
|
notification_url: "TS",
|
282
293
|
brand_id: "TS",
|
283
294
|
campaign_id: "TS",
|
295
|
+
media_urls: [],
|
284
296
|
)
|
285
297
|
instance_2 = Freeclimb::MessageResult.new(
|
286
298
|
uri: "TS",
|
@@ -297,6 +309,7 @@ describe Freeclimb::MessageResult do
|
|
297
309
|
notification_url: "TS",
|
298
310
|
brand_id: "TS",
|
299
311
|
campaign_id: "TS",
|
312
|
+
media_urls: [],
|
300
313
|
)
|
301
314
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
302
315
|
end
|
@@ -316,6 +329,7 @@ describe Freeclimb::MessageResult do
|
|
316
329
|
notification_url: "TS",
|
317
330
|
brand_id: "TS",
|
318
331
|
campaign_id: "TS",
|
332
|
+
media_urls: [],
|
319
333
|
)
|
320
334
|
instance_2 = Freeclimb::MessageResult.new(
|
321
335
|
uri: "ST",
|
@@ -332,6 +346,7 @@ describe Freeclimb::MessageResult do
|
|
332
346
|
notification_url: "ST",
|
333
347
|
brand_id: "ST",
|
334
348
|
campaign_id: "ST",
|
349
|
+
media_urls: nil,
|
335
350
|
)
|
336
351
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
337
352
|
end
|
@@ -354,6 +369,7 @@ describe Freeclimb::MessageResult do
|
|
354
369
|
notification_url: "TS",
|
355
370
|
brand_id: "TS",
|
356
371
|
campaign_id: "TS",
|
372
|
+
media_urls: Array.new(),
|
357
373
|
)
|
358
374
|
expect(instance.hash).to be_a_kind_of(Integer)
|
359
375
|
end
|
@@ -376,6 +392,7 @@ describe Freeclimb::MessageResult do
|
|
376
392
|
notification_url: "TS",
|
377
393
|
brand_id: "TS",
|
378
394
|
campaign_id: "TS",
|
395
|
+
media_urls: Array.new(),
|
379
396
|
)
|
380
397
|
instance_2 = Freeclimb::MessageResult.new
|
381
398
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -398,6 +415,7 @@ describe Freeclimb::MessageResult do
|
|
398
415
|
notification_url: "TS",
|
399
416
|
brand_id: "TS",
|
400
417
|
campaign_id: "TS",
|
418
|
+
media_urls: Array.new(),
|
401
419
|
)
|
402
420
|
it 'deserializes the data of uri' do
|
403
421
|
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
@@ -441,6 +459,9 @@ describe Freeclimb::MessageResult do
|
|
441
459
|
it 'deserializes the data of segment_count' do
|
442
460
|
expect(instance._deserialize("Float", instance.segment_count)).to be_a_kind_of(Float)
|
443
461
|
end
|
462
|
+
it 'deserializes the data of media_urls' do
|
463
|
+
expect(instance._deserialize("Array<String>", instance.media_urls)).to be_a_kind_of(Array)
|
464
|
+
end
|
444
465
|
end
|
445
466
|
|
446
467
|
describe 'test method "to_s"' do
|
@@ -460,6 +481,7 @@ describe Freeclimb::MessageResult do
|
|
460
481
|
notification_url: "TS",
|
461
482
|
brand_id: "TS",
|
462
483
|
campaign_id: "TS",
|
484
|
+
media_urls: Array.new(),
|
463
485
|
)
|
464
486
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
465
487
|
end
|
@@ -482,6 +504,7 @@ describe Freeclimb::MessageResult do
|
|
482
504
|
notification_url: "TS",
|
483
505
|
brand_id: "TS",
|
484
506
|
campaign_id: "TS",
|
507
|
+
media_urls: Array.new(),
|
485
508
|
)
|
486
509
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
487
510
|
end
|
@@ -502,6 +525,7 @@ describe Freeclimb::MessageResult do
|
|
502
525
|
notification_url: "TS",
|
503
526
|
brand_id: "TS",
|
504
527
|
campaign_id: "TS",
|
528
|
+
media_urls: Array.new(),
|
505
529
|
)
|
506
530
|
instance_2 = Freeclimb::MessageResult.new(
|
507
531
|
uri: "TS",
|
@@ -518,6 +542,7 @@ describe Freeclimb::MessageResult do
|
|
518
542
|
notification_url: "TS",
|
519
543
|
brand_id: "TS",
|
520
544
|
campaign_id: "TS",
|
545
|
+
media_urls: Array.new(),
|
521
546
|
)
|
522
547
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
523
548
|
end
|
@@ -553,6 +578,8 @@ describe Freeclimb::MessageResult do
|
|
553
578
|
|
554
579
|
campaign_id: "TS",
|
555
580
|
|
581
|
+
|
582
|
+
media_urls: Array.new(),
|
556
583
|
)
|
557
584
|
it 'returns uri in the form of hash' do
|
558
585
|
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
@@ -599,6 +626,9 @@ describe Freeclimb::MessageResult do
|
|
599
626
|
it 'returns segment_count in the form of hash' do
|
600
627
|
expect(instance._to_hash(instance.segment_count)).to eq(instance.segment_count)
|
601
628
|
end
|
629
|
+
it 'returns media_urls in the form of hash' do
|
630
|
+
expect(instance._to_hash(instance.media_urls)).to eq(instance.media_urls)
|
631
|
+
end
|
602
632
|
end
|
603
633
|
|
604
634
|
end
|