freeclimb 5.1.0 → 5.2.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 +9 -0
- data/Gemfile +4 -5
- data/Gemfile.lock +18 -5
- data/README.md +4 -4
- data/Rakefile +1 -1
- data/docs/CreateConferenceRequest.md +1 -1
- data/docs/DefaultApi.md +1 -1
- data/freeclimb.gemspec +21 -26
- data/lib/freeclimb/api/default_api.rb +878 -878
- data/lib/freeclimb/api_client.rb +78 -83
- data/lib/freeclimb/api_error.rb +17 -19
- data/lib/freeclimb/configuration.rb +27 -29
- data/lib/freeclimb/models/account_request.rb +36 -41
- data/lib/freeclimb/models/account_result.rb +88 -92
- data/lib/freeclimb/models/account_status.rb +12 -14
- data/lib/freeclimb/models/account_type.rb +12 -14
- data/lib/freeclimb/models/add_to_conference.rb +81 -85
- data/lib/freeclimb/models/add_to_conference_notification_webhook.rb +99 -103
- data/lib/freeclimb/models/add_to_queue_notification_webhook.rb +78 -82
- data/lib/freeclimb/models/answered_by.rb +12 -14
- data/lib/freeclimb/models/application_list.rb +74 -78
- data/lib/freeclimb/models/application_request.rb +66 -70
- data/lib/freeclimb/models/application_result.rb +100 -104
- data/lib/freeclimb/models/available_number.rb +66 -70
- data/lib/freeclimb/models/available_number_list.rb +74 -78
- data/lib/freeclimb/models/barge_in_reason.rb +12 -14
- data/lib/freeclimb/models/buy_incoming_number_request.rb +41 -45
- data/lib/freeclimb/models/call_control_webhook.rb +56 -61
- data/lib/freeclimb/models/call_direction.rb +12 -14
- data/lib/freeclimb/models/call_ended_reason.rb +12 -14
- data/lib/freeclimb/models/call_list.rb +74 -78
- data/lib/freeclimb/models/call_result.rb +142 -146
- data/lib/freeclimb/models/call_status.rb +12 -14
- data/lib/freeclimb/models/call_status_webhook.rb +84 -88
- data/lib/freeclimb/models/capabilities.rb +55 -59
- data/lib/freeclimb/models/completion_request.rb +32 -36
- data/lib/freeclimb/models/completion_result.rb +36 -40
- data/lib/freeclimb/models/completion_result_status.rb +12 -14
- data/lib/freeclimb/models/conference_list.rb +74 -78
- data/lib/freeclimb/models/conference_participant_list.rb +74 -78
- data/lib/freeclimb/models/conference_participant_result.rb +88 -92
- data/lib/freeclimb/models/conference_recording_status_webhook.rb +99 -103
- data/lib/freeclimb/models/conference_result.rb +106 -110
- data/lib/freeclimb/models/conference_status.rb +12 -14
- data/lib/freeclimb/models/conference_status_webhook.rb +102 -106
- data/lib/freeclimb/models/create_conference.rb +60 -63
- data/lib/freeclimb/models/create_conference_request.rb +55 -54
- data/lib/freeclimb/models/create_conference_webhook.rb +102 -106
- data/lib/freeclimb/models/create_web_rtc_token.rb +42 -46
- data/lib/freeclimb/models/dequeue.rb +28 -33
- data/lib/freeclimb/models/dequeue_webhook.rb +89 -93
- data/lib/freeclimb/models/enqueue.rb +48 -52
- data/lib/freeclimb/models/filter_logs_request.rb +31 -35
- data/lib/freeclimb/models/get_digits.rb +73 -77
- data/lib/freeclimb/models/get_digits_reason.rb +12 -14
- data/lib/freeclimb/models/get_digits_webhook.rb +93 -97
- data/lib/freeclimb/models/get_speech.rb +94 -97
- data/lib/freeclimb/models/get_speech_reason.rb +12 -14
- data/lib/freeclimb/models/get_speech_webhook.rb +118 -122
- data/lib/freeclimb/models/grammar_file_built_in.rb +12 -14
- data/lib/freeclimb/models/grammar_type.rb +12 -14
- data/lib/freeclimb/models/hangup.rb +34 -39
- data/lib/freeclimb/models/if_machine.rb +12 -14
- data/lib/freeclimb/models/inbound_call_webhook.rb +85 -89
- data/lib/freeclimb/models/incoming_number_list.rb +74 -78
- data/lib/freeclimb/models/incoming_number_request.rb +41 -45
- data/lib/freeclimb/models/incoming_number_result.rb +122 -126
- data/lib/freeclimb/models/language.rb +12 -14
- data/lib/freeclimb/models/leave_conference_webhook.rb +79 -83
- data/lib/freeclimb/models/log_level.rb +12 -14
- data/lib/freeclimb/models/log_list.rb +74 -78
- data/lib/freeclimb/models/log_result.rb +67 -71
- data/lib/freeclimb/models/machine_detected_webhook.rb +89 -93
- data/lib/freeclimb/models/machine_type.rb +12 -14
- data/lib/freeclimb/models/make_call_request.rb +77 -81
- data/lib/freeclimb/models/message_delivery_webhook.rb +81 -86
- data/lib/freeclimb/models/message_direction.rb +12 -14
- data/lib/freeclimb/models/message_request.rb +72 -75
- data/lib/freeclimb/models/message_result.rb +135 -139
- data/lib/freeclimb/models/message_status.rb +12 -14
- data/lib/freeclimb/models/message_status_webhook.rb +86 -90
- data/lib/freeclimb/models/messages_list.rb +74 -78
- data/lib/freeclimb/models/mutable_resource_model.rb +46 -51
- data/lib/freeclimb/models/out_dial.rb +80 -84
- data/lib/freeclimb/models/out_dial_api_connect_webhook.rb +84 -88
- data/lib/freeclimb/models/out_dial_connect_webhook.rb +84 -88
- data/lib/freeclimb/models/out_dial_start_webhook.rb +90 -94
- data/lib/freeclimb/models/pagination_model.rb +67 -71
- data/lib/freeclimb/models/park.rb +44 -48
- data/lib/freeclimb/models/pause.rb +33 -37
- data/lib/freeclimb/models/percl_command.rb +36 -40
- data/lib/freeclimb/models/percl_script.rb +32 -36
- data/lib/freeclimb/models/play.rb +44 -48
- data/lib/freeclimb/models/play_beep.rb +12 -14
- data/lib/freeclimb/models/play_early_media.rb +33 -37
- data/lib/freeclimb/models/queue_list.rb +74 -78
- data/lib/freeclimb/models/queue_member.rb +55 -59
- data/lib/freeclimb/models/queue_member_list.rb +74 -78
- data/lib/freeclimb/models/queue_request.rb +37 -42
- data/lib/freeclimb/models/queue_result.rb +88 -92
- data/lib/freeclimb/models/queue_result_status.rb +12 -14
- data/lib/freeclimb/models/queue_wait_webhook.rb +94 -98
- data/lib/freeclimb/models/record_utterance.rb +63 -67
- data/lib/freeclimb/models/record_utterance_term_reason.rb +12 -14
- data/lib/freeclimb/models/record_webhook.rb +119 -123
- data/lib/freeclimb/models/recording_list.rb +74 -78
- data/lib/freeclimb/models/recording_result.rb +76 -80
- data/lib/freeclimb/models/redirect.rb +33 -37
- data/lib/freeclimb/models/redirect_webhook.rb +84 -88
- data/lib/freeclimb/models/reject.rb +34 -39
- data/lib/freeclimb/models/remove_from_conference.rb +28 -33
- data/lib/freeclimb/models/remove_from_queue_notification_webhook.rb +89 -93
- data/lib/freeclimb/models/request_type.rb +12 -14
- data/lib/freeclimb/models/say.rb +49 -53
- data/lib/freeclimb/models/send_digits.rb +43 -47
- data/lib/freeclimb/models/set_dtmf_pass_through.rb +34 -39
- data/lib/freeclimb/models/set_listen.rb +34 -39
- data/lib/freeclimb/models/set_talk.rb +34 -39
- data/lib/freeclimb/models/sms.rb +48 -52
- data/lib/freeclimb/models/sms_ten_dlc_brand.rb +187 -190
- data/lib/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_entity_type.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_identity_status.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_relationship.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_stock_exchange.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb +74 -78
- data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +226 -229
- data/lib/freeclimb/models/sms_ten_dlc_campaign_status.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb +74 -78
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +186 -189
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +84 -87
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_status.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb +74 -78
- data/lib/freeclimb/models/sms_toll_free_campaign.rb +61 -64
- data/lib/freeclimb/models/sms_toll_free_campaign_registration_status.rb +12 -14
- data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +74 -78
- data/lib/freeclimb/models/start_record_call.rb +28 -33
- data/lib/freeclimb/models/terminate_conference.rb +28 -33
- data/lib/freeclimb/models/tfn.rb +31 -35
- data/lib/freeclimb/models/tfn_campaign.rb +76 -79
- data/lib/freeclimb/models/transcribe_reason.rb +12 -14
- data/lib/freeclimb/models/transcribe_term_reason.rb +12 -14
- data/lib/freeclimb/models/transcribe_utterance.rb +61 -65
- data/lib/freeclimb/models/transcribe_utterance_record.rb +43 -47
- data/lib/freeclimb/models/transcribe_webhook.rb +150 -154
- data/lib/freeclimb/models/unpark.rb +28 -33
- data/lib/freeclimb/models/update_call_request.rb +31 -35
- data/lib/freeclimb/models/update_call_request_status.rb +12 -14
- data/lib/freeclimb/models/update_conference_participant_request.rb +41 -46
- data/lib/freeclimb/models/update_conference_request.rb +41 -45
- data/lib/freeclimb/models/update_conference_request_status.rb +12 -14
- data/lib/freeclimb/models/webhook.rb +32 -37
- data/lib/freeclimb/utils/request_verifier.rb +14 -14
- data/lib/freeclimb/utils/signature_information.rb +8 -8
- data/lib/freeclimb/version.rb +10 -12
- data/lib/freeclimb.rb +156 -158
- data/openapi.json +3 -0
- data/package.json +1 -1
- data/spec/api/default_api_spec.rb +492 -676
- data/spec/api_client_spec.rb +100 -102
- data/spec/configuration_spec.rb +16 -18
- data/spec/models/account_request_spec.rb +104 -233
- data/spec/models/account_result_spec.rb +393 -1013
- data/spec/models/account_status_spec.rb +27 -30
- data/spec/models/account_type_spec.rb +24 -27
- data/spec/models/add_to_conference_notification_webhook_spec.rb +464 -1197
- data/spec/models/add_to_conference_spec.rb +354 -850
- data/spec/models/add_to_queue_notification_webhook_spec.rb +341 -864
- data/spec/models/answered_by_spec.rb +24 -27
- data/spec/models/application_list_spec.rb +289 -646
- data/spec/models/application_request_spec.rb +265 -679
- data/spec/models/application_result_spec.rb +444 -1184
- data/spec/models/available_number_list_spec.rb +289 -646
- data/spec/models/available_number_spec.rb +271 -650
- data/spec/models/barge_in_reason_spec.rb +27 -30
- data/spec/models/buy_incoming_number_request_spec.rb +136 -322
- data/spec/models/call_control_webhook_spec.rb +203 -503
- data/spec/models/call_direction_spec.rb +27 -30
- data/spec/models/call_ended_reason_spec.rb +107 -110
- data/spec/models/call_list_spec.rb +289 -646
- data/spec/models/call_result_spec.rb +679 -1778
- data/spec/models/call_status_spec.rb +47 -50
- data/spec/models/call_status_webhook_spec.rb +413 -990
- data/spec/models/capabilities_spec.rb +202 -411
- data/spec/models/completion_request_spec.rb +75 -143
- data/spec/models/completion_result_spec.rb +104 -231
- data/spec/models/completion_result_status_spec.rb +24 -27
- data/spec/models/conference_list_spec.rb +289 -646
- data/spec/models/conference_participant_list_spec.rb +289 -646
- data/spec/models/conference_participant_result_spec.rb +384 -938
- data/spec/models/conference_recording_status_webhook_spec.rb +464 -1197
- data/spec/models/conference_result_spec.rb +489 -1263
- data/spec/models/conference_status_spec.rb +31 -34
- data/spec/models/conference_status_webhook_spec.rb +464 -1197
- data/spec/models/create_conference_request_spec.rb +204 -485
- data/spec/models/create_conference_spec.rb +237 -557
- data/spec/models/create_conference_webhook_spec.rb +464 -1197
- data/spec/models/create_web_rtc_token_spec.rb +136 -307
- data/spec/models/dequeue_spec.rb +14 -17
- data/spec/models/dequeue_webhook_spec.rb +400 -1021
- data/spec/models/enqueue_spec.rb +169 -412
- data/spec/models/filter_logs_request_spec.rb +73 -145
- data/spec/models/get_digits_reason_spec.rb +31 -34
- data/spec/models/get_digits_spec.rb +326 -737
- data/spec/models/get_digits_webhook_spec.rb +435 -1127
- data/spec/models/get_speech_reason_spec.rb +39 -42
- data/spec/models/get_speech_spec.rb +399 -1036
- data/spec/models/get_speech_webhook_spec.rb +608 -1553
- data/spec/models/grammar_file_built_in_spec.rb +75 -78
- data/spec/models/grammar_type_spec.rb +24 -27
- data/spec/models/hangup_spec.rb +73 -145
- data/spec/models/if_machine_spec.rb +24 -27
- data/spec/models/inbound_call_webhook_spec.rb +371 -951
- data/spec/models/incoming_number_list_spec.rb +289 -646
- data/spec/models/incoming_number_request_spec.rb +136 -322
- data/spec/models/incoming_number_result_spec.rb +573 -1489
- data/spec/models/language_spec.rb +120 -123
- data/spec/models/leave_conference_webhook_spec.rb +341 -864
- data/spec/models/log_level_spec.rb +27 -30
- data/spec/models/log_list_spec.rb +289 -646
- data/spec/models/log_result_spec.rb +272 -667
- data/spec/models/machine_detected_webhook_spec.rb +401 -1036
- data/spec/models/machine_type_spec.rb +24 -27
- data/spec/models/make_call_request_spec.rb +353 -905
- data/spec/models/message_delivery_webhook_spec.rb +357 -942
- data/spec/models/message_direction_spec.rb +24 -27
- data/spec/models/message_request_spec.rb +324 -818
- data/spec/models/message_result_spec.rb +647 -1710
- data/spec/models/message_status_spec.rb +60 -63
- data/spec/models/message_status_webhook_spec.rb +405 -1045
- data/spec/models/messages_list_spec.rb +289 -646
- data/spec/models/mutable_resource_model_spec.rb +168 -395
- data/spec/models/out_dial_api_connect_webhook_spec.rb +371 -951
- data/spec/models/out_dial_connect_webhook_spec.rb +371 -951
- data/spec/models/out_dial_spec.rb +354 -903
- data/spec/models/out_dial_start_webhook_spec.rb +401 -1038
- data/spec/models/pagination_model_spec.rb +259 -577
- data/spec/models/park_spec.rb +136 -322
- data/spec/models/pause_spec.rb +72 -128
- data/spec/models/percl_command_spec.rb +76 -145
- data/spec/models/percl_script_spec.rb +73 -127
- data/spec/models/play_beep_spec.rb +31 -34
- data/spec/models/play_early_media_spec.rb +73 -145
- data/spec/models/play_spec.rb +135 -287
- data/spec/models/queue_list_spec.rb +289 -646
- data/spec/models/queue_member_list_spec.rb +289 -646
- data/spec/models/queue_member_spec.rb +199 -467
- data/spec/models/queue_request_spec.rb +103 -216
- data/spec/models/queue_result_spec.rb +388 -965
- data/spec/models/queue_result_status_spec.rb +31 -34
- data/spec/models/queue_wait_webhook_spec.rb +429 -1091
- data/spec/models/record_utterance_spec.rb +263 -591
- data/spec/models/record_utterance_term_reason_spec.rb +31 -34
- data/spec/models/record_webhook_spec.rb +605 -1548
- data/spec/models/recording_list_spec.rb +289 -646
- data/spec/models/recording_result_spec.rb +323 -819
- data/spec/models/redirect_spec.rb +73 -145
- data/spec/models/redirect_webhook_spec.rb +371 -951
- data/spec/models/reject_spec.rb +73 -145
- data/spec/models/remove_from_conference_spec.rb +14 -17
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +404 -1023
- data/spec/models/request_type_spec.rb +107 -110
- data/spec/models/say_spec.rb +168 -377
- data/spec/models/send_digits_spec.rb +135 -287
- data/spec/models/set_dtmf_pass_through_spec.rb +74 -127
- data/spec/models/set_listen_spec.rb +74 -127
- data/spec/models/set_talk_spec.rb +74 -127
- data/spec/models/sms_spec.rb +169 -412
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +31 -34
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +35 -38
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +31 -34
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +35 -38
- data/spec/models/sms_ten_dlc_brand_spec.rb +1082 -2746
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +124 -127
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +289 -646
- data/spec/models/sms_ten_dlc_campaign_spec.rb +1139 -2881
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +24 -27
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +289 -646
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +406 -1004
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +961 -2393
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +24 -27
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +289 -646
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +35 -38
- data/spec/models/sms_toll_free_campaign_spec.rb +270 -666
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +289 -646
- data/spec/models/start_record_call_spec.rb +14 -17
- data/spec/models/terminate_conference_spec.rb +14 -17
- data/spec/models/tfn_campaign_spec.rb +330 -858
- data/spec/models/tfn_spec.rb +73 -145
- data/spec/models/transcribe_reason_spec.rb +35 -38
- data/spec/models/transcribe_term_reason_spec.rb +24 -27
- data/spec/models/transcribe_utterance_record_spec.rb +134 -270
- data/spec/models/transcribe_utterance_spec.rb +236 -523
- data/spec/models/transcribe_webhook_spec.rb +749 -1918
- data/spec/models/unpark_spec.rb +14 -17
- data/spec/models/update_call_request_spec.rb +74 -143
- data/spec/models/update_call_request_status_spec.rb +24 -27
- data/spec/models/update_conference_participant_request_spec.rb +137 -268
- data/spec/models/update_conference_request_spec.rb +140 -321
- data/spec/models/update_conference_request_status_spec.rb +24 -27
- data/spec/models/webhook_spec.rb +68 -137
- data/spec/quickstart_spec.rb +5 -5
- data/spec/spec_helper.rb +92 -100
- data/spec/utils/request_verifier_spec.rb +70 -71
- data/spec/utils/signature_information_spec.rb +23 -23
- data/yarn.lock +9 -0
- metadata +3 -151
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
# #FreeClimb API
|
2
|
+
#
|
3
|
+
# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 1.0.0
|
6
|
+
# Contact: support@freeclimb.com
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 7.9.0
|
9
|
+
#
|
3
10
|
|
4
|
-
|
5
|
-
|
6
|
-
|
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'
|
11
|
+
require "spec_helper"
|
12
|
+
require "json"
|
13
|
+
require "date"
|
16
14
|
include Freeclimb
|
17
15
|
|
18
16
|
# Unit tests for Freeclimb::CallStatusWebhook
|
@@ -21,865 +19,490 @@ include Freeclimb
|
|
21
19
|
describe Freeclimb::CallStatusWebhook do
|
22
20
|
let(:instance) { Freeclimb::CallStatusWebhook.new }
|
23
21
|
|
24
|
-
describe
|
25
|
-
it
|
22
|
+
describe "test an instance of CallStatusWebhook" do
|
23
|
+
it "should create an instance of CallStatusWebhook" do
|
26
24
|
expect(instance).to be_instance_of(Freeclimb::CallStatusWebhook)
|
27
25
|
end
|
28
26
|
end
|
29
|
-
describe
|
30
|
-
it
|
27
|
+
describe ".deserialize" do
|
28
|
+
it "deserializes a json payload into instance of CallStatusWebhook" do
|
31
29
|
payload = '{ "requestType": "callStatus" }'
|
32
30
|
expect(Freeclimb::CallStatusWebhook.deserialize(payload)).to be_instance_of(Freeclimb::CallStatusWebhook)
|
33
31
|
end
|
34
32
|
end
|
35
|
-
|
33
|
+
|
36
34
|
describe 'test attribute "request_type"' do
|
37
|
-
it
|
38
|
-
|
35
|
+
it "should work" do
|
39
36
|
instance.request_type = "TEST_STRING"
|
40
|
-
expect(instance.request_type).to eq("TEST_STRING")
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
expect(instance.request_type).to eq("TEST_STRING")
|
44
38
|
end
|
45
39
|
end
|
46
40
|
|
47
41
|
describe 'test attribute "call_id"' do
|
48
|
-
it
|
49
|
-
|
42
|
+
it "should work" do
|
50
43
|
instance.call_id = "TEST_STRING"
|
51
|
-
expect(instance.call_id).to eq("TEST_STRING")
|
52
|
-
|
53
|
-
|
54
|
-
|
44
|
+
expect(instance.call_id).to eq("TEST_STRING")
|
55
45
|
end
|
56
46
|
end
|
57
47
|
|
58
48
|
describe 'test attribute "account_id"' do
|
59
|
-
it
|
60
|
-
|
49
|
+
it "should work" do
|
61
50
|
instance.account_id = "TEST_STRING"
|
62
|
-
expect(instance.account_id).to eq("TEST_STRING")
|
63
|
-
|
64
|
-
|
65
|
-
|
51
|
+
expect(instance.account_id).to eq("TEST_STRING")
|
66
52
|
end
|
67
53
|
end
|
68
54
|
|
69
55
|
describe 'test attribute "from"' do
|
70
|
-
it
|
71
|
-
|
56
|
+
it "should work" do
|
72
57
|
instance.from = "TEST_STRING"
|
73
|
-
expect(instance.from).to eq("TEST_STRING")
|
74
|
-
|
75
|
-
|
76
|
-
|
58
|
+
expect(instance.from).to eq("TEST_STRING")
|
77
59
|
end
|
78
60
|
end
|
79
61
|
|
80
62
|
describe 'test attribute "to"' do
|
81
|
-
it
|
82
|
-
|
63
|
+
it "should work" do
|
83
64
|
instance.to = "TEST_STRING"
|
84
|
-
expect(instance.to).to eq("TEST_STRING")
|
85
|
-
|
86
|
-
|
87
|
-
|
65
|
+
expect(instance.to).to eq("TEST_STRING")
|
88
66
|
end
|
89
67
|
end
|
90
68
|
|
91
|
-
|
92
69
|
describe 'test attribute "call_status"' do
|
93
|
-
it
|
70
|
+
it "assigns value QUEUED" do
|
94
71
|
instance.call_status = Freeclimb::CallStatus::QUEUED
|
95
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED)
|
72
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED)
|
96
73
|
end
|
97
|
-
it
|
74
|
+
it "assigns value RINGING" do
|
98
75
|
instance.call_status = Freeclimb::CallStatus::RINGING
|
99
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING)
|
76
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING)
|
100
77
|
end
|
101
|
-
it
|
78
|
+
it "assigns value IN_PROGRESS" do
|
102
79
|
instance.call_status = Freeclimb::CallStatus::IN_PROGRESS
|
103
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS)
|
80
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS)
|
104
81
|
end
|
105
|
-
it
|
82
|
+
it "assigns value CANCELED" do
|
106
83
|
instance.call_status = Freeclimb::CallStatus::CANCELED
|
107
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED)
|
84
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED)
|
108
85
|
end
|
109
|
-
it
|
86
|
+
it "assigns value COMPLETED" do
|
110
87
|
instance.call_status = Freeclimb::CallStatus::COMPLETED
|
111
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED)
|
88
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED)
|
112
89
|
end
|
113
|
-
it
|
90
|
+
it "assigns value FAILED" do
|
114
91
|
instance.call_status = Freeclimb::CallStatus::FAILED
|
115
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED)
|
92
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED)
|
116
93
|
end
|
117
|
-
it
|
94
|
+
it "assigns value BUSY" do
|
118
95
|
instance.call_status = Freeclimb::CallStatus::BUSY
|
119
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY)
|
96
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY)
|
120
97
|
end
|
121
|
-
it
|
98
|
+
it "assigns value NO_ANSWER" do
|
122
99
|
instance.call_status = Freeclimb::CallStatus::NO_ANSWER
|
123
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER)
|
100
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER)
|
124
101
|
end
|
125
102
|
end
|
126
103
|
|
127
104
|
describe 'test attribute "call_ended_reason"' do
|
128
|
-
it
|
105
|
+
it "assigns value BUSY" do
|
129
106
|
instance.call_ended_reason = Freeclimb::CallEndedReason::BUSY
|
130
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::BUSY)
|
107
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::BUSY)
|
131
108
|
end
|
132
|
-
it
|
109
|
+
it "assigns value FAILED" do
|
133
110
|
instance.call_ended_reason = Freeclimb::CallEndedReason::FAILED
|
134
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAILED)
|
111
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAILED)
|
135
112
|
end
|
136
|
-
it
|
113
|
+
it "assigns value NO_ANSWER" do
|
137
114
|
instance.call_ended_reason = Freeclimb::CallEndedReason::NO_ANSWER
|
138
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::NO_ANSWER)
|
115
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::NO_ANSWER)
|
139
116
|
end
|
140
|
-
it
|
117
|
+
it "assigns value CALL_CANCELED" do
|
141
118
|
instance.call_ended_reason = Freeclimb::CallEndedReason::CALL_CANCELED
|
142
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CALL_CANCELED)
|
119
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CALL_CANCELED)
|
143
120
|
end
|
144
|
-
it
|
121
|
+
it "assigns value FAR_END_HANGUP" do
|
145
122
|
instance.call_ended_reason = Freeclimb::CallEndedReason::FAR_END_HANGUP
|
146
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAR_END_HANGUP)
|
123
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::FAR_END_HANGUP)
|
147
124
|
end
|
148
|
-
it
|
125
|
+
it "assigns value APP_HANGUP" do
|
149
126
|
instance.call_ended_reason = Freeclimb::CallEndedReason::APP_HANGUP
|
150
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_HANGUP)
|
127
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_HANGUP)
|
151
128
|
end
|
152
|
-
it
|
129
|
+
it "assigns value APP_REJECT" do
|
153
130
|
instance.call_ended_reason = Freeclimb::CallEndedReason::APP_REJECT
|
154
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_REJECT)
|
131
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_REJECT)
|
155
132
|
end
|
156
|
-
it
|
133
|
+
it "assigns value APP_NO_PERCL" do
|
157
134
|
instance.call_ended_reason = Freeclimb::CallEndedReason::APP_NO_PERCL
|
158
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_NO_PERCL)
|
135
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_NO_PERCL)
|
159
136
|
end
|
160
|
-
it
|
137
|
+
it "assigns value APP_INVALID_PERCL" do
|
161
138
|
instance.call_ended_reason = Freeclimb::CallEndedReason::APP_INVALID_PERCL
|
162
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_INVALID_PERCL)
|
139
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::APP_INVALID_PERCL)
|
163
140
|
end
|
164
|
-
it
|
141
|
+
it "assigns value CONFERENCE_TERMINATED" do
|
165
142
|
instance.call_ended_reason = Freeclimb::CallEndedReason::CONFERENCE_TERMINATED
|
166
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_TERMINATED)
|
143
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_TERMINATED)
|
167
144
|
end
|
168
|
-
it
|
145
|
+
it "assigns value CONFERENCE_EMPTIED" do
|
169
146
|
instance.call_ended_reason = Freeclimb::CallEndedReason::CONFERENCE_EMPTIED
|
170
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_EMPTIED)
|
147
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFERENCE_EMPTIED)
|
171
148
|
end
|
172
|
-
it
|
149
|
+
it "assigns value REMOVED_FROM_CONFERENCE" do
|
173
150
|
instance.call_ended_reason = Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE
|
174
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE)
|
151
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::REMOVED_FROM_CONFERENCE)
|
175
152
|
end
|
176
|
-
it
|
153
|
+
it "assigns value MACHINE_DETECTED" do
|
177
154
|
instance.call_ended_reason = Freeclimb::CallEndedReason::MACHINE_DETECTED
|
178
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MACHINE_DETECTED)
|
155
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MACHINE_DETECTED)
|
179
156
|
end
|
180
|
-
it
|
157
|
+
it "assigns value WEBHOOK_FAILED" do
|
181
158
|
instance.call_ended_reason = Freeclimb::CallEndedReason::WEBHOOK_FAILED
|
182
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_FAILED)
|
159
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_FAILED)
|
183
160
|
end
|
184
|
-
it
|
161
|
+
it "assigns value WEBHOOK_INVALID_RESPONSE" do
|
185
162
|
instance.call_ended_reason = Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE
|
186
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE)
|
163
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::WEBHOOK_INVALID_RESPONSE)
|
187
164
|
end
|
188
|
-
it
|
165
|
+
it "assigns value VOICE_DISABLED" do
|
189
166
|
instance.call_ended_reason = Freeclimb::CallEndedReason::VOICE_DISABLED
|
190
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::VOICE_DISABLED)
|
167
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::VOICE_DISABLED)
|
191
168
|
end
|
192
|
-
it
|
169
|
+
it "assigns value CONFIG_ERROR_NO_APPLICATION" do
|
193
170
|
instance.call_ended_reason = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION
|
194
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION)
|
171
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_APPLICATION)
|
195
172
|
end
|
196
|
-
it
|
173
|
+
it "assigns value CONFIG_ERROR_NO_VOICE_URL" do
|
197
174
|
instance.call_ended_reason = Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL
|
198
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL)
|
175
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::CONFIG_ERROR_NO_VOICE_URL)
|
199
176
|
end
|
200
|
-
it
|
177
|
+
it "assigns value MAX_REDIRECTS_ERROR" do
|
201
178
|
instance.call_ended_reason = Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR
|
202
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR)
|
179
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_REDIRECTS_ERROR)
|
203
180
|
end
|
204
|
-
it
|
181
|
+
it "assigns value PERCL_PROCESSING_ERROR" do
|
205
182
|
instance.call_ended_reason = Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR
|
206
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR)
|
183
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::PERCL_PROCESSING_ERROR)
|
207
184
|
end
|
208
|
-
it
|
185
|
+
it "assigns value INTERNAL_ERROR" do
|
209
186
|
instance.call_ended_reason = Freeclimb::CallEndedReason::INTERNAL_ERROR
|
210
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::INTERNAL_ERROR)
|
187
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::INTERNAL_ERROR)
|
211
188
|
end
|
212
|
-
it
|
189
|
+
it "assigns value GRPC_HANGUP" do
|
213
190
|
instance.call_ended_reason = Freeclimb::CallEndedReason::GRPC_HANGUP
|
214
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::GRPC_HANGUP)
|
191
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::GRPC_HANGUP)
|
215
192
|
end
|
216
|
-
it
|
193
|
+
it "assigns value MAX_DURATION" do
|
217
194
|
instance.call_ended_reason = Freeclimb::CallEndedReason::MAX_DURATION
|
218
|
-
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_DURATION)
|
195
|
+
expect(instance.call_ended_reason).to eq(Freeclimb::CallEndedReason::MAX_DURATION)
|
219
196
|
end
|
220
197
|
end
|
221
198
|
|
222
199
|
describe 'test attribute "direction"' do
|
223
|
-
it
|
200
|
+
it "assigns value INBOUND" do
|
224
201
|
instance.direction = Freeclimb::CallDirection::INBOUND
|
225
|
-
expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND)
|
202
|
+
expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND)
|
226
203
|
end
|
227
|
-
it
|
204
|
+
it "assigns value OUTBOUND_API" do
|
228
205
|
instance.direction = Freeclimb::CallDirection::OUTBOUND_API
|
229
|
-
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API)
|
206
|
+
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API)
|
230
207
|
end
|
231
|
-
it
|
208
|
+
it "assigns value OUTBOUND_DIAL" do
|
232
209
|
instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL
|
233
|
-
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL)
|
210
|
+
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL)
|
234
211
|
end
|
235
212
|
end
|
236
213
|
describe 'test attribute "conference_id"' do
|
237
|
-
it
|
238
|
-
|
214
|
+
it "should work" do
|
239
215
|
instance.conference_id = "TEST_STRING"
|
240
|
-
expect(instance.conference_id).to eq("TEST_STRING")
|
241
|
-
|
242
|
-
|
243
|
-
|
216
|
+
expect(instance.conference_id).to eq("TEST_STRING")
|
244
217
|
end
|
245
218
|
end
|
246
219
|
|
247
220
|
describe 'test attribute "queue_id"' do
|
248
|
-
it
|
249
|
-
|
221
|
+
it "should work" do
|
250
222
|
instance.queue_id = "TEST_STRING"
|
251
|
-
expect(instance.queue_id).to eq("TEST_STRING")
|
252
|
-
|
253
|
-
|
254
|
-
|
223
|
+
expect(instance.queue_id).to eq("TEST_STRING")
|
255
224
|
end
|
256
225
|
end
|
257
226
|
|
258
227
|
describe 'test method "initialize"' do
|
259
|
-
it
|
260
|
-
expect {
|
261
|
-
|
262
|
-
request_type: "TS",
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
call_id: "TS",
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
account_id: "TS",
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
from: "TS",
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
to: "TS",
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
conference_id: "TS",
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
queue_id: "TS",
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
)}.not_to raise_error()
|
312
|
-
end
|
313
|
-
it 'fails to initialize with input argument that is not a hash in Freeclimb::CallStatusWebhook' do
|
314
|
-
expect { instance = Freeclimb::CallStatusWebhook.new(
|
315
|
-
|
316
|
-
request_type: "TS",
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
call_id: "TS",
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
account_id: "TS",
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
from: "TS",
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
to: "TS",
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
conference_id: "TS",
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
queue_id: "TS",
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
invalid_attribute: true
|
366
|
-
)}.to raise_error(ArgumentError)
|
367
|
-
end
|
368
|
-
it 'fails to initialize with invalid attribute' do
|
369
|
-
expect { instance = Freeclimb::CallStatusWebhook.new(
|
370
|
-
|
371
|
-
request_type: "TS",
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
call_id: "TS",
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
account_id: "TS",
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
from: "TS",
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
to: "TS",
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
conference_id: "TS",
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
queue_id: "TS",
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
invalid_attribute: true
|
421
|
-
)}.to raise_error(ArgumentError)
|
422
|
-
end
|
423
|
-
end
|
424
|
-
|
425
|
-
describe 'test method "valid"' do
|
426
|
-
it 'checks if properties are valid' do
|
427
|
-
instance = Freeclimb::CallStatusWebhook.new(
|
428
|
-
|
228
|
+
it "properly initializes with values" do
|
229
|
+
expect {
|
230
|
+
Freeclimb::CallStatusWebhook.new(
|
429
231
|
request_type: "TS",
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
232
|
+
|
434
233
|
call_id: "TS",
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
234
|
+
|
439
235
|
account_id: "TS",
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
236
|
+
|
444
237
|
from: "TS",
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
238
|
+
|
449
239
|
to: "TS",
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
240
|
+
|
454
241
|
call_status: Freeclimb::CallStatus::QUEUED,
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
242
|
+
|
459
243
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
244
|
+
|
464
245
|
direction: Freeclimb::CallDirection::INBOUND,
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
conference_id: "TS",
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
queue_id: "TS",
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
)
|
479
|
-
expect(instance.valid?).to eq(true)
|
480
|
-
end
|
481
246
|
|
247
|
+
conference_id: "TS",
|
482
248
|
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
)
|
487
|
-
expect(instance.valid?).to eq(false)
|
249
|
+
queue_id: "TS"
|
250
|
+
)
|
251
|
+
}.not_to raise_error
|
488
252
|
end
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
describe 'test method "eql?"' do
|
493
|
-
it 'checks if objects are equal' do
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
instance_1 = Freeclimb::CallStatusWebhook.new(
|
505
|
-
|
253
|
+
it "fails to initialize with input argument that is not a hash in Freeclimb::CallStatusWebhook" do
|
254
|
+
expect {
|
255
|
+
Freeclimb::CallStatusWebhook.new(
|
506
256
|
request_type: "TS",
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
257
|
+
|
511
258
|
call_id: "TS",
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
259
|
+
|
516
260
|
account_id: "TS",
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
261
|
+
|
521
262
|
from: "TS",
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
263
|
+
|
526
264
|
to: "TS",
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
265
|
+
|
533
266
|
call_status: Freeclimb::CallStatus::QUEUED,
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
267
|
+
|
538
268
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
269
|
+
|
543
270
|
direction: Freeclimb::CallDirection::INBOUND,
|
544
|
-
|
545
|
-
|
271
|
+
|
546
272
|
conference_id: "TS",
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
273
|
+
|
551
274
|
queue_id: "TS",
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
)
|
556
|
-
|
557
|
-
|
275
|
+
|
276
|
+
invalid_attribute: true
|
277
|
+
)
|
278
|
+
}.to raise_error(ArgumentError)
|
279
|
+
end
|
280
|
+
it "fails to initialize with invalid attribute" do
|
281
|
+
expect {
|
282
|
+
Freeclimb::CallStatusWebhook.new(
|
558
283
|
request_type: "TS",
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
284
|
+
|
563
285
|
call_id: "TS",
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
286
|
+
|
568
287
|
account_id: "TS",
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
288
|
+
|
573
289
|
from: "TS",
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
290
|
+
|
578
291
|
to: "TS",
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
292
|
+
|
585
293
|
call_status: Freeclimb::CallStatus::QUEUED,
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
294
|
+
|
590
295
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
296
|
+
|
595
297
|
direction: Freeclimb::CallDirection::INBOUND,
|
596
|
-
|
597
|
-
|
298
|
+
|
598
299
|
conference_id: "TS",
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
300
|
+
|
603
301
|
queue_id: "TS",
|
604
|
-
|
605
|
-
|
606
|
-
|
302
|
+
|
303
|
+
invalid_attribute: true
|
304
|
+
)
|
305
|
+
}.to raise_error(ArgumentError)
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
describe 'test method "valid"' do
|
310
|
+
it "checks if properties are valid" do
|
311
|
+
instance = Freeclimb::CallStatusWebhook.new(
|
312
|
+
request_type: "TS",
|
313
|
+
|
314
|
+
call_id: "TS",
|
315
|
+
|
316
|
+
account_id: "TS",
|
317
|
+
|
318
|
+
from: "TS",
|
319
|
+
|
320
|
+
to: "TS",
|
321
|
+
|
322
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
323
|
+
|
324
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
325
|
+
|
326
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
327
|
+
|
328
|
+
conference_id: "TS",
|
329
|
+
|
330
|
+
queue_id: "TS"
|
331
|
+
)
|
332
|
+
expect(instance.valid?).to eq(true)
|
333
|
+
end
|
334
|
+
|
335
|
+
skip "checks if properties are invalid" do
|
336
|
+
instance = Freeclimb::CallStatusWebhook.new
|
337
|
+
|
338
|
+
expect(instance.valid?).to eq(false)
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
describe 'test method "eql?"' do
|
343
|
+
it "checks if objects are equal" do
|
344
|
+
instance_1 = Freeclimb::CallStatusWebhook.new(
|
345
|
+
request_type: "TS",
|
346
|
+
|
347
|
+
call_id: "TS",
|
348
|
+
|
349
|
+
account_id: "TS",
|
350
|
+
|
351
|
+
from: "TS",
|
352
|
+
|
353
|
+
to: "TS",
|
354
|
+
|
355
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
356
|
+
|
357
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
358
|
+
|
359
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
360
|
+
|
361
|
+
conference_id: "TS",
|
362
|
+
|
363
|
+
queue_id: "TS"
|
364
|
+
)
|
365
|
+
instance_2 = Freeclimb::CallStatusWebhook.new(
|
366
|
+
request_type: "TS",
|
367
|
+
|
368
|
+
call_id: "TS",
|
369
|
+
|
370
|
+
account_id: "TS",
|
371
|
+
|
372
|
+
from: "TS",
|
373
|
+
|
374
|
+
to: "TS",
|
375
|
+
|
376
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
377
|
+
|
378
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
379
|
+
|
380
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
381
|
+
|
382
|
+
conference_id: "TS",
|
383
|
+
|
384
|
+
queue_id: "TS"
|
607
385
|
)
|
608
386
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
609
387
|
end
|
610
|
-
|
611
|
-
it
|
388
|
+
|
389
|
+
it "checks if objects are not equal" do
|
612
390
|
instance_1 = Freeclimb::CallStatusWebhook.new(
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
to: "TS",
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
652
|
-
|
653
|
-
|
654
|
-
conference_id: "TS",
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
queue_id: "TS",
|
660
|
-
|
661
|
-
|
662
|
-
|
391
|
+
request_type: "TS",
|
392
|
+
|
393
|
+
call_id: "TS",
|
394
|
+
|
395
|
+
account_id: "TS",
|
396
|
+
|
397
|
+
from: "TS",
|
398
|
+
|
399
|
+
to: "TS",
|
400
|
+
|
401
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
402
|
+
|
403
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
404
|
+
|
405
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
406
|
+
|
407
|
+
conference_id: "TS",
|
408
|
+
|
409
|
+
queue_id: "TS"
|
663
410
|
)
|
664
411
|
instance_2 = Freeclimb::CallStatusWebhook.new(
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
to: "ST",
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
call_status: nil,
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
call_ended_reason: nil,
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
direction: nil,
|
704
|
-
|
705
|
-
|
706
|
-
conference_id: "ST",
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
queue_id: "ST",
|
712
|
-
|
713
|
-
|
714
|
-
|
412
|
+
request_type: "ST",
|
413
|
+
|
414
|
+
call_id: "ST",
|
415
|
+
|
416
|
+
account_id: "ST",
|
417
|
+
|
418
|
+
from: "ST",
|
419
|
+
|
420
|
+
to: "ST",
|
421
|
+
|
422
|
+
call_status: nil,
|
423
|
+
|
424
|
+
call_ended_reason: nil,
|
425
|
+
|
426
|
+
direction: nil,
|
427
|
+
|
428
|
+
conference_id: "ST",
|
429
|
+
|
430
|
+
queue_id: "ST"
|
715
431
|
)
|
716
432
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
717
433
|
end
|
718
434
|
end
|
719
|
-
|
435
|
+
|
720
436
|
describe 'test method "hash"' do
|
721
|
-
it
|
437
|
+
it "calculates hash code" do
|
722
438
|
instance = Freeclimb::CallStatusWebhook.new(
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
to: "TS",
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
conference_id: "TS",
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
queue_id: "TS",
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
)
|
439
|
+
request_type: "TS",
|
440
|
+
|
441
|
+
call_id: "TS",
|
442
|
+
|
443
|
+
account_id: "TS",
|
444
|
+
|
445
|
+
from: "TS",
|
446
|
+
|
447
|
+
to: "TS",
|
448
|
+
|
449
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
450
|
+
|
451
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
452
|
+
|
453
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
454
|
+
|
455
|
+
conference_id: "TS",
|
456
|
+
|
457
|
+
queue_id: "TS"
|
458
|
+
)
|
774
459
|
expect(instance.hash).to be_a_kind_of(Integer)
|
775
460
|
end
|
776
461
|
end
|
777
462
|
|
778
463
|
describe 'test method "build_from_hash"' do
|
779
|
-
it
|
464
|
+
it "builds equivalent model from hash code" do
|
780
465
|
instance_1 = Freeclimb::CallStatusWebhook.new(
|
781
|
-
|
782
466
|
request_type: "TS",
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
467
|
+
|
787
468
|
call_id: "TS",
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
469
|
+
|
792
470
|
account_id: "TS",
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
471
|
+
|
797
472
|
from: "TS",
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
473
|
+
|
802
474
|
to: "TS",
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
475
|
+
|
807
476
|
call_status: Freeclimb::CallStatus::QUEUED,
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
477
|
+
|
812
478
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
479
|
+
|
817
480
|
direction: Freeclimb::CallDirection::INBOUND,
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
481
|
+
|
822
482
|
conference_id: "TS",
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
queue_id: "TS",
|
828
|
-
|
829
|
-
|
830
|
-
|
483
|
+
|
484
|
+
queue_id: "TS"
|
831
485
|
)
|
832
486
|
instance_2 = Freeclimb::CallStatusWebhook.new(
|
833
|
-
|
834
487
|
request_type: "TS",
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
488
|
+
|
839
489
|
call_id: "TS",
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
490
|
+
|
844
491
|
account_id: "TS",
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
492
|
+
|
849
493
|
from: "TS",
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
494
|
+
|
854
495
|
to: "TS",
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
496
|
+
|
859
497
|
call_status: Freeclimb::CallStatus::QUEUED,
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
498
|
+
|
864
499
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
500
|
+
|
869
501
|
direction: Freeclimb::CallDirection::INBOUND,
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
502
|
+
|
874
503
|
conference_id: "TS",
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
queue_id: "TS",
|
880
|
-
|
881
|
-
|
882
|
-
|
504
|
+
|
505
|
+
queue_id: "TS"
|
883
506
|
)
|
884
507
|
|
885
508
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -888,328 +511,149 @@ describe Freeclimb::CallStatusWebhook do
|
|
888
511
|
|
889
512
|
describe 'test method "_deserialize"' do
|
890
513
|
instance = Freeclimb::CallStatusWebhook.new(
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
to: "TS",
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
conference_id: "TS",
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
queue_id: "TS",
|
938
|
-
|
939
|
-
|
940
|
-
|
514
|
+
request_type: "TS",
|
515
|
+
|
516
|
+
call_id: "TS",
|
517
|
+
|
518
|
+
account_id: "TS",
|
519
|
+
|
520
|
+
from: "TS",
|
521
|
+
|
522
|
+
to: "TS",
|
523
|
+
|
524
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
525
|
+
|
526
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
527
|
+
|
528
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
529
|
+
|
530
|
+
conference_id: "TS",
|
531
|
+
|
532
|
+
queue_id: "TS"
|
941
533
|
)
|
942
|
-
it
|
534
|
+
it "deserializes the data of request_type" do
|
943
535
|
expect(instance._deserialize("String", instance.request_type)).to be_a_kind_of(String)
|
944
536
|
end
|
945
|
-
|
946
|
-
|
947
|
-
it 'deserializes the data of call_id' do
|
537
|
+
|
538
|
+
it "deserializes the data of call_id" do
|
948
539
|
expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String)
|
949
540
|
end
|
950
|
-
|
951
|
-
|
952
|
-
it 'deserializes the data of account_id' do
|
541
|
+
|
542
|
+
it "deserializes the data of account_id" do
|
953
543
|
expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
|
954
544
|
end
|
955
|
-
|
956
|
-
|
957
|
-
it 'deserializes the data of from' do
|
545
|
+
|
546
|
+
it "deserializes the data of from" do
|
958
547
|
expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String)
|
959
548
|
end
|
960
|
-
|
961
|
-
|
962
|
-
it 'deserializes the data of to' do
|
549
|
+
|
550
|
+
it "deserializes the data of to" do
|
963
551
|
expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String)
|
964
552
|
end
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
it 'deserializes the data of conference_id' do
|
553
|
+
|
554
|
+
it "deserializes the data of conference_id" do
|
974
555
|
expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String)
|
975
556
|
end
|
976
|
-
|
977
|
-
|
978
|
-
it 'deserializes the data of queue_id' do
|
557
|
+
|
558
|
+
it "deserializes the data of queue_id" do
|
979
559
|
expect(instance._deserialize("String", instance.queue_id)).to be_a_kind_of(String)
|
980
560
|
end
|
981
|
-
|
982
|
-
|
983
561
|
end
|
984
562
|
|
985
563
|
describe 'test method "to_s"' do
|
986
|
-
it
|
564
|
+
it "returns the string representation of the object" do
|
987
565
|
instance = Freeclimb::CallStatusWebhook.new(
|
988
|
-
|
989
566
|
request_type: "TS",
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
567
|
+
|
994
568
|
call_id: "TS",
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
569
|
+
|
999
570
|
account_id: "TS",
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
571
|
+
|
1004
572
|
from: "TS",
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
573
|
+
|
1009
574
|
to: "TS",
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
575
|
+
|
1014
576
|
call_status: Freeclimb::CallStatus::QUEUED,
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
577
|
+
|
1019
578
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
579
|
+
|
1024
580
|
direction: Freeclimb::CallDirection::INBOUND,
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
581
|
+
|
1029
582
|
conference_id: "TS",
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
queue_id: "TS",
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
583
|
+
|
584
|
+
queue_id: "TS"
|
1038
585
|
)
|
1039
586
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
1040
587
|
end
|
1041
588
|
end
|
1042
589
|
|
1043
590
|
describe 'test method "to_hash"' do
|
1044
|
-
it
|
591
|
+
it "returns the object in the form of hash" do
|
1045
592
|
instance = Freeclimb::CallStatusWebhook.new(
|
1046
|
-
|
1047
593
|
request_type: "TS",
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
594
|
+
|
1052
595
|
call_id: "TS",
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
596
|
+
|
1057
597
|
account_id: "TS",
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
598
|
+
|
1062
599
|
from: "TS",
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
600
|
+
|
1067
601
|
to: "TS",
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
602
|
+
|
1072
603
|
call_status: Freeclimb::CallStatus::QUEUED,
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
604
|
+
|
1077
605
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
606
|
+
|
1082
607
|
direction: Freeclimb::CallDirection::INBOUND,
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
608
|
+
|
1087
609
|
conference_id: "TS",
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
queue_id: "TS",
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
610
|
+
|
611
|
+
queue_id: "TS"
|
1096
612
|
)
|
1097
613
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
1098
614
|
end
|
1099
|
-
it
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
615
|
+
it "creates equal hash for two equal objects" do
|
1110
616
|
instance_1 = Freeclimb::CallStatusWebhook.new(
|
1111
|
-
|
1112
617
|
request_type: "TS",
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
618
|
+
|
1117
619
|
call_id: "TS",
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
620
|
+
|
1122
621
|
account_id: "TS",
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
622
|
+
|
1127
623
|
from: "TS",
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
624
|
+
|
1132
625
|
to: "TS",
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
626
|
+
|
1137
627
|
call_status: Freeclimb::CallStatus::QUEUED,
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
628
|
+
|
1142
629
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
630
|
+
|
1147
631
|
direction: Freeclimb::CallDirection::INBOUND,
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
632
|
+
|
1152
633
|
conference_id: "TS",
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
queue_id: "TS",
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
634
|
+
|
635
|
+
queue_id: "TS"
|
1161
636
|
)
|
1162
637
|
instance_2 = Freeclimb::CallStatusWebhook.new(
|
1163
|
-
|
1164
638
|
request_type: "TS",
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
639
|
+
|
1169
640
|
call_id: "TS",
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
641
|
+
|
1174
642
|
account_id: "TS",
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
643
|
+
|
1179
644
|
from: "TS",
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
645
|
+
|
1184
646
|
to: "TS",
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
647
|
+
|
1189
648
|
call_status: Freeclimb::CallStatus::QUEUED,
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
649
|
+
|
1194
650
|
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
651
|
+
|
1199
652
|
direction: Freeclimb::CallDirection::INBOUND,
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
653
|
+
|
1204
654
|
conference_id: "TS",
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
queue_id: "TS",
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
655
|
+
|
656
|
+
queue_id: "TS"
|
1213
657
|
)
|
1214
658
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
1215
659
|
end
|
@@ -1217,76 +661,55 @@ describe Freeclimb::CallStatusWebhook do
|
|
1217
661
|
|
1218
662
|
describe 'test method "_to_hash"' do
|
1219
663
|
instance = Freeclimb::CallStatusWebhook.new(
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
conference_id: "TS",
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
queue_id: "TS",
|
1258
|
-
|
1259
|
-
)
|
1260
|
-
it 'returns request_type in the form of hash' do
|
664
|
+
request_type: "TS",
|
665
|
+
|
666
|
+
call_id: "TS",
|
667
|
+
|
668
|
+
account_id: "TS",
|
669
|
+
|
670
|
+
from: "TS",
|
671
|
+
|
672
|
+
to: "TS",
|
673
|
+
|
674
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
675
|
+
|
676
|
+
call_ended_reason: Freeclimb::CallEndedReason::BUSY,
|
677
|
+
|
678
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
679
|
+
|
680
|
+
conference_id: "TS",
|
681
|
+
|
682
|
+
queue_id: "TS"
|
683
|
+
)
|
684
|
+
it "returns request_type in the form of hash" do
|
1261
685
|
expect(instance._to_hash(instance.request_type)).to eq(instance.request_type)
|
1262
686
|
end
|
1263
|
-
it
|
687
|
+
it "returns call_id in the form of hash" do
|
1264
688
|
expect(instance._to_hash(instance.call_id)).to eq(instance.call_id)
|
1265
689
|
end
|
1266
|
-
it
|
690
|
+
it "returns account_id in the form of hash" do
|
1267
691
|
expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
|
1268
692
|
end
|
1269
|
-
it
|
693
|
+
it "returns from in the form of hash" do
|
1270
694
|
expect(instance._to_hash(instance.from)).to eq(instance.from)
|
1271
695
|
end
|
1272
|
-
it
|
696
|
+
it "returns to in the form of hash" do
|
1273
697
|
expect(instance._to_hash(instance.to)).to eq(instance.to)
|
1274
698
|
end
|
1275
|
-
it
|
699
|
+
it "returns call_status in the form of hash" do
|
1276
700
|
expect(instance._to_hash(instance.call_status)).to eq(instance.call_status)
|
1277
701
|
end
|
1278
|
-
it
|
702
|
+
it "returns call_ended_reason in the form of hash" do
|
1279
703
|
expect(instance._to_hash(instance.call_ended_reason)).to eq(instance.call_ended_reason)
|
1280
704
|
end
|
1281
|
-
it
|
705
|
+
it "returns direction in the form of hash" do
|
1282
706
|
expect(instance._to_hash(instance.direction)).to eq(instance.direction)
|
1283
707
|
end
|
1284
|
-
it
|
708
|
+
it "returns conference_id in the form of hash" do
|
1285
709
|
expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id)
|
1286
710
|
end
|
1287
|
-
it
|
711
|
+
it "returns queue_id in the form of hash" do
|
1288
712
|
expect(instance._to_hash(instance.queue_id)).to eq(instance.queue_id)
|
1289
713
|
end
|
1290
714
|
end
|
1291
|
-
|
1292
715
|
end
|