freeclimb 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +4 -5
- data/Gemfile.lock +18 -5
- data/README.md +4 -4
- data/Rakefile +1 -1
- data/docs/CreateConferenceRequest.md +1 -1
- data/docs/DefaultApi.md +1 -1
- data/freeclimb.gemspec +21 -26
- data/lib/freeclimb/api/default_api.rb +878 -878
- data/lib/freeclimb/api_client.rb +78 -83
- data/lib/freeclimb/api_error.rb +17 -19
- data/lib/freeclimb/configuration.rb +27 -29
- data/lib/freeclimb/models/account_request.rb +36 -41
- data/lib/freeclimb/models/account_result.rb +88 -92
- data/lib/freeclimb/models/account_status.rb +12 -14
- data/lib/freeclimb/models/account_type.rb +12 -14
- data/lib/freeclimb/models/add_to_conference.rb +81 -85
- data/lib/freeclimb/models/add_to_conference_notification_webhook.rb +99 -103
- data/lib/freeclimb/models/add_to_queue_notification_webhook.rb +78 -82
- data/lib/freeclimb/models/answered_by.rb +12 -14
- data/lib/freeclimb/models/application_list.rb +74 -78
- data/lib/freeclimb/models/application_request.rb +66 -70
- data/lib/freeclimb/models/application_result.rb +100 -104
- data/lib/freeclimb/models/available_number.rb +66 -70
- data/lib/freeclimb/models/available_number_list.rb +74 -78
- data/lib/freeclimb/models/barge_in_reason.rb +12 -14
- data/lib/freeclimb/models/buy_incoming_number_request.rb +41 -45
- data/lib/freeclimb/models/call_control_webhook.rb +56 -61
- data/lib/freeclimb/models/call_direction.rb +12 -14
- data/lib/freeclimb/models/call_ended_reason.rb +12 -14
- data/lib/freeclimb/models/call_list.rb +74 -78
- data/lib/freeclimb/models/call_result.rb +142 -146
- data/lib/freeclimb/models/call_status.rb +12 -14
- data/lib/freeclimb/models/call_status_webhook.rb +84 -88
- data/lib/freeclimb/models/capabilities.rb +55 -59
- data/lib/freeclimb/models/completion_request.rb +32 -36
- data/lib/freeclimb/models/completion_result.rb +36 -40
- data/lib/freeclimb/models/completion_result_status.rb +12 -14
- data/lib/freeclimb/models/conference_list.rb +74 -78
- data/lib/freeclimb/models/conference_participant_list.rb +74 -78
- data/lib/freeclimb/models/conference_participant_result.rb +88 -92
- data/lib/freeclimb/models/conference_recording_status_webhook.rb +99 -103
- data/lib/freeclimb/models/conference_result.rb +106 -110
- data/lib/freeclimb/models/conference_status.rb +12 -14
- data/lib/freeclimb/models/conference_status_webhook.rb +102 -106
- data/lib/freeclimb/models/create_conference.rb +60 -63
- data/lib/freeclimb/models/create_conference_request.rb +55 -54
- data/lib/freeclimb/models/create_conference_webhook.rb +102 -106
- data/lib/freeclimb/models/create_web_rtc_token.rb +42 -46
- data/lib/freeclimb/models/dequeue.rb +28 -33
- data/lib/freeclimb/models/dequeue_webhook.rb +89 -93
- data/lib/freeclimb/models/enqueue.rb +48 -52
- data/lib/freeclimb/models/filter_logs_request.rb +31 -35
- data/lib/freeclimb/models/get_digits.rb +73 -77
- data/lib/freeclimb/models/get_digits_reason.rb +12 -14
- data/lib/freeclimb/models/get_digits_webhook.rb +93 -97
- data/lib/freeclimb/models/get_speech.rb +94 -97
- data/lib/freeclimb/models/get_speech_reason.rb +12 -14
- data/lib/freeclimb/models/get_speech_webhook.rb +118 -122
- data/lib/freeclimb/models/grammar_file_built_in.rb +12 -14
- data/lib/freeclimb/models/grammar_type.rb +12 -14
- data/lib/freeclimb/models/hangup.rb +34 -39
- data/lib/freeclimb/models/if_machine.rb +12 -14
- data/lib/freeclimb/models/inbound_call_webhook.rb +85 -89
- data/lib/freeclimb/models/incoming_number_list.rb +74 -78
- data/lib/freeclimb/models/incoming_number_request.rb +41 -45
- data/lib/freeclimb/models/incoming_number_result.rb +122 -126
- data/lib/freeclimb/models/language.rb +12 -14
- data/lib/freeclimb/models/leave_conference_webhook.rb +79 -83
- data/lib/freeclimb/models/log_level.rb +12 -14
- data/lib/freeclimb/models/log_list.rb +74 -78
- data/lib/freeclimb/models/log_result.rb +67 -71
- data/lib/freeclimb/models/machine_detected_webhook.rb +89 -93
- data/lib/freeclimb/models/machine_type.rb +12 -14
- data/lib/freeclimb/models/make_call_request.rb +77 -81
- data/lib/freeclimb/models/message_delivery_webhook.rb +81 -86
- data/lib/freeclimb/models/message_direction.rb +12 -14
- data/lib/freeclimb/models/message_request.rb +72 -75
- data/lib/freeclimb/models/message_result.rb +135 -139
- data/lib/freeclimb/models/message_status.rb +12 -14
- data/lib/freeclimb/models/message_status_webhook.rb +86 -90
- data/lib/freeclimb/models/messages_list.rb +74 -78
- data/lib/freeclimb/models/mutable_resource_model.rb +46 -51
- data/lib/freeclimb/models/out_dial.rb +80 -84
- data/lib/freeclimb/models/out_dial_api_connect_webhook.rb +84 -88
- data/lib/freeclimb/models/out_dial_connect_webhook.rb +84 -88
- data/lib/freeclimb/models/out_dial_start_webhook.rb +90 -94
- data/lib/freeclimb/models/pagination_model.rb +67 -71
- data/lib/freeclimb/models/park.rb +44 -48
- data/lib/freeclimb/models/pause.rb +33 -37
- data/lib/freeclimb/models/percl_command.rb +36 -40
- data/lib/freeclimb/models/percl_script.rb +32 -36
- data/lib/freeclimb/models/play.rb +44 -48
- data/lib/freeclimb/models/play_beep.rb +12 -14
- data/lib/freeclimb/models/play_early_media.rb +33 -37
- data/lib/freeclimb/models/queue_list.rb +74 -78
- data/lib/freeclimb/models/queue_member.rb +55 -59
- data/lib/freeclimb/models/queue_member_list.rb +74 -78
- data/lib/freeclimb/models/queue_request.rb +37 -42
- data/lib/freeclimb/models/queue_result.rb +88 -92
- data/lib/freeclimb/models/queue_result_status.rb +12 -14
- data/lib/freeclimb/models/queue_wait_webhook.rb +94 -98
- data/lib/freeclimb/models/record_utterance.rb +63 -67
- data/lib/freeclimb/models/record_utterance_term_reason.rb +12 -14
- data/lib/freeclimb/models/record_webhook.rb +119 -123
- data/lib/freeclimb/models/recording_list.rb +74 -78
- data/lib/freeclimb/models/recording_result.rb +76 -80
- data/lib/freeclimb/models/redirect.rb +33 -37
- data/lib/freeclimb/models/redirect_webhook.rb +84 -88
- data/lib/freeclimb/models/reject.rb +34 -39
- data/lib/freeclimb/models/remove_from_conference.rb +28 -33
- data/lib/freeclimb/models/remove_from_queue_notification_webhook.rb +89 -93
- data/lib/freeclimb/models/request_type.rb +12 -14
- data/lib/freeclimb/models/say.rb +49 -53
- data/lib/freeclimb/models/send_digits.rb +43 -47
- data/lib/freeclimb/models/set_dtmf_pass_through.rb +34 -39
- data/lib/freeclimb/models/set_listen.rb +34 -39
- data/lib/freeclimb/models/set_talk.rb +34 -39
- data/lib/freeclimb/models/sms.rb +48 -52
- data/lib/freeclimb/models/sms_ten_dlc_brand.rb +187 -190
- data/lib/freeclimb/models/sms_ten_dlc_brand_alt_business_id_type.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_entity_type.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_identity_status.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_relationship.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brand_stock_exchange.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_brands_list_result.rb +74 -78
- data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +226 -229
- data/lib/freeclimb/models/sms_ten_dlc_campaign_status.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_campaigns_list_result.rb +74 -78
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +186 -189
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +84 -87
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_status.rb +12 -14
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaigns_list_result.rb +74 -78
- data/lib/freeclimb/models/sms_toll_free_campaign.rb +61 -64
- data/lib/freeclimb/models/sms_toll_free_campaign_registration_status.rb +12 -14
- data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +74 -78
- data/lib/freeclimb/models/start_record_call.rb +28 -33
- data/lib/freeclimb/models/terminate_conference.rb +28 -33
- data/lib/freeclimb/models/tfn.rb +31 -35
- data/lib/freeclimb/models/tfn_campaign.rb +76 -79
- data/lib/freeclimb/models/transcribe_reason.rb +12 -14
- data/lib/freeclimb/models/transcribe_term_reason.rb +12 -14
- data/lib/freeclimb/models/transcribe_utterance.rb +61 -65
- data/lib/freeclimb/models/transcribe_utterance_record.rb +43 -47
- data/lib/freeclimb/models/transcribe_webhook.rb +150 -154
- data/lib/freeclimb/models/unpark.rb +28 -33
- data/lib/freeclimb/models/update_call_request.rb +31 -35
- data/lib/freeclimb/models/update_call_request_status.rb +12 -14
- data/lib/freeclimb/models/update_conference_participant_request.rb +41 -46
- data/lib/freeclimb/models/update_conference_request.rb +41 -45
- data/lib/freeclimb/models/update_conference_request_status.rb +12 -14
- data/lib/freeclimb/models/webhook.rb +32 -37
- data/lib/freeclimb/utils/request_verifier.rb +14 -14
- data/lib/freeclimb/utils/signature_information.rb +8 -8
- data/lib/freeclimb/version.rb +10 -12
- data/lib/freeclimb.rb +156 -158
- data/openapi.json +3 -0
- data/package.json +1 -1
- data/spec/api/default_api_spec.rb +492 -676
- data/spec/api_client_spec.rb +100 -102
- data/spec/configuration_spec.rb +16 -18
- data/spec/models/account_request_spec.rb +104 -233
- data/spec/models/account_result_spec.rb +393 -1013
- data/spec/models/account_status_spec.rb +27 -30
- data/spec/models/account_type_spec.rb +24 -27
- data/spec/models/add_to_conference_notification_webhook_spec.rb +464 -1197
- data/spec/models/add_to_conference_spec.rb +354 -850
- data/spec/models/add_to_queue_notification_webhook_spec.rb +341 -864
- data/spec/models/answered_by_spec.rb +24 -27
- data/spec/models/application_list_spec.rb +289 -646
- data/spec/models/application_request_spec.rb +265 -679
- data/spec/models/application_result_spec.rb +444 -1184
- data/spec/models/available_number_list_spec.rb +289 -646
- data/spec/models/available_number_spec.rb +271 -650
- data/spec/models/barge_in_reason_spec.rb +27 -30
- data/spec/models/buy_incoming_number_request_spec.rb +136 -322
- data/spec/models/call_control_webhook_spec.rb +203 -503
- data/spec/models/call_direction_spec.rb +27 -30
- data/spec/models/call_ended_reason_spec.rb +107 -110
- data/spec/models/call_list_spec.rb +289 -646
- data/spec/models/call_result_spec.rb +679 -1778
- data/spec/models/call_status_spec.rb +47 -50
- data/spec/models/call_status_webhook_spec.rb +413 -990
- data/spec/models/capabilities_spec.rb +202 -411
- data/spec/models/completion_request_spec.rb +75 -143
- data/spec/models/completion_result_spec.rb +104 -231
- data/spec/models/completion_result_status_spec.rb +24 -27
- data/spec/models/conference_list_spec.rb +289 -646
- data/spec/models/conference_participant_list_spec.rb +289 -646
- data/spec/models/conference_participant_result_spec.rb +384 -938
- data/spec/models/conference_recording_status_webhook_spec.rb +464 -1197
- data/spec/models/conference_result_spec.rb +489 -1263
- data/spec/models/conference_status_spec.rb +31 -34
- data/spec/models/conference_status_webhook_spec.rb +464 -1197
- data/spec/models/create_conference_request_spec.rb +204 -485
- data/spec/models/create_conference_spec.rb +237 -557
- data/spec/models/create_conference_webhook_spec.rb +464 -1197
- data/spec/models/create_web_rtc_token_spec.rb +136 -307
- data/spec/models/dequeue_spec.rb +14 -17
- data/spec/models/dequeue_webhook_spec.rb +400 -1021
- data/spec/models/enqueue_spec.rb +169 -412
- data/spec/models/filter_logs_request_spec.rb +73 -145
- data/spec/models/get_digits_reason_spec.rb +31 -34
- data/spec/models/get_digits_spec.rb +326 -737
- data/spec/models/get_digits_webhook_spec.rb +435 -1127
- data/spec/models/get_speech_reason_spec.rb +39 -42
- data/spec/models/get_speech_spec.rb +399 -1036
- data/spec/models/get_speech_webhook_spec.rb +608 -1553
- data/spec/models/grammar_file_built_in_spec.rb +75 -78
- data/spec/models/grammar_type_spec.rb +24 -27
- data/spec/models/hangup_spec.rb +73 -145
- data/spec/models/if_machine_spec.rb +24 -27
- data/spec/models/inbound_call_webhook_spec.rb +371 -951
- data/spec/models/incoming_number_list_spec.rb +289 -646
- data/spec/models/incoming_number_request_spec.rb +136 -322
- data/spec/models/incoming_number_result_spec.rb +573 -1489
- data/spec/models/language_spec.rb +120 -123
- data/spec/models/leave_conference_webhook_spec.rb +341 -864
- data/spec/models/log_level_spec.rb +27 -30
- data/spec/models/log_list_spec.rb +289 -646
- data/spec/models/log_result_spec.rb +272 -667
- data/spec/models/machine_detected_webhook_spec.rb +401 -1036
- data/spec/models/machine_type_spec.rb +24 -27
- data/spec/models/make_call_request_spec.rb +353 -905
- data/spec/models/message_delivery_webhook_spec.rb +357 -942
- data/spec/models/message_direction_spec.rb +24 -27
- data/spec/models/message_request_spec.rb +324 -818
- data/spec/models/message_result_spec.rb +647 -1710
- data/spec/models/message_status_spec.rb +60 -63
- data/spec/models/message_status_webhook_spec.rb +405 -1045
- data/spec/models/messages_list_spec.rb +289 -646
- data/spec/models/mutable_resource_model_spec.rb +168 -395
- data/spec/models/out_dial_api_connect_webhook_spec.rb +371 -951
- data/spec/models/out_dial_connect_webhook_spec.rb +371 -951
- data/spec/models/out_dial_spec.rb +354 -903
- data/spec/models/out_dial_start_webhook_spec.rb +401 -1038
- data/spec/models/pagination_model_spec.rb +259 -577
- data/spec/models/park_spec.rb +136 -322
- data/spec/models/pause_spec.rb +72 -128
- data/spec/models/percl_command_spec.rb +76 -145
- data/spec/models/percl_script_spec.rb +73 -127
- data/spec/models/play_beep_spec.rb +31 -34
- data/spec/models/play_early_media_spec.rb +73 -145
- data/spec/models/play_spec.rb +135 -287
- data/spec/models/queue_list_spec.rb +289 -646
- data/spec/models/queue_member_list_spec.rb +289 -646
- data/spec/models/queue_member_spec.rb +199 -467
- data/spec/models/queue_request_spec.rb +103 -216
- data/spec/models/queue_result_spec.rb +388 -965
- data/spec/models/queue_result_status_spec.rb +31 -34
- data/spec/models/queue_wait_webhook_spec.rb +429 -1091
- data/spec/models/record_utterance_spec.rb +263 -591
- data/spec/models/record_utterance_term_reason_spec.rb +31 -34
- data/spec/models/record_webhook_spec.rb +605 -1548
- data/spec/models/recording_list_spec.rb +289 -646
- data/spec/models/recording_result_spec.rb +323 -819
- data/spec/models/redirect_spec.rb +73 -145
- data/spec/models/redirect_webhook_spec.rb +371 -951
- data/spec/models/reject_spec.rb +73 -145
- data/spec/models/remove_from_conference_spec.rb +14 -17
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +404 -1023
- data/spec/models/request_type_spec.rb +107 -110
- data/spec/models/say_spec.rb +168 -377
- data/spec/models/send_digits_spec.rb +135 -287
- data/spec/models/set_dtmf_pass_through_spec.rb +74 -127
- data/spec/models/set_listen_spec.rb +74 -127
- data/spec/models/set_talk_spec.rb +74 -127
- data/spec/models/sms_spec.rb +169 -412
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +31 -34
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +35 -38
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +31 -34
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +35 -38
- data/spec/models/sms_ten_dlc_brand_spec.rb +1082 -2746
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +124 -127
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +289 -646
- data/spec/models/sms_ten_dlc_campaign_spec.rb +1139 -2881
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +24 -27
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +289 -646
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +406 -1004
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +961 -2393
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +24 -27
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +289 -646
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +35 -38
- data/spec/models/sms_toll_free_campaign_spec.rb +270 -666
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +289 -646
- data/spec/models/start_record_call_spec.rb +14 -17
- data/spec/models/terminate_conference_spec.rb +14 -17
- data/spec/models/tfn_campaign_spec.rb +330 -858
- data/spec/models/tfn_spec.rb +73 -145
- data/spec/models/transcribe_reason_spec.rb +35 -38
- data/spec/models/transcribe_term_reason_spec.rb +24 -27
- data/spec/models/transcribe_utterance_record_spec.rb +134 -270
- data/spec/models/transcribe_utterance_spec.rb +236 -523
- data/spec/models/transcribe_webhook_spec.rb +749 -1918
- data/spec/models/unpark_spec.rb +14 -17
- data/spec/models/update_call_request_spec.rb +74 -143
- data/spec/models/update_call_request_status_spec.rb +24 -27
- data/spec/models/update_conference_participant_request_spec.rb +137 -268
- data/spec/models/update_conference_request_spec.rb +140 -321
- data/spec/models/update_conference_request_status_spec.rb +24 -27
- data/spec/models/webhook_spec.rb +68 -137
- data/spec/quickstart_spec.rb +5 -5
- data/spec/spec_helper.rb +92 -100
- data/spec/utils/request_verifier_spec.rb +70 -71
- data/spec/utils/signature_information_spec.rb +23 -23
- data/yarn.lock +9 -0
- metadata +3 -151
@@ -1,18 +1,16 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
# #FreeClimb API
|
2
|
+
#
|
3
|
+
# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 1.0.0
|
6
|
+
# Contact: support@freeclimb.com
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 7.9.0
|
9
|
+
#
|
3
10
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Contact: support@freeclimb.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.9.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
11
|
+
require "spec_helper"
|
12
|
+
require "json"
|
13
|
+
require "date"
|
16
14
|
include Freeclimb
|
17
15
|
|
18
16
|
# Unit tests for Freeclimb::AvailableNumber
|
@@ -21,524 +19,276 @@ include Freeclimb
|
|
21
19
|
describe Freeclimb::AvailableNumber do
|
22
20
|
let(:instance) { Freeclimb::AvailableNumber.new }
|
23
21
|
|
24
|
-
describe
|
25
|
-
it
|
22
|
+
describe "test an instance of AvailableNumber" do
|
23
|
+
it "should create an instance of AvailableNumber" do
|
26
24
|
expect(instance).to be_instance_of(Freeclimb::AvailableNumber)
|
27
25
|
end
|
28
26
|
end
|
29
|
-
|
27
|
+
|
30
28
|
describe 'test attribute "capabilities"' do
|
31
|
-
it
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
it "should work" do
|
35
30
|
instance.capabilities = Capabilities.new
|
36
31
|
expect(instance.capabilities).to be_instance_of(Capabilities)
|
37
|
-
|
38
32
|
end
|
39
33
|
end
|
40
34
|
|
41
35
|
describe 'test attribute "campaign_id"' do
|
42
|
-
it
|
43
|
-
|
36
|
+
it "should work" do
|
44
37
|
instance.campaign_id = "TEST_STRING"
|
45
|
-
expect(instance.campaign_id).to eq("TEST_STRING")
|
46
|
-
|
47
|
-
|
48
|
-
|
38
|
+
expect(instance.campaign_id).to eq("TEST_STRING")
|
49
39
|
end
|
50
40
|
end
|
51
41
|
|
52
42
|
describe 'test attribute "phone_number"' do
|
53
|
-
it
|
54
|
-
|
43
|
+
it "should work" do
|
55
44
|
instance.phone_number = "TEST_STRING"
|
56
|
-
expect(instance.phone_number).to eq("TEST_STRING")
|
57
|
-
|
58
|
-
|
59
|
-
|
45
|
+
expect(instance.phone_number).to eq("TEST_STRING")
|
60
46
|
end
|
61
47
|
end
|
62
48
|
|
63
49
|
describe 'test attribute "voice_enabled"' do
|
64
|
-
it
|
50
|
+
it "should work" do
|
65
51
|
instance.voice_enabled = false
|
66
|
-
expect(instance.voice_enabled).to eq(false)
|
67
|
-
|
68
|
-
|
69
|
-
|
52
|
+
expect(instance.voice_enabled).to eq(false)
|
70
53
|
end
|
71
54
|
end
|
72
55
|
|
73
56
|
describe 'test attribute "sms_enabled"' do
|
74
|
-
it
|
57
|
+
it "should work" do
|
75
58
|
instance.sms_enabled = false
|
76
|
-
expect(instance.sms_enabled).to eq(false)
|
77
|
-
|
78
|
-
|
79
|
-
|
59
|
+
expect(instance.sms_enabled).to eq(false)
|
80
60
|
end
|
81
61
|
end
|
82
62
|
|
83
63
|
describe 'test attribute "region"' do
|
84
|
-
it
|
85
|
-
|
64
|
+
it "should work" do
|
86
65
|
instance.region = "TEST_STRING"
|
87
|
-
expect(instance.region).to eq("TEST_STRING")
|
88
|
-
|
89
|
-
|
90
|
-
|
66
|
+
expect(instance.region).to eq("TEST_STRING")
|
91
67
|
end
|
92
68
|
end
|
93
69
|
|
94
70
|
describe 'test attribute "country"' do
|
95
|
-
it
|
96
|
-
|
71
|
+
it "should work" do
|
97
72
|
instance.country = "TEST_STRING"
|
98
|
-
expect(instance.country).to eq("TEST_STRING")
|
99
|
-
|
100
|
-
|
101
|
-
|
73
|
+
expect(instance.country).to eq("TEST_STRING")
|
102
74
|
end
|
103
75
|
end
|
104
76
|
|
105
77
|
describe 'test method "initialize"' do
|
106
|
-
it
|
107
|
-
expect {
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
capabilities: Capabilities.new(),
|
112
|
-
|
113
|
-
|
114
|
-
campaign_id: "TS",
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
phone_number: "TS",
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
voice_enabled: true,
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
sms_enabled: true,
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
region: "TS",
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
country: "TS",
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
)}.not_to raise_error()
|
142
|
-
end
|
143
|
-
it 'fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumber' do
|
144
|
-
expect { instance = Freeclimb::AvailableNumber.new(
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
capabilities: Capabilities.new,
|
149
|
-
|
150
|
-
|
151
|
-
campaign_id: "TS",
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
phone_number: "TS",
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
voice_enabled: true,
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
sms_enabled: true,
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
region: "TS",
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
country: "TS",
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
invalid_attribute: true
|
179
|
-
)}.to raise_error(ArgumentError)
|
180
|
-
end
|
181
|
-
it 'fails to initialize with invalid attribute' do
|
182
|
-
expect { instance = Freeclimb::AvailableNumber.new(
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
capabilities: Capabilities.new,
|
187
|
-
|
188
|
-
|
189
|
-
campaign_id: "TS",
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
phone_number: "TS",
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
voice_enabled: true,
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
sms_enabled: true,
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
region: "TS",
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
country: "TS",
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
invalid_attribute: true
|
217
|
-
)}.to raise_error(ArgumentError)
|
218
|
-
end
|
219
|
-
end
|
220
|
-
|
221
|
-
describe 'test method "valid"' do
|
222
|
-
it 'checks if properties are valid' do
|
223
|
-
instance = Freeclimb::AvailableNumber.new(
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
capabilities: Capabilities.new(),
|
228
|
-
|
229
|
-
|
78
|
+
it "properly initializes with values" do
|
79
|
+
expect {
|
80
|
+
Freeclimb::AvailableNumber.new(
|
81
|
+
capabilities: Capabilities.new,
|
82
|
+
|
230
83
|
campaign_id: "TS",
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
84
|
+
|
235
85
|
phone_number: "TS",
|
236
|
-
|
237
|
-
|
238
|
-
|
86
|
+
|
239
87
|
voice_enabled: true,
|
240
|
-
|
241
|
-
|
242
|
-
|
88
|
+
|
243
89
|
sms_enabled: true,
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
region: "TS",
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
country: "TS",
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
)
|
258
|
-
expect(instance.valid?).to eq(true)
|
259
|
-
end
|
260
90
|
|
91
|
+
region: "TS",
|
261
92
|
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
93
|
+
country: "TS"
|
94
|
+
)
|
95
|
+
}.not_to raise_error
|
96
|
+
end
|
97
|
+
it "fails to initialize with input argument that is not a hash in Freeclimb::AvailableNumber" do
|
98
|
+
expect {
|
99
|
+
Freeclimb::AvailableNumber.new(
|
100
|
+
capabilities: Capabilities.new,
|
270
101
|
|
271
|
-
describe 'test method "eql?"' do
|
272
|
-
it 'checks if objects are equal' do
|
273
|
-
|
274
|
-
obj_Capabilities = Capabilities.new()
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
instance_1 = Freeclimb::AvailableNumber.new(
|
283
|
-
|
284
|
-
|
285
|
-
capabilities: obj_Capabilities,
|
286
|
-
|
287
|
-
|
288
|
-
|
289
102
|
campaign_id: "TS",
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
103
|
+
|
294
104
|
phone_number: "TS",
|
295
|
-
|
296
|
-
|
297
|
-
|
105
|
+
|
298
106
|
voice_enabled: true,
|
299
|
-
|
300
|
-
|
301
|
-
|
107
|
+
|
302
108
|
sms_enabled: true,
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
109
|
+
|
307
110
|
region: "TS",
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
111
|
+
|
312
112
|
country: "TS",
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
)
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
113
|
+
|
114
|
+
invalid_attribute: true
|
115
|
+
)
|
116
|
+
}.to raise_error(ArgumentError)
|
117
|
+
end
|
118
|
+
it "fails to initialize with invalid attribute" do
|
119
|
+
expect {
|
120
|
+
Freeclimb::AvailableNumber.new(
|
121
|
+
capabilities: Capabilities.new,
|
122
|
+
|
324
123
|
campaign_id: "TS",
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
124
|
+
|
329
125
|
phone_number: "TS",
|
330
|
-
|
331
|
-
|
332
|
-
|
126
|
+
|
333
127
|
voice_enabled: true,
|
334
|
-
|
335
|
-
|
336
|
-
|
128
|
+
|
337
129
|
sms_enabled: true,
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
130
|
+
|
342
131
|
region: "TS",
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
132
|
+
|
347
133
|
country: "TS",
|
348
|
-
|
349
|
-
|
350
|
-
|
134
|
+
|
135
|
+
invalid_attribute: true
|
136
|
+
)
|
137
|
+
}.to raise_error(ArgumentError)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe 'test method "valid"' do
|
142
|
+
it "checks if properties are valid" do
|
143
|
+
instance = Freeclimb::AvailableNumber.new(
|
144
|
+
capabilities: Capabilities.new,
|
145
|
+
|
146
|
+
campaign_id: "TS",
|
147
|
+
|
148
|
+
phone_number: "TS",
|
149
|
+
|
150
|
+
voice_enabled: true,
|
151
|
+
|
152
|
+
sms_enabled: true,
|
153
|
+
|
154
|
+
region: "TS",
|
155
|
+
|
156
|
+
country: "TS"
|
157
|
+
)
|
158
|
+
expect(instance.valid?).to eq(true)
|
159
|
+
end
|
160
|
+
|
161
|
+
skip "checks if properties are invalid" do
|
162
|
+
instance = Freeclimb::AvailableNumber.new
|
163
|
+
|
164
|
+
expect(instance.valid?).to eq(false)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
describe 'test method "eql?"' do
|
169
|
+
it "checks if objects are equal" do
|
170
|
+
obj_Capabilities = Capabilities.new
|
171
|
+
|
172
|
+
instance_1 = Freeclimb::AvailableNumber.new(
|
173
|
+
capabilities: obj_Capabilities,
|
174
|
+
|
175
|
+
campaign_id: "TS",
|
176
|
+
|
177
|
+
phone_number: "TS",
|
178
|
+
|
179
|
+
voice_enabled: true,
|
180
|
+
|
181
|
+
sms_enabled: true,
|
182
|
+
|
183
|
+
region: "TS",
|
184
|
+
|
185
|
+
country: "TS"
|
186
|
+
)
|
187
|
+
instance_2 = Freeclimb::AvailableNumber.new(
|
188
|
+
capabilities: obj_Capabilities,
|
189
|
+
|
190
|
+
campaign_id: "TS",
|
191
|
+
|
192
|
+
phone_number: "TS",
|
193
|
+
|
194
|
+
voice_enabled: true,
|
195
|
+
|
196
|
+
sms_enabled: true,
|
197
|
+
|
198
|
+
region: "TS",
|
199
|
+
|
200
|
+
country: "TS"
|
351
201
|
)
|
352
202
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
353
203
|
end
|
354
|
-
|
355
|
-
it
|
204
|
+
|
205
|
+
it "checks if objects are not equal" do
|
356
206
|
instance_1 = Freeclimb::AvailableNumber.new(
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
voice_enabled: true,
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
sms_enabled: true,
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
region: "TS",
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
country: "TS",
|
387
|
-
|
388
|
-
|
389
|
-
|
207
|
+
capabilities: Capabilities.new,
|
208
|
+
|
209
|
+
campaign_id: "TS",
|
210
|
+
|
211
|
+
phone_number: "TS",
|
212
|
+
|
213
|
+
voice_enabled: true,
|
214
|
+
|
215
|
+
sms_enabled: true,
|
216
|
+
|
217
|
+
region: "TS",
|
218
|
+
|
219
|
+
country: "TS"
|
390
220
|
)
|
391
221
|
instance_2 = Freeclimb::AvailableNumber.new(
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
voice_enabled: false,
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
sms_enabled: false,
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
region: "ST",
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
country: "ST",
|
422
|
-
|
423
|
-
|
424
|
-
|
222
|
+
capabilities: Capabilities.new,
|
223
|
+
|
224
|
+
campaign_id: "ST",
|
225
|
+
|
226
|
+
phone_number: "ST",
|
227
|
+
|
228
|
+
voice_enabled: false,
|
229
|
+
|
230
|
+
sms_enabled: false,
|
231
|
+
|
232
|
+
region: "ST",
|
233
|
+
|
234
|
+
country: "ST"
|
425
235
|
)
|
426
236
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
427
237
|
end
|
428
238
|
end
|
429
|
-
|
239
|
+
|
430
240
|
describe 'test method "hash"' do
|
431
|
-
it
|
241
|
+
it "calculates hash code" do
|
432
242
|
instance = Freeclimb::AvailableNumber.new(
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
voice_enabled: true,
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
sms_enabled: true,
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
region: "TS",
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
country: "TS",
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
)
|
243
|
+
capabilities: Capabilities.new,
|
244
|
+
|
245
|
+
campaign_id: "TS",
|
246
|
+
|
247
|
+
phone_number: "TS",
|
248
|
+
|
249
|
+
voice_enabled: true,
|
250
|
+
|
251
|
+
sms_enabled: true,
|
252
|
+
|
253
|
+
region: "TS",
|
254
|
+
|
255
|
+
country: "TS"
|
256
|
+
)
|
467
257
|
expect(instance.hash).to be_a_kind_of(Integer)
|
468
258
|
end
|
469
259
|
end
|
470
260
|
|
471
261
|
describe 'test method "build_from_hash"' do
|
472
|
-
it
|
262
|
+
it "builds equivalent model from hash code" do
|
473
263
|
instance_1 = Freeclimb::AvailableNumber.new(
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
capabilities: Capabilities.new(),
|
478
|
-
|
479
|
-
|
264
|
+
capabilities: Capabilities.new,
|
265
|
+
|
480
266
|
campaign_id: "TS",
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
267
|
+
|
485
268
|
phone_number: "TS",
|
486
|
-
|
487
|
-
|
488
|
-
|
269
|
+
|
489
270
|
voice_enabled: true,
|
490
|
-
|
491
|
-
|
492
|
-
|
271
|
+
|
493
272
|
sms_enabled: true,
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
273
|
+
|
498
274
|
region: "TS",
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
country: "TS",
|
504
|
-
|
505
|
-
|
506
|
-
|
275
|
+
|
276
|
+
country: "TS"
|
507
277
|
)
|
508
278
|
instance_2 = Freeclimb::AvailableNumber.new(
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
capabilities: Capabilities.new(),
|
513
|
-
|
514
|
-
|
279
|
+
capabilities: Capabilities.new,
|
280
|
+
|
515
281
|
campaign_id: "TS",
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
282
|
+
|
520
283
|
phone_number: "TS",
|
521
|
-
|
522
|
-
|
523
|
-
|
284
|
+
|
524
285
|
voice_enabled: true,
|
525
|
-
|
526
|
-
|
527
|
-
|
286
|
+
|
528
287
|
sms_enabled: true,
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
288
|
+
|
533
289
|
region: "TS",
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
country: "TS",
|
539
|
-
|
540
|
-
|
541
|
-
|
290
|
+
|
291
|
+
country: "TS"
|
542
292
|
)
|
543
293
|
|
544
294
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -547,237 +297,121 @@ describe Freeclimb::AvailableNumber do
|
|
547
297
|
|
548
298
|
describe 'test method "_deserialize"' do
|
549
299
|
instance = Freeclimb::AvailableNumber.new(
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
voice_enabled: true,
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
sms_enabled: true,
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
region: "TS",
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
country: "TS",
|
580
|
-
|
581
|
-
|
582
|
-
|
300
|
+
capabilities: Capabilities.new,
|
301
|
+
|
302
|
+
campaign_id: "TS",
|
303
|
+
|
304
|
+
phone_number: "TS",
|
305
|
+
|
306
|
+
voice_enabled: true,
|
307
|
+
|
308
|
+
sms_enabled: true,
|
309
|
+
|
310
|
+
region: "TS",
|
311
|
+
|
312
|
+
country: "TS"
|
583
313
|
)
|
584
|
-
|
585
|
-
|
586
|
-
it 'deserializes the data of capabilities' do
|
314
|
+
|
315
|
+
it "deserializes the data of capabilities" do
|
587
316
|
expect(instance._deserialize("Object", instance.capabilities)).to be_a_kind_of(Capabilities)
|
588
317
|
end
|
589
|
-
|
590
|
-
it
|
318
|
+
|
319
|
+
it "deserializes the data of campaign_id" do
|
591
320
|
expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String)
|
592
321
|
end
|
593
|
-
|
594
|
-
|
595
|
-
it 'deserializes the data of phone_number' do
|
322
|
+
|
323
|
+
it "deserializes the data of phone_number" do
|
596
324
|
expect(instance._deserialize("String", instance.phone_number)).to be_a_kind_of(String)
|
597
325
|
end
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
it 'deserializes the data of voice_enabled' do
|
326
|
+
|
327
|
+
it "deserializes the data of voice_enabled" do
|
603
328
|
expect(instance._deserialize("Boolean", instance.voice_enabled)).to be_a_kind_of(TrueClass)
|
604
329
|
end
|
605
|
-
|
606
|
-
|
607
|
-
it 'deserializes the data of sms_enabled' do
|
330
|
+
|
331
|
+
it "deserializes the data of sms_enabled" do
|
608
332
|
expect(instance._deserialize("Boolean", instance.sms_enabled)).to be_a_kind_of(TrueClass)
|
609
333
|
end
|
610
|
-
it
|
334
|
+
it "deserializes the data of region" do
|
611
335
|
expect(instance._deserialize("String", instance.region)).to be_a_kind_of(String)
|
612
336
|
end
|
613
|
-
|
614
|
-
|
615
|
-
it 'deserializes the data of country' do
|
337
|
+
|
338
|
+
it "deserializes the data of country" do
|
616
339
|
expect(instance._deserialize("String", instance.country)).to be_a_kind_of(String)
|
617
340
|
end
|
618
|
-
|
619
|
-
|
620
341
|
end
|
621
342
|
|
622
343
|
describe 'test method "to_s"' do
|
623
|
-
it
|
344
|
+
it "returns the string representation of the object" do
|
624
345
|
instance = Freeclimb::AvailableNumber.new(
|
625
|
-
|
626
|
-
|
627
|
-
|
628
346
|
capabilities: Capabilities.new,
|
629
|
-
|
630
|
-
|
347
|
+
|
631
348
|
campaign_id: "TS",
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
349
|
+
|
636
350
|
phone_number: "TS",
|
637
|
-
|
638
|
-
|
639
|
-
|
351
|
+
|
640
352
|
voice_enabled: true,
|
641
|
-
|
642
|
-
|
643
|
-
|
353
|
+
|
644
354
|
sms_enabled: true,
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
355
|
+
|
649
356
|
region: "TS",
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
country: "TS",
|
655
|
-
|
656
|
-
|
657
|
-
|
357
|
+
|
358
|
+
country: "TS"
|
658
359
|
)
|
659
360
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
660
361
|
end
|
661
362
|
end
|
662
363
|
|
663
364
|
describe 'test method "to_hash"' do
|
664
|
-
it
|
365
|
+
it "returns the object in the form of hash" do
|
665
366
|
instance = Freeclimb::AvailableNumber.new(
|
666
|
-
|
667
|
-
|
668
|
-
|
669
367
|
capabilities: Capabilities.new,
|
670
|
-
|
671
|
-
|
368
|
+
|
672
369
|
campaign_id: "TS",
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
370
|
+
|
677
371
|
phone_number: "TS",
|
678
|
-
|
679
|
-
|
680
|
-
|
372
|
+
|
681
373
|
voice_enabled: true,
|
682
|
-
|
683
|
-
|
684
|
-
|
374
|
+
|
685
375
|
sms_enabled: true,
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
376
|
+
|
690
377
|
region: "TS",
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
country: "TS",
|
696
|
-
|
697
|
-
|
698
|
-
|
378
|
+
|
379
|
+
country: "TS"
|
699
380
|
)
|
700
381
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
701
382
|
end
|
702
|
-
it
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
383
|
+
it "creates equal hash for two equal objects" do
|
384
|
+
obj = Capabilities.new
|
385
|
+
|
712
386
|
instance_1 = Freeclimb::AvailableNumber.new(
|
713
|
-
|
714
|
-
|
715
|
-
|
716
387
|
capabilities: obj,
|
717
|
-
|
718
|
-
|
388
|
+
|
719
389
|
campaign_id: "TS",
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
390
|
+
|
724
391
|
phone_number: "TS",
|
725
|
-
|
726
|
-
|
727
|
-
|
392
|
+
|
728
393
|
voice_enabled: true,
|
729
|
-
|
730
|
-
|
731
|
-
|
394
|
+
|
732
395
|
sms_enabled: true,
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
396
|
+
|
737
397
|
region: "TS",
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
country: "TS",
|
743
|
-
|
744
|
-
|
745
|
-
|
398
|
+
|
399
|
+
country: "TS"
|
746
400
|
)
|
747
401
|
instance_2 = Freeclimb::AvailableNumber.new(
|
748
|
-
|
749
|
-
|
750
|
-
|
751
402
|
capabilities: obj,
|
752
|
-
|
753
|
-
|
403
|
+
|
754
404
|
campaign_id: "TS",
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
405
|
+
|
759
406
|
phone_number: "TS",
|
760
|
-
|
761
|
-
|
762
|
-
|
407
|
+
|
763
408
|
voice_enabled: true,
|
764
|
-
|
765
|
-
|
766
|
-
|
409
|
+
|
767
410
|
sms_enabled: true,
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
411
|
+
|
772
412
|
region: "TS",
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
country: "TS",
|
778
|
-
|
779
|
-
|
780
|
-
|
413
|
+
|
414
|
+
country: "TS"
|
781
415
|
)
|
782
416
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
783
417
|
end
|
@@ -785,51 +419,38 @@ describe Freeclimb::AvailableNumber do
|
|
785
419
|
|
786
420
|
describe 'test method "_to_hash"' do
|
787
421
|
instance = Freeclimb::AvailableNumber.new(
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
sms_enabled: true,
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
region: "TS",
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
country: "TS",
|
810
|
-
|
811
|
-
)
|
812
|
-
it 'returns capabilities in the form of hash' do
|
422
|
+
campaign_id: "TS",
|
423
|
+
|
424
|
+
phone_number: "TS",
|
425
|
+
|
426
|
+
voice_enabled: true,
|
427
|
+
|
428
|
+
sms_enabled: true,
|
429
|
+
|
430
|
+
region: "TS",
|
431
|
+
|
432
|
+
country: "TS"
|
433
|
+
)
|
434
|
+
it "returns capabilities in the form of hash" do
|
813
435
|
expect(instance._to_hash(instance.capabilities)).to eq(instance.capabilities)
|
814
436
|
end
|
815
|
-
it
|
437
|
+
it "returns campaign_id in the form of hash" do
|
816
438
|
expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id)
|
817
439
|
end
|
818
|
-
it
|
440
|
+
it "returns phone_number in the form of hash" do
|
819
441
|
expect(instance._to_hash(instance.phone_number)).to eq(instance.phone_number)
|
820
442
|
end
|
821
|
-
it
|
443
|
+
it "returns voice_enabled in the form of hash" do
|
822
444
|
expect(instance._to_hash(instance.voice_enabled)).to eq(instance.voice_enabled)
|
823
445
|
end
|
824
|
-
it
|
446
|
+
it "returns sms_enabled in the form of hash" do
|
825
447
|
expect(instance._to_hash(instance.sms_enabled)).to eq(instance.sms_enabled)
|
826
448
|
end
|
827
|
-
it
|
449
|
+
it "returns region in the form of hash" do
|
828
450
|
expect(instance._to_hash(instance.region)).to eq(instance.region)
|
829
451
|
end
|
830
|
-
it
|
452
|
+
it "returns country in the form of hash" do
|
831
453
|
expect(instance._to_hash(instance.country)).to eq(instance.country)
|
832
454
|
end
|
833
455
|
end
|
834
|
-
|
835
456
|
end
|