freeclimb 4.5.2 → 4.6.1
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 +1 -1
- data/README.md +15 -7
- data/docs/AddToConference.md +0 -2
- data/docs/AddToConferenceAllOf.md +0 -2
- data/docs/CreateWebRTCToken.md +22 -0
- data/docs/DefaultApi.md +303 -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/docs/TranscribeUtterance.md +1 -1
- data/docs/TranscribeUtteranceAllOf.md +28 -0
- data/docs/TranscribeUtteranceAllOfRecord.md +22 -0
- data/lib/freeclimb/api/default_api.rb +262 -7
- data/lib/freeclimb/models/account_request.rb +0 -2
- data/lib/freeclimb/models/account_result.rb +0 -6
- data/lib/freeclimb/models/add_to_conference.rb +1 -29
- data/lib/freeclimb/models/add_to_conference_all_of.rb +1 -29
- data/lib/freeclimb/models/application_result.rb +0 -6
- data/lib/freeclimb/models/buy_incoming_number_request.rb +0 -4
- data/lib/freeclimb/models/call_result.rb +0 -6
- data/lib/freeclimb/models/conference_participant_result.rb +0 -6
- data/lib/freeclimb/models/conference_result.rb +0 -6
- data/lib/freeclimb/models/create_conference.rb +0 -8
- data/lib/freeclimb/models/create_conference_all_of.rb +0 -8
- data/lib/freeclimb/models/create_conference_request.rb +0 -6
- data/lib/freeclimb/models/create_web_rtc_token.rb +274 -0
- data/lib/freeclimb/models/dequeue.rb +1 -0
- data/lib/freeclimb/models/enqueue.rb +0 -6
- data/lib/freeclimb/models/enqueue_all_of.rb +0 -6
- data/lib/freeclimb/models/get_digits.rb +1 -17
- data/lib/freeclimb/models/get_digits_all_of.rb +1 -17
- data/lib/freeclimb/models/get_speech.rb +0 -22
- data/lib/freeclimb/models/get_speech_all_of.rb +0 -22
- data/lib/freeclimb/models/incoming_number_request.rb +0 -2
- data/lib/freeclimb/models/incoming_number_result.rb +14 -13
- data/lib/freeclimb/models/incoming_number_result_all_of.rb +14 -5
- data/lib/freeclimb/models/make_call_request.rb +0 -18
- data/lib/freeclimb/models/message_request.rb +10 -24
- data/lib/freeclimb/models/message_request_all_of.rb +10 -16
- data/lib/freeclimb/models/message_result.rb +17 -11
- data/lib/freeclimb/models/message_result_all_of.rb +17 -5
- data/lib/freeclimb/models/mutable_resource_model.rb +0 -6
- data/lib/freeclimb/models/out_dial.rb +0 -18
- data/lib/freeclimb/models/out_dial_all_of.rb +0 -18
- data/lib/freeclimb/models/park.rb +0 -4
- data/lib/freeclimb/models/park_all_of.rb +0 -4
- data/lib/freeclimb/models/play.rb +1 -17
- data/lib/freeclimb/models/play_all_of.rb +1 -17
- data/lib/freeclimb/models/queue_request.rb +0 -2
- data/lib/freeclimb/models/queue_result.rb +0 -6
- data/lib/freeclimb/models/record_utterance.rb +0 -12
- data/lib/freeclimb/models/record_utterance_all_of.rb +0 -12
- data/lib/freeclimb/models/recording_result.rb +0 -6
- data/lib/freeclimb/models/remove_from_conference.rb +4 -23
- data/lib/freeclimb/models/say.rb +1 -19
- data/lib/freeclimb/models/say_all_of.rb +1 -19
- data/lib/freeclimb/models/send_digits.rb +0 -4
- data/lib/freeclimb/models/send_digits_all_of.rb +0 -4
- 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.rb +0 -6
- data/lib/freeclimb/models/sms_all_of.rb +0 -6
- data/lib/freeclimb/models/sms_ten_dlc_brand.rb +0 -60
- data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +121 -41
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +0 -44
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +0 -20
- data/lib/freeclimb/models/sms_toll_free_campaign.rb +337 -0
- data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +311 -0
- data/lib/freeclimb/models/{remove_from_conference_all_of.rb → sms_toll_free_campaigns_list_result_all_of.rb} +14 -16
- data/lib/freeclimb/models/start_record_call.rb +1 -0
- data/lib/freeclimb/models/terminate_conference.rb +4 -23
- data/lib/freeclimb/models/{terminate_conference_all_of.rb → tfn.rb} +15 -14
- data/lib/freeclimb/models/transcribe_utterance.rb +11 -16
- data/lib/freeclimb/models/transcribe_utterance_all_of.rb +281 -0
- data/lib/freeclimb/models/{transcribe_utterance_record.rb → transcribe_utterance_all_of_record.rb} +3 -7
- data/lib/freeclimb/models/unpark.rb +1 -0
- data/lib/freeclimb/models/update_conference_participant_request.rb +0 -2
- data/lib/freeclimb/models/update_conference_request.rb +0 -2
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +8 -4
- data/openapi.json +407 -88
- data/package.json +8 -0
- data/spec/api/default_api_spec.rb +215 -55
- data/spec/models/account_request_spec.rb +8 -6
- data/spec/models/account_result_spec.rb +28 -9
- data/spec/models/add_to_conference_spec.rb +21 -37
- data/spec/models/application_list_spec.rb +46 -22
- data/spec/models/application_request_spec.rb +13 -6
- data/spec/models/application_result_spec.rb +24 -9
- data/spec/models/available_number_list_spec.rb +46 -22
- data/spec/models/available_number_spec.rb +23 -10
- data/spec/models/buy_incoming_number_request_spec.rb +11 -7
- data/spec/models/call_list_spec.rb +46 -22
- data/spec/models/call_result_spec.rb +49 -15
- data/spec/models/capabilities_spec.rb +26 -11
- data/spec/models/conference_list_spec.rb +46 -22
- data/spec/models/conference_participant_list_spec.rb +46 -22
- data/spec/models/conference_participant_result_spec.rb +24 -9
- data/spec/models/conference_result_spec.rb +32 -9
- data/spec/models/create_conference_request_spec.rb +15 -6
- data/spec/models/create_conference_spec.rb +19 -7
- data/spec/models/create_web_rtc_token_spec.rb +231 -0
- data/spec/models/enqueue_spec.rb +16 -9
- data/spec/models/filter_logs_request_spec.rb +9 -7
- data/spec/models/get_digits_spec.rb +59 -35
- data/spec/models/get_speech_spec.rb +60 -24
- data/spec/models/hangup_spec.rb +7 -6
- data/spec/models/incoming_number_list_spec.rb +46 -22
- data/spec/models/incoming_number_request_spec.rb +9 -6
- data/spec/models/incoming_number_result_spec.rb +68 -13
- data/spec/models/log_list_spec.rb +46 -22
- data/spec/models/log_result_spec.rb +21 -9
- data/spec/models/make_call_request_spec.rb +26 -11
- data/spec/models/message_request_spec.rb +49 -35
- data/spec/models/message_result_spec.rb +64 -11
- data/spec/models/messages_list_spec.rb +46 -22
- data/spec/models/mutable_resource_model_spec.rb +15 -9
- data/spec/models/out_dial_spec.rb +33 -13
- data/spec/models/pagination_model_spec.rb +40 -21
- data/spec/models/park_spec.rb +13 -8
- data/spec/models/pause_spec.rb +14 -10
- data/spec/models/percl_command_spec.rb +6 -6
- data/spec/models/percl_script_spec.rb +11 -6
- data/spec/models/play_early_media_spec.rb +9 -7
- data/spec/models/play_spec.rb +17 -40
- data/spec/models/queue_list_spec.rb +46 -22
- data/spec/models/queue_member_list_spec.rb +46 -22
- data/spec/models/queue_member_spec.rb +21 -12
- data/spec/models/queue_request_spec.rb +13 -9
- data/spec/models/queue_result_spec.rb +37 -18
- data/spec/models/record_utterance_spec.rb +28 -13
- data/spec/models/recording_list_spec.rb +46 -22
- data/spec/models/recording_result_spec.rb +25 -12
- data/spec/models/redirect_spec.rb +9 -7
- data/spec/models/reject_spec.rb +7 -6
- data/spec/models/remove_from_conference_spec.rb +0 -133
- data/spec/models/say_spec.rb +18 -40
- data/spec/models/send_digits_spec.rb +17 -10
- data/spec/models/set_listen_spec.rb +8 -37
- data/spec/models/set_talk_spec.rb +8 -37
- data/spec/models/sms_spec.rb +16 -9
- data/spec/models/sms_ten_dlc_brand_spec.rb +38 -4
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +46 -22
- data/spec/models/sms_ten_dlc_campaign_spec.rb +228 -4
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +46 -22
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +25 -7
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +56 -8
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +46 -22
- data/spec/models/sms_toll_free_campaign_spec.rb +382 -0
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +395 -0
- data/spec/models/terminate_conference_spec.rb +0 -133
- data/spec/models/tfn_spec.rb +164 -0
- data/spec/models/{transcribe_utterance_record_spec.rb → transcribe_utterance_all_of_record_spec.rb} +78 -67
- data/spec/models/transcribe_utterance_spec.rb +37 -96
- data/spec/models/update_call_request_spec.rb +12 -7
- data/spec/models/update_conference_participant_request_spec.rb +10 -6
- data/spec/models/update_conference_request_spec.rb +15 -6
- data/yarn.lock +1292 -0
- metadata +105 -84
@@ -30,6 +30,7 @@ describe Freeclimb::MessageRequest do
|
|
30
30
|
it 'should work' do
|
31
31
|
instance.uri = "TEST_STRING"
|
32
32
|
expect(instance.uri).to eq("TEST_STRING")
|
33
|
+
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -37,6 +38,7 @@ describe Freeclimb::MessageRequest do
|
|
37
38
|
it 'should work' do
|
38
39
|
instance.date_created = "TEST_STRING"
|
39
40
|
expect(instance.date_created).to eq("TEST_STRING")
|
41
|
+
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|
@@ -44,13 +46,17 @@ describe Freeclimb::MessageRequest do
|
|
44
46
|
it 'should work' do
|
45
47
|
instance.date_updated = "TEST_STRING"
|
46
48
|
expect(instance.date_updated).to eq("TEST_STRING")
|
49
|
+
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
50
53
|
describe 'test attribute "revision"' do
|
51
54
|
it 'should work' do
|
55
|
+
|
56
|
+
|
52
57
|
instance.revision = 1
|
53
|
-
expect(instance.revision).to eq(1)
|
58
|
+
expect(instance.revision).to eq(1)
|
59
|
+
|
54
60
|
end
|
55
61
|
end
|
56
62
|
|
@@ -58,6 +64,7 @@ describe Freeclimb::MessageRequest do
|
|
58
64
|
it 'should work' do
|
59
65
|
instance.from = "TEST_STRING"
|
60
66
|
expect(instance.from).to eq("TEST_STRING")
|
67
|
+
|
61
68
|
end
|
62
69
|
end
|
63
70
|
|
@@ -65,6 +72,7 @@ describe Freeclimb::MessageRequest do
|
|
65
72
|
it 'should work' do
|
66
73
|
instance.to = "TEST_STRING"
|
67
74
|
expect(instance.to).to eq("TEST_STRING")
|
75
|
+
|
68
76
|
end
|
69
77
|
end
|
70
78
|
|
@@ -72,6 +80,7 @@ describe Freeclimb::MessageRequest do
|
|
72
80
|
it 'should work' do
|
73
81
|
instance.text = "TEST_STRING"
|
74
82
|
expect(instance.text).to eq("TEST_STRING")
|
83
|
+
|
75
84
|
end
|
76
85
|
end
|
77
86
|
|
@@ -79,13 +88,15 @@ describe Freeclimb::MessageRequest do
|
|
79
88
|
it 'should work' do
|
80
89
|
instance.notification_url = "TEST_STRING"
|
81
90
|
expect(instance.notification_url).to eq("TEST_STRING")
|
91
|
+
|
82
92
|
end
|
83
93
|
end
|
84
94
|
|
85
|
-
describe 'test attribute "
|
95
|
+
describe 'test attribute "media_urls"' do
|
86
96
|
it 'should work' do
|
87
|
-
|
88
|
-
|
97
|
+
|
98
|
+
instance.media_urls = ["ELEMENT_1", "ELEMENT_2"]
|
99
|
+
expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"])
|
89
100
|
end
|
90
101
|
end
|
91
102
|
|
@@ -100,7 +111,7 @@ describe Freeclimb::MessageRequest do
|
|
100
111
|
to: "TS",
|
101
112
|
text: "TS",
|
102
113
|
notification_url: "TS",
|
103
|
-
|
114
|
+
media_urls: Array.new(),
|
104
115
|
)}.not_to raise_error()
|
105
116
|
end
|
106
117
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageRequest' do
|
@@ -113,7 +124,7 @@ describe Freeclimb::MessageRequest do
|
|
113
124
|
to: "TS",
|
114
125
|
text: "TS",
|
115
126
|
notification_url: "TS",
|
116
|
-
|
127
|
+
media_urls: Array.new(),
|
117
128
|
invalid_attribute: true
|
118
129
|
)}.to raise_error(ArgumentError)
|
119
130
|
end
|
@@ -127,12 +138,12 @@ describe Freeclimb::MessageRequest do
|
|
127
138
|
to: "TS",
|
128
139
|
text: "TS",
|
129
140
|
notification_url: "TS",
|
130
|
-
|
141
|
+
media_urls: Array.new(),
|
131
142
|
invalid_attribute: true
|
132
143
|
)}.to raise_error(ArgumentError)
|
133
144
|
end
|
134
145
|
end
|
135
|
-
|
146
|
+
|
136
147
|
describe 'test method "valid"' do
|
137
148
|
it 'checks if properties are valid' do
|
138
149
|
instance = Freeclimb::MessageRequest.new(
|
@@ -144,22 +155,24 @@ describe Freeclimb::MessageRequest do
|
|
144
155
|
to: "TS",
|
145
156
|
text: "TS",
|
146
157
|
notification_url: "TS",
|
147
|
-
|
158
|
+
media_urls: Array.new(),
|
148
159
|
)
|
149
160
|
expect(instance.valid?).to eq(true)
|
150
161
|
end
|
162
|
+
|
151
163
|
it 'checks if properties are invalid' do
|
152
164
|
instance = Freeclimb::MessageRequest.new(
|
153
|
-
|
154
|
-
|
155
|
-
|
165
|
+
|
166
|
+
from: nil,
|
167
|
+
|
168
|
+
to: nil,
|
169
|
+
|
170
|
+
text: nil,
|
171
|
+
|
156
172
|
)
|
157
173
|
expect(instance.valid?).to eq(false)
|
158
174
|
end
|
159
|
-
|
160
|
-
instance = Freeclimb::MessageRequest.new()
|
161
|
-
expect(instance.valid?).to eq(false)
|
162
|
-
end
|
175
|
+
|
163
176
|
end
|
164
177
|
|
165
178
|
describe 'test method "eql?"' do
|
@@ -174,7 +187,7 @@ describe Freeclimb::MessageRequest do
|
|
174
187
|
to: "TS",
|
175
188
|
text: "TS",
|
176
189
|
notification_url: "TS",
|
177
|
-
|
190
|
+
media_urls: [],
|
178
191
|
)
|
179
192
|
instance_2 = Freeclimb::MessageRequest.new(
|
180
193
|
uri: "TS",
|
@@ -185,37 +198,38 @@ describe Freeclimb::MessageRequest do
|
|
185
198
|
to: "TS",
|
186
199
|
text: "TS",
|
187
200
|
notification_url: "TS",
|
188
|
-
|
201
|
+
media_urls: [],
|
189
202
|
)
|
190
203
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
191
204
|
end
|
205
|
+
|
192
206
|
it 'checks if objects are not equal' do
|
193
207
|
instance_1 = Freeclimb::MessageRequest.new(
|
194
208
|
uri: "TS",
|
195
209
|
date_created: "TS",
|
196
210
|
date_updated: "TS",
|
197
|
-
revision:
|
211
|
+
revision: 2,
|
198
212
|
from: "TS",
|
199
213
|
to: "TS",
|
200
214
|
text: "TS",
|
201
215
|
notification_url: "TS",
|
202
|
-
|
216
|
+
media_urls: [],
|
203
217
|
)
|
204
218
|
instance_2 = Freeclimb::MessageRequest.new(
|
205
219
|
uri: "ST",
|
206
220
|
date_created: "ST",
|
207
221
|
date_updated: "ST",
|
208
|
-
revision:
|
222
|
+
revision: 1,
|
209
223
|
from: "ST",
|
210
224
|
to: "ST",
|
211
225
|
text: "ST",
|
212
226
|
notification_url: "ST",
|
213
|
-
|
227
|
+
media_urls: nil,
|
214
228
|
)
|
215
229
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
216
230
|
end
|
217
231
|
end
|
218
|
-
|
232
|
+
|
219
233
|
describe 'test method "hash"' do
|
220
234
|
it 'calculates hash code' do
|
221
235
|
instance = Freeclimb::MessageRequest.new(
|
@@ -227,7 +241,7 @@ describe Freeclimb::MessageRequest do
|
|
227
241
|
to: "TS",
|
228
242
|
text: "TS",
|
229
243
|
notification_url: "TS",
|
230
|
-
|
244
|
+
media_urls: Array.new(),
|
231
245
|
)
|
232
246
|
expect(instance.hash).to be_a_kind_of(Integer)
|
233
247
|
end
|
@@ -244,7 +258,7 @@ describe Freeclimb::MessageRequest do
|
|
244
258
|
to: "TS",
|
245
259
|
text: "TS",
|
246
260
|
notification_url: "TS",
|
247
|
-
|
261
|
+
media_urls: Array.new(),
|
248
262
|
)
|
249
263
|
instance_2 = Freeclimb::MessageRequest.new
|
250
264
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -261,7 +275,7 @@ describe Freeclimb::MessageRequest do
|
|
261
275
|
to: "TS",
|
262
276
|
text: "TS",
|
263
277
|
notification_url: "TS",
|
264
|
-
|
278
|
+
media_urls: Array.new(),
|
265
279
|
)
|
266
280
|
it 'deserializes the data of uri' do
|
267
281
|
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
@@ -287,8 +301,8 @@ describe Freeclimb::MessageRequest do
|
|
287
301
|
it 'deserializes the data of notification_url' do
|
288
302
|
expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String)
|
289
303
|
end
|
290
|
-
it 'deserializes the data of
|
291
|
-
expect(instance._deserialize("String", instance.
|
304
|
+
it 'deserializes the data of media_urls' do
|
305
|
+
expect(instance._deserialize("Array<String>", instance.media_urls)).to be_a_kind_of(Array)
|
292
306
|
end
|
293
307
|
end
|
294
308
|
|
@@ -303,7 +317,7 @@ describe Freeclimb::MessageRequest do
|
|
303
317
|
to: "TS",
|
304
318
|
text: "TS",
|
305
319
|
notification_url: "TS",
|
306
|
-
|
320
|
+
media_urls: Array.new(),
|
307
321
|
)
|
308
322
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
309
323
|
end
|
@@ -320,7 +334,7 @@ describe Freeclimb::MessageRequest do
|
|
320
334
|
to: "TS",
|
321
335
|
text: "TS",
|
322
336
|
notification_url: "TS",
|
323
|
-
|
337
|
+
media_urls: Array.new(),
|
324
338
|
)
|
325
339
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
326
340
|
end
|
@@ -335,7 +349,7 @@ describe Freeclimb::MessageRequest do
|
|
335
349
|
to: "TS",
|
336
350
|
text: "TS",
|
337
351
|
notification_url: "TS",
|
338
|
-
|
352
|
+
media_urls: Array.new(),
|
339
353
|
)
|
340
354
|
instance_2 = Freeclimb::MessageRequest.new(
|
341
355
|
uri: "TS",
|
@@ -346,7 +360,7 @@ describe Freeclimb::MessageRequest do
|
|
346
360
|
to: "TS",
|
347
361
|
text: "TS",
|
348
362
|
notification_url: "TS",
|
349
|
-
|
363
|
+
media_urls: Array.new(),
|
350
364
|
)
|
351
365
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
352
366
|
end
|
@@ -370,7 +384,7 @@ describe Freeclimb::MessageRequest do
|
|
370
384
|
|
371
385
|
notification_url: "TS",
|
372
386
|
|
373
|
-
|
387
|
+
media_urls: Array.new(),
|
374
388
|
)
|
375
389
|
it 'returns uri in the form of hash' do
|
376
390
|
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
@@ -396,8 +410,8 @@ describe Freeclimb::MessageRequest do
|
|
396
410
|
it 'returns notification_url in the form of hash' do
|
397
411
|
expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url)
|
398
412
|
end
|
399
|
-
it 'returns
|
400
|
-
expect(instance._to_hash(instance.
|
413
|
+
it 'returns media_urls in the form of hash' do
|
414
|
+
expect(instance._to_hash(instance.media_urls)).to eq(instance.media_urls)
|
401
415
|
end
|
402
416
|
end
|
403
417
|
|
@@ -30,6 +30,7 @@ describe Freeclimb::MessageResult do
|
|
30
30
|
it 'should work' do
|
31
31
|
instance.uri = "TEST_STRING"
|
32
32
|
expect(instance.uri).to eq("TEST_STRING")
|
33
|
+
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
@@ -37,6 +38,7 @@ describe Freeclimb::MessageResult do
|
|
37
38
|
it 'should work' do
|
38
39
|
instance.date_created = "TEST_STRING"
|
39
40
|
expect(instance.date_created).to eq("TEST_STRING")
|
41
|
+
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|
@@ -44,13 +46,17 @@ describe Freeclimb::MessageResult do
|
|
44
46
|
it 'should work' do
|
45
47
|
instance.date_updated = "TEST_STRING"
|
46
48
|
expect(instance.date_updated).to eq("TEST_STRING")
|
49
|
+
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
50
53
|
describe 'test attribute "revision"' do
|
51
54
|
it 'should work' do
|
55
|
+
|
56
|
+
|
52
57
|
instance.revision = 1
|
53
|
-
expect(instance.revision).to eq(1)
|
58
|
+
expect(instance.revision).to eq(1)
|
59
|
+
|
54
60
|
end
|
55
61
|
end
|
56
62
|
|
@@ -58,6 +64,7 @@ describe Freeclimb::MessageResult do
|
|
58
64
|
it 'should work' do
|
59
65
|
instance.account_id = "TEST_STRING"
|
60
66
|
expect(instance.account_id).to eq("TEST_STRING")
|
67
|
+
|
61
68
|
end
|
62
69
|
end
|
63
70
|
|
@@ -65,6 +72,7 @@ describe Freeclimb::MessageResult do
|
|
65
72
|
it 'should work' do
|
66
73
|
instance.message_id = "TEST_STRING"
|
67
74
|
expect(instance.message_id).to eq("TEST_STRING")
|
75
|
+
|
68
76
|
end
|
69
77
|
end
|
70
78
|
|
@@ -120,6 +128,7 @@ describe Freeclimb::MessageResult do
|
|
120
128
|
it 'should work' do
|
121
129
|
instance.from = "TEST_STRING"
|
122
130
|
expect(instance.from).to eq("TEST_STRING")
|
131
|
+
|
123
132
|
end
|
124
133
|
end
|
125
134
|
|
@@ -127,6 +136,7 @@ describe Freeclimb::MessageResult do
|
|
127
136
|
it 'should work' do
|
128
137
|
instance.to = "TEST_STRING"
|
129
138
|
expect(instance.to).to eq("TEST_STRING")
|
139
|
+
|
130
140
|
end
|
131
141
|
end
|
132
142
|
|
@@ -134,6 +144,7 @@ describe Freeclimb::MessageResult do
|
|
134
144
|
it 'should work' do
|
135
145
|
instance.text = "TEST_STRING"
|
136
146
|
expect(instance.text).to eq("TEST_STRING")
|
147
|
+
|
137
148
|
end
|
138
149
|
end
|
139
150
|
|
@@ -141,6 +152,7 @@ describe Freeclimb::MessageResult do
|
|
141
152
|
it 'should work' do
|
142
153
|
instance.direction = "TEST_STRING"
|
143
154
|
expect(instance.direction).to eq("TEST_STRING")
|
155
|
+
|
144
156
|
end
|
145
157
|
end
|
146
158
|
|
@@ -148,6 +160,7 @@ describe Freeclimb::MessageResult do
|
|
148
160
|
it 'should work' do
|
149
161
|
instance.notification_url = "TEST_STRING"
|
150
162
|
expect(instance.notification_url).to eq("TEST_STRING")
|
163
|
+
|
151
164
|
end
|
152
165
|
end
|
153
166
|
|
@@ -155,6 +168,7 @@ describe Freeclimb::MessageResult do
|
|
155
168
|
it 'should work' do
|
156
169
|
instance.brand_id = "TEST_STRING"
|
157
170
|
expect(instance.brand_id).to eq("TEST_STRING")
|
171
|
+
|
158
172
|
end
|
159
173
|
end
|
160
174
|
|
@@ -162,13 +176,25 @@ describe Freeclimb::MessageResult do
|
|
162
176
|
it 'should work' do
|
163
177
|
instance.campaign_id = "TEST_STRING"
|
164
178
|
expect(instance.campaign_id).to eq("TEST_STRING")
|
179
|
+
|
165
180
|
end
|
166
181
|
end
|
167
182
|
|
168
183
|
describe 'test attribute "segment_count"' do
|
169
184
|
it 'should work' do
|
170
|
-
|
171
|
-
|
185
|
+
|
186
|
+
|
187
|
+
instance.segment_count = 1.0
|
188
|
+
expect(instance.segment_count).to eq(1.0)
|
189
|
+
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
describe 'test attribute "media_urls"' do
|
194
|
+
it 'should work' do
|
195
|
+
|
196
|
+
instance.media_urls = ["ELEMENT_1", "ELEMENT_2"]
|
197
|
+
expect(instance.media_urls).to eq(["ELEMENT_1", "ELEMENT_2"])
|
172
198
|
end
|
173
199
|
end
|
174
200
|
|
@@ -189,6 +215,7 @@ describe Freeclimb::MessageResult do
|
|
189
215
|
notification_url: "TS",
|
190
216
|
brand_id: "TS",
|
191
217
|
campaign_id: "TS",
|
218
|
+
media_urls: Array.new(),
|
192
219
|
)}.not_to raise_error()
|
193
220
|
end
|
194
221
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageResult' do
|
@@ -207,6 +234,7 @@ describe Freeclimb::MessageResult do
|
|
207
234
|
notification_url: "TS",
|
208
235
|
brand_id: "TS",
|
209
236
|
campaign_id: "TS",
|
237
|
+
media_urls: Array.new(),
|
210
238
|
invalid_attribute: true
|
211
239
|
)}.to raise_error(ArgumentError)
|
212
240
|
end
|
@@ -226,11 +254,12 @@ describe Freeclimb::MessageResult do
|
|
226
254
|
notification_url: "TS",
|
227
255
|
brand_id: "TS",
|
228
256
|
campaign_id: "TS",
|
257
|
+
media_urls: Array.new(),
|
229
258
|
invalid_attribute: true
|
230
259
|
)}.to raise_error(ArgumentError)
|
231
260
|
end
|
232
261
|
end
|
233
|
-
|
262
|
+
|
234
263
|
describe 'test method "valid"' do
|
235
264
|
it 'checks if properties are valid' do
|
236
265
|
instance = Freeclimb::MessageResult.new(
|
@@ -249,18 +278,18 @@ describe Freeclimb::MessageResult do
|
|
249
278
|
brand_id: "TS",
|
250
279
|
campaign_id: "TS",
|
251
280
|
segment_count: 1,
|
281
|
+
media_urls: Array.new(),
|
252
282
|
)
|
253
283
|
expect(instance.valid?).to eq(true)
|
254
284
|
end
|
285
|
+
|
255
286
|
it 'checks if properties are invalid' do
|
256
287
|
instance = Freeclimb::MessageResult.new(
|
288
|
+
|
257
289
|
)
|
258
290
|
expect(instance.valid?).to eq(false)
|
259
291
|
end
|
260
|
-
|
261
|
-
instance = Freeclimb::MessageResult.new()
|
262
|
-
expect(instance.valid?).to eq(false)
|
263
|
-
end
|
292
|
+
|
264
293
|
end
|
265
294
|
|
266
295
|
describe 'test method "eql?"' do
|
@@ -273,6 +302,7 @@ describe Freeclimb::MessageResult do
|
|
273
302
|
revision: 1,
|
274
303
|
account_id: "TS",
|
275
304
|
message_id: "TS",
|
305
|
+
status: Freeclimb::MessageStatus.new(),
|
276
306
|
status: "NEW",
|
277
307
|
from: "TS",
|
278
308
|
to: "TS",
|
@@ -281,6 +311,7 @@ describe Freeclimb::MessageResult do
|
|
281
311
|
notification_url: "TS",
|
282
312
|
brand_id: "TS",
|
283
313
|
campaign_id: "TS",
|
314
|
+
media_urls: [],
|
284
315
|
)
|
285
316
|
instance_2 = Freeclimb::MessageResult.new(
|
286
317
|
uri: "TS",
|
@@ -289,6 +320,7 @@ describe Freeclimb::MessageResult do
|
|
289
320
|
revision: 1,
|
290
321
|
account_id: "TS",
|
291
322
|
message_id: "TS",
|
323
|
+
status: Freeclimb::MessageStatus.new(),
|
292
324
|
status: "NEW",
|
293
325
|
from: "TS",
|
294
326
|
to: "TS",
|
@@ -297,17 +329,20 @@ describe Freeclimb::MessageResult do
|
|
297
329
|
notification_url: "TS",
|
298
330
|
brand_id: "TS",
|
299
331
|
campaign_id: "TS",
|
332
|
+
media_urls: [],
|
300
333
|
)
|
301
334
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
302
335
|
end
|
336
|
+
|
303
337
|
it 'checks if objects are not equal' do
|
304
338
|
instance_1 = Freeclimb::MessageResult.new(
|
305
339
|
uri: "TS",
|
306
340
|
date_created: "TS",
|
307
341
|
date_updated: "TS",
|
308
|
-
revision:
|
342
|
+
revision: 2,
|
309
343
|
account_id: "TS",
|
310
344
|
message_id: "TS",
|
345
|
+
status: Freeclimb::MessageStatus.new(),
|
311
346
|
status: "NEW",
|
312
347
|
from: "TS",
|
313
348
|
to: "TS",
|
@@ -316,14 +351,16 @@ describe Freeclimb::MessageResult do
|
|
316
351
|
notification_url: "TS",
|
317
352
|
brand_id: "TS",
|
318
353
|
campaign_id: "TS",
|
354
|
+
media_urls: [],
|
319
355
|
)
|
320
356
|
instance_2 = Freeclimb::MessageResult.new(
|
321
357
|
uri: "ST",
|
322
358
|
date_created: "ST",
|
323
359
|
date_updated: "ST",
|
324
|
-
revision:
|
360
|
+
revision: 1,
|
325
361
|
account_id: "ST",
|
326
362
|
message_id: "ST",
|
363
|
+
status: Freeclimb::MessageStatus.new(),
|
327
364
|
status: "QUEUED",
|
328
365
|
from: "ST",
|
329
366
|
to: "ST",
|
@@ -332,11 +369,12 @@ describe Freeclimb::MessageResult do
|
|
332
369
|
notification_url: "ST",
|
333
370
|
brand_id: "ST",
|
334
371
|
campaign_id: "ST",
|
372
|
+
media_urls: nil,
|
335
373
|
)
|
336
374
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
337
375
|
end
|
338
376
|
end
|
339
|
-
|
377
|
+
|
340
378
|
describe 'test method "hash"' do
|
341
379
|
it 'calculates hash code' do
|
342
380
|
instance = Freeclimb::MessageResult.new(
|
@@ -354,6 +392,7 @@ describe Freeclimb::MessageResult do
|
|
354
392
|
notification_url: "TS",
|
355
393
|
brand_id: "TS",
|
356
394
|
campaign_id: "TS",
|
395
|
+
media_urls: Array.new(),
|
357
396
|
)
|
358
397
|
expect(instance.hash).to be_a_kind_of(Integer)
|
359
398
|
end
|
@@ -376,6 +415,7 @@ describe Freeclimb::MessageResult do
|
|
376
415
|
notification_url: "TS",
|
377
416
|
brand_id: "TS",
|
378
417
|
campaign_id: "TS",
|
418
|
+
media_urls: Array.new(),
|
379
419
|
)
|
380
420
|
instance_2 = Freeclimb::MessageResult.new
|
381
421
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -398,6 +438,7 @@ describe Freeclimb::MessageResult do
|
|
398
438
|
notification_url: "TS",
|
399
439
|
brand_id: "TS",
|
400
440
|
campaign_id: "TS",
|
441
|
+
media_urls: Array.new(),
|
401
442
|
)
|
402
443
|
it 'deserializes the data of uri' do
|
403
444
|
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
@@ -441,6 +482,9 @@ describe Freeclimb::MessageResult do
|
|
441
482
|
it 'deserializes the data of segment_count' do
|
442
483
|
expect(instance._deserialize("Float", instance.segment_count)).to be_a_kind_of(Float)
|
443
484
|
end
|
485
|
+
it 'deserializes the data of media_urls' do
|
486
|
+
expect(instance._deserialize("Array<String>", instance.media_urls)).to be_a_kind_of(Array)
|
487
|
+
end
|
444
488
|
end
|
445
489
|
|
446
490
|
describe 'test method "to_s"' do
|
@@ -460,6 +504,7 @@ describe Freeclimb::MessageResult do
|
|
460
504
|
notification_url: "TS",
|
461
505
|
brand_id: "TS",
|
462
506
|
campaign_id: "TS",
|
507
|
+
media_urls: Array.new(),
|
463
508
|
)
|
464
509
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
465
510
|
end
|
@@ -482,6 +527,7 @@ describe Freeclimb::MessageResult do
|
|
482
527
|
notification_url: "TS",
|
483
528
|
brand_id: "TS",
|
484
529
|
campaign_id: "TS",
|
530
|
+
media_urls: Array.new(),
|
485
531
|
)
|
486
532
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
487
533
|
end
|
@@ -502,6 +548,7 @@ describe Freeclimb::MessageResult do
|
|
502
548
|
notification_url: "TS",
|
503
549
|
brand_id: "TS",
|
504
550
|
campaign_id: "TS",
|
551
|
+
media_urls: Array.new(),
|
505
552
|
)
|
506
553
|
instance_2 = Freeclimb::MessageResult.new(
|
507
554
|
uri: "TS",
|
@@ -518,6 +565,7 @@ describe Freeclimb::MessageResult do
|
|
518
565
|
notification_url: "TS",
|
519
566
|
brand_id: "TS",
|
520
567
|
campaign_id: "TS",
|
568
|
+
media_urls: Array.new(),
|
521
569
|
)
|
522
570
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
523
571
|
end
|
@@ -553,6 +601,8 @@ describe Freeclimb::MessageResult do
|
|
553
601
|
|
554
602
|
campaign_id: "TS",
|
555
603
|
|
604
|
+
|
605
|
+
media_urls: Array.new(),
|
556
606
|
)
|
557
607
|
it 'returns uri in the form of hash' do
|
558
608
|
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
@@ -599,6 +649,9 @@ describe Freeclimb::MessageResult do
|
|
599
649
|
it 'returns segment_count in the form of hash' do
|
600
650
|
expect(instance._to_hash(instance.segment_count)).to eq(instance.segment_count)
|
601
651
|
end
|
652
|
+
it 'returns media_urls in the form of hash' do
|
653
|
+
expect(instance._to_hash(instance.media_urls)).to eq(instance.media_urls)
|
654
|
+
end
|
602
655
|
end
|
603
656
|
|
604
657
|
end
|