freeclimb 5.0.0 → 5.1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +21 -15
- data/README.md +5 -4
- data/docs/MessageResult.md +7 -1
- data/docs/TFNCampaign.md +34 -0
- data/lib/freeclimb/configuration.rb +1 -2
- data/lib/freeclimb/models/dequeue.rb +2 -4
- data/lib/freeclimb/models/message_result.rb +36 -5
- data/lib/freeclimb/models/remove_from_conference.rb +2 -4
- data/lib/freeclimb/models/start_record_call.rb +2 -4
- data/lib/freeclimb/models/terminate_conference.rb +2 -4
- data/lib/freeclimb/models/tfn_campaign.rb +370 -0
- data/lib/freeclimb/models/unpark.rb +2 -4
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +1 -0
- data/openapi.json +93 -38
- data/spec/api/default_api_spec.rb +39 -117
- data/spec/models/account_request_spec.rb +113 -2
- data/spec/models/account_result_spec.rb +591 -28
- data/spec/models/account_status_spec.rb +1 -0
- data/spec/models/account_type_spec.rb +1 -0
- data/spec/models/add_to_conference_notification_webhook_spec.rb +654 -5
- data/spec/models/add_to_conference_spec.rb +471 -2
- data/spec/models/add_to_queue_notification_webhook_spec.rb +465 -2
- data/spec/models/answered_by_spec.rb +1 -0
- data/spec/models/application_list_spec.rb +323 -2
- data/spec/models/application_request_spec.rb +393 -2
- data/spec/models/application_result_spec.rb +723 -14
- data/spec/models/available_number_list_spec.rb +323 -2
- data/spec/models/available_number_spec.rb +380 -21
- data/spec/models/barge_in_reason_spec.rb +1 -0
- data/spec/models/buy_incoming_number_request_spec.rb +169 -2
- data/spec/models/call_control_webhook_spec.rb +281 -2
- data/spec/models/call_direction_spec.rb +1 -0
- data/spec/models/call_ended_reason_spec.rb +1 -0
- data/spec/models/call_list_spec.rb +323 -2
- data/spec/models/call_result_spec.rb +1020 -9
- data/spec/models/call_status_spec.rb +1 -0
- data/spec/models/call_status_webhook_spec.rb +501 -2
- data/spec/models/capabilities_spec.rb +191 -2
- data/spec/models/completion_request_spec.rb +54 -2
- data/spec/models/completion_result_spec.rb +93 -2
- data/spec/models/completion_result_status_spec.rb +1 -0
- data/spec/models/conference_list_spec.rb +323 -2
- data/spec/models/conference_participant_list_spec.rb +323 -2
- data/spec/models/conference_participant_result_spec.rb +532 -7
- data/spec/models/conference_recording_status_webhook_spec.rb +654 -5
- data/spec/models/conference_result_spec.rb +768 -55
- data/spec/models/conference_status_spec.rb +1 -0
- data/spec/models/conference_status_webhook_spec.rb +654 -5
- data/spec/models/create_conference_request_spec.rb +243 -2
- data/spec/models/create_conference_spec.rb +281 -2
- data/spec/models/create_conference_webhook_spec.rb +654 -5
- data/spec/models/create_web_rtc_token_spec.rb +151 -2
- data/spec/models/dequeue_spec.rb +1 -0
- data/spec/models/dequeue_webhook_spec.rb +565 -8
- data/spec/models/enqueue_spec.rb +225 -2
- data/spec/models/filter_logs_request_spec.rb +57 -2
- data/spec/models/get_digits_reason_spec.rb +1 -0
- data/spec/models/get_digits_spec.rb +379 -2
- data/spec/models/get_digits_webhook_spec.rb +623 -12
- data/spec/models/get_speech_reason_spec.rb +1 -0
- data/spec/models/get_speech_spec.rb +556 -11
- data/spec/models/get_speech_webhook_spec.rb +870 -15
- data/spec/models/grammar_file_built_in_spec.rb +1 -0
- data/spec/models/grammar_type_spec.rb +1 -0
- data/spec/models/hangup_spec.rb +57 -2
- data/spec/models/if_machine_spec.rb +1 -0
- data/spec/models/inbound_call_webhook_spec.rb +521 -2
- data/spec/models/incoming_number_list_spec.rb +323 -2
- data/spec/models/incoming_number_request_spec.rb +169 -2
- data/spec/models/incoming_number_result_spec.rb +930 -43
- data/spec/models/language_spec.rb +1 -0
- data/spec/models/leave_conference_webhook_spec.rb +465 -2
- data/spec/models/log_level_spec.rb +1 -0
- data/spec/models/log_list_spec.rb +323 -2
- data/spec/models/log_result_spec.rb +368 -9
- data/spec/models/machine_detected_webhook_spec.rb +565 -10
- data/spec/models/machine_type_spec.rb +1 -0
- data/spec/models/make_call_request_spec.rb +529 -6
- data/spec/models/message_delivery_webhook_spec.rb +565 -6
- data/spec/models/message_direction_spec.rb +1 -0
- data/spec/models/message_request_spec.rb +469 -2
- data/spec/models/message_result_spec.rb +1364 -225
- data/spec/models/message_status_spec.rb +1 -0
- data/spec/models/message_status_webhook_spec.rb +615 -20
- data/spec/models/messages_list_spec.rb +323 -2
- data/spec/models/mutable_resource_model_spec.rb +207 -2
- data/spec/models/out_dial_api_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_spec.rb +505 -2
- data/spec/models/out_dial_start_webhook_spec.rb +599 -24
- data/spec/models/pagination_model_spec.rb +285 -2
- data/spec/models/park_spec.rb +169 -2
- data/spec/models/pause_spec.rb +39 -2
- data/spec/models/percl_command_spec.rb +54 -2
- data/spec/models/percl_script_spec.rb +39 -2
- data/spec/models/play_beep_spec.rb +1 -0
- data/spec/models/play_early_media_spec.rb +57 -2
- data/spec/models/play_spec.rb +133 -2
- data/spec/models/queue_list_spec.rb +323 -2
- data/spec/models/queue_member_list_spec.rb +323 -2
- data/spec/models/queue_member_spec.rb +245 -2
- data/spec/models/queue_request_spec.rb +95 -2
- data/spec/models/queue_result_spec.rb +564 -15
- data/spec/models/queue_result_status_spec.rb +1 -0
- data/spec/models/queue_wait_webhook_spec.rb +616 -21
- data/spec/models/record_utterance_spec.rb +303 -2
- data/spec/models/record_utterance_term_reason_spec.rb +1 -0
- data/spec/models/record_webhook_spec.rb +868 -13
- data/spec/models/recording_list_spec.rb +323 -2
- data/spec/models/recording_result_spec.rb +469 -2
- data/spec/models/redirect_spec.rb +57 -2
- data/spec/models/redirect_webhook_spec.rb +521 -2
- data/spec/models/reject_spec.rb +57 -2
- data/spec/models/remove_from_conference_spec.rb +1 -0
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +546 -9
- data/spec/models/request_type_spec.rb +1 -0
- data/spec/models/say_spec.rb +189 -2
- data/spec/models/send_digits_spec.rb +133 -2
- data/spec/models/set_dtmf_pass_through_spec.rb +39 -2
- data/spec/models/set_listen_spec.rb +39 -2
- data/spec/models/set_talk_spec.rb +39 -2
- data/spec/models/sms_spec.rb +225 -2
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_spec.rb +1969 -423
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_campaign_spec.rb +2224 -550
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +597 -17
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +1537 -155
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +1 -0
- data/spec/models/sms_toll_free_campaign_spec.rb +355 -2
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +323 -2
- data/spec/models/start_record_call_spec.rb +1 -0
- data/spec/models/terminate_conference_spec.rb +1 -0
- data/spec/models/tfn_campaign_spec.rb +1089 -0
- data/spec/models/tfn_spec.rb +57 -2
- data/spec/models/transcribe_reason_spec.rb +1 -0
- data/spec/models/transcribe_term_reason_spec.rb +1 -0
- data/spec/models/transcribe_utterance_record_spec.rb +115 -2
- data/spec/models/transcribe_utterance_spec.rb +288 -21
- data/spec/models/transcribe_webhook_spec.rb +1049 -4
- data/spec/models/unpark_spec.rb +1 -0
- data/spec/models/update_call_request_spec.rb +37 -2
- data/spec/models/update_call_request_status_spec.rb +1 -0
- data/spec/models/update_conference_participant_request_spec.rb +115 -2
- data/spec/models/update_conference_request_spec.rb +129 -2
- data/spec/models/update_conference_request_status_spec.rb +1 -0
- data/spec/models/webhook_spec.rb +54 -2
- metadata +129 -125
@@ -0,0 +1,1089 @@
|
|
1
|
+
=begin
|
2
|
+
#FreeClimb API
|
3
|
+
|
4
|
+
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@freeclimb.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
include Freeclimb
|
17
|
+
|
18
|
+
# Unit tests for Freeclimb::TFNCampaign
|
19
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
20
|
+
# Please update as you see appropriate
|
21
|
+
describe Freeclimb::TFNCampaign do
|
22
|
+
let(:instance) { Freeclimb::TFNCampaign.new }
|
23
|
+
|
24
|
+
describe 'test an instance of TFNCampaign' do
|
25
|
+
it 'should create an instance of TFNCampaign' do
|
26
|
+
expect(instance).to be_instance_of(Freeclimb::TFNCampaign)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test attribute "account_id"' do
|
31
|
+
it 'should work' do
|
32
|
+
|
33
|
+
instance.account_id = "TEST_STRING"
|
34
|
+
expect(instance.account_id).to eq("TEST_STRING")
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "campaign_id"' do
|
42
|
+
it 'should work' do
|
43
|
+
|
44
|
+
instance.campaign_id = "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a"
|
45
|
+
expect(instance.campaign_id).to eq("cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a")
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "use_case"' do
|
54
|
+
it 'should work' do
|
55
|
+
|
56
|
+
instance.use_case = "TEST_STRING"
|
57
|
+
expect(instance.use_case).to eq("TEST_STRING")
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
describe 'test attribute "registration_status"' do
|
66
|
+
it 'assigns value UNREGISTERED' do
|
67
|
+
instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED
|
68
|
+
expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED)
|
69
|
+
end
|
70
|
+
it 'assigns value INITIATED' do
|
71
|
+
instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED
|
72
|
+
expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::INITIATED)
|
73
|
+
end
|
74
|
+
it 'assigns value PENDING' do
|
75
|
+
instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING
|
76
|
+
expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::PENDING)
|
77
|
+
end
|
78
|
+
it 'assigns value DECLINED' do
|
79
|
+
instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED
|
80
|
+
expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::DECLINED)
|
81
|
+
end
|
82
|
+
it 'assigns value REGISTERED' do
|
83
|
+
instance.registration_status = Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED
|
84
|
+
expect(instance.registration_status).to eq(Freeclimb::SMSTollFreeCampaignRegistrationStatus::REGISTERED)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
describe 'test attribute "date_created"' do
|
88
|
+
it 'should work' do
|
89
|
+
|
90
|
+
instance.date_created = "TEST_STRING"
|
91
|
+
expect(instance.date_created).to eq("TEST_STRING")
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
describe 'test attribute "date_updated"' do
|
99
|
+
it 'should work' do
|
100
|
+
|
101
|
+
instance.date_updated = "TEST_STRING"
|
102
|
+
expect(instance.date_updated).to eq("TEST_STRING")
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe 'test attribute "date_created_iso"' do
|
110
|
+
it 'should work' do
|
111
|
+
|
112
|
+
instance.date_created_iso = "TEST_STRING"
|
113
|
+
expect(instance.date_created_iso).to eq("TEST_STRING")
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
describe 'test attribute "date_updated_iso"' do
|
121
|
+
it 'should work' do
|
122
|
+
|
123
|
+
instance.date_updated_iso = "TEST_STRING"
|
124
|
+
expect(instance.date_updated_iso).to eq("TEST_STRING")
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
describe 'test attribute "revision"' do
|
132
|
+
it 'should work' do
|
133
|
+
|
134
|
+
|
135
|
+
instance.revision = 1
|
136
|
+
expect(instance.revision).to eq(1)
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
describe 'test method "initialize"' do
|
144
|
+
it 'properly initializes with values' do
|
145
|
+
expect { instance = Freeclimb::TFNCampaign.new(
|
146
|
+
|
147
|
+
account_id: "TS",
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
use_case: "TS",
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
date_created: "TS",
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
date_updated: "TS",
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
date_created_iso: "TS",
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
date_updated_iso: "TS",
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
revision: 1,
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
)}.not_to raise_error()
|
192
|
+
end
|
193
|
+
it 'fails to initialize with input argument that is not a hash in Freeclimb::TFNCampaign' do
|
194
|
+
expect { instance = Freeclimb::TFNCampaign.new(
|
195
|
+
|
196
|
+
account_id: "TS",
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
use_case: "TS",
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
date_created: "TS",
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
date_updated: "TS",
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
date_created_iso: "TS",
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
date_updated_iso: "TS",
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
revision: 1,
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
invalid_attribute: true
|
241
|
+
)}.to raise_error(ArgumentError)
|
242
|
+
end
|
243
|
+
it 'fails to initialize with invalid attribute' do
|
244
|
+
expect { instance = Freeclimb::TFNCampaign.new(
|
245
|
+
|
246
|
+
account_id: "TS",
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
use_case: "TS",
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
date_created: "TS",
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
date_updated: "TS",
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
date_created_iso: "TS",
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
date_updated_iso: "TS",
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
revision: 1,
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
invalid_attribute: true
|
291
|
+
)}.to raise_error(ArgumentError)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
describe 'test method "valid"' do
|
296
|
+
it 'checks if properties are valid' do
|
297
|
+
instance = Freeclimb::TFNCampaign.new(
|
298
|
+
|
299
|
+
account_id: "TS",
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
use_case: "TS",
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
date_created: "TS",
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
date_updated: "TS",
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
date_created_iso: "TS",
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
date_updated_iso: "TS",
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
revision: 1,
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
)
|
344
|
+
expect(instance.valid?).to eq(true)
|
345
|
+
end
|
346
|
+
|
347
|
+
|
348
|
+
skip 'checks if properties are invalid' do
|
349
|
+
instance = Freeclimb::TFNCampaign.new(
|
350
|
+
|
351
|
+
)
|
352
|
+
expect(instance.valid?).to eq(false)
|
353
|
+
end
|
354
|
+
|
355
|
+
end
|
356
|
+
|
357
|
+
describe 'test method "eql?"' do
|
358
|
+
it 'checks if objects are equal' do
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
instance_1 = Freeclimb::TFNCampaign.new(
|
369
|
+
|
370
|
+
account_id: "TS",
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
use_case: "TS",
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
389
|
+
|
390
|
+
|
391
|
+
date_created: "TS",
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
date_updated: "TS",
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
date_created_iso: "TS",
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
date_updated_iso: "TS",
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
revision: 1,
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
)
|
415
|
+
instance_2 = Freeclimb::TFNCampaign.new(
|
416
|
+
|
417
|
+
account_id: "TS",
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
use_case: "TS",
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
436
|
+
|
437
|
+
|
438
|
+
date_created: "TS",
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
date_updated: "TS",
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
date_created_iso: "TS",
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
date_updated_iso: "TS",
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
revision: 1,
|
460
|
+
|
461
|
+
)
|
462
|
+
expect(instance_1.eql?(instance_2)).to eq(true)
|
463
|
+
end
|
464
|
+
|
465
|
+
it 'checks if objects are not equal' do
|
466
|
+
instance_1 = Freeclimb::TFNCampaign.new(
|
467
|
+
|
468
|
+
account_id: "TS",
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
use_case: "TS",
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
487
|
+
|
488
|
+
|
489
|
+
date_created: "TS",
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
date_updated: "TS",
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
date_created_iso: "TS",
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
date_updated_iso: "TS",
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
revision: 2,
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
)
|
513
|
+
instance_2 = Freeclimb::TFNCampaign.new(
|
514
|
+
|
515
|
+
account_id: "ST",
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a1",
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
use_case: "ST",
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
registration_status: nil,
|
534
|
+
|
535
|
+
|
536
|
+
date_created: "ST",
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
date_updated: "ST",
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
date_created_iso: "ST",
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
date_updated_iso: "ST",
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
revision: 1,
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
)
|
560
|
+
expect(instance_1.eql?(instance_2)).to eq(false)
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
describe 'test method "hash"' do
|
565
|
+
it 'calculates hash code' do
|
566
|
+
instance = Freeclimb::TFNCampaign.new(
|
567
|
+
|
568
|
+
account_id: "TS",
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
use_case: "TS",
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
date_created: "TS",
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
date_updated: "TS",
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
date_created_iso: "TS",
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
date_updated_iso: "TS",
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
revision: 1,
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
)
|
613
|
+
expect(instance.hash).to be_a_kind_of(Integer)
|
614
|
+
end
|
615
|
+
end
|
616
|
+
|
617
|
+
describe 'test method "build_from_hash"' do
|
618
|
+
it 'builds equivalent model from hash code' do
|
619
|
+
instance_1 = Freeclimb::TFNCampaign.new(
|
620
|
+
|
621
|
+
account_id: "TS",
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
use_case: "TS",
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
date_created: "TS",
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
date_updated: "TS",
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
date_created_iso: "TS",
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
|
657
|
+
date_updated_iso: "TS",
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
revision: 1,
|
662
|
+
|
663
|
+
|
664
|
+
|
665
|
+
)
|
666
|
+
instance_2 = Freeclimb::TFNCampaign.new(
|
667
|
+
|
668
|
+
account_id: "TS",
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
use_case: "TS",
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
date_created: "TS",
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
date_updated: "TS",
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
date_created_iso: "TS",
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
date_updated_iso: "TS",
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
revision: 1,
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
)
|
713
|
+
|
714
|
+
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
715
|
+
end
|
716
|
+
end
|
717
|
+
|
718
|
+
describe 'test method "_deserialize"' do
|
719
|
+
instance = Freeclimb::TFNCampaign.new(
|
720
|
+
|
721
|
+
account_id: "TS",
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
|
731
|
+
|
732
|
+
use_case: "TS",
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
date_created: "TS",
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
date_updated: "TS",
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
date_created_iso: "TS",
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
date_updated_iso: "TS",
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
revision: 1,
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
)
|
766
|
+
it 'deserializes the data of account_id' do
|
767
|
+
expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
|
768
|
+
end
|
769
|
+
|
770
|
+
|
771
|
+
it 'deserializes the data of campaign_id' do
|
772
|
+
expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String)
|
773
|
+
end
|
774
|
+
|
775
|
+
|
776
|
+
it 'deserializes the data of use_case' do
|
777
|
+
expect(instance._deserialize("String", instance.use_case)).to be_a_kind_of(String)
|
778
|
+
end
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
it 'deserializes the data of date_created' do
|
784
|
+
expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
|
785
|
+
end
|
786
|
+
|
787
|
+
|
788
|
+
it 'deserializes the data of date_updated' do
|
789
|
+
expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
|
790
|
+
end
|
791
|
+
|
792
|
+
|
793
|
+
it 'deserializes the data of date_created_iso' do
|
794
|
+
expect(instance._deserialize("String", instance.date_created_iso)).to be_a_kind_of(String)
|
795
|
+
end
|
796
|
+
|
797
|
+
|
798
|
+
it 'deserializes the data of date_updated_iso' do
|
799
|
+
expect(instance._deserialize("String", instance.date_updated_iso)).to be_a_kind_of(String)
|
800
|
+
end
|
801
|
+
|
802
|
+
|
803
|
+
it 'deserializes the data of revision' do
|
804
|
+
expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
|
805
|
+
end
|
806
|
+
|
807
|
+
|
808
|
+
end
|
809
|
+
|
810
|
+
describe 'test method "to_s"' do
|
811
|
+
it 'returns the string representation of the object' do
|
812
|
+
instance = Freeclimb::TFNCampaign.new(
|
813
|
+
|
814
|
+
account_id: "TS",
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
use_case: "TS",
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
date_created: "TS",
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
date_updated: "TS",
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
date_created_iso: "TS",
|
846
|
+
|
847
|
+
|
848
|
+
|
849
|
+
|
850
|
+
date_updated_iso: "TS",
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
revision: 1,
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
)
|
859
|
+
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
860
|
+
end
|
861
|
+
end
|
862
|
+
|
863
|
+
describe 'test method "to_hash"' do
|
864
|
+
it 'returns the object in the form of hash' do
|
865
|
+
instance = Freeclimb::TFNCampaign.new(
|
866
|
+
|
867
|
+
account_id: "TS",
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
use_case: "TS",
|
879
|
+
|
880
|
+
|
881
|
+
|
882
|
+
|
883
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
date_created: "TS",
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
date_updated: "TS",
|
894
|
+
|
895
|
+
|
896
|
+
|
897
|
+
|
898
|
+
date_created_iso: "TS",
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
date_updated_iso: "TS",
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
revision: 1,
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
)
|
912
|
+
expect(instance.to_hash).to be_a_kind_of(Hash)
|
913
|
+
end
|
914
|
+
it 'creates equal hash for two equal objects' do
|
915
|
+
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
instance_1 = Freeclimb::TFNCampaign.new(
|
925
|
+
|
926
|
+
account_id: "TS",
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
|
931
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
|
937
|
+
use_case: "TS",
|
938
|
+
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
943
|
+
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
date_created: "TS",
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
date_updated: "TS",
|
953
|
+
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
date_created_iso: "TS",
|
958
|
+
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
date_updated_iso: "TS",
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
revision: 1,
|
967
|
+
|
968
|
+
|
969
|
+
|
970
|
+
)
|
971
|
+
instance_2 = Freeclimb::TFNCampaign.new(
|
972
|
+
|
973
|
+
account_id: "TS",
|
974
|
+
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
979
|
+
|
980
|
+
|
981
|
+
|
982
|
+
|
983
|
+
|
984
|
+
use_case: "TS",
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
|
989
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
990
|
+
|
991
|
+
|
992
|
+
|
993
|
+
|
994
|
+
date_created: "TS",
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
date_updated: "TS",
|
1000
|
+
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
date_created_iso: "TS",
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
date_updated_iso: "TS",
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
revision: 1,
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
)
|
1018
|
+
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
1019
|
+
end
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
describe 'test method "_to_hash"' do
|
1023
|
+
instance = Freeclimb::TFNCampaign.new(
|
1024
|
+
|
1025
|
+
account_id: "TS",
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
campaign_id: "cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a",
|
1030
|
+
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
use_case: "TS",
|
1035
|
+
|
1036
|
+
|
1037
|
+
|
1038
|
+
registration_status: Freeclimb::SMSTollFreeCampaignRegistrationStatus::UNREGISTERED,
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
date_created: "TS",
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
date_updated: "TS",
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
date_created_iso: "TS",
|
1051
|
+
|
1052
|
+
|
1053
|
+
|
1054
|
+
date_updated_iso: "TS",
|
1055
|
+
|
1056
|
+
|
1057
|
+
revision: 1,
|
1058
|
+
|
1059
|
+
)
|
1060
|
+
it 'returns account_id in the form of hash' do
|
1061
|
+
expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
|
1062
|
+
end
|
1063
|
+
it 'returns campaign_id in the form of hash' do
|
1064
|
+
expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id)
|
1065
|
+
end
|
1066
|
+
it 'returns use_case in the form of hash' do
|
1067
|
+
expect(instance._to_hash(instance.use_case)).to eq(instance.use_case)
|
1068
|
+
end
|
1069
|
+
it 'returns registration_status in the form of hash' do
|
1070
|
+
expect(instance._to_hash(instance.registration_status)).to eq(instance.registration_status)
|
1071
|
+
end
|
1072
|
+
it 'returns date_created in the form of hash' do
|
1073
|
+
expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
|
1074
|
+
end
|
1075
|
+
it 'returns date_updated in the form of hash' do
|
1076
|
+
expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
|
1077
|
+
end
|
1078
|
+
it 'returns date_created_iso in the form of hash' do
|
1079
|
+
expect(instance._to_hash(instance.date_created_iso)).to eq(instance.date_created_iso)
|
1080
|
+
end
|
1081
|
+
it 'returns date_updated_iso in the form of hash' do
|
1082
|
+
expect(instance._to_hash(instance.date_updated_iso)).to eq(instance.date_updated_iso)
|
1083
|
+
end
|
1084
|
+
it 'returns revision in the form of hash' do
|
1085
|
+
expect(instance._to_hash(instance.revision)).to eq(instance.revision)
|
1086
|
+
end
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
end
|