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::CallResult
|
18
17
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -20,1051 +19,990 @@ require 'date'
|
|
20
19
|
describe Freeclimb::CallResult do
|
21
20
|
let(:instance) { Freeclimb::CallResult.new }
|
22
21
|
|
23
|
-
describe
|
24
|
-
it
|
22
|
+
describe "test an instance of CallResult" do
|
23
|
+
it "should create an instance of CallResult" do
|
25
24
|
expect(instance).to be_instance_of(Freeclimb::CallResult)
|
26
25
|
end
|
27
26
|
end
|
28
|
-
|
27
|
+
|
29
28
|
describe 'test attribute "uri"' do
|
30
|
-
it
|
29
|
+
it "should work" do
|
31
30
|
instance.uri = "TEST_STRING"
|
32
|
-
expect(instance.uri).to eq("TEST_STRING")
|
33
|
-
|
31
|
+
expect(instance.uri).to eq("TEST_STRING")
|
34
32
|
end
|
35
33
|
end
|
36
34
|
|
37
35
|
describe 'test attribute "date_created"' do
|
38
|
-
it
|
36
|
+
it "should work" do
|
39
37
|
instance.date_created = "TEST_STRING"
|
40
|
-
expect(instance.date_created).to eq("TEST_STRING")
|
41
|
-
|
38
|
+
expect(instance.date_created).to eq("TEST_STRING")
|
42
39
|
end
|
43
40
|
end
|
44
41
|
|
45
42
|
describe 'test attribute "date_updated"' do
|
46
|
-
it
|
43
|
+
it "should work" do
|
47
44
|
instance.date_updated = "TEST_STRING"
|
48
|
-
expect(instance.date_updated).to eq("TEST_STRING")
|
49
|
-
|
45
|
+
expect(instance.date_updated).to eq("TEST_STRING")
|
50
46
|
end
|
51
47
|
end
|
52
48
|
|
53
49
|
describe 'test attribute "revision"' do
|
54
|
-
it
|
55
|
-
|
56
|
-
|
50
|
+
it "should work" do
|
57
51
|
instance.revision = 1
|
58
52
|
expect(instance.revision).to eq(1)
|
59
|
-
|
60
53
|
end
|
61
54
|
end
|
62
55
|
|
63
56
|
describe 'test attribute "call_id"' do
|
64
|
-
it
|
57
|
+
it "should work" do
|
65
58
|
instance.call_id = "TEST_STRING"
|
66
|
-
expect(instance.call_id).to eq("TEST_STRING")
|
67
|
-
|
59
|
+
expect(instance.call_id).to eq("TEST_STRING")
|
68
60
|
end
|
69
61
|
end
|
70
62
|
|
71
63
|
describe 'test attribute "parent_call_id"' do
|
72
|
-
it
|
64
|
+
it "should work" do
|
73
65
|
instance.parent_call_id = "TEST_STRING"
|
74
|
-
expect(instance.parent_call_id).to eq("TEST_STRING")
|
75
|
-
|
66
|
+
expect(instance.parent_call_id).to eq("TEST_STRING")
|
76
67
|
end
|
77
68
|
end
|
78
69
|
|
79
70
|
describe 'test attribute "account_id"' do
|
80
|
-
it
|
71
|
+
it "should work" do
|
81
72
|
instance.account_id = "TEST_STRING"
|
82
|
-
expect(instance.account_id).to eq("TEST_STRING")
|
83
|
-
|
73
|
+
expect(instance.account_id).to eq("TEST_STRING")
|
84
74
|
end
|
85
75
|
end
|
86
76
|
|
87
77
|
describe 'test attribute "from"' do
|
88
|
-
it
|
78
|
+
it "should work" do
|
89
79
|
instance.from = "TEST_STRING"
|
90
|
-
expect(instance.from).to eq("TEST_STRING")
|
91
|
-
|
80
|
+
expect(instance.from).to eq("TEST_STRING")
|
92
81
|
end
|
93
82
|
end
|
94
83
|
|
95
84
|
describe 'test attribute "to"' do
|
96
|
-
it
|
85
|
+
it "should work" do
|
97
86
|
instance.to = "TEST_STRING"
|
98
|
-
expect(instance.to).to eq("TEST_STRING")
|
99
|
-
|
87
|
+
expect(instance.to).to eq("TEST_STRING")
|
100
88
|
end
|
101
89
|
end
|
102
90
|
|
103
91
|
describe 'test attribute "phone_number_id"' do
|
104
|
-
it
|
92
|
+
it "should work" do
|
105
93
|
instance.phone_number_id = "TEST_STRING"
|
106
|
-
expect(instance.phone_number_id).to eq("TEST_STRING")
|
107
|
-
|
94
|
+
expect(instance.phone_number_id).to eq("TEST_STRING")
|
108
95
|
end
|
109
96
|
end
|
110
97
|
|
111
|
-
|
112
98
|
describe 'test attribute "call_status"' do
|
113
|
-
it
|
99
|
+
it "assigns value QUEUED" do
|
114
100
|
instance.call_status = Freeclimb::CallStatus::QUEUED
|
115
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED)
|
101
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::QUEUED)
|
116
102
|
end
|
117
|
-
it
|
103
|
+
it "assigns value RINGING" do
|
118
104
|
instance.call_status = Freeclimb::CallStatus::RINGING
|
119
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING)
|
105
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::RINGING)
|
120
106
|
end
|
121
|
-
it
|
107
|
+
it "assigns value IN_PROGRESS" do
|
122
108
|
instance.call_status = Freeclimb::CallStatus::IN_PROGRESS
|
123
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS)
|
109
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::IN_PROGRESS)
|
124
110
|
end
|
125
|
-
it
|
111
|
+
it "assigns value CANCELED" do
|
126
112
|
instance.call_status = Freeclimb::CallStatus::CANCELED
|
127
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED)
|
113
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::CANCELED)
|
128
114
|
end
|
129
|
-
it
|
115
|
+
it "assigns value COMPLETED" do
|
130
116
|
instance.call_status = Freeclimb::CallStatus::COMPLETED
|
131
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED)
|
117
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::COMPLETED)
|
132
118
|
end
|
133
|
-
it
|
119
|
+
it "assigns value FAILED" do
|
134
120
|
instance.call_status = Freeclimb::CallStatus::FAILED
|
135
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED)
|
121
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::FAILED)
|
136
122
|
end
|
137
|
-
it
|
123
|
+
it "assigns value BUSY" do
|
138
124
|
instance.call_status = Freeclimb::CallStatus::BUSY
|
139
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY)
|
125
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::BUSY)
|
140
126
|
end
|
141
|
-
it
|
127
|
+
it "assigns value NO_ANSWER" do
|
142
128
|
instance.call_status = Freeclimb::CallStatus::NO_ANSWER
|
143
|
-
expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER)
|
129
|
+
expect(instance.call_status).to eq(Freeclimb::CallStatus::NO_ANSWER)
|
144
130
|
end
|
145
131
|
end
|
146
132
|
describe 'test attribute "start_time"' do
|
147
|
-
it
|
133
|
+
it "should work" do
|
148
134
|
instance.start_time = "TEST_STRING"
|
149
|
-
expect(instance.start_time).to eq("TEST_STRING")
|
150
|
-
|
135
|
+
expect(instance.start_time).to eq("TEST_STRING")
|
151
136
|
end
|
152
137
|
end
|
153
138
|
|
154
139
|
describe 'test attribute "connect_time"' do
|
155
|
-
it
|
140
|
+
it "should work" do
|
156
141
|
instance.connect_time = "TEST_STRING"
|
157
|
-
expect(instance.connect_time).to eq("TEST_STRING")
|
158
|
-
|
142
|
+
expect(instance.connect_time).to eq("TEST_STRING")
|
159
143
|
end
|
160
144
|
end
|
161
145
|
|
162
146
|
describe 'test attribute "end_time"' do
|
163
|
-
it
|
147
|
+
it "should work" do
|
164
148
|
instance.end_time = "TEST_STRING"
|
165
|
-
expect(instance.end_time).to eq("TEST_STRING")
|
166
|
-
|
149
|
+
expect(instance.end_time).to eq("TEST_STRING")
|
167
150
|
end
|
168
151
|
end
|
169
152
|
|
170
153
|
describe 'test attribute "duration"' do
|
171
|
-
it
|
172
|
-
|
173
|
-
|
154
|
+
it "should work" do
|
174
155
|
instance.duration = 1
|
175
156
|
expect(instance.duration).to eq(1)
|
176
|
-
|
177
157
|
end
|
178
158
|
end
|
179
159
|
|
180
160
|
describe 'test attribute "connect_duration"' do
|
181
|
-
it
|
182
|
-
|
183
|
-
|
161
|
+
it "should work" do
|
184
162
|
instance.connect_duration = 1
|
185
163
|
expect(instance.connect_duration).to eq(1)
|
186
|
-
|
187
164
|
end
|
188
165
|
end
|
189
166
|
|
190
|
-
|
191
167
|
describe 'test attribute "direction"' do
|
192
|
-
it
|
168
|
+
it "assigns value INBOUND" do
|
193
169
|
instance.direction = Freeclimb::CallDirection::INBOUND
|
194
|
-
expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND)
|
170
|
+
expect(instance.direction).to eq(Freeclimb::CallDirection::INBOUND)
|
195
171
|
end
|
196
|
-
it
|
172
|
+
it "assigns value OUTBOUND_API" do
|
197
173
|
instance.direction = Freeclimb::CallDirection::OUTBOUND_API
|
198
|
-
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API)
|
174
|
+
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_API)
|
199
175
|
end
|
200
|
-
it
|
176
|
+
it "assigns value OUTBOUND_DIAL" do
|
201
177
|
instance.direction = Freeclimb::CallDirection::OUTBOUND_DIAL
|
202
|
-
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL)
|
178
|
+
expect(instance.direction).to eq(Freeclimb::CallDirection::OUTBOUND_DIAL)
|
203
179
|
end
|
204
180
|
end
|
205
181
|
|
206
182
|
describe 'test attribute "answered_by"' do
|
207
|
-
it
|
183
|
+
it "assigns value HUMAN" do
|
208
184
|
instance.answered_by = Freeclimb::AnsweredBy::HUMAN
|
209
|
-
expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::HUMAN)
|
185
|
+
expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::HUMAN)
|
210
186
|
end
|
211
|
-
it
|
187
|
+
it "assigns value MACHINE" do
|
212
188
|
instance.answered_by = Freeclimb::AnsweredBy::MACHINE
|
213
|
-
expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::MACHINE)
|
189
|
+
expect(instance.answered_by).to eq(Freeclimb::AnsweredBy::MACHINE)
|
214
190
|
end
|
215
191
|
end
|
216
192
|
describe 'test attribute "subresource_uris"' do
|
217
|
-
it
|
218
|
-
|
219
|
-
testObject = Object.new()
|
193
|
+
it "should work" do
|
194
|
+
testObject = Object.new
|
220
195
|
instance.subresource_uris = testObject
|
221
196
|
expect(instance.subresource_uris).to eq(testObject)
|
197
|
+
|
198
|
+
instance.subresource_uris = Object.new
|
199
|
+
expect(instance.subresource_uris).to be_instance_of(Object)
|
222
200
|
end
|
223
201
|
end
|
224
202
|
|
225
203
|
describe 'test attribute "application_id"' do
|
226
|
-
it
|
204
|
+
it "should work" do
|
227
205
|
instance.application_id = "TEST_STRING"
|
228
|
-
expect(instance.application_id).to eq("TEST_STRING")
|
229
|
-
|
206
|
+
expect(instance.application_id).to eq("TEST_STRING")
|
230
207
|
end
|
231
208
|
end
|
232
209
|
|
233
210
|
describe 'test method "initialize"' do
|
234
|
-
it
|
235
|
-
expect {
|
236
|
-
|
237
|
-
|
238
|
-
date_created: "TS",
|
239
|
-
|
240
|
-
date_updated: "TS",
|
241
|
-
|
242
|
-
revision: 1,
|
243
|
-
|
244
|
-
call_id: "TS",
|
245
|
-
|
246
|
-
parent_call_id: "TS",
|
247
|
-
|
248
|
-
account_id: "TS",
|
249
|
-
|
250
|
-
from: "TS",
|
251
|
-
|
252
|
-
to: "TS",
|
253
|
-
|
254
|
-
phone_number_id: "TS",
|
255
|
-
|
256
|
-
|
257
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
258
|
-
|
259
|
-
start_time: "TS",
|
260
|
-
|
261
|
-
connect_time: "TS",
|
262
|
-
|
263
|
-
end_time: "TS",
|
264
|
-
|
265
|
-
duration: 1,
|
266
|
-
|
267
|
-
connect_duration: 1,
|
268
|
-
|
269
|
-
|
270
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
271
|
-
|
272
|
-
|
273
|
-
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
274
|
-
|
275
|
-
subresource_uris: Object.new(),
|
276
|
-
|
277
|
-
application_id: "TS",
|
278
|
-
|
279
|
-
)}.not_to raise_error()
|
280
|
-
end
|
281
|
-
it 'fails to initialize with input argument that is not a hash in Freeclimb::CallResult' do
|
282
|
-
expect { instance = Freeclimb::CallResult.new(
|
283
|
-
uri: "TS",
|
284
|
-
|
285
|
-
date_created: "TS",
|
286
|
-
|
287
|
-
date_updated: "TS",
|
288
|
-
|
289
|
-
revision: 1,
|
290
|
-
|
291
|
-
call_id: "TS",
|
292
|
-
|
293
|
-
parent_call_id: "TS",
|
294
|
-
|
295
|
-
account_id: "TS",
|
296
|
-
|
297
|
-
from: "TS",
|
298
|
-
|
299
|
-
to: "TS",
|
300
|
-
|
301
|
-
phone_number_id: "TS",
|
302
|
-
|
303
|
-
|
304
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
305
|
-
|
306
|
-
start_time: "TS",
|
307
|
-
|
308
|
-
connect_time: "TS",
|
309
|
-
|
310
|
-
end_time: "TS",
|
311
|
-
|
312
|
-
duration: 1,
|
313
|
-
|
314
|
-
connect_duration: 1,
|
315
|
-
|
316
|
-
|
317
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
318
|
-
|
319
|
-
|
320
|
-
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
321
|
-
|
322
|
-
subresource_uris: Object.new(),
|
323
|
-
|
324
|
-
application_id: "TS",
|
325
|
-
|
326
|
-
invalid_attribute: true
|
327
|
-
)}.to raise_error(ArgumentError)
|
328
|
-
end
|
329
|
-
it 'fails to initialize with invalid attribute' do
|
330
|
-
expect { instance = Freeclimb::CallResult.new(
|
331
|
-
uri: "TS",
|
332
|
-
|
333
|
-
date_created: "TS",
|
334
|
-
|
335
|
-
date_updated: "TS",
|
336
|
-
|
337
|
-
revision: 1,
|
338
|
-
|
339
|
-
call_id: "TS",
|
340
|
-
|
341
|
-
parent_call_id: "TS",
|
342
|
-
|
343
|
-
account_id: "TS",
|
344
|
-
|
345
|
-
from: "TS",
|
346
|
-
|
347
|
-
to: "TS",
|
348
|
-
|
349
|
-
phone_number_id: "TS",
|
350
|
-
|
351
|
-
|
352
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
353
|
-
|
354
|
-
start_time: "TS",
|
355
|
-
|
356
|
-
connect_time: "TS",
|
357
|
-
|
358
|
-
end_time: "TS",
|
359
|
-
|
360
|
-
duration: 1,
|
361
|
-
|
362
|
-
connect_duration: 1,
|
363
|
-
|
364
|
-
|
365
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
366
|
-
|
367
|
-
|
368
|
-
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
369
|
-
|
370
|
-
subresource_uris: Object.new(),
|
371
|
-
|
372
|
-
application_id: "TS",
|
373
|
-
|
374
|
-
invalid_attribute: true
|
375
|
-
)}.to raise_error(ArgumentError)
|
376
|
-
end
|
377
|
-
end
|
378
|
-
|
379
|
-
describe 'test method "valid"' do
|
380
|
-
it 'checks if properties are valid' do
|
381
|
-
instance = Freeclimb::CallResult.new(
|
211
|
+
it "properly initializes with values" do
|
212
|
+
expect {
|
213
|
+
Freeclimb::CallResult.new(
|
382
214
|
uri: "TS",
|
383
|
-
|
215
|
+
|
384
216
|
date_created: "TS",
|
385
|
-
|
217
|
+
|
386
218
|
date_updated: "TS",
|
387
|
-
|
219
|
+
|
388
220
|
revision: 1,
|
389
|
-
|
221
|
+
|
390
222
|
call_id: "TS",
|
391
|
-
|
223
|
+
|
392
224
|
parent_call_id: "TS",
|
393
|
-
|
225
|
+
|
394
226
|
account_id: "TS",
|
395
|
-
|
227
|
+
|
396
228
|
from: "TS",
|
397
|
-
|
229
|
+
|
398
230
|
to: "TS",
|
399
|
-
|
231
|
+
|
400
232
|
phone_number_id: "TS",
|
401
|
-
|
402
|
-
|
233
|
+
|
403
234
|
call_status: Freeclimb::CallStatus::QUEUED,
|
404
|
-
|
235
|
+
|
405
236
|
start_time: "TS",
|
406
|
-
|
237
|
+
|
407
238
|
connect_time: "TS",
|
408
|
-
|
239
|
+
|
409
240
|
end_time: "TS",
|
410
|
-
|
241
|
+
|
411
242
|
duration: 1,
|
412
|
-
|
243
|
+
|
413
244
|
connect_duration: 1,
|
414
|
-
|
415
|
-
|
245
|
+
|
416
246
|
direction: Freeclimb::CallDirection::INBOUND,
|
417
|
-
|
418
|
-
|
247
|
+
|
419
248
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
420
|
-
|
421
|
-
subresource_uris: Object.new(),
|
422
|
-
|
423
|
-
application_id: "TS",
|
424
|
-
|
425
|
-
)
|
426
|
-
expect(instance.valid?).to eq(true)
|
427
|
-
end
|
428
249
|
|
250
|
+
subresource_uris: Object.new,
|
429
251
|
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
)
|
434
|
-
expect(instance.valid?).to eq(false)
|
252
|
+
application_id: "TS"
|
253
|
+
)
|
254
|
+
}.not_to raise_error
|
435
255
|
end
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
describe 'test method "eql?"' do
|
440
|
-
it 'checks if objects are equal' do
|
441
|
-
obj = Object.new()
|
442
|
-
instance_1 = Freeclimb::CallResult.new(
|
256
|
+
it "fails to initialize with input argument that is not a hash in Freeclimb::CallResult" do
|
257
|
+
expect {
|
258
|
+
Freeclimb::CallResult.new(
|
443
259
|
uri: "TS",
|
444
|
-
|
260
|
+
|
445
261
|
date_created: "TS",
|
446
|
-
|
262
|
+
|
447
263
|
date_updated: "TS",
|
448
|
-
|
264
|
+
|
449
265
|
revision: 1,
|
450
|
-
|
266
|
+
|
451
267
|
call_id: "TS",
|
452
|
-
|
268
|
+
|
453
269
|
parent_call_id: "TS",
|
454
|
-
|
270
|
+
|
455
271
|
account_id: "TS",
|
456
|
-
|
272
|
+
|
457
273
|
from: "TS",
|
458
|
-
|
274
|
+
|
459
275
|
to: "TS",
|
460
|
-
|
276
|
+
|
461
277
|
phone_number_id: "TS",
|
462
|
-
|
463
|
-
|
278
|
+
|
464
279
|
call_status: Freeclimb::CallStatus::QUEUED,
|
465
|
-
|
280
|
+
|
466
281
|
start_time: "TS",
|
467
|
-
|
282
|
+
|
468
283
|
connect_time: "TS",
|
469
|
-
|
284
|
+
|
470
285
|
end_time: "TS",
|
471
|
-
|
286
|
+
|
472
287
|
duration: 1,
|
473
|
-
|
288
|
+
|
474
289
|
connect_duration: 1,
|
475
|
-
|
476
|
-
|
290
|
+
|
477
291
|
direction: Freeclimb::CallDirection::INBOUND,
|
478
|
-
|
479
|
-
|
292
|
+
|
480
293
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
481
|
-
|
482
|
-
subresource_uris:
|
483
|
-
|
294
|
+
|
295
|
+
subresource_uris: Object.new,
|
296
|
+
|
484
297
|
application_id: "TS",
|
485
|
-
|
486
|
-
|
487
|
-
|
298
|
+
|
299
|
+
invalid_attribute: true
|
300
|
+
)
|
301
|
+
}.to raise_error(ArgumentError)
|
302
|
+
end
|
303
|
+
it "fails to initialize with invalid attribute" do
|
304
|
+
expect {
|
305
|
+
Freeclimb::CallResult.new(
|
488
306
|
uri: "TS",
|
489
|
-
|
307
|
+
|
490
308
|
date_created: "TS",
|
491
|
-
|
309
|
+
|
492
310
|
date_updated: "TS",
|
493
|
-
|
311
|
+
|
494
312
|
revision: 1,
|
495
|
-
|
313
|
+
|
496
314
|
call_id: "TS",
|
497
|
-
|
315
|
+
|
498
316
|
parent_call_id: "TS",
|
499
|
-
|
317
|
+
|
500
318
|
account_id: "TS",
|
501
|
-
|
319
|
+
|
502
320
|
from: "TS",
|
503
|
-
|
321
|
+
|
504
322
|
to: "TS",
|
505
|
-
|
323
|
+
|
506
324
|
phone_number_id: "TS",
|
507
|
-
|
508
|
-
|
325
|
+
|
509
326
|
call_status: Freeclimb::CallStatus::QUEUED,
|
510
|
-
|
327
|
+
|
511
328
|
start_time: "TS",
|
512
|
-
|
329
|
+
|
513
330
|
connect_time: "TS",
|
514
|
-
|
331
|
+
|
515
332
|
end_time: "TS",
|
516
|
-
|
333
|
+
|
517
334
|
duration: 1,
|
518
|
-
|
335
|
+
|
519
336
|
connect_duration: 1,
|
520
|
-
|
521
|
-
|
522
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
523
|
-
|
524
|
-
|
525
|
-
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
526
|
-
|
527
|
-
subresource_uris: obj,
|
528
|
-
|
529
|
-
application_id: "TS",
|
530
|
-
|
531
|
-
)
|
532
|
-
expect(instance_1.eql?(instance_2)).to eq(true)
|
533
|
-
end
|
534
|
-
|
535
|
-
it 'checks if objects are not equal' do
|
536
|
-
instance_1 = Freeclimb::CallResult.new(
|
537
|
-
uri: "TS",
|
538
|
-
|
539
|
-
date_created: "TS",
|
540
|
-
|
541
|
-
date_updated: "TS",
|
542
|
-
|
543
|
-
revision: 2,
|
544
|
-
|
545
|
-
call_id: "TS",
|
546
|
-
|
547
|
-
parent_call_id: "TS",
|
548
|
-
|
549
|
-
account_id: "TS",
|
550
|
-
|
551
|
-
from: "TS",
|
552
|
-
|
553
|
-
to: "TS",
|
554
|
-
|
555
|
-
phone_number_id: "TS",
|
556
|
-
|
557
|
-
|
558
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
559
|
-
|
560
|
-
start_time: "TS",
|
561
|
-
|
562
|
-
connect_time: "TS",
|
563
|
-
|
564
|
-
end_time: "TS",
|
565
|
-
|
566
|
-
duration: 2,
|
567
|
-
|
568
|
-
connect_duration: 2,
|
569
|
-
|
570
|
-
|
337
|
+
|
571
338
|
direction: Freeclimb::CallDirection::INBOUND,
|
572
|
-
|
573
|
-
|
339
|
+
|
574
340
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
575
|
-
|
576
|
-
subresource_uris: Object.new
|
577
|
-
|
341
|
+
|
342
|
+
subresource_uris: Object.new,
|
343
|
+
|
578
344
|
application_id: "TS",
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
date_created: "ST",
|
585
|
-
|
586
|
-
date_updated: "ST",
|
587
|
-
|
588
|
-
revision: 1,
|
589
|
-
|
590
|
-
call_id: "ST",
|
591
|
-
|
592
|
-
parent_call_id: "ST",
|
593
|
-
|
594
|
-
account_id: "ST",
|
595
|
-
|
596
|
-
from: "ST",
|
597
|
-
|
598
|
-
to: "ST",
|
599
|
-
|
600
|
-
phone_number_id: "ST",
|
601
|
-
|
602
|
-
|
603
|
-
call_status: nil,
|
604
|
-
|
605
|
-
start_time: "ST",
|
606
|
-
|
607
|
-
connect_time: "ST",
|
608
|
-
|
609
|
-
end_time: "ST",
|
610
|
-
|
611
|
-
duration: 1,
|
612
|
-
|
613
|
-
connect_duration: 1,
|
614
|
-
|
615
|
-
|
616
|
-
direction: nil,
|
617
|
-
|
618
|
-
|
619
|
-
answered_by: nil,
|
620
|
-
|
621
|
-
subresource_uris: nil,
|
622
|
-
|
623
|
-
application_id: "ST",
|
624
|
-
|
625
|
-
)
|
626
|
-
expect(instance_1.eql?(instance_2)).to eq(false)
|
627
|
-
end
|
628
|
-
end
|
629
|
-
|
630
|
-
describe 'test method "hash"' do
|
631
|
-
it 'calculates hash code' do
|
632
|
-
instance = Freeclimb::CallResult.new(
|
633
|
-
uri: "TS",
|
634
|
-
|
635
|
-
date_created: "TS",
|
636
|
-
|
637
|
-
date_updated: "TS",
|
638
|
-
|
639
|
-
revision: 1,
|
640
|
-
|
641
|
-
call_id: "TS",
|
642
|
-
|
643
|
-
parent_call_id: "TS",
|
644
|
-
|
645
|
-
account_id: "TS",
|
646
|
-
|
647
|
-
from: "TS",
|
648
|
-
|
649
|
-
to: "TS",
|
650
|
-
|
651
|
-
phone_number_id: "TS",
|
652
|
-
|
653
|
-
|
654
|
-
call_status: Freeclimb::CallStatus::QUEUED,
|
655
|
-
|
656
|
-
start_time: "TS",
|
657
|
-
|
658
|
-
connect_time: "TS",
|
659
|
-
|
660
|
-
end_time: "TS",
|
661
|
-
|
662
|
-
duration: 1,
|
663
|
-
|
664
|
-
connect_duration: 1,
|
665
|
-
|
666
|
-
|
667
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
668
|
-
|
669
|
-
|
670
|
-
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
671
|
-
|
672
|
-
subresource_uris: Object.new(),
|
673
|
-
|
674
|
-
application_id: "TS",
|
675
|
-
|
676
|
-
)
|
677
|
-
expect(instance.hash).to be_a_kind_of(Integer)
|
345
|
+
|
346
|
+
invalid_attribute: true
|
347
|
+
)
|
348
|
+
}.to raise_error(ArgumentError)
|
678
349
|
end
|
679
350
|
end
|
680
351
|
|
681
|
-
describe 'test method "
|
682
|
-
it
|
683
|
-
|
352
|
+
describe 'test method "valid"' do
|
353
|
+
it "checks if properties are valid" do
|
354
|
+
instance = Freeclimb::CallResult.new(
|
684
355
|
uri: "TS",
|
685
|
-
|
356
|
+
|
686
357
|
date_created: "TS",
|
687
|
-
|
358
|
+
|
688
359
|
date_updated: "TS",
|
689
|
-
|
360
|
+
|
690
361
|
revision: 1,
|
691
|
-
|
362
|
+
|
692
363
|
call_id: "TS",
|
693
|
-
|
364
|
+
|
694
365
|
parent_call_id: "TS",
|
695
|
-
|
366
|
+
|
696
367
|
account_id: "TS",
|
697
|
-
|
368
|
+
|
698
369
|
from: "TS",
|
699
|
-
|
370
|
+
|
700
371
|
to: "TS",
|
701
|
-
|
372
|
+
|
702
373
|
phone_number_id: "TS",
|
703
|
-
|
704
|
-
|
374
|
+
|
705
375
|
call_status: Freeclimb::CallStatus::QUEUED,
|
706
|
-
|
376
|
+
|
707
377
|
start_time: "TS",
|
708
|
-
|
378
|
+
|
709
379
|
connect_time: "TS",
|
710
|
-
|
380
|
+
|
711
381
|
end_time: "TS",
|
712
|
-
|
382
|
+
|
713
383
|
duration: 1,
|
714
|
-
|
384
|
+
|
715
385
|
connect_duration: 1,
|
716
|
-
|
717
|
-
|
386
|
+
|
718
387
|
direction: Freeclimb::CallDirection::INBOUND,
|
719
|
-
|
720
|
-
|
388
|
+
|
721
389
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
722
|
-
|
723
|
-
subresource_uris: Object.new
|
724
|
-
|
725
|
-
application_id: "TS"
|
726
|
-
|
390
|
+
|
391
|
+
subresource_uris: Object.new,
|
392
|
+
|
393
|
+
application_id: "TS"
|
727
394
|
)
|
728
|
-
|
395
|
+
expect(instance.valid?).to eq(true)
|
396
|
+
end
|
397
|
+
|
398
|
+
skip "checks if properties are invalid" do
|
399
|
+
instance = Freeclimb::CallResult.new
|
400
|
+
|
401
|
+
expect(instance.valid?).to eq(false)
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
405
|
+
describe 'test method "eql?"' do
|
406
|
+
it "checks if objects are equal" do
|
407
|
+
obj_Object = Object.new
|
408
|
+
|
409
|
+
instance_1 = Freeclimb::CallResult.new(
|
729
410
|
uri: "TS",
|
730
|
-
|
411
|
+
|
731
412
|
date_created: "TS",
|
732
|
-
|
413
|
+
|
733
414
|
date_updated: "TS",
|
734
|
-
|
415
|
+
|
735
416
|
revision: 1,
|
736
|
-
|
417
|
+
|
737
418
|
call_id: "TS",
|
738
|
-
|
419
|
+
|
739
420
|
parent_call_id: "TS",
|
740
|
-
|
421
|
+
|
741
422
|
account_id: "TS",
|
742
|
-
|
423
|
+
|
743
424
|
from: "TS",
|
744
|
-
|
425
|
+
|
745
426
|
to: "TS",
|
746
|
-
|
427
|
+
|
747
428
|
phone_number_id: "TS",
|
748
|
-
|
749
|
-
|
429
|
+
|
750
430
|
call_status: Freeclimb::CallStatus::QUEUED,
|
751
|
-
|
431
|
+
|
752
432
|
start_time: "TS",
|
753
|
-
|
433
|
+
|
754
434
|
connect_time: "TS",
|
755
|
-
|
435
|
+
|
756
436
|
end_time: "TS",
|
757
|
-
|
437
|
+
|
758
438
|
duration: 1,
|
759
|
-
|
439
|
+
|
760
440
|
connect_duration: 1,
|
761
|
-
|
762
|
-
|
441
|
+
|
763
442
|
direction: Freeclimb::CallDirection::INBOUND,
|
764
|
-
|
765
|
-
|
443
|
+
|
766
444
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
767
|
-
|
768
|
-
subresource_uris: Object.new(),
|
769
|
-
|
770
|
-
application_id: "TS",
|
771
|
-
|
772
|
-
)
|
773
445
|
|
774
|
-
|
775
|
-
end
|
776
|
-
end
|
446
|
+
subresource_uris: obj_Object,
|
777
447
|
|
778
|
-
|
779
|
-
|
448
|
+
application_id: "TS"
|
449
|
+
)
|
450
|
+
instance_2 = Freeclimb::CallResult.new(
|
780
451
|
uri: "TS",
|
781
|
-
|
452
|
+
|
782
453
|
date_created: "TS",
|
783
|
-
|
454
|
+
|
784
455
|
date_updated: "TS",
|
785
|
-
|
456
|
+
|
786
457
|
revision: 1,
|
787
|
-
|
458
|
+
|
788
459
|
call_id: "TS",
|
789
|
-
|
460
|
+
|
790
461
|
parent_call_id: "TS",
|
791
|
-
|
462
|
+
|
792
463
|
account_id: "TS",
|
793
|
-
|
464
|
+
|
794
465
|
from: "TS",
|
795
|
-
|
466
|
+
|
796
467
|
to: "TS",
|
797
|
-
|
468
|
+
|
798
469
|
phone_number_id: "TS",
|
799
|
-
|
800
|
-
|
470
|
+
|
471
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
472
|
+
|
473
|
+
start_time: "TS",
|
474
|
+
|
475
|
+
connect_time: "TS",
|
476
|
+
|
477
|
+
end_time: "TS",
|
478
|
+
|
479
|
+
duration: 1,
|
480
|
+
|
481
|
+
connect_duration: 1,
|
482
|
+
|
483
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
484
|
+
|
485
|
+
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
486
|
+
|
487
|
+
subresource_uris: obj_Object,
|
488
|
+
|
489
|
+
application_id: "TS"
|
490
|
+
)
|
491
|
+
expect(instance_1.eql?(instance_2)).to eq(true)
|
492
|
+
end
|
493
|
+
|
494
|
+
it "checks if objects are not equal" do
|
495
|
+
instance_1 = Freeclimb::CallResult.new(
|
496
|
+
uri: "TS",
|
497
|
+
|
498
|
+
date_created: "TS",
|
499
|
+
|
500
|
+
date_updated: "TS",
|
501
|
+
|
502
|
+
revision: 2,
|
503
|
+
|
504
|
+
call_id: "TS",
|
505
|
+
|
506
|
+
parent_call_id: "TS",
|
507
|
+
|
508
|
+
account_id: "TS",
|
509
|
+
|
510
|
+
from: "TS",
|
511
|
+
|
512
|
+
to: "TS",
|
513
|
+
|
514
|
+
phone_number_id: "TS",
|
515
|
+
|
516
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
517
|
+
|
518
|
+
start_time: "TS",
|
519
|
+
|
520
|
+
connect_time: "TS",
|
521
|
+
|
522
|
+
end_time: "TS",
|
523
|
+
|
524
|
+
duration: 2,
|
525
|
+
|
526
|
+
connect_duration: 2,
|
527
|
+
|
528
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
529
|
+
|
530
|
+
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
531
|
+
|
532
|
+
subresource_uris: Object.new,
|
533
|
+
|
534
|
+
subresource_uris: Object.new,
|
535
|
+
|
536
|
+
application_id: "TS"
|
537
|
+
)
|
538
|
+
instance_2 = Freeclimb::CallResult.new(
|
539
|
+
uri: "ST",
|
540
|
+
|
541
|
+
date_created: "ST",
|
542
|
+
|
543
|
+
date_updated: "ST",
|
544
|
+
|
545
|
+
revision: 1,
|
546
|
+
|
547
|
+
call_id: "ST",
|
548
|
+
|
549
|
+
parent_call_id: "ST",
|
550
|
+
|
551
|
+
account_id: "ST",
|
552
|
+
|
553
|
+
from: "ST",
|
554
|
+
|
555
|
+
to: "ST",
|
556
|
+
|
557
|
+
phone_number_id: "ST",
|
558
|
+
|
559
|
+
call_status: nil,
|
560
|
+
|
561
|
+
start_time: "ST",
|
562
|
+
|
563
|
+
connect_time: "ST",
|
564
|
+
|
565
|
+
end_time: "ST",
|
566
|
+
|
567
|
+
duration: 1,
|
568
|
+
|
569
|
+
connect_duration: 1,
|
570
|
+
|
571
|
+
direction: nil,
|
572
|
+
|
573
|
+
answered_by: nil,
|
574
|
+
|
575
|
+
subresource_uris: Object.new,
|
576
|
+
|
577
|
+
application_id: "ST"
|
578
|
+
)
|
579
|
+
expect(instance_1.eql?(instance_2)).to eq(false)
|
580
|
+
end
|
581
|
+
end
|
582
|
+
|
583
|
+
describe 'test method "hash"' do
|
584
|
+
it "calculates hash code" do
|
585
|
+
instance = Freeclimb::CallResult.new(
|
586
|
+
uri: "TS",
|
587
|
+
|
588
|
+
date_created: "TS",
|
589
|
+
|
590
|
+
date_updated: "TS",
|
591
|
+
|
592
|
+
revision: 1,
|
593
|
+
|
594
|
+
call_id: "TS",
|
595
|
+
|
596
|
+
parent_call_id: "TS",
|
597
|
+
|
598
|
+
account_id: "TS",
|
599
|
+
|
600
|
+
from: "TS",
|
601
|
+
|
602
|
+
to: "TS",
|
603
|
+
|
604
|
+
phone_number_id: "TS",
|
605
|
+
|
801
606
|
call_status: Freeclimb::CallStatus::QUEUED,
|
802
|
-
|
607
|
+
|
803
608
|
start_time: "TS",
|
804
|
-
|
609
|
+
|
805
610
|
connect_time: "TS",
|
806
|
-
|
611
|
+
|
807
612
|
end_time: "TS",
|
808
|
-
|
613
|
+
|
809
614
|
duration: 1,
|
810
|
-
|
615
|
+
|
811
616
|
connect_duration: 1,
|
812
|
-
|
813
|
-
|
617
|
+
|
618
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
619
|
+
|
620
|
+
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
621
|
+
|
622
|
+
subresource_uris: Object.new,
|
623
|
+
|
624
|
+
application_id: "TS"
|
625
|
+
)
|
626
|
+
expect(instance.hash).to be_a_kind_of(Integer)
|
627
|
+
end
|
628
|
+
end
|
629
|
+
|
630
|
+
describe 'test method "build_from_hash"' do
|
631
|
+
it "builds equivalent model from hash code" do
|
632
|
+
instance_1 = Freeclimb::CallResult.new(
|
633
|
+
uri: "TS",
|
634
|
+
|
635
|
+
date_created: "TS",
|
636
|
+
|
637
|
+
date_updated: "TS",
|
638
|
+
|
639
|
+
revision: 1,
|
640
|
+
|
641
|
+
call_id: "TS",
|
642
|
+
|
643
|
+
parent_call_id: "TS",
|
644
|
+
|
645
|
+
account_id: "TS",
|
646
|
+
|
647
|
+
from: "TS",
|
648
|
+
|
649
|
+
to: "TS",
|
650
|
+
|
651
|
+
phone_number_id: "TS",
|
652
|
+
|
653
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
654
|
+
|
655
|
+
start_time: "TS",
|
656
|
+
|
657
|
+
connect_time: "TS",
|
658
|
+
|
659
|
+
end_time: "TS",
|
660
|
+
|
661
|
+
duration: 1,
|
662
|
+
|
663
|
+
connect_duration: 1,
|
664
|
+
|
665
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
666
|
+
|
667
|
+
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
668
|
+
|
669
|
+
subresource_uris: Object.new,
|
670
|
+
|
671
|
+
application_id: "TS"
|
672
|
+
)
|
673
|
+
instance_2 = Freeclimb::CallResult.new(
|
674
|
+
uri: "TS",
|
675
|
+
|
676
|
+
date_created: "TS",
|
677
|
+
|
678
|
+
date_updated: "TS",
|
679
|
+
|
680
|
+
revision: 1,
|
681
|
+
|
682
|
+
call_id: "TS",
|
683
|
+
|
684
|
+
parent_call_id: "TS",
|
685
|
+
|
686
|
+
account_id: "TS",
|
687
|
+
|
688
|
+
from: "TS",
|
689
|
+
|
690
|
+
to: "TS",
|
691
|
+
|
692
|
+
phone_number_id: "TS",
|
693
|
+
|
694
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
695
|
+
|
696
|
+
start_time: "TS",
|
697
|
+
|
698
|
+
connect_time: "TS",
|
699
|
+
|
700
|
+
end_time: "TS",
|
701
|
+
|
702
|
+
duration: 1,
|
703
|
+
|
704
|
+
connect_duration: 1,
|
705
|
+
|
814
706
|
direction: Freeclimb::CallDirection::INBOUND,
|
815
|
-
|
816
|
-
|
707
|
+
|
817
708
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
818
|
-
|
819
|
-
subresource_uris: Object.new
|
820
|
-
|
821
|
-
application_id: "TS"
|
822
|
-
|
709
|
+
|
710
|
+
subresource_uris: Object.new,
|
711
|
+
|
712
|
+
application_id: "TS"
|
713
|
+
)
|
714
|
+
|
715
|
+
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
describe 'test method "_deserialize"' do
|
720
|
+
instance = Freeclimb::CallResult.new(
|
721
|
+
uri: "TS",
|
722
|
+
|
723
|
+
date_created: "TS",
|
724
|
+
|
725
|
+
date_updated: "TS",
|
726
|
+
|
727
|
+
revision: 1,
|
728
|
+
|
729
|
+
call_id: "TS",
|
730
|
+
|
731
|
+
parent_call_id: "TS",
|
732
|
+
|
733
|
+
account_id: "TS",
|
734
|
+
|
735
|
+
from: "TS",
|
736
|
+
|
737
|
+
to: "TS",
|
738
|
+
|
739
|
+
phone_number_id: "TS",
|
740
|
+
|
741
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
742
|
+
|
743
|
+
start_time: "TS",
|
744
|
+
|
745
|
+
connect_time: "TS",
|
746
|
+
|
747
|
+
end_time: "TS",
|
748
|
+
|
749
|
+
duration: 1,
|
750
|
+
|
751
|
+
connect_duration: 1,
|
752
|
+
|
753
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
754
|
+
|
755
|
+
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
756
|
+
|
757
|
+
subresource_uris: Object.new,
|
758
|
+
|
759
|
+
application_id: "TS"
|
823
760
|
)
|
824
|
-
it
|
761
|
+
it "deserializes the data of uri" do
|
825
762
|
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
826
763
|
end
|
827
|
-
|
764
|
+
|
765
|
+
it "deserializes the data of date_created" do
|
828
766
|
expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
|
829
767
|
end
|
830
|
-
|
768
|
+
|
769
|
+
it "deserializes the data of date_updated" do
|
831
770
|
expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
|
832
771
|
end
|
833
|
-
|
772
|
+
|
773
|
+
it "deserializes the data of revision" do
|
834
774
|
expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
|
835
775
|
end
|
836
|
-
|
776
|
+
|
777
|
+
it "deserializes the data of call_id" do
|
837
778
|
expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String)
|
838
779
|
end
|
839
|
-
|
780
|
+
|
781
|
+
it "deserializes the data of parent_call_id" do
|
840
782
|
expect(instance._deserialize("String", instance.parent_call_id)).to be_a_kind_of(String)
|
841
783
|
end
|
842
|
-
|
784
|
+
|
785
|
+
it "deserializes the data of account_id" do
|
843
786
|
expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
|
844
787
|
end
|
845
|
-
|
788
|
+
|
789
|
+
it "deserializes the data of from" do
|
846
790
|
expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String)
|
847
791
|
end
|
848
|
-
|
792
|
+
|
793
|
+
it "deserializes the data of to" do
|
849
794
|
expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String)
|
850
795
|
end
|
851
|
-
|
796
|
+
|
797
|
+
it "deserializes the data of phone_number_id" do
|
852
798
|
expect(instance._deserialize("String", instance.phone_number_id)).to be_a_kind_of(String)
|
853
799
|
end
|
854
|
-
|
800
|
+
|
801
|
+
it "deserializes the data of start_time" do
|
855
802
|
expect(instance._deserialize("String", instance.start_time)).to be_a_kind_of(String)
|
856
803
|
end
|
857
|
-
|
804
|
+
|
805
|
+
it "deserializes the data of connect_time" do
|
858
806
|
expect(instance._deserialize("String", instance.connect_time)).to be_a_kind_of(String)
|
859
807
|
end
|
860
|
-
|
808
|
+
|
809
|
+
it "deserializes the data of end_time" do
|
861
810
|
expect(instance._deserialize("String", instance.end_time)).to be_a_kind_of(String)
|
862
811
|
end
|
863
|
-
|
812
|
+
|
813
|
+
it "deserializes the data of duration" do
|
864
814
|
expect(instance._deserialize("Integer", instance.duration)).to be_a_kind_of(Integer)
|
865
815
|
end
|
866
|
-
|
816
|
+
|
817
|
+
it "deserializes the data of connect_duration" do
|
867
818
|
expect(instance._deserialize("Integer", instance.connect_duration)).to be_a_kind_of(Integer)
|
868
819
|
end
|
869
|
-
|
820
|
+
|
821
|
+
it "deserializes the data of subresource_uris" do
|
870
822
|
expect(instance._deserialize("Object", instance.subresource_uris)).to be_a_kind_of(Object)
|
871
823
|
end
|
872
|
-
|
824
|
+
|
825
|
+
it "deserializes the data of application_id" do
|
873
826
|
expect(instance._deserialize("String", instance.application_id)).to be_a_kind_of(String)
|
874
827
|
end
|
875
828
|
end
|
876
829
|
|
877
830
|
describe 'test method "to_s"' do
|
878
|
-
it
|
831
|
+
it "returns the string representation of the object" do
|
879
832
|
instance = Freeclimb::CallResult.new(
|
880
833
|
uri: "TS",
|
881
|
-
|
834
|
+
|
882
835
|
date_created: "TS",
|
883
|
-
|
836
|
+
|
884
837
|
date_updated: "TS",
|
885
|
-
|
838
|
+
|
886
839
|
revision: 1,
|
887
|
-
|
840
|
+
|
888
841
|
call_id: "TS",
|
889
|
-
|
842
|
+
|
890
843
|
parent_call_id: "TS",
|
891
|
-
|
844
|
+
|
892
845
|
account_id: "TS",
|
893
|
-
|
846
|
+
|
894
847
|
from: "TS",
|
895
|
-
|
848
|
+
|
896
849
|
to: "TS",
|
897
|
-
|
850
|
+
|
898
851
|
phone_number_id: "TS",
|
899
|
-
|
900
|
-
|
852
|
+
|
901
853
|
call_status: Freeclimb::CallStatus::QUEUED,
|
902
|
-
|
854
|
+
|
903
855
|
start_time: "TS",
|
904
|
-
|
856
|
+
|
905
857
|
connect_time: "TS",
|
906
|
-
|
858
|
+
|
907
859
|
end_time: "TS",
|
908
|
-
|
860
|
+
|
909
861
|
duration: 1,
|
910
|
-
|
862
|
+
|
911
863
|
connect_duration: 1,
|
912
|
-
|
913
|
-
|
864
|
+
|
914
865
|
direction: Freeclimb::CallDirection::INBOUND,
|
915
|
-
|
916
|
-
|
866
|
+
|
917
867
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
918
|
-
|
919
|
-
subresource_uris: Object.new
|
920
|
-
|
921
|
-
application_id: "TS"
|
922
|
-
|
868
|
+
|
869
|
+
subresource_uris: Object.new,
|
870
|
+
|
871
|
+
application_id: "TS"
|
923
872
|
)
|
924
873
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
925
874
|
end
|
926
875
|
end
|
927
876
|
|
928
877
|
describe 'test method "to_hash"' do
|
929
|
-
it
|
878
|
+
it "returns the object in the form of hash" do
|
930
879
|
instance = Freeclimb::CallResult.new(
|
931
880
|
uri: "TS",
|
932
|
-
|
881
|
+
|
933
882
|
date_created: "TS",
|
934
|
-
|
883
|
+
|
935
884
|
date_updated: "TS",
|
936
|
-
|
885
|
+
|
937
886
|
revision: 1,
|
938
|
-
|
887
|
+
|
939
888
|
call_id: "TS",
|
940
|
-
|
889
|
+
|
941
890
|
parent_call_id: "TS",
|
942
|
-
|
891
|
+
|
943
892
|
account_id: "TS",
|
944
|
-
|
893
|
+
|
945
894
|
from: "TS",
|
946
|
-
|
895
|
+
|
947
896
|
to: "TS",
|
948
|
-
|
897
|
+
|
949
898
|
phone_number_id: "TS",
|
950
|
-
|
951
|
-
|
899
|
+
|
952
900
|
call_status: Freeclimb::CallStatus::QUEUED,
|
953
|
-
|
901
|
+
|
954
902
|
start_time: "TS",
|
955
|
-
|
903
|
+
|
956
904
|
connect_time: "TS",
|
957
|
-
|
905
|
+
|
958
906
|
end_time: "TS",
|
959
|
-
|
907
|
+
|
960
908
|
duration: 1,
|
961
|
-
|
909
|
+
|
962
910
|
connect_duration: 1,
|
963
|
-
|
964
|
-
|
911
|
+
|
965
912
|
direction: Freeclimb::CallDirection::INBOUND,
|
966
|
-
|
967
|
-
|
913
|
+
|
968
914
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
969
|
-
|
970
|
-
subresource_uris: Object.new
|
971
|
-
|
972
|
-
application_id: "TS"
|
973
|
-
|
915
|
+
|
916
|
+
subresource_uris: Object.new,
|
917
|
+
|
918
|
+
application_id: "TS"
|
974
919
|
)
|
975
920
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
976
921
|
end
|
977
|
-
it
|
978
|
-
obj = Object.new
|
922
|
+
it "creates equal hash for two equal objects" do
|
923
|
+
obj = Object.new
|
924
|
+
|
979
925
|
instance_1 = Freeclimb::CallResult.new(
|
980
926
|
uri: "TS",
|
981
|
-
|
927
|
+
|
982
928
|
date_created: "TS",
|
983
|
-
|
929
|
+
|
984
930
|
date_updated: "TS",
|
985
|
-
|
931
|
+
|
986
932
|
revision: 1,
|
987
|
-
|
933
|
+
|
988
934
|
call_id: "TS",
|
989
|
-
|
935
|
+
|
990
936
|
parent_call_id: "TS",
|
991
|
-
|
937
|
+
|
992
938
|
account_id: "TS",
|
993
|
-
|
939
|
+
|
994
940
|
from: "TS",
|
995
|
-
|
941
|
+
|
996
942
|
to: "TS",
|
997
|
-
|
943
|
+
|
998
944
|
phone_number_id: "TS",
|
999
|
-
|
1000
|
-
|
945
|
+
|
1001
946
|
call_status: Freeclimb::CallStatus::QUEUED,
|
1002
|
-
|
947
|
+
|
1003
948
|
start_time: "TS",
|
1004
|
-
|
949
|
+
|
1005
950
|
connect_time: "TS",
|
1006
|
-
|
951
|
+
|
1007
952
|
end_time: "TS",
|
1008
|
-
|
953
|
+
|
1009
954
|
duration: 1,
|
1010
|
-
|
955
|
+
|
1011
956
|
connect_duration: 1,
|
1012
|
-
|
1013
|
-
|
957
|
+
|
1014
958
|
direction: Freeclimb::CallDirection::INBOUND,
|
1015
|
-
|
1016
|
-
|
959
|
+
|
1017
960
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
1018
|
-
|
961
|
+
|
1019
962
|
subresource_uris: obj,
|
1020
|
-
|
1021
|
-
application_id: "TS"
|
1022
|
-
|
963
|
+
|
964
|
+
application_id: "TS"
|
1023
965
|
)
|
1024
966
|
instance_2 = Freeclimb::CallResult.new(
|
1025
967
|
uri: "TS",
|
1026
|
-
|
968
|
+
|
1027
969
|
date_created: "TS",
|
1028
|
-
|
970
|
+
|
1029
971
|
date_updated: "TS",
|
1030
|
-
|
972
|
+
|
1031
973
|
revision: 1,
|
1032
|
-
|
974
|
+
|
1033
975
|
call_id: "TS",
|
1034
|
-
|
976
|
+
|
1035
977
|
parent_call_id: "TS",
|
1036
|
-
|
978
|
+
|
1037
979
|
account_id: "TS",
|
1038
|
-
|
980
|
+
|
1039
981
|
from: "TS",
|
1040
|
-
|
982
|
+
|
1041
983
|
to: "TS",
|
1042
|
-
|
984
|
+
|
1043
985
|
phone_number_id: "TS",
|
1044
|
-
|
1045
|
-
|
986
|
+
|
1046
987
|
call_status: Freeclimb::CallStatus::QUEUED,
|
1047
|
-
|
988
|
+
|
1048
989
|
start_time: "TS",
|
1049
|
-
|
990
|
+
|
1050
991
|
connect_time: "TS",
|
1051
|
-
|
992
|
+
|
1052
993
|
end_time: "TS",
|
1053
|
-
|
994
|
+
|
1054
995
|
duration: 1,
|
1055
|
-
|
996
|
+
|
1056
997
|
connect_duration: 1,
|
1057
|
-
|
1058
|
-
|
998
|
+
|
1059
999
|
direction: Freeclimb::CallDirection::INBOUND,
|
1060
|
-
|
1061
|
-
|
1000
|
+
|
1062
1001
|
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
1063
|
-
|
1002
|
+
|
1064
1003
|
subresource_uris: obj,
|
1065
|
-
|
1066
|
-
application_id: "TS"
|
1067
|
-
|
1004
|
+
|
1005
|
+
application_id: "TS"
|
1068
1006
|
)
|
1069
1007
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
1070
1008
|
end
|
@@ -1072,129 +1010,103 @@ describe Freeclimb::CallResult do
|
|
1072
1010
|
|
1073
1011
|
describe 'test method "_to_hash"' do
|
1074
1012
|
instance = Freeclimb::CallResult.new(
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
end_time: "TS",
|
1116
|
-
|
1117
|
-
|
1118
|
-
duration: 1,
|
1119
|
-
|
1120
|
-
|
1121
|
-
connect_duration: 1,
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
direction: Freeclimb::CallDirection::INBOUND,
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
1130
|
-
|
1131
|
-
|
1132
|
-
subresource_uris: Object.new(),
|
1133
|
-
|
1134
|
-
|
1135
|
-
application_id: "TS",
|
1136
|
-
|
1137
|
-
)
|
1138
|
-
it 'returns uri in the form of hash' do
|
1013
|
+
uri: "TS",
|
1014
|
+
|
1015
|
+
date_created: "TS",
|
1016
|
+
|
1017
|
+
date_updated: "TS",
|
1018
|
+
|
1019
|
+
revision: 1,
|
1020
|
+
|
1021
|
+
call_id: "TS",
|
1022
|
+
|
1023
|
+
parent_call_id: "TS",
|
1024
|
+
|
1025
|
+
account_id: "TS",
|
1026
|
+
|
1027
|
+
from: "TS",
|
1028
|
+
|
1029
|
+
to: "TS",
|
1030
|
+
|
1031
|
+
phone_number_id: "TS",
|
1032
|
+
|
1033
|
+
call_status: Freeclimb::CallStatus::QUEUED,
|
1034
|
+
|
1035
|
+
start_time: "TS",
|
1036
|
+
|
1037
|
+
connect_time: "TS",
|
1038
|
+
|
1039
|
+
end_time: "TS",
|
1040
|
+
|
1041
|
+
duration: 1,
|
1042
|
+
|
1043
|
+
connect_duration: 1,
|
1044
|
+
|
1045
|
+
direction: Freeclimb::CallDirection::INBOUND,
|
1046
|
+
|
1047
|
+
answered_by: Freeclimb::AnsweredBy::HUMAN,
|
1048
|
+
|
1049
|
+
application_id: "TS"
|
1050
|
+
)
|
1051
|
+
it "returns uri in the form of hash" do
|
1139
1052
|
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
1140
1053
|
end
|
1141
|
-
it
|
1054
|
+
it "returns date_created in the form of hash" do
|
1142
1055
|
expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
|
1143
1056
|
end
|
1144
|
-
it
|
1057
|
+
it "returns date_updated in the form of hash" do
|
1145
1058
|
expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
|
1146
1059
|
end
|
1147
|
-
it
|
1060
|
+
it "returns revision in the form of hash" do
|
1148
1061
|
expect(instance._to_hash(instance.revision)).to eq(instance.revision)
|
1149
1062
|
end
|
1150
|
-
it
|
1063
|
+
it "returns call_id in the form of hash" do
|
1151
1064
|
expect(instance._to_hash(instance.call_id)).to eq(instance.call_id)
|
1152
1065
|
end
|
1153
|
-
it
|
1066
|
+
it "returns parent_call_id in the form of hash" do
|
1154
1067
|
expect(instance._to_hash(instance.parent_call_id)).to eq(instance.parent_call_id)
|
1155
1068
|
end
|
1156
|
-
it
|
1069
|
+
it "returns account_id in the form of hash" do
|
1157
1070
|
expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
|
1158
1071
|
end
|
1159
|
-
it
|
1072
|
+
it "returns from in the form of hash" do
|
1160
1073
|
expect(instance._to_hash(instance.from)).to eq(instance.from)
|
1161
1074
|
end
|
1162
|
-
it
|
1075
|
+
it "returns to in the form of hash" do
|
1163
1076
|
expect(instance._to_hash(instance.to)).to eq(instance.to)
|
1164
1077
|
end
|
1165
|
-
it
|
1078
|
+
it "returns phone_number_id in the form of hash" do
|
1166
1079
|
expect(instance._to_hash(instance.phone_number_id)).to eq(instance.phone_number_id)
|
1167
1080
|
end
|
1168
|
-
it
|
1081
|
+
it "returns call_status in the form of hash" do
|
1169
1082
|
expect(instance._to_hash(instance.call_status)).to eq(instance.call_status)
|
1170
1083
|
end
|
1171
|
-
it
|
1084
|
+
it "returns start_time in the form of hash" do
|
1172
1085
|
expect(instance._to_hash(instance.start_time)).to eq(instance.start_time)
|
1173
1086
|
end
|
1174
|
-
it
|
1087
|
+
it "returns connect_time in the form of hash" do
|
1175
1088
|
expect(instance._to_hash(instance.connect_time)).to eq(instance.connect_time)
|
1176
1089
|
end
|
1177
|
-
it
|
1090
|
+
it "returns end_time in the form of hash" do
|
1178
1091
|
expect(instance._to_hash(instance.end_time)).to eq(instance.end_time)
|
1179
1092
|
end
|
1180
|
-
it
|
1093
|
+
it "returns duration in the form of hash" do
|
1181
1094
|
expect(instance._to_hash(instance.duration)).to eq(instance.duration)
|
1182
1095
|
end
|
1183
|
-
it
|
1096
|
+
it "returns connect_duration in the form of hash" do
|
1184
1097
|
expect(instance._to_hash(instance.connect_duration)).to eq(instance.connect_duration)
|
1185
1098
|
end
|
1186
|
-
it
|
1099
|
+
it "returns direction in the form of hash" do
|
1187
1100
|
expect(instance._to_hash(instance.direction)).to eq(instance.direction)
|
1188
1101
|
end
|
1189
|
-
it
|
1102
|
+
it "returns answered_by in the form of hash" do
|
1190
1103
|
expect(instance._to_hash(instance.answered_by)).to eq(instance.answered_by)
|
1191
1104
|
end
|
1192
|
-
it
|
1105
|
+
it "returns subresource_uris in the form of hash" do
|
1193
1106
|
expect(instance._to_hash(instance.subresource_uris)).to eq(instance.subresource_uris)
|
1194
1107
|
end
|
1195
|
-
it
|
1108
|
+
it "returns application_id in the form of hash" do
|
1196
1109
|
expect(instance._to_hash(instance.application_id)).to eq(instance.application_id)
|
1197
1110
|
end
|
1198
1111
|
end
|
1199
|
-
|
1200
1112
|
end
|