freeclimb 5.0.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 +21 -1
- data/Gemfile +4 -4
- data/Gemfile.lock +34 -15
- data/README.md +5 -4
- data/Rakefile +1 -1
- data/docs/CreateConferenceRequest.md +1 -1
- data/docs/DefaultApi.md +1 -1
- data/docs/MessageResult.md +7 -1
- data/docs/TFNCampaign.md +34 -0
- 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 +28 -31
- 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 +30 -37
- 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 +150 -123
- 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 +30 -37
- 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 +30 -37
- data/lib/freeclimb/models/terminate_conference.rb +30 -37
- data/lib/freeclimb/models/tfn.rb +31 -35
- data/lib/freeclimb/models/tfn_campaign.rb +367 -0
- 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 +30 -37
- 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 -157
- data/openapi.json +96 -38
- data/package.json +1 -1
- data/spec/api/default_api_spec.rb +531 -793
- data/spec/api_client_spec.rb +100 -102
- data/spec/configuration_spec.rb +16 -18
- data/spec/models/account_request_spec.rb +106 -124
- data/spec/models/account_result_spec.rb +396 -453
- data/spec/models/account_status_spec.rb +28 -30
- data/spec/models/account_type_spec.rb +25 -27
- data/spec/models/add_to_conference_notification_webhook_spec.rb +465 -549
- data/spec/models/add_to_conference_spec.rb +355 -382
- data/spec/models/add_to_queue_notification_webhook_spec.rb +342 -402
- data/spec/models/answered_by_spec.rb +25 -27
- data/spec/models/application_list_spec.rb +290 -326
- data/spec/models/application_request_spec.rb +266 -289
- data/spec/models/application_result_spec.rb +445 -476
- data/spec/models/available_number_list_spec.rb +290 -326
- data/spec/models/available_number_spec.rb +279 -299
- data/spec/models/barge_in_reason_spec.rb +28 -30
- data/spec/models/buy_incoming_number_request_spec.rb +137 -156
- data/spec/models/call_control_webhook_spec.rb +204 -225
- data/spec/models/call_direction_spec.rb +28 -30
- data/spec/models/call_ended_reason_spec.rb +108 -110
- data/spec/models/call_list_spec.rb +290 -326
- data/spec/models/call_result_spec.rb +684 -772
- data/spec/models/call_status_spec.rb +48 -50
- data/spec/models/call_status_webhook_spec.rb +414 -492
- data/spec/models/capabilities_spec.rb +203 -223
- data/spec/models/completion_request_spec.rb +76 -92
- data/spec/models/completion_result_spec.rb +107 -143
- data/spec/models/completion_result_status_spec.rb +25 -27
- data/spec/models/conference_list_spec.rb +290 -326
- data/spec/models/conference_participant_list_spec.rb +290 -326
- data/spec/models/conference_participant_result_spec.rb +385 -414
- data/spec/models/conference_recording_status_webhook_spec.rb +465 -549
- data/spec/models/conference_result_spec.rb +492 -553
- data/spec/models/conference_status_spec.rb +32 -34
- data/spec/models/conference_status_webhook_spec.rb +465 -549
- data/spec/models/create_conference_request_spec.rb +205 -245
- data/spec/models/create_conference_spec.rb +237 -278
- data/spec/models/create_conference_webhook_spec.rb +465 -549
- data/spec/models/create_web_rtc_token_spec.rb +137 -159
- data/spec/models/dequeue_spec.rb +15 -17
- data/spec/models/dequeue_webhook_spec.rb +401 -465
- data/spec/models/enqueue_spec.rb +170 -190
- data/spec/models/filter_logs_request_spec.rb +74 -91
- data/spec/models/get_digits_reason_spec.rb +32 -34
- data/spec/models/get_digits_spec.rb +327 -361
- data/spec/models/get_digits_webhook_spec.rb +436 -517
- data/spec/models/get_speech_reason_spec.rb +40 -42
- data/spec/models/get_speech_spec.rb +400 -492
- data/spec/models/get_speech_webhook_spec.rb +608 -698
- data/spec/models/grammar_file_built_in_spec.rb +76 -78
- data/spec/models/grammar_type_spec.rb +25 -27
- data/spec/models/hangup_spec.rb +74 -91
- data/spec/models/if_machine_spec.rb +25 -27
- data/spec/models/inbound_call_webhook_spec.rb +372 -433
- data/spec/models/incoming_number_list_spec.rb +290 -326
- data/spec/models/incoming_number_request_spec.rb +137 -156
- data/spec/models/incoming_number_result_spec.rb +584 -613
- data/spec/models/language_spec.rb +121 -123
- data/spec/models/leave_conference_webhook_spec.rb +342 -402
- data/spec/models/log_level_spec.rb +28 -30
- data/spec/models/log_list_spec.rb +290 -326
- data/spec/models/log_result_spec.rb +275 -311
- data/spec/models/machine_detected_webhook_spec.rb +402 -482
- data/spec/models/machine_type_spec.rb +25 -27
- data/spec/models/make_call_request_spec.rb +354 -383
- data/spec/models/message_delivery_webhook_spec.rb +358 -384
- data/spec/models/message_direction_spec.rb +25 -27
- data/spec/models/message_request_spec.rb +325 -352
- data/spec/models/message_result_spec.rb +674 -598
- data/spec/models/message_status_spec.rb +61 -63
- data/spec/models/message_status_webhook_spec.rb +406 -451
- data/spec/models/messages_list_spec.rb +290 -326
- data/spec/models/mutable_resource_model_spec.rb +169 -191
- data/spec/models/out_dial_api_connect_webhook_spec.rb +372 -433
- data/spec/models/out_dial_connect_webhook_spec.rb +372 -433
- data/spec/models/out_dial_spec.rb +355 -401
- data/spec/models/out_dial_start_webhook_spec.rb +402 -464
- data/spec/models/pagination_model_spec.rb +260 -295
- data/spec/models/park_spec.rb +137 -156
- data/spec/models/pause_spec.rb +73 -92
- data/spec/models/percl_command_spec.rb +77 -94
- data/spec/models/percl_script_spec.rb +74 -91
- data/spec/models/play_beep_spec.rb +32 -34
- data/spec/models/play_early_media_spec.rb +74 -91
- data/spec/models/play_spec.rb +136 -157
- data/spec/models/queue_list_spec.rb +290 -326
- data/spec/models/queue_member_list_spec.rb +290 -326
- data/spec/models/queue_member_spec.rb +200 -225
- data/spec/models/queue_request_spec.rb +105 -125
- data/spec/models/queue_result_spec.rb +391 -419
- data/spec/models/queue_result_status_spec.rb +32 -34
- data/spec/models/queue_wait_webhook_spec.rb +430 -497
- data/spec/models/record_utterance_spec.rb +264 -291
- data/spec/models/record_utterance_term_reason_spec.rb +32 -34
- data/spec/models/record_webhook_spec.rb +605 -693
- data/spec/models/recording_list_spec.rb +290 -326
- data/spec/models/recording_result_spec.rb +324 -353
- data/spec/models/redirect_spec.rb +74 -91
- data/spec/models/redirect_webhook_spec.rb +372 -433
- data/spec/models/reject_spec.rb +74 -91
- data/spec/models/remove_from_conference_spec.rb +15 -17
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +405 -487
- data/spec/models/request_type_spec.rb +108 -110
- data/spec/models/say_spec.rb +169 -191
- data/spec/models/send_digits_spec.rb +136 -157
- data/spec/models/set_dtmf_pass_through_spec.rb +75 -91
- data/spec/models/set_listen_spec.rb +75 -91
- data/spec/models/set_talk_spec.rb +75 -91
- data/spec/models/sms_spec.rb +170 -190
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +32 -34
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +36 -38
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +32 -34
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +36 -38
- data/spec/models/sms_ten_dlc_brand_spec.rb +1083 -1201
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +125 -127
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +290 -326
- data/spec/models/sms_ten_dlc_campaign_spec.rb +1140 -1208
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +25 -27
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +290 -326
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +407 -425
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +965 -1015
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +25 -27
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +290 -326
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +36 -38
- data/spec/models/sms_toll_free_campaign_spec.rb +271 -314
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +290 -326
- data/spec/models/start_record_call_spec.rb +15 -17
- data/spec/models/terminate_conference_spec.rb +15 -17
- data/spec/models/tfn_campaign_spec.rb +561 -0
- data/spec/models/tfn_spec.rb +74 -91
- data/spec/models/transcribe_reason_spec.rb +36 -38
- data/spec/models/transcribe_term_reason_spec.rb +25 -27
- data/spec/models/transcribe_utterance_record_spec.rb +135 -158
- data/spec/models/transcribe_utterance_spec.rb +245 -265
- data/spec/models/transcribe_webhook_spec.rb +750 -874
- data/spec/models/unpark_spec.rb +15 -17
- data/spec/models/update_call_request_spec.rb +75 -109
- data/spec/models/update_call_request_status_spec.rb +25 -27
- data/spec/models/update_conference_participant_request_spec.rb +138 -156
- data/spec/models/update_conference_request_spec.rb +141 -195
- data/spec/models/update_conference_request_status_spec.rb +25 -27
- data/spec/models/webhook_spec.rb +69 -86
- 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 +9 -153
@@ -1,18 +1,17 @@
|
|
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
|
-
|
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"
|
14
|
+
include Freeclimb
|
16
15
|
|
17
16
|
# Unit tests for Freeclimb::GetSpeech
|
18
17
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -20,474 +19,411 @@ require 'date'
|
|
20
19
|
describe Freeclimb::GetSpeech do
|
21
20
|
let(:instance) { Freeclimb::GetSpeech.new }
|
22
21
|
|
23
|
-
describe
|
24
|
-
it
|
22
|
+
describe "test an instance of GetSpeech" do
|
23
|
+
it "should create an instance of GetSpeech" do
|
25
24
|
expect(instance).to be_instance_of(Freeclimb::GetSpeech)
|
26
25
|
end
|
27
26
|
end
|
28
|
-
|
27
|
+
|
29
28
|
describe 'test attribute "action_url"' do
|
30
|
-
it
|
29
|
+
it "should work" do
|
31
30
|
instance.action_url = "TEST_STRING"
|
32
|
-
expect(instance.action_url).to eq("TEST_STRING")
|
33
|
-
|
31
|
+
expect(instance.action_url).to eq("TEST_STRING")
|
34
32
|
end
|
35
33
|
end
|
36
34
|
|
37
|
-
|
38
35
|
describe 'test attribute "grammar_type"' do
|
39
|
-
it
|
36
|
+
it "assigns value URL" do
|
40
37
|
instance.grammar_type = Freeclimb::GrammarType::URL
|
41
|
-
expect(instance.grammar_type).to eq(Freeclimb::GrammarType::URL)
|
38
|
+
expect(instance.grammar_type).to eq(Freeclimb::GrammarType::URL)
|
42
39
|
end
|
43
|
-
it
|
40
|
+
it "assigns value BUILT_IN" do
|
44
41
|
instance.grammar_type = Freeclimb::GrammarType::BUILT_IN
|
45
|
-
expect(instance.grammar_type).to eq(Freeclimb::GrammarType::BUILT_IN)
|
42
|
+
expect(instance.grammar_type).to eq(Freeclimb::GrammarType::BUILT_IN)
|
46
43
|
end
|
47
44
|
end
|
48
45
|
describe 'test attribute "grammar_file"' do
|
49
|
-
it
|
46
|
+
it "should work" do
|
50
47
|
instance.grammar_file = "TEST_STRING"
|
51
|
-
expect(instance.grammar_file).to eq("TEST_STRING")
|
52
|
-
|
48
|
+
expect(instance.grammar_file).to eq("TEST_STRING")
|
53
49
|
end
|
54
50
|
end
|
55
51
|
|
56
52
|
describe 'test attribute "grammar_rule"' do
|
57
|
-
it
|
53
|
+
it "should work" do
|
58
54
|
instance.grammar_rule = "TEST_STRING"
|
59
|
-
expect(instance.grammar_rule).to eq("TEST_STRING")
|
60
|
-
|
55
|
+
expect(instance.grammar_rule).to eq("TEST_STRING")
|
61
56
|
end
|
62
57
|
end
|
63
58
|
|
64
59
|
describe 'test attribute "play_beep"' do
|
65
|
-
it
|
60
|
+
it "should work" do
|
66
61
|
instance.play_beep = false
|
67
|
-
expect(instance.play_beep).to eq(false)
|
68
|
-
|
62
|
+
expect(instance.play_beep).to eq(false)
|
69
63
|
end
|
70
64
|
end
|
71
65
|
|
72
66
|
describe 'test attribute "prompts"' do
|
73
|
-
it
|
74
|
-
|
67
|
+
it "should work" do
|
75
68
|
instance.prompts = ["ELEMENT_1", "ELEMENT_2"]
|
76
|
-
expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"])
|
69
|
+
expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"])
|
77
70
|
end
|
78
71
|
end
|
79
72
|
|
80
73
|
describe 'test attribute "no_input_timeout_ms"' do
|
81
|
-
it
|
82
|
-
|
83
|
-
|
74
|
+
it "should work" do
|
84
75
|
instance.no_input_timeout_ms = 1
|
85
76
|
expect(instance.no_input_timeout_ms).to eq(1)
|
86
|
-
|
87
77
|
end
|
88
78
|
end
|
89
79
|
|
90
80
|
describe 'test attribute "recognition_timeout_ms"' do
|
91
|
-
it
|
92
|
-
|
93
|
-
|
81
|
+
it "should work" do
|
94
82
|
instance.recognition_timeout_ms = 1
|
95
83
|
expect(instance.recognition_timeout_ms).to eq(1)
|
96
|
-
|
97
84
|
end
|
98
85
|
end
|
99
86
|
|
100
87
|
describe 'test attribute "confidence_threshold"' do
|
101
|
-
it
|
102
|
-
|
103
|
-
|
88
|
+
it "should work" do
|
104
89
|
instance.confidence_threshold = 1.0
|
105
90
|
expect(instance.confidence_threshold).to eq(1.0)
|
106
|
-
|
107
91
|
end
|
108
92
|
end
|
109
93
|
|
110
94
|
describe 'test attribute "sensitivity_level"' do
|
111
|
-
it
|
112
|
-
|
113
|
-
|
95
|
+
it "should work" do
|
114
96
|
instance.sensitivity_level = 1.0
|
115
97
|
expect(instance.sensitivity_level).to eq(1.0)
|
116
|
-
|
117
98
|
end
|
118
99
|
end
|
119
100
|
|
120
101
|
describe 'test attribute "speech_complete_timeout_ms"' do
|
121
|
-
it
|
122
|
-
|
123
|
-
|
102
|
+
it "should work" do
|
124
103
|
instance.speech_complete_timeout_ms = 1
|
125
104
|
expect(instance.speech_complete_timeout_ms).to eq(1)
|
126
|
-
|
127
105
|
end
|
128
106
|
end
|
129
107
|
|
130
108
|
describe 'test attribute "speech_incomplete_timeout_ms"' do
|
131
|
-
it
|
132
|
-
|
133
|
-
|
109
|
+
it "should work" do
|
134
110
|
instance.speech_incomplete_timeout_ms = 1
|
135
111
|
expect(instance.speech_incomplete_timeout_ms).to eq(1)
|
136
|
-
|
137
112
|
end
|
138
113
|
end
|
139
114
|
|
140
115
|
describe 'test attribute "privacy_mode"' do
|
141
|
-
it
|
116
|
+
it "should work" do
|
142
117
|
instance.privacy_mode = false
|
143
|
-
expect(instance.privacy_mode).to eq(false)
|
144
|
-
|
118
|
+
expect(instance.privacy_mode).to eq(false)
|
145
119
|
end
|
146
120
|
end
|
147
121
|
|
148
122
|
describe 'test method "initialize"' do
|
149
|
-
it
|
150
|
-
expect {
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
grammar_type: Freeclimb::GrammarType::URL,
|
155
|
-
|
156
|
-
grammar_file: "TS",
|
157
|
-
|
158
|
-
grammar_rule: "TS",
|
159
|
-
|
160
|
-
play_beep: true,
|
161
|
-
|
162
|
-
prompts: Array.new(),
|
163
|
-
|
164
|
-
no_input_timeout_ms: 1,
|
165
|
-
|
166
|
-
recognition_timeout_ms: 1,
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
speech_complete_timeout_ms: 1,
|
171
|
-
|
172
|
-
speech_incomplete_timeout_ms: 1,
|
173
|
-
|
174
|
-
privacy_mode: true,
|
175
|
-
|
176
|
-
)}.not_to raise_error()
|
177
|
-
end
|
178
|
-
it 'fails to initialize with input argument that is not a hash in Freeclimb::GetSpeech' do
|
179
|
-
expect { instance = Freeclimb::GetSpeech.new(
|
180
|
-
action_url: "TS",
|
181
|
-
|
182
|
-
|
183
|
-
grammar_type: Freeclimb::GrammarType::URL,
|
184
|
-
|
185
|
-
grammar_file: "TS",
|
186
|
-
|
187
|
-
grammar_rule: "TS",
|
188
|
-
|
189
|
-
play_beep: true,
|
190
|
-
|
191
|
-
prompts: Array.new(),
|
192
|
-
|
193
|
-
no_input_timeout_ms: 1,
|
194
|
-
|
195
|
-
recognition_timeout_ms: 1,
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
speech_complete_timeout_ms: 1,
|
200
|
-
|
201
|
-
speech_incomplete_timeout_ms: 1,
|
202
|
-
|
203
|
-
privacy_mode: true,
|
204
|
-
|
205
|
-
invalid_attribute: true
|
206
|
-
)}.to raise_error(ArgumentError)
|
207
|
-
end
|
208
|
-
it 'fails to initialize with invalid attribute' do
|
209
|
-
expect { instance = Freeclimb::GetSpeech.new(
|
210
|
-
action_url: "TS",
|
211
|
-
|
212
|
-
|
213
|
-
grammar_type: Freeclimb::GrammarType::URL,
|
214
|
-
|
215
|
-
grammar_file: "TS",
|
216
|
-
|
217
|
-
grammar_rule: "TS",
|
218
|
-
|
219
|
-
play_beep: true,
|
220
|
-
|
221
|
-
prompts: Array.new(),
|
222
|
-
|
223
|
-
no_input_timeout_ms: 1,
|
224
|
-
|
225
|
-
recognition_timeout_ms: 1,
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
speech_complete_timeout_ms: 1,
|
230
|
-
|
231
|
-
speech_incomplete_timeout_ms: 1,
|
232
|
-
|
233
|
-
privacy_mode: true,
|
234
|
-
|
235
|
-
invalid_attribute: true
|
236
|
-
)}.to raise_error(ArgumentError)
|
237
|
-
end
|
238
|
-
end
|
239
|
-
|
240
|
-
describe 'test method "valid"' do
|
241
|
-
it 'checks if properties are valid' do
|
242
|
-
instance = Freeclimb::GetSpeech.new(
|
123
|
+
it "properly initializes with values" do
|
124
|
+
expect {
|
125
|
+
Freeclimb::GetSpeech.new(
|
243
126
|
action_url: "TS",
|
244
|
-
|
245
|
-
|
127
|
+
|
246
128
|
grammar_type: Freeclimb::GrammarType::URL,
|
247
|
-
|
129
|
+
|
248
130
|
grammar_file: "TS",
|
249
|
-
|
131
|
+
|
250
132
|
grammar_rule: "TS",
|
251
|
-
|
133
|
+
|
252
134
|
play_beep: true,
|
253
|
-
|
254
|
-
prompts:
|
255
|
-
|
135
|
+
|
136
|
+
prompts: [],
|
137
|
+
|
256
138
|
no_input_timeout_ms: 1,
|
257
|
-
|
139
|
+
|
258
140
|
recognition_timeout_ms: 1,
|
259
|
-
|
260
|
-
confidence_threshold: 1,
|
261
|
-
|
262
|
-
sensitivity_level: 1,
|
263
|
-
|
141
|
+
|
264
142
|
speech_complete_timeout_ms: 1,
|
265
|
-
|
266
|
-
speech_incomplete_timeout_ms: 1,
|
267
|
-
|
268
|
-
privacy_mode: true,
|
269
|
-
|
270
|
-
)
|
271
|
-
expect(instance.valid?).to eq(true)
|
272
|
-
end
|
273
143
|
|
144
|
+
speech_incomplete_timeout_ms: 1,
|
274
145
|
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
)
|
279
|
-
expect(instance.valid?).to eq(false)
|
146
|
+
privacy_mode: true
|
147
|
+
)
|
148
|
+
}.not_to raise_error
|
280
149
|
end
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
describe 'test method "eql?"' do
|
285
|
-
it 'checks if objects are equal' do
|
286
|
-
obj = Object.new()
|
287
|
-
instance_1 = Freeclimb::GetSpeech.new(
|
150
|
+
it "fails to initialize with input argument that is not a hash in Freeclimb::GetSpeech" do
|
151
|
+
expect {
|
152
|
+
Freeclimb::GetSpeech.new(
|
288
153
|
action_url: "TS",
|
289
|
-
|
290
|
-
|
154
|
+
|
291
155
|
grammar_type: Freeclimb::GrammarType::URL,
|
292
|
-
|
156
|
+
|
293
157
|
grammar_file: "TS",
|
294
|
-
|
158
|
+
|
295
159
|
grammar_rule: "TS",
|
296
|
-
|
160
|
+
|
297
161
|
play_beep: true,
|
298
|
-
|
162
|
+
|
299
163
|
prompts: [],
|
300
|
-
|
164
|
+
|
301
165
|
no_input_timeout_ms: 1,
|
302
|
-
|
166
|
+
|
303
167
|
recognition_timeout_ms: 1,
|
304
|
-
|
305
|
-
|
306
|
-
|
168
|
+
|
307
169
|
speech_complete_timeout_ms: 1,
|
308
|
-
|
170
|
+
|
309
171
|
speech_incomplete_timeout_ms: 1,
|
310
|
-
|
172
|
+
|
311
173
|
privacy_mode: true,
|
312
|
-
|
313
|
-
|
314
|
-
|
174
|
+
|
175
|
+
invalid_attribute: true
|
176
|
+
)
|
177
|
+
}.to raise_error(ArgumentError)
|
178
|
+
end
|
179
|
+
it "fails to initialize with invalid attribute" do
|
180
|
+
expect {
|
181
|
+
Freeclimb::GetSpeech.new(
|
315
182
|
action_url: "TS",
|
316
|
-
|
317
|
-
|
183
|
+
|
318
184
|
grammar_type: Freeclimb::GrammarType::URL,
|
319
|
-
|
185
|
+
|
320
186
|
grammar_file: "TS",
|
321
|
-
|
187
|
+
|
322
188
|
grammar_rule: "TS",
|
323
|
-
|
189
|
+
|
324
190
|
play_beep: true,
|
325
|
-
|
191
|
+
|
326
192
|
prompts: [],
|
327
|
-
|
193
|
+
|
328
194
|
no_input_timeout_ms: 1,
|
329
|
-
|
195
|
+
|
330
196
|
recognition_timeout_ms: 1,
|
331
|
-
|
332
|
-
|
333
|
-
|
197
|
+
|
334
198
|
speech_complete_timeout_ms: 1,
|
335
|
-
|
199
|
+
|
336
200
|
speech_incomplete_timeout_ms: 1,
|
337
|
-
|
201
|
+
|
338
202
|
privacy_mode: true,
|
339
|
-
|
203
|
+
|
204
|
+
invalid_attribute: true
|
205
|
+
)
|
206
|
+
}.to raise_error(ArgumentError)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
describe 'test method "valid"' do
|
211
|
+
it "checks if properties are valid" do
|
212
|
+
instance = Freeclimb::GetSpeech.new(
|
213
|
+
action_url: "TS",
|
214
|
+
|
215
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
216
|
+
|
217
|
+
grammar_file: "TS",
|
218
|
+
|
219
|
+
grammar_rule: "TS",
|
220
|
+
|
221
|
+
play_beep: true,
|
222
|
+
|
223
|
+
prompts: [],
|
224
|
+
|
225
|
+
no_input_timeout_ms: 1,
|
226
|
+
|
227
|
+
recognition_timeout_ms: 1,
|
228
|
+
|
229
|
+
confidence_threshold: 1,
|
230
|
+
|
231
|
+
sensitivity_level: 1,
|
232
|
+
|
233
|
+
speech_complete_timeout_ms: 1,
|
234
|
+
|
235
|
+
speech_incomplete_timeout_ms: 1,
|
236
|
+
|
237
|
+
privacy_mode: true
|
238
|
+
)
|
239
|
+
expect(instance.valid?).to eq(true)
|
240
|
+
end
|
241
|
+
|
242
|
+
skip "checks if properties are invalid" do
|
243
|
+
instance = Freeclimb::GetSpeech.new
|
244
|
+
|
245
|
+
expect(instance.valid?).to eq(false)
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
describe 'test method "eql?"' do
|
250
|
+
it "checks if objects are equal" do
|
251
|
+
instance_1 = Freeclimb::GetSpeech.new(
|
252
|
+
action_url: "TS",
|
253
|
+
|
254
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
255
|
+
|
256
|
+
grammar_file: "TS",
|
257
|
+
|
258
|
+
grammar_rule: "TS",
|
259
|
+
|
260
|
+
play_beep: true,
|
261
|
+
|
262
|
+
prompts: [],
|
263
|
+
|
264
|
+
no_input_timeout_ms: 1,
|
265
|
+
|
266
|
+
recognition_timeout_ms: 1,
|
267
|
+
|
268
|
+
speech_complete_timeout_ms: 1,
|
269
|
+
|
270
|
+
speech_incomplete_timeout_ms: 1,
|
271
|
+
|
272
|
+
privacy_mode: true
|
273
|
+
)
|
274
|
+
instance_2 = Freeclimb::GetSpeech.new(
|
275
|
+
action_url: "TS",
|
276
|
+
|
277
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
278
|
+
|
279
|
+
grammar_file: "TS",
|
280
|
+
|
281
|
+
grammar_rule: "TS",
|
282
|
+
|
283
|
+
play_beep: true,
|
284
|
+
|
285
|
+
prompts: [],
|
286
|
+
|
287
|
+
no_input_timeout_ms: 1,
|
288
|
+
|
289
|
+
recognition_timeout_ms: 1,
|
290
|
+
|
291
|
+
speech_complete_timeout_ms: 1,
|
292
|
+
|
293
|
+
speech_incomplete_timeout_ms: 1,
|
294
|
+
|
295
|
+
privacy_mode: true
|
340
296
|
)
|
341
297
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
342
298
|
end
|
343
|
-
|
344
|
-
it
|
299
|
+
|
300
|
+
it "checks if objects are not equal" do
|
345
301
|
instance_1 = Freeclimb::GetSpeech.new(
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
speech_incomplete_timeout_ms: 2,
|
368
|
-
|
369
|
-
privacy_mode: true,
|
370
|
-
|
302
|
+
action_url: "TS",
|
303
|
+
|
304
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
305
|
+
|
306
|
+
grammar_file: "TS",
|
307
|
+
|
308
|
+
grammar_rule: "TS",
|
309
|
+
|
310
|
+
play_beep: true,
|
311
|
+
|
312
|
+
prompts: [],
|
313
|
+
|
314
|
+
no_input_timeout_ms: 2,
|
315
|
+
|
316
|
+
recognition_timeout_ms: 2,
|
317
|
+
|
318
|
+
speech_complete_timeout_ms: 2,
|
319
|
+
|
320
|
+
speech_incomplete_timeout_ms: 2,
|
321
|
+
|
322
|
+
privacy_mode: true
|
371
323
|
)
|
372
324
|
instance_2 = Freeclimb::GetSpeech.new(
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
speech_incomplete_timeout_ms: 1,
|
395
|
-
|
396
|
-
privacy_mode: false,
|
397
|
-
|
325
|
+
action_url: "ST",
|
326
|
+
|
327
|
+
grammar_type: nil,
|
328
|
+
|
329
|
+
grammar_file: "ST",
|
330
|
+
|
331
|
+
grammar_rule: "ST",
|
332
|
+
|
333
|
+
play_beep: false,
|
334
|
+
|
335
|
+
prompts: nil,
|
336
|
+
|
337
|
+
no_input_timeout_ms: 1,
|
338
|
+
|
339
|
+
recognition_timeout_ms: 1,
|
340
|
+
|
341
|
+
speech_complete_timeout_ms: 1,
|
342
|
+
|
343
|
+
speech_incomplete_timeout_ms: 1,
|
344
|
+
|
345
|
+
privacy_mode: false
|
398
346
|
)
|
399
347
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
400
348
|
end
|
401
349
|
end
|
402
|
-
|
350
|
+
|
403
351
|
describe 'test method "hash"' do
|
404
|
-
it
|
352
|
+
it "calculates hash code" do
|
405
353
|
instance = Freeclimb::GetSpeech.new(
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
privacy_mode: true,
|
430
|
-
|
431
|
-
)
|
354
|
+
action_url: "TS",
|
355
|
+
|
356
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
357
|
+
|
358
|
+
grammar_file: "TS",
|
359
|
+
|
360
|
+
grammar_rule: "TS",
|
361
|
+
|
362
|
+
play_beep: true,
|
363
|
+
|
364
|
+
prompts: [],
|
365
|
+
|
366
|
+
no_input_timeout_ms: 1,
|
367
|
+
|
368
|
+
recognition_timeout_ms: 1,
|
369
|
+
|
370
|
+
speech_complete_timeout_ms: 1,
|
371
|
+
|
372
|
+
speech_incomplete_timeout_ms: 1,
|
373
|
+
|
374
|
+
privacy_mode: true
|
375
|
+
)
|
432
376
|
expect(instance.hash).to be_a_kind_of(Integer)
|
433
377
|
end
|
434
378
|
end
|
435
379
|
|
436
380
|
describe 'test method "build_from_hash"' do
|
437
|
-
it
|
381
|
+
it "builds equivalent model from hash code" do
|
438
382
|
instance_1 = Freeclimb::GetSpeech.new(
|
439
383
|
action_url: "TS",
|
440
|
-
|
441
|
-
|
384
|
+
|
442
385
|
grammar_type: Freeclimb::GrammarType::URL,
|
443
|
-
|
386
|
+
|
444
387
|
grammar_file: "TS",
|
445
|
-
|
388
|
+
|
446
389
|
grammar_rule: "TS",
|
447
|
-
|
390
|
+
|
448
391
|
play_beep: true,
|
449
|
-
|
450
|
-
prompts:
|
451
|
-
|
392
|
+
|
393
|
+
prompts: [],
|
394
|
+
|
452
395
|
no_input_timeout_ms: 1,
|
453
|
-
|
396
|
+
|
454
397
|
recognition_timeout_ms: 1,
|
455
|
-
|
456
|
-
|
457
|
-
|
398
|
+
|
458
399
|
speech_complete_timeout_ms: 1,
|
459
|
-
|
400
|
+
|
460
401
|
speech_incomplete_timeout_ms: 1,
|
461
|
-
|
462
|
-
privacy_mode: true
|
463
|
-
|
402
|
+
|
403
|
+
privacy_mode: true
|
464
404
|
)
|
465
405
|
instance_2 = Freeclimb::GetSpeech.new(
|
466
406
|
action_url: "TS",
|
467
|
-
|
468
|
-
|
407
|
+
|
469
408
|
grammar_type: Freeclimb::GrammarType::URL,
|
470
|
-
|
409
|
+
|
471
410
|
grammar_file: "TS",
|
472
|
-
|
411
|
+
|
473
412
|
grammar_rule: "TS",
|
474
|
-
|
413
|
+
|
475
414
|
play_beep: true,
|
476
|
-
|
477
|
-
prompts:
|
478
|
-
|
415
|
+
|
416
|
+
prompts: [],
|
417
|
+
|
479
418
|
no_input_timeout_ms: 1,
|
480
|
-
|
419
|
+
|
481
420
|
recognition_timeout_ms: 1,
|
482
|
-
|
483
|
-
|
484
|
-
|
421
|
+
|
485
422
|
speech_complete_timeout_ms: 1,
|
486
|
-
|
423
|
+
|
487
424
|
speech_incomplete_timeout_ms: 1,
|
488
|
-
|
489
|
-
privacy_mode: true
|
490
|
-
|
425
|
+
|
426
|
+
privacy_mode: true
|
491
427
|
)
|
492
428
|
|
493
429
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -496,189 +432,178 @@ describe Freeclimb::GetSpeech do
|
|
496
432
|
|
497
433
|
describe 'test method "_deserialize"' do
|
498
434
|
instance = Freeclimb::GetSpeech.new(
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
speech_incomplete_timeout_ms: 1,
|
521
|
-
|
522
|
-
privacy_mode: true,
|
523
|
-
|
435
|
+
action_url: "TS",
|
436
|
+
|
437
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
438
|
+
|
439
|
+
grammar_file: "TS",
|
440
|
+
|
441
|
+
grammar_rule: "TS",
|
442
|
+
|
443
|
+
play_beep: true,
|
444
|
+
|
445
|
+
prompts: [],
|
446
|
+
|
447
|
+
no_input_timeout_ms: 1,
|
448
|
+
|
449
|
+
recognition_timeout_ms: 1,
|
450
|
+
|
451
|
+
speech_complete_timeout_ms: 1,
|
452
|
+
|
453
|
+
speech_incomplete_timeout_ms: 1,
|
454
|
+
|
455
|
+
privacy_mode: true
|
524
456
|
)
|
525
|
-
it
|
457
|
+
it "deserializes the data of action_url" do
|
526
458
|
expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
|
527
459
|
end
|
528
|
-
|
460
|
+
|
461
|
+
it "deserializes the data of grammar_file" do
|
529
462
|
expect(instance._deserialize("String", instance.grammar_file)).to be_a_kind_of(String)
|
530
463
|
end
|
531
|
-
|
464
|
+
|
465
|
+
it "deserializes the data of grammar_rule" do
|
532
466
|
expect(instance._deserialize("String", instance.grammar_rule)).to be_a_kind_of(String)
|
533
467
|
end
|
534
|
-
|
468
|
+
|
469
|
+
it "deserializes the data of play_beep" do
|
535
470
|
expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass)
|
536
471
|
end
|
537
|
-
it
|
472
|
+
it "deserializes the data of prompts" do
|
538
473
|
expect(instance._deserialize("Array<PerclCommand>", instance.prompts)).to be_a_kind_of(Array)
|
539
474
|
end
|
540
|
-
|
475
|
+
|
476
|
+
it "deserializes the data of no_input_timeout_ms" do
|
541
477
|
expect(instance._deserialize("Integer", instance.no_input_timeout_ms)).to be_a_kind_of(Integer)
|
542
478
|
end
|
543
|
-
|
479
|
+
|
480
|
+
it "deserializes the data of recognition_timeout_ms" do
|
544
481
|
expect(instance._deserialize("Integer", instance.recognition_timeout_ms)).to be_a_kind_of(Integer)
|
545
482
|
end
|
546
|
-
|
483
|
+
|
484
|
+
it "deserializes the data of confidence_threshold" do
|
547
485
|
expect(instance._deserialize("Float", instance.confidence_threshold)).to be_a_kind_of(Float)
|
548
486
|
end
|
549
|
-
|
487
|
+
|
488
|
+
it "deserializes the data of sensitivity_level" do
|
550
489
|
expect(instance._deserialize("Float", instance.sensitivity_level)).to be_a_kind_of(Float)
|
551
490
|
end
|
552
|
-
|
491
|
+
|
492
|
+
it "deserializes the data of speech_complete_timeout_ms" do
|
553
493
|
expect(instance._deserialize("Integer", instance.speech_complete_timeout_ms)).to be_a_kind_of(Integer)
|
554
494
|
end
|
555
|
-
|
495
|
+
|
496
|
+
it "deserializes the data of speech_incomplete_timeout_ms" do
|
556
497
|
expect(instance._deserialize("Integer", instance.speech_incomplete_timeout_ms)).to be_a_kind_of(Integer)
|
557
498
|
end
|
558
|
-
|
499
|
+
|
500
|
+
it "deserializes the data of privacy_mode" do
|
559
501
|
expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass)
|
560
502
|
end
|
561
503
|
end
|
562
504
|
|
563
505
|
describe 'test method "to_s"' do
|
564
|
-
it
|
506
|
+
it "returns the string representation of the object" do
|
565
507
|
instance = Freeclimb::GetSpeech.new(
|
566
508
|
action_url: "TS",
|
567
|
-
|
568
|
-
|
509
|
+
|
569
510
|
grammar_type: Freeclimb::GrammarType::URL,
|
570
|
-
|
511
|
+
|
571
512
|
grammar_file: "TS",
|
572
|
-
|
513
|
+
|
573
514
|
grammar_rule: "TS",
|
574
|
-
|
515
|
+
|
575
516
|
play_beep: true,
|
576
|
-
|
577
|
-
prompts:
|
578
|
-
|
517
|
+
|
518
|
+
prompts: [],
|
519
|
+
|
579
520
|
no_input_timeout_ms: 1,
|
580
|
-
|
521
|
+
|
581
522
|
recognition_timeout_ms: 1,
|
582
|
-
|
583
|
-
|
584
|
-
|
523
|
+
|
585
524
|
speech_complete_timeout_ms: 1,
|
586
|
-
|
525
|
+
|
587
526
|
speech_incomplete_timeout_ms: 1,
|
588
|
-
|
589
|
-
privacy_mode: true
|
590
|
-
|
527
|
+
|
528
|
+
privacy_mode: true
|
591
529
|
)
|
592
530
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
593
531
|
end
|
594
532
|
end
|
595
533
|
|
596
534
|
describe 'test method "to_hash"' do
|
597
|
-
it
|
535
|
+
it "returns the object in the form of hash" do
|
598
536
|
instance = Freeclimb::GetSpeech.new(
|
599
537
|
action_url: "TS",
|
600
|
-
|
601
|
-
|
538
|
+
|
602
539
|
grammar_type: Freeclimb::GrammarType::URL,
|
603
|
-
|
540
|
+
|
604
541
|
grammar_file: "TS",
|
605
|
-
|
542
|
+
|
606
543
|
grammar_rule: "TS",
|
607
|
-
|
544
|
+
|
608
545
|
play_beep: true,
|
609
|
-
|
610
|
-
prompts:
|
611
|
-
|
546
|
+
|
547
|
+
prompts: [],
|
548
|
+
|
612
549
|
no_input_timeout_ms: 1,
|
613
|
-
|
550
|
+
|
614
551
|
recognition_timeout_ms: 1,
|
615
|
-
|
616
|
-
|
617
|
-
|
552
|
+
|
618
553
|
speech_complete_timeout_ms: 1,
|
619
|
-
|
554
|
+
|
620
555
|
speech_incomplete_timeout_ms: 1,
|
621
|
-
|
622
|
-
privacy_mode: true
|
623
|
-
|
556
|
+
|
557
|
+
privacy_mode: true
|
624
558
|
)
|
625
559
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
626
560
|
end
|
627
|
-
it
|
628
|
-
obj = Object.new()
|
561
|
+
it "creates equal hash for two equal objects" do
|
629
562
|
instance_1 = Freeclimb::GetSpeech.new(
|
630
563
|
action_url: "TS",
|
631
|
-
|
632
|
-
|
564
|
+
|
633
565
|
grammar_type: Freeclimb::GrammarType::URL,
|
634
|
-
|
566
|
+
|
635
567
|
grammar_file: "TS",
|
636
|
-
|
568
|
+
|
637
569
|
grammar_rule: "TS",
|
638
|
-
|
570
|
+
|
639
571
|
play_beep: true,
|
640
|
-
|
641
|
-
prompts:
|
642
|
-
|
572
|
+
|
573
|
+
prompts: [],
|
574
|
+
|
643
575
|
no_input_timeout_ms: 1,
|
644
|
-
|
576
|
+
|
645
577
|
recognition_timeout_ms: 1,
|
646
|
-
|
647
|
-
|
648
|
-
|
578
|
+
|
649
579
|
speech_complete_timeout_ms: 1,
|
650
|
-
|
580
|
+
|
651
581
|
speech_incomplete_timeout_ms: 1,
|
652
|
-
|
653
|
-
privacy_mode: true
|
654
|
-
|
582
|
+
|
583
|
+
privacy_mode: true
|
655
584
|
)
|
656
585
|
instance_2 = Freeclimb::GetSpeech.new(
|
657
586
|
action_url: "TS",
|
658
|
-
|
659
|
-
|
587
|
+
|
660
588
|
grammar_type: Freeclimb::GrammarType::URL,
|
661
|
-
|
589
|
+
|
662
590
|
grammar_file: "TS",
|
663
|
-
|
591
|
+
|
664
592
|
grammar_rule: "TS",
|
665
|
-
|
593
|
+
|
666
594
|
play_beep: true,
|
667
|
-
|
668
|
-
prompts:
|
669
|
-
|
595
|
+
|
596
|
+
prompts: [],
|
597
|
+
|
670
598
|
no_input_timeout_ms: 1,
|
671
|
-
|
599
|
+
|
672
600
|
recognition_timeout_ms: 1,
|
673
|
-
|
674
|
-
|
675
|
-
|
601
|
+
|
676
602
|
speech_complete_timeout_ms: 1,
|
677
|
-
|
603
|
+
|
678
604
|
speech_incomplete_timeout_ms: 1,
|
679
|
-
|
680
|
-
privacy_mode: true
|
681
|
-
|
605
|
+
|
606
|
+
privacy_mode: true
|
682
607
|
)
|
683
608
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
684
609
|
end
|
@@ -686,83 +611,66 @@ describe Freeclimb::GetSpeech do
|
|
686
611
|
|
687
612
|
describe 'test method "_to_hash"' do
|
688
613
|
instance = Freeclimb::GetSpeech.new(
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
speech_complete_timeout_ms: 1,
|
719
|
-
|
720
|
-
|
721
|
-
speech_incomplete_timeout_ms: 1,
|
722
|
-
|
723
|
-
|
724
|
-
privacy_mode: true,
|
725
|
-
|
726
|
-
)
|
727
|
-
it 'returns action_url in the form of hash' do
|
614
|
+
action_url: "TS",
|
615
|
+
|
616
|
+
grammar_type: Freeclimb::GrammarType::URL,
|
617
|
+
|
618
|
+
grammar_file: "TS",
|
619
|
+
|
620
|
+
grammar_rule: "TS",
|
621
|
+
|
622
|
+
play_beep: true,
|
623
|
+
|
624
|
+
prompts: [],
|
625
|
+
|
626
|
+
no_input_timeout_ms: 1,
|
627
|
+
|
628
|
+
recognition_timeout_ms: 1,
|
629
|
+
|
630
|
+
speech_complete_timeout_ms: 1,
|
631
|
+
|
632
|
+
speech_incomplete_timeout_ms: 1,
|
633
|
+
|
634
|
+
privacy_mode: true
|
635
|
+
)
|
636
|
+
it "returns action_url in the form of hash" do
|
728
637
|
expect(instance._to_hash(instance.action_url)).to eq(instance.action_url)
|
729
638
|
end
|
730
|
-
it
|
639
|
+
it "returns grammar_type in the form of hash" do
|
731
640
|
expect(instance._to_hash(instance.grammar_type)).to eq(instance.grammar_type)
|
732
641
|
end
|
733
|
-
it
|
642
|
+
it "returns grammar_file in the form of hash" do
|
734
643
|
expect(instance._to_hash(instance.grammar_file)).to eq(instance.grammar_file)
|
735
644
|
end
|
736
|
-
it
|
645
|
+
it "returns grammar_rule in the form of hash" do
|
737
646
|
expect(instance._to_hash(instance.grammar_rule)).to eq(instance.grammar_rule)
|
738
647
|
end
|
739
|
-
it
|
648
|
+
it "returns play_beep in the form of hash" do
|
740
649
|
expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep)
|
741
650
|
end
|
742
|
-
it
|
651
|
+
it "returns prompts in the form of hash" do
|
743
652
|
expect(instance._to_hash(instance.prompts)).to eq(instance.prompts)
|
744
653
|
end
|
745
|
-
it
|
654
|
+
it "returns no_input_timeout_ms in the form of hash" do
|
746
655
|
expect(instance._to_hash(instance.no_input_timeout_ms)).to eq(instance.no_input_timeout_ms)
|
747
656
|
end
|
748
|
-
it
|
657
|
+
it "returns recognition_timeout_ms in the form of hash" do
|
749
658
|
expect(instance._to_hash(instance.recognition_timeout_ms)).to eq(instance.recognition_timeout_ms)
|
750
659
|
end
|
751
|
-
it
|
660
|
+
it "returns confidence_threshold in the form of hash" do
|
752
661
|
expect(instance._to_hash(instance.confidence_threshold)).to eq(instance.confidence_threshold)
|
753
662
|
end
|
754
|
-
it
|
663
|
+
it "returns sensitivity_level in the form of hash" do
|
755
664
|
expect(instance._to_hash(instance.sensitivity_level)).to eq(instance.sensitivity_level)
|
756
665
|
end
|
757
|
-
it
|
666
|
+
it "returns speech_complete_timeout_ms in the form of hash" do
|
758
667
|
expect(instance._to_hash(instance.speech_complete_timeout_ms)).to eq(instance.speech_complete_timeout_ms)
|
759
668
|
end
|
760
|
-
it
|
669
|
+
it "returns speech_incomplete_timeout_ms in the form of hash" do
|
761
670
|
expect(instance._to_hash(instance.speech_incomplete_timeout_ms)).to eq(instance.speech_incomplete_timeout_ms)
|
762
671
|
end
|
763
|
-
it
|
672
|
+
it "returns privacy_mode in the form of hash" do
|
764
673
|
expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode)
|
765
674
|
end
|
766
675
|
end
|
767
|
-
|
768
676
|
end
|